1
1

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.
Этот коммит содержится в:
Jeff Squyres 2012-08-24 14:29:19 +00:00
родитель a1f3d63278
Коммит 20612c4194

Просмотреть файл

@ -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 {