• Ingo Molnar's avatar
    [PATCH] fix do_fork() return value · 7196d9df
    Ingo Molnar authored
    Noticed by Julie DeWandel <jdewand@redhat.com>.
    
    do_fork() needs to return the pid (or error), not the pointer to the
    resulting process structure.  The process structure may not even be
    valid any more, since do_fork() has already woken the process up (and as
    a result it might already have done its thing and gone away).
    
    Besides, doing it this way cleans up the users, which all really just
    wanted the pid or error number _anyway_.
    
    This fixes the x86 users, other architectures need to be fixed up as
    well.
    7196d9df
process.c 17.5 KB