(GLib) How to remove a Child Watch source that is not needed any more?
- From: Aleksander Morgado <gtk-list aleksander es>
- To: gtk-list gnome org
- Subject: (GLib) How to remove a Child Watch source that is not needed any more?
- Date: Wed, 20 Jan 2010 16:14:18 +0100
Hi all,
I use g_child_watch_source_new() to get notified when a spawned process exits. It works as expected, but if I ever need to stop taking care of it, this is, the parent process doesn't need to check if the child process is still being executed, I see that I cannot detach it from the main context properly with g_source_destroy(): the GSource still seems to be valid after that, and valgrind reports a FD leak for each Child Watch source that didn't get fired up when parent process exits.
So, is there a safe and clean way to remove those Child Watch sources from the main context?
Cheers,
-Aleksander
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]