From 20612c4194e1377db1c28140e29069fbc9776504 Mon Sep 17 00:00:00 2001 From: Jeff Squyres Date: Fri, 24 Aug 2012 14:29:19 +0000 Subject: [PATCH] Don't close the IOF stdin if we happen to read less than a full buffer's worth of data -- interactive stdin will have that behavior frequently. This commit was SVN r27131. --- orte/mca/iof/hnp/iof_hnp_read.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/orte/mca/iof/hnp/iof_hnp_read.c b/orte/mca/iof/hnp/iof_hnp_read.c index 902117ec60..24d3c4be82 100644 --- a/orte/mca/iof/hnp/iof_hnp_read.c +++ b/orte/mca/iof/hnp/iof_hnp_read.c @@ -181,10 +181,6 @@ void orte_iof_hnp_read_local_handler(int fd, short event, void *cbdata) OPAL_THREAD_UNLOCK(&mca_iof_hnp_component.lock); return; } - if (0 < numbytes && numbytes < (int)sizeof(data)) { - /* need to write a 0-byte event to clear the stream and close it */ - orte_iof_base_write_output(&rev->name, ORTE_IOF_STDIN, data, 0, sink->wev); - } } } else { OPAL_OUTPUT_VERBOSE((1, orte_iof_base.iof_output, @@ -212,7 +208,7 @@ void orte_iof_hnp_read_local_handler(int fd, short event, void *cbdata) } } /* if num_bytes was zero, or we read the last piece of the file, then we need to terminate the event */ - if (0 == numbytes || numbytes < (int)sizeof(data)) { + if (0 == numbytes) { /* this will also close our stdin file descriptor */ OBJ_RELEASE(mca_iof_hnp_component.stdinev); } else {