- if (ct->task.error < 0)
- return ct->task.error;
- if (ct->status == CL_SENDING) {
- stdin_set_defaults(&sit);
- register_task(s, &sit.task);
- return -E_TASK_STARTED;
+ struct supervisor_task *svt = context;
+ int ret = task_status(ct->task);
+
+ if (ret < 0)
+ return ret;
+ if (!svt->stdout_task_started && ct->status == CL_EXECUTING) {
+ stdout_task_register(&sot, s);
+ svt->stdout_task_started = true;
+ return 1;