Re: g_spawn_async_with_pipes and g_io_add_watch problems



On Fri, 3 Dec 2004 16:44:36 +0100, Hubert Sokolowski
<h sokolowski wsisiz edu pl> wrote:
[...]
my main process was locking on writing to gzip's stdin or on reading
from gzip's stdout. this was because I wasn't checking if I can write to
gzip's stdin.


I would sugest simply "not blocking" on write to gzip's stdin.
(i.e. make sure all your reads/writes are one byte at a time and
use select() to check if the descriptor is ready or not, dont just
read/write).
can I use g_io_channel_get_buffer_condition instead of select?

Ahh, 
    g_io_channel_get_buffer_condition is news to me, you learn
something new every day ;-)

Cheers,
                                                           -Tristan



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