gdk_add_input() Question


I've come across a small hurdle with the use of gdk_add_input().

To simplify the whole problem I wrote an application which shows the
behaviour and it is available at:

This program simply forks another process and runs a command (always
"./child-process", just symbolic link to the command you want) in the
subprocess, displaying the stdout and stderr of the process, and also
allows the user to send text to the child process's stdin. 

The problem lies in using gdk_add_input() to monitor a pipe for data.
When a shell script is run the program works perfectly (one is included
"").  However when any binary is run as the child-process then
gdk_add_input() incorrectly reports that there is data to be read.  The
callback function then blocks on the read operation in the callback
function, and the show stops there (bot only for a binary, shell scripst
work fine).

Am I incorrectly using the function?
Any help would be greatly appreciated and I thank you in advance for it.

PS: Remember that the program is simple, and it is hard coded to run the
child-process as "./child-process" so you will need to symbolic link to
"" to show it working.


  Cosmic -
           (PGP public key and ICQ number available)

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