diff options
author | Hans de Goede <hdegoede@redhat.com> | 2010-10-29 11:32:25 +0200 |
---|---|---|
committer | Hans de Goede <hdegoede@redhat.com> | 2010-10-29 11:32:25 +0200 |
commit | 2fa589f0dd21cae11449ad946c605b3f65c127d2 (patch) | |
tree | 53a5bb9ba056e86f13b7acb51bcaeeddc5baac4b | |
parent | 12e838d4303210f6bc1312b12390af8c2eb31779 (diff) |
vdagentd: When daemonizing use exit() from the mother
Rather then breaking from the main_loop, this avoids logging a bogus:
vdagentd quiting, returning status 0
Message to the log file.
-rw-r--r-- | vdagentd.c | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -519,7 +519,10 @@ void daemonize(void) fprintf(logfile, "fork: %s\n", strerror(errno)); retval = 1; default: - quit = 1; + udscs_destroy_server(server); + if (logfile != stderr) + fclose(logfile); + exit(0); } } |