[Gimp-developer] [PATCH] fix to batch console support
Christopher Montgomery
xiphmont at gmail.com
Thu May 28 11:37:27 PDT 2009
The batch mode console is using stdio but never flushing its output
after fwrite()s. This still usually works by accident when using
batch mode from a terminal, but it means scripts generally won't work
as responses to requests never get flushed through the return pipe.
Apologies for this not being in git format-patch format, it was a spot
test to get other unit tests working and trivial enough it doesn't
seem worth the extra trouble.
Cheers,
Monty
diff --git a/plug-ins/script-fu/scheme-wrapper.c
b/plug-ins/script-fu/scheme-wrapper.c
index 9212801..fbcf81b 100644
--- a/plug-ins/script-fu/scheme-wrapper.c
+++ b/plug-ins/script-fu/scheme-wrapper.c
@@ -329,6 +329,7 @@ ts_stdout_output_func (TsOutputType type,
if (len < 0)
len = strlen (string);
fprintf (stdout, "%.*s", len, string);
+ fflush (stdout);
}
void
More information about the Gimp-developer
mailing list