aboutsummaryrefslogtreecommitdiffstats
path: root/nldev.c
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2015-03-12 21:10:00 +0100
committerNatanael Copa <ncopa@alpinelinux.org>2015-03-12 21:10:00 +0100
commite0403c6407e1b3b2ef0082a1ea4cd4e0ebf2bc33 (patch)
tree7cf0ca271b689563244ec30714ff2ec9609837fd /nldev.c
parent79668628ba0e6f42ba2ff8d51f2fd3c33b0838ad (diff)
downloadnldev-e0403c6407e1b3b2ef0082a1ea4cd4e0ebf2bc33.tar.bz2
nldev-e0403c6407e1b3b2ef0082a1ea4cd4e0ebf2bc33.tar.xz
nldev: don't bother shutdown on a socket we are about to close
Diffstat (limited to 'nldev.c')
-rw-r--r--nldev.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/nldev.c b/nldev.c
index 2a6c062..e1868a3 100644
--- a/nldev.c
+++ b/nldev.c
@@ -73,10 +73,8 @@ sighandler(int sig)
case SIGQUIT:
case SIGABRT:
case SIGTERM:
- if (listfd >= 0) {
- shutdown(listfd, SHUT_RDWR);
+ if (listfd >= 0)
close(listfd);
- }
exit(0);
break;
default:
@@ -255,7 +253,6 @@ main(int argc, char *argv[])
fds[1].fd = child.fd;
}
- shutdown(listfd, SHUT_RDWR);
close(listfd);
return 0;