Skip to content

Instantly share code, notes, and snippets.

@adsr
Created June 2, 2015 23:35
Show Gist options
  • Select an option

  • Save adsr/7976fa1cc77141bf1c63 to your computer and use it in GitHub Desktop.

Select an option

Save adsr/7976fa1cc77141bf1c63 to your computer and use it in GitHub Desktop.
Index: ncat/ncat_listen.c
===================================================================
--- ncat/ncat_listen.c (revision 34570)
+++ ncat/ncat_listen.c (working copy)
@@ -522,7 +522,7 @@
netexec(&sinfo, o.cmdexec);
} else {
/* Now that a client is connected, pay attention to stdin. */
- if (!stdin_eof)
+ if (!stdin_eof && !o.recvonly)
FD_SET(STDIN_FILENO, &master_readfds);
if (!o.sendonly) {
/* add to our lists */
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment