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:
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);
|
host_clean(dst_h);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
close(STDIN_FILENO);
|
if (dm) {
|
||||||
close(STDOUT_FILENO);
|
close(STDIN_FILENO);
|
||||||
close(STDERR_FILENO);
|
close(STDOUT_FILENO);
|
||||||
|
close(STDERR_FILENO);
|
||||||
|
}
|
||||||
|
|
||||||
main_loop(listen, listen_h, bind_h, dst_h);
|
main_loop(listen, listen_h, bind_h, dst_h);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user