mirror of
https://github.com/owntone/owntone-server.git
synced 2024-12-27 15:45:56 -05:00
close STDERR on fork
This commit is contained in:
parent
97fea2ff84
commit
58236d00c1
@ -108,7 +108,9 @@ int rend_init(char *user) {
|
||||
if((fd = open("/dev/null", O_RDWR, 0)) != -1) {
|
||||
dup2(fd, STDIN_FILENO);
|
||||
dup2(fd, STDOUT_FILENO);
|
||||
// dup2(fd, STDERR_FILENO);
|
||||
if(!config.foreground)
|
||||
dup2(fd, STDERR_FILENO);
|
||||
|
||||
if (fd > 2)
|
||||
close(fd);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user