summaryrefslogtreecommitdiff
path: root/ctest.c
diff options
context:
space:
mode:
Diffstat (limited to 'ctest.c')
-rw-r--r--ctest.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ctest.c b/ctest.c
index 2e871cb..b0a367d 100644
--- a/ctest.c
+++ b/ctest.c
@@ -27,7 +27,7 @@ main(int argc, char **argv) {
exit(EXIT_FAILURE);
}
- sfd = socket(AF_INET, SOCK_STREAM, 0);
+ sfd = socket(AF_INET, SOCK_STREAM | SOCK_CLOEXEC, 0);
if (sfd < 0) {
perror("socket");
exit(EXIT_FAILURE);