Gimp batch-mode patch
Background
Gimp provides a
remotely-scriptable interface when invoked with the "-b
-" option. Unfortunately, the the scheme interpreter wrapper
used for command-line interaction uses stdio for
read/write, but does not flush writes to stdout.
Responses to commands are never flushed to the return pipe,
causing scripts to hang waiting for a response.
Fix
A single fflush(stdout); addition to
scheme-wrapper.c in the script-fu plugin fixes the problem. Note
that even when gimp is configured with --enable-static
and --disable-shared, the fix is in the script-fu plugin,
not in the GIMP application itself. make install is
likely necessary to ensure the fixed plugin is loaded by any local
build.
Patch
Note that this patch has already been applied against both
master [commit 7b7d44837834061e8ee2c668b0f9d99d9ae13dcf] and the
gimp-2-6 branch [commit 3c59c936e075a36d1648cbf38ae12c2577432f74].
It will be included in gimp-2.6.7 and any git clone/pull after May
28, 2009.
Up to patch index
Monty