Re: fork ???
- From: Havoc Pennington <hp redhat com>
- To: Sri Ramkrishna <sri aracnet com>
- Cc: Magnus Wirström <asd mail bip net>,gnome-devel-list <gnome-devel-list gnome org>
- Subject: Re: fork ???
- Date: 14 Jul 2000 14:04:58 -0400
Sri Ramkrishna <sri@aracnet.com> writes:
> You probably don't want to do a full fork as it takes a lot of system
> resources most of which you don't need. Use a vfork and then have teh
> child execute a execve system call. The parent will suspend until you
> issue the execve.
>
> Caveats are that vfork doesn't make your code very portable from what I
> glean from the linux kernel mailing list.
>
Just use fork(), it's cheap on Linux, certainly cheap enough for most
uses.
One example of using it is the gnome_execute_async() function in
libgnome, you could look at that code.
Also a UNIX programming book will have examples; try Linux Application
Development, Advanced Programming in the UNIX Environment, or
Beginning Linux Programming, those three are all worth owning.
Havoc
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]