mirror of
https://github.com/nmap/nmap.git
synced 2026-08-04 14:49:29 +00:00
Don't use socket close on STDOUT, use IO close instead. See #978
This commit is contained in:
parent
d0718cd631
commit
74bbf2dcca
1 changed files with 4 additions and 0 deletions
|
|
@ -1304,7 +1304,11 @@ static void read_socket_handler(nsock_pool nsp, nsock_event evt, void *data)
|
|||
ncat_assert(type == NSE_TYPE_READ);
|
||||
|
||||
if (status == NSE_STATUS_EOF) {
|
||||
#ifdef WIN32
|
||||
_close(STDOUT_FILENO);
|
||||
#else
|
||||
Close(STDOUT_FILENO);
|
||||
#endif
|
||||
/* In --recv-only mode or non-TCP mode, exit after EOF on the socket. */
|
||||
if (o.proto != IPPROTO_TCP || (o.proto == IPPROTO_TCP && o.recvonly))
|
||||
nsock_loop_quit(nsp);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue