bproc_detach – Remove the current process from the BProc process space.
#include <sys/bproc.h> int bproc_detach(long code);
bproc_detach removes the current process from the global BProc
process space. After
bproc_detach succeeds, the process continues to
execute on its node, but is no longer visible from other nodes. From the
viewpoint of other processes in the BProc system, the effect is as if
the process had executed
exit(code). See exit2 for a description
of the effects seen by the parent process.
bproc_detach returns zero.
bproc_detach returns -1 and sets errno appropriately.
The caller does not have root permissions.
BProcsystem is not loaded in the current kernel.
In addition, any errors listed in fork(2) may occur.
In the current release,
bproc_detach may change the PID and PPID of
the current process, but is not guaranteed to do so. The PPID may change
at some point after
bproc_detach has returned, but such behavior is
In future releases,
bproc_detach may be implemented to remove the
current process from the BProc system, or it may be implemented to make
a copy of the current process outside of the BProc system; other options
are also possible. The user should make no assumptions beyond those
documented in this man page.
Some implementations of GNU
libc cache the value of
getpid may return inaccurate values if called both
before and after