mirror of
https://codeberg.org/scip/udpxd.git
synced 2025-12-16 03:20:58 +01:00
Merge pull request #3 from ValdikSS/verbose
Close stdin, stdout and stderr only if demonizing. Fixes verbose mode.
This commit is contained in:
10
net.c
10
net.c
@@ -237,10 +237,12 @@ int start_listener (char *inip, char *inpt, char *srcip, char *dstip,
|
||||
host_clean(dst_h);
|
||||
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