X-Git-Url: http://winboard.nl/cgi-bin?a=blobdiff_plain;f=usystem.c;h=baba3537e5e2213571c7cfea9aceadf13266545d;hb=f0f8c2c30e7f5696c8f1d4a8a97f22da5987de92;hp=4a08e576d56bed1cbfebb439365618a480a9a85d;hpb=89b07e580a401d8c123c4a10e82789a873f37965;p=xboard.git diff --git a/usystem.c b/usystem.c index 4a08e57..baba353 100644 --- a/usystem.c +++ b/usystem.c @@ -650,18 +650,20 @@ OpenRcmd (char *host, char *user, char *cmd, ProcRef *pr) return -1; } +Boolean stdoutClosed = FALSE; + int OutputToProcess (ProcRef pr, char *message, int count, int *outError) { static int line = 0; ChildProc *cp = (ChildProc *) pr; - int outCount; + int outCount = count; if (pr == NoProc) { - if (appData.noJoin || !appData.useInternalWrap) - outCount = fwrite(message, 1, count, stdout); - else + if (appData.noJoin || !appData.useInternalWrap) { + if(!stdoutClosed) outCount = fwrite(message, 1, count, stdout); + } else { int width = get_term_width(); int len = wrap(NULL, message, count, width, &line);