public uint ChildWatchAdd(int pid, ChildWatchFunc watch_func) { this.watch_func = new ChildWatchFunc (watch_func); /* We hold this proxy in an object field. Otherwise, * the GC would collect the trampoline shortly after the * invocation of g_child_watch_add(); this would crash * the program later when Glib wants to call our defunct * callback trampoline. */ watch_func_proxy = new GChildWatchFunc (watch_func_proxy_cb); return g_child_watch_add (pid, watch_func_proxy, IntPtr.Zero); }
static extern uint g_child_watch_add(int pid, GChildWatchFunc watch_func, IntPtr user_data);