mirror of
https://codeberg.org/scip/udpxd.git
synced 2025-12-16 19:40:58 +01:00
Close stdin, stdout and stderr only if demonizing. Fixes verbose mode.
This commit is contained in:
8
net.c
8
net.c
@@ -238,9 +238,11 @@ int start_listener (char *inip, char *inpt, char *srcip, char *dstip,
|
||||
return 1;
|
||||
}
|
||||
|
||||
close(STDIN_FILENO);
|
||||
close(STDOUT_FILENO);
|
||||
close(STDERR_FILENO);
|
||||
if (dm) {
|
||||
close(STDIN_FILENO);
|
||||
close(STDOUT_FILENO);
|
||||
close(STDERR_FILENO);
|
||||
}
|
||||
|
||||
main_loop(listen, listen_h, bind_h, dst_h);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user