← Commit list

1ce190b7c

Denis Vlasenko
Denis Vlasenko
2007-03-14
FAILED Duration: 11s

Subject

udhcp: use fdprintf for pidfile creation (smaller code)

Binary

No binary (build failed)

Architecture & Compiler Flags

Architecture: x86_64-linux-gnu Compiler: gcc (Ubuntu 11.4.0-1ubuntu1~22.04.3) 11.4.0

—

Build Log

(log yok)

Commit Diff GitHub →

networking/udhcp/pidfile.c+1 -7
@@ -52,15 +52,9 @@ int pidfile_acquire(const char *pidfile)
void pidfile_write_release(int pid_fd)
{
- FILE *out;
-
if (pid_fd < 0) return;
- out = fdopen(pid_fd, "w");
- if (out) {
- fprintf(out, "%d\n", getpid());
- fclose(out);
- }
+ fdprintf(pid_fd, "%d\n", getpid());
lockf(pid_fd, F_UNLCK, 0);
close(pid_fd);
}