mirror of
https://github.com/nmap/nmap.git
synced 2026-01-20 13:19:01 +00:00
Don't use socket close on STDOUT, use IO close instead. See #978
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user