Is g_io_add_watch one-shot on pipes?



Hi,

Is g_io_add_watch one shot only on a pipe
or does the watch remain valid after the callback is executed?

My callback is only being triggered once when I use
g_io_add_watch on a pipe.
If I send more data to the pipe the callback is not
executed again.

I have to call g_io_add_watch within the callback
on the same IOchannel to get the callback triggered again.

Is the correct behaviour? Am I causing a memory leak
by calling g_io_add_watch recursively from the callback
without freeing anything in between?

Thanks!

Richard Chan






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