g_spawn_async lockup



Hi,
I want to execute an external program using g_spawn_async_with_pipes.
This program outputs ASCII to stdout, which I want to catch using
g_child_watch_add.
This works fine, but if the data exceeds a certain amount of data
apparently the pipe gets 'full', causing the ext. program to wait with
outputting.
As a result the g_child_watch_add will not start reading the pipe.

So g_child_watch_add waits until the ext. program is finished and the
ext. program waits until g_child_watch_add starts with reading from the
pipe.

How to deal with this?

I tried to redirect the output to a file, and use g_spawn_async instead
of g_spawn_async_with_pipes, but redirecting seems not to be accepted by
g_spawn_async.

(For this second method I tried flags G_SPAWN_FILE_AND_ARGV_ZERO and
|G_SPAWN_STDOUT_TO_DEV_NULL, without success.)
|

Rob A.



-- 
This message has been scanned for viruses and is believed to be clean




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