lkml.org 
[lkml]   [1999]   [Feb]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    SubjectRe: vfork() from userland
    Date
    From

    Your program is buggy. If execlp() fails, you must call _exit()
    immediately; otherwise main will return twice and the stack will be
    trashed.

    I am not certain whether calling fprintf() or execlp() in the child is
    safe. I would avoid everything but system calls - write(), execve(),
    etc.

    It is also possible that the default wrapper used by syscall() doesn't
    work correctly with vfork. If this were the case, however, your first
    program should have blown up too.

    zw

    -
    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:50    [W:0.017 / U:31.336 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site