mirror of
https://github.com/sheumann/hush.git
synced 2025-01-21 12:30:42 +00:00
Shutdown sending on the socket when stdin closes.
This commit is contained in:
parent
6f6aa9b428
commit
95fa0ea3d4
2
nc.c
2
nc.c
@ -111,6 +111,8 @@ int nc_main(int argc, char **argv)
|
||||
exit(0);
|
||||
ofd = fileno(stdout);
|
||||
} else {
|
||||
if (nread == 0)
|
||||
shutdown(sfd, 1);
|
||||
ofd = sfd;
|
||||
}
|
||||
|
||||
|
@ -111,6 +111,8 @@ int nc_main(int argc, char **argv)
|
||||
exit(0);
|
||||
ofd = fileno(stdout);
|
||||
} else {
|
||||
if (nread == 0)
|
||||
shutdown(sfd, 1);
|
||||
ofd = sfd;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user