Skip to content
Snippets Groups Projects
Commit 73b6dc2e authored by Christopher J. Morrone's avatar Christopher J. Morrone
Browse files

Do not try to use non-blocking IO on stdin.

parent d2f219c7
No related branches found
No related tags found
No related merge requests found
...@@ -170,7 +170,6 @@ struct file_read_info { ...@@ -170,7 +170,6 @@ struct file_read_info {
uint32_t nodeid; uint32_t nodeid;
bool eof; bool eof;
bool was_blocking;
}; };
...@@ -720,12 +719,6 @@ create_file_read_eio_obj(int fd, uint32_t taskid, uint32_t nodeid, ...@@ -720,12 +719,6 @@ create_file_read_eio_obj(int fd, uint32_t taskid, uint32_t nodeid,
info->header.ltaskid = (uint16_t)-1; info->header.ltaskid = (uint16_t)-1;
info->eof = false; info->eof = false;
if (fd_is_blocking(fd)) {
fd_set_nonblocking(fd);
info->was_blocking = true;
} else {
info->was_blocking = false;
}
eio = eio_obj_create(fd, &file_read_ops, (void *)info); eio = eio_obj_create(fd, &file_read_ops, (void *)info);
return eio; return eio;
...@@ -748,11 +741,6 @@ static bool _file_readable(eio_obj_t *obj) ...@@ -748,11 +741,6 @@ static bool _file_readable(eio_obj_t *obj)
} }
if (obj->shutdown == true) { if (obj->shutdown == true) {
debug3(" false, shutdown"); debug3(" false, shutdown");
/* if the file descriptor was in blocking mode before we set it
* to O_NONBLOCK, then set it back to blocking mode before
* closing */
if (info->was_blocking)
fd_set_blocking(obj->fd);
close(obj->fd); close(obj->fd);
obj->fd = -1; obj->fd = -1;
info->eof = true; info->eof = true;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment