Boost logo

Boost-Build :

From: David Abrahams (dave_at_[hidden])
Date: 2005-07-29 06:15:29


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?

-- 
Dave Abrahams
Boost Consulting
www.boost-consulting.com
 

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