|
Boost-Build : |
From: Vladimir Prus (ghost_at_[hidden])
Date: 2005-07-29 06:21:25
On Friday 29 July 2005 15:15, David Abrahams wrote:
> Vladimir Prus <ghost_at_[hidden]> writes:
> > BTW, anybody has any idea why the code in question:
> >
> > if ((pid = vfork()) == 0)
> > {
> > execvp( argv[0], argv );
> > _exit(127);
> > }
> >
> > uses "_exit" and not "exit"? The only difference is that _exit does not
> > invoke "atexit" functions. Everywhere else, "exit" is used.
>
> Maybe because you want those functions to be run by the main process,
> and not by the fork?
Ah.. that's reasonable.
- Volodya
-- Vladimir Prus http://vladimir_prus.blogspot.com Boost.Build V2: http://boost.org/boost-build2
Boost-Build list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk