projects
/
paraslash.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
osx_write: kill superfluous semaphore code
[paraslash.git]
/
stdout.c
diff --git
a/stdout.c
b/stdout.c
index 1c1435a321dedaf445b39a0a1ad8791d024d636d..1656bcc94d886c712ce5b584a84f2dcf5e15e74a 100644
(file)
--- a/
stdout.c
+++ b/
stdout.c
@@
-82,6
+82,8
@@
void stdout_post_select(struct sched *s, struct task *t)
if (ret <= 0)
return;
*sot->loaded -= ret;
if (ret <= 0)
return;
*sot->loaded -= ret;
+ if (*sot->loaded)
+ memmove(sot->buf, sot->buf + ret, *sot->loaded);
t->ret = 1;
}
t->ret = 1;
}
@@
-107,5
+109,6
@@
void stdout_set_defaults(struct stdout_task *sot)
sot->task.post_select = stdout_post_select;
sot->task.event_handler = stdout_default_event_handler;
sot->eof = 0;
sot->task.post_select = stdout_post_select;
sot->task.event_handler = stdout_default_event_handler;
sot->eof = 0;
+ mark_fd_nonblock(STDOUT_FILENO);
sprintf(sot->task.status, "stdout writer");
}
sprintf(sot->task.status, "stdout writer");
}