Hello,
I've built a FIFOed interface toward gimp-console in the form of a couple of public I/O FIFOs connected to an interpreting bash script which translates incoming commands into dispatches understandable by gimp, and sends them to it using another couple of I/O private FIFOs.
Code:
I/O publicly +-------------------------+ I/O private FIFOs +-------+
accessible FIFOs | INTERFACE | toward Gimp | |
------------------>| |-------------------->| GIMP |
<------------------| translator / dispatcher |<--------------------| |
+-------------------------+ +-------+
Since design, the interface's end side of the two private FIFOs toward gimp have to always be kept
open, in the sense that a generic sub-process has to always be fictitiously connected with the two pipes, to prevent hangs of
read and
write operations performed by gimp (explanation of this behavior is under
man 7 pipe).
I succeeded in doing this only in the form of:
Code:
dummy_lasting_process >input_to_gimp <output_from_gimp &
gimp-console --parameters <input_to_gimp >output_from_gimp &
I discovered that if the order of redirection operators in the dummy process is inverted, as in
Code:
dummy_lasting_process <output_from_gimp >input_to_gimp &
gimp-console --parameters <input_to_gimp >output_from_gimp &
both the dummy process and gimp hang up, suggesting that the ending of one or both of the pipes is open.
I see no reason for this.