Spawn a process without exec



Hello!

Please, could anybody tell me how to create a non-exec process within a
GTK application?
I can't use fork() because the child has to use GTK, and the g_spawn...
stuff is only used to spawn processes that run a different program with exec.

What about if I want to emule a simple fork() in GTK?
For example, I want to do this:

        int w;

        if (!fork ()) {
                puts ("Hello, I'm the child.");

                /* code that uses GTK... */

                exit (0);
        }

        wait (&w);
        puts ("My child has died. Goodbye!");


Thanks.

---
David Rosal,   <davidrr menta net>
--



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]