Subject: | POSIX::exit is the same as builtin exit |
I see code like this in IPC::Run:
## Use POSIX::exit to avoid global destruction, since this might
## cause DESTROY() to be called on objects created in the parent
## and thus cause double cleanup. For instance, if DESTROY() unlinks
## a file in the child, we don't want the parent to suddenly miss
## it.
POSIX::exit 0;
there is also documentation talking about POSIX::exit[1]. In fact POSIX::exit() just calls the
normal perl builtin function exit(). The function you want to call to avoid destructors is
POSIX::_exit().
[1] http://search.cpan.org/grep?cpanid=ADAMK&release=IPC-Run-
0.82&string=POSIX%3A%3Aexit&i=1&n=1&C=0