[PATCH] fix to batch console support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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
_______________________________________________
Gimp-developer mailing list
Gimp-developer@xxxxxxxxxxxxxxxxxxxxxx
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer

[Index of Archives]     [Video For Linux]     [Photo]     [Yosemite News]     [gtk]     [GIMP for Windows]     [KDE]     [GEGL]     [Gimp's Home]     [Gimp on GUI]     [Gimp on Windows]     [Steve's Art]

  Powered by Linux