g_io_channel_get_buffer_condition




Hi!

I use this function to check if I can write to GIOChannel this way
if (!(g_io_channel_get_buffer_condition (io_write) & G_IO_OUT))
  {
    printf ("data cannot be written\n");
    return TRUE;
  }

but the above condition is always true. io_write can be a file or a pipe.
I can disable this code for a file and then it works fine, but I need this
for a pipe.
Do I have to use select instead of this function to check if I can write
to a file?

regards
hs



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