fix compilation under musl libc

closes #943

Change-Id: Ie192325e83ee129380ce1af2d235c0942a9b5afa
changes/80/38280/1
Richard Fuchs 6 years ago
parent 1c00016974
commit 24cb202678

@ -33,9 +33,15 @@ void daemonize(void) {
if (fork())
_exit(0);
write_log = (write_log_t *) syslog;
#ifdef __GLIBC__
stdin = freopen("/dev/null", "r", stdin);
stdout = freopen("/dev/null", "w", stdout);
stderr = freopen("/dev/null", "w", stderr);
#else
freopen("/dev/null", "r", stdin);
freopen("/dev/null", "w", stdout);
freopen("/dev/null", "w", stderr);
#endif
setpgrp();
}

Loading…
Cancel
Save