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.
diff --git a/plug-ins/script-fu/scheme-wrapper.c
index 9212801..fbcf81b 100644
@@ -329,6 +329,7 @@ ts_stdout_output_func (TsOutputType type,
if (len < 0)
len = strlen (string);
fprintf (stdout, "%.*s", len, string);
+ fflush (stdout);
Gimp-developer mailing list