← Commit list

6caa07376

Russ Dill
Russ Dill
2003-12-26
FAILED Duration: 66s

Subject

it should work even if you don't assign a pidfile

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/common.c+7 -6
@@ -59,15 +59,14 @@ void background(const char *pidfile)
#else /* __uClinux__ */
int pid_fd;
- if (!pidfile) return;
-
- pid_fd = pidfile_acquire(pidfile); /* hold lock during fork. */
+ /* hold lock during fork. */
+ if (pidfile) pid_fd = pidfile_acquire(pidfile);
if (daemon(0, 0) == -1) {
perror("fork");
exit(1);
}
daemonized++;
- pidfile_write_release(pid_fd);
+ if (pidfile) pidfile_write_release(pid_fd);
#endif /* __uClinux__ */
}
@@ -97,8 +96,10 @@ void start_log_and_pid(const char *client_server, const char *pidfile)
sanitize_fds();
/* do some other misc startup stuff while we are here to save bytes */
- pid_fd = pidfile_acquire(pidfile);
- pidfile_write_release(pid_fd);
+ if (pidfile) {
+ pid_fd = pidfile_acquire(pidfile);
+ pidfile_write_release(pid_fd);
+ }
/* equivelent of doing a fflush after every \n */
setlinebuf(stdout);