Re: fork in callbacks
- From: "Rodrigo Moya" <Moya_Rodrigo/madrid_tecnologia sinvest es>
- To: <gnome-list gnome org>
- Subject: Re: fork in callbacks
- Date: Thu, 3 Dec 1998 19:42:11 +0100
>Rodrigo Moya writes:
> > Can I fork() inside a (GNOME) widget callback?, for example:
>Think very carefully about whether you really want to do this.
>It will create two copies of every widget in your program. If any
>of your widgets are associated with X resources like windows then
>you will have two separate processes trying to access the same
>resources. Furthermore, the child copy will not have an X connection!
>This is not a problem providing you "throw away" the child process by
>doing an execve (or similar) shortly after forking. However, the
>gnome-libs already provide you with an API for starting an executable
>(libgnome/gnome-exec.h) and one for starting a CORBA server
>(libgnorba) so there may be no need to fork for yourself.
Well, what I want to do is to execve a process and capture its output (that
is stdio and return code). Is there a better solution?
] [Thread Prev