Fix a typo on the Documentation web page.
[paraslash.git] / stdin.c
diff --git a/stdin.c b/stdin.c
index 40f02c1cef0a945546966fef4f2cea033d54fc17..afbe35f8eaf2f74a7e04437e5c60de1a2a6a9b1b 100644 (file)
--- a/stdin.c
+++ b/stdin.c
@@ -90,6 +90,8 @@ static void stdin_post_select(struct sched *s, struct task *t)
  */
 void stdin_set_defaults(struct stdin_task *sit)
 {
+       int ret;
+
        sit->bufsize = 16 * 1024,
        sit->loaded = 0,
        sit->error = 0,
@@ -97,6 +99,10 @@ void stdin_set_defaults(struct stdin_task *sit)
        sit->task.post_select = stdin_post_select;
        sit->task.event_handler = stdin_default_event_handler;
        sit->task.private_data = sit;
-       mark_fd_nonblocking(STDIN_FILENO);
        sprintf(sit->task.status, "stdin reader");
+       ret = mark_fd_nonblocking(STDIN_FILENO);
+       if (ret >= 0)
+               return;
+       PARA_EMERG_LOG("%s\n", para_strerror(-ret));
+       exit(EXIT_FAILURE);
 }