示例#1
0
文件: spawn.cs 项目: GNOME/mortadelo
        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);
        }
示例#2
0
文件: spawn.cs 项目: GNOME/mortadelo
 static extern uint g_child_watch_add(int pid, GChildWatchFunc watch_func, IntPtr user_data);