fork in callbacks
- From: Felix Bellaby <felix pooh u-net com>
- To: "Rodrigo Moya" <Moya_Rodrigo/madrid_tecnologia sinvest es>
- Cc: gnome-list gnome org
- Subject: fork in callbacks
- Date: Thu, 3 Dec 1998 17:57:09 +0000 (GMT)
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.
Felix
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]