aboutsummaryrefslogtreecommitdiffstats
path: root/sharkd_daemon.c
diff options
context:
space:
mode:
authorJakub Zawadzki <darkjames-ws@darkjames.pl>2017-09-24 17:00:29 +0200
committerJakub Zawadzki <darkjames-ws@darkjames.pl>2017-09-24 20:35:44 +0000
commit15b67769922c32bddc66c90ca4480817e757b193 (patch)
tree30945fe3769968b343bcf17f69682064a10f94e7 /sharkd_daemon.c
parent7517b73e74bd3a425406e08fa0ce667a655ee049 (diff)
sharkd: close server file descriptor in child.
Change-Id: I65713f6d49fccb2045a99636d0d2f1aa5be44b83 Reviewed-on: https://code.wireshark.org/review/23677 Petri-Dish: Jakub Zawadzki <darkjames-ws@darkjames.pl> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Jakub Zawadzki <darkjames-ws@darkjames.pl>
Diffstat (limited to 'sharkd_daemon.c')
-rw-r--r--sharkd_daemon.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/sharkd_daemon.c b/sharkd_daemon.c
index d97e347..c3dea96 100644
--- a/sharkd_daemon.c
+++ b/sharkd_daemon.c
@@ -263,6 +263,7 @@ sharkd_loop(void)
pid = fork();
if (pid == 0)
{
+ closesocket(_server_fd);
/* redirect stdin, stdout to socket */
dup2(fd, 0);
dup2(fd, 1);