- if(r < 0) fatal(errno, "error calling waitpid");
- if(w) error(0, "subprocess exited with wait status %#x", (unsigned)w);
+ if(r < 0) disorder_fatal(errno, "error calling waitpid");
+ if(w)
+ disorder_error(0, "subprocess exited with wait status %#x", (unsigned)w);
_exit(0);
}
/* First child process. This will be the session leader, and will
* be transient. */
D(("first child pid=%lu", (unsigned long)getpid()));
_exit(0);
}
/* First child process. This will be the session leader, and will
* be transient. */
D(("first child pid=%lu", (unsigned long)getpid()));
/* we'll log to syslog */
openlog(tag, LOG_PID, fac);
log_default = &log_syslog;
/* we'll log to syslog */
openlog(tag, LOG_PID, fac);
log_default = &log_syslog;
if(!(fp = fopen(pidfile, "w"))
|| fprintf(fp, "%lu\n", (unsigned long)getpid()) < 0
|| fclose(fp) < 0)
if(!(fp = fopen(pidfile, "w"))
|| fprintf(fp, "%lu\n", (unsigned long)getpid()) < 0
|| fclose(fp) < 0)