lkml.org 
[lkml]   [1999]   [Jan]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: Porting vfork()
    On Tue, Jan 05, 1999 at 03:46:11PM -0600, kernel@draper.net wrote:
    > So, the question: is linux vfork() behavior annoying anyone else and is it
    > worth fixing? (other than to eliminate its appearance in the BUG area of the
    > Linux fork() man page ;)

    What are you doing with vfork? The reason vfork exists is in the special
    case where fork() is followed by exec*(), and the memory copy (used to be?)
    prohibitively expensive. [I am missing a reference to this effect, so I
    can't be 100% authoritative. Reportedly, _The Magic Garden Explained_
    talks about this, but I am passing this along secondhand]

    Is it possible that you're taking advantage of the shared memory as
    mentioned in SunOS 5.6's manpage for vfork, or the Stevens book mentioned
    in the vfork-related message at [1] (be sure you read the reply at [2]?
    In this case, you may be able to use clone(0, SIGCHLD) instead of vfork().
    Maybe something like
    #ifdef LINUX
    #define vfork() clone(0, SIGCHLD)
    #endif
    but until you make clear what abuse of vfork() you're relying on, who knows
    whether this does what you want.

    Jeff
    [1] http://www.sigmasoft.com/~openbsd/misc/msg00960.html
    [2] http://www.sigmasoft.com/~openbsd/misc/msg00961.html
    --
    \/ http://www.slashdot.org/ Jeff Epler jepler@inetnebr.com
    Term, holidays, term, holidays, till we leave school, and then work, work,
    work till we die.
    -- C.S. Lewis

    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.rutgers.edu
    Please read the FAQ at http://www.tux.org/lkml/

    \
     
     \ /
      Last update: 2005-03-22 13:49    [W:0.038 / U:2.568 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site