If several lines are given to the stdin of sic in a single write() call
(by whatever is controlling sic), only the first line will be seen by
sic until the stdin file descriptor is triggered the next time. This is
due to interactions between C stdio buffering and the use of select().
sic already disables buffering on the socket FD, and with this patch,
also on stdin.
diff --git a/sic.c b/sic.c
index 6b5ae96..ce6d216 100644
--- a/sic.c
+++ b/sic.c
@@ -181,6 +181,7 @@ main(int argc, char *argv[]) {
fflush(srv);
setbuf(stdout, NULL);
setbuf(srv, NULL);
+ setbuf(stdin, NULL);
for(;;) { /* main loop */
FD_ZERO(&rd);
FD_SET(0, &rd);
--
\ Troels
/\ Henriksen