2010/3/29 Dinar Talypov <di...@yantel.ru>:
> While looking at the code found that some flags are not documented in 
> fork1(9), but used.
> These are:
> - FORK_SIGHAND
> - FORK_PTRACE
> - FORK_THREAD
>
> Can someone point out what they are?

Thank you for pointing out the doc absence!

To quote the just committed manpage update:

     FORK_SIGHAND     The child will share the parent's signal actions, in-
                      cluding the handler, mask, and flags, with
                      sigactsshare().  The default behavior is to copy the
                      signal actions from the parent with sigactsinit().
                      FORK_SHAREVM must also be set.

     FORK_PTRACE      The child will start with tracing enabled, as if
                      ptrace(PT_TRACE_ME, 0, 0, 0) had been invoked in the
                      child.

     FORK_THREAD      The child will instead be a kernel-level thread in the
                      same process as the parent.  FORK_NOZOMBIE,
                      FORK_SHAREVM, and FORK_SIGHAND must also be set.  If the
                      kernel option RTHREADS isn't enabled then the call will
                      return ENOTSUP.

(And yes, the RTHREADS kernel option is now documented some too.)


Philip Guenther

Reply via email to