Is it allowed to read twice or more in the GIO channel watch ?



Hi,

I have a function added with g_io_add_watch who reads line by line the output of a shell command spawned with g_spawn_async_with_pipes. The channel is set to non blocking and with encoding ISO8859-1.

I read twice in the same iteration of the watch with g_io_channel_read_line before returning TRUE. Since I get some weird behaviour:

http://bugzilla.xfce.org/show_bug.cgi?id=1736

I would like to know if this is allowed or I must read one line at once in the single iteration of the watch. The code is here:

http://svn.xfce.org/filedetails.php?repname=xfce4&path=%2Fxarchiver%2Ftrunk%2Flibxarchiver%2Fsupport-arj.c&rev=21282&sc=1

Thank you,
--
Colossus
Xarchiver, a Linux GTK+2 only archive manager - http://xarchiver.xfce.org
Cpsed, a Linux OpenGL 3D scene editor - http://cpsed.sourceforge.net
Mizio, a QT proxy hunter scanner tool - http://mizio.sourceforge.net



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