t->ret = 1;
if (!sot->check_fd) {
- if (*sot->eof)
+ if (*sot->input_eof)
t->ret = -E_STDOUT_EOF;
return;
}
*sot->loaded -= ret;
t->ret = 1;
}
+
+void stdout_default_event_handler(struct task *t)
+{
+ PARA_NOTICE_LOG("%p: %s\n", t, PARA_STRERROR(-t->ret));
+ unregister_task(t);
+}
+
+
+void stdout_set_defaults(struct stdout_task *sot)
+{
+ sot->task.private_data = sot;
+ sot->task.pre_select = stdout_pre_select;
+ sot->task.post_select = stdout_post_select;
+ sot->task.event_handler = stdout_default_event_handler;
+ sot->task.flags = 0;
+ sot->eof = 0;
+ sprintf(sot->task.status, "stdout writer");
+}