g_io_add_watch problem on OSX



Hello

I have at problem with an old linux app I'm porting to OSX.
I have gtk installed from darwinports.

The app calls g++ using g_spawn_asyns_with_pipes and uses g_io_channels
to transfer the output from g++ to a textview.
the problem is that the io  callback function which i attach to a io watch
never runs.

there are no glib warnings when i run the code.

//code
g_spawn_async_with_pipes(path.c_str(), arguments, NULL,G_SPAWN_SEARCH_PATH,
                             NULL, NULL, &gpid,&in, &out, &err,&error);

io_out = g_io_channel_unix_new(out);
io_err = g_io_channel_unix_new(err);
iotag_err = g_io_add_watch(io_err, G_IO_IN, read_input, this);
iotag_out = g_io_add_watch(io_out, G_IO_IN, read_input, this);

this is my basic code.

g++ does run but read_input is never calls.

Any help appreciated

/Jacob Kolding



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