- converted = ret;
- if (*ol) {
- ret = write(STDOUT_FILENO, ob, *ol);
- PARA_DEBUG_LOG("wrote %d/%zd\n", ret, *ol);
- if (ret <= 0)
- goto out;
- *ol -= ret;
- if (*ol) {
- PARA_NOTICE_LOG("short write: %zd bytes left\n", *ol);
- memmove(ob, ob + ret, *ol);
- }
- }
- if (!eof || converted)
- goto again;
- ret = 0;
+
+ stdout_set_defaults(sot);
+ PARA_EMERG_LOG("fc->output_eof: %d\n", *fc->output_eof);
+ sot->buf = fc->outbuf;
+ sot->loaded = fc->out_loaded;
+ sot->input_eof = &fc->eof;
+
+ register_task(&sot->task);
+ register_task(&fc->task);
+ register_task(&sit->task);
+ s.default_timeout.tv_sec = 1;
+ s.default_timeout.tv_usec = 0;
+ PARA_EMERG_LOG("fc->output_eof: %d\n", *fc->output_eof);
+ ret = sched(&s);