Re: [gtkmm] Spawing a process and being notified of its termination
- From: Martin Schulze <martin-ml hippogriff de>
- To: Enrico Zini <zinie cs unibo it>
- Cc: gtkmm-list gnome org, Paul Davis <paul linuxaudiosystems com>
- Subject: Re: [gtkmm] Spawing a process and being notified of its termination
- Date: Tue, 31 Aug 2004 21:18:02 +0200
Hi Enrico!
You will want to use Glib::signal_io():
http://gtkmm.sourceforge.net/docs/glibmm-2.4/docs/reference/html/classGlib_1_1SignalIO.html
Sorry that the answer comes this late.
I think the error in the tutorial needs a bug report / patch!
Regards,
Martin
Am 22.08.2004 23:24:51 schrieb(en) Enrico Zini:
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>
_______________________________________________
gtkmm-list mailing list
gtkmm-list gnome org
http://mail.gnome.org/mailman/listinfo/gtkmm-list
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]