DragonFly BSD
DragonFly kernel List (threaded) for 2005-04
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

Re: vfork() and setpgid()


From: Max Okumoto <okumoto@xxxxxxxx>
Date: Fri, 22 Apr 2005 09:39:40 -0700

Matthew Dillon wrote:
:
:Is it safe to call setpgid() in the child process of vfork()?
:Should know this but, can find any docs that says if it is ok.
:
:			Max

    Hmm.  That's a good question.  I would say it would "probably"
    be ok.  System calls in general should be ok.

    The issue with vfork() is that the child has its own process
    and related structures (file descriptors), but it is sharing
    the parent's address space, so you don't want to do anything
    that messes with memory beyond your local stack.

-Matt
Matthew Dillon <dillon@xxxxxxxxxxxxx>

I was worried that vfork() might also share the descriptors. Thanks!

Max




[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]