On Sun, Aug 22, 2004 at 10:41:32AM -0400, Paul Davis wrote: > technically, there is very little you can "legally" do in a POSIX > signal handler. however, write(2) is one of them. create a FIFO, add > it to the main event loop using g_io_add() or its cousins, and then > in the SIGCHLD handled, write a byte or three to the FIFO. your main > event loop will call the io ready handler that you set up in > g_io_add(), and that handler can do whatever you want. Almost there. I wrote code to create a pipe and set it in nonblocking mode, to avoid the signal handler to block if the Gtk main loop has something else to do and isn't reading from the pipe. Now I'd like to add reading the pipe in the Gtk event loop, but: 1) No g_io_add function is defined anywhere: $ find /usr/include/glibmm-2.4/ | xargs grep g_io_add $ find /usr/include/gdkmm-2.4/ | xargs grep g_io_add $ find /usr/include/gtkmm-2.4/ | xargs grep g_io_add $ 2) The "Monitoring I/O" chapter of the tutorial seems to be wrong, as it refers to: sigc::connection Gtk::Main::input.connect(const SlotType& sd, int source, GdkInputCondition condition); which doesn't appear to exist anymore. 3) I'm clueless. help... Ciao, Enrico -- GPG key: 1024D/797EBFAB 2000-12-05 Enrico Zini <enrico debian org>
Attachment:
signature.asc
Description: Digital signature