Distinguish between G_IO_ERR and G_IO_HUP



Hi,

I'm trying to catch the returned error message of the unzip
executable with GIOChannel. I use g_spawn_async_with_pipes and
then I create a GIOChannel and then i call g_io_add_watch. I run
unzip with an incomplete zip file so the have the unzip executable
fails with an error message but the G_IO_ERR conditions is never met, while the G_IO_HUP is met when both the pipe ends and when the unzip returns an error; how can I distinguish the two conditions so to have my application emits an appropriate gtk_dialog with an error message when unzip fails to open the zip archive ?
--
Colossus

Cpsed, a Linux OpenGL 3D scene editor
http://cpsed.sourceforge.net/




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