New commit. Much changes. Very impress. Wow.

This commit is contained in:
Wilco Baan Hofman 2014-01-12 20:52:43 +01:00 committed by root
parent 6eb419202c
commit eb041ce5b4
5 changed files with 65 additions and 9 deletions

View file

@ -126,8 +126,10 @@ int main(int argc, char **argv) {
if ((pid = fork())) {
/* Write PID file */
pidfile = fopen(conf->pid_file, "w");
if (pidfile < 0)
if (pidfile == NULL) {
DEBUG(0, "Cannot open pid file");
return ST_LOG_ERR;
}
n = fprintf(pidfile, "%d\n", pid);
fclose(pidfile);