This is the mail archive of the libc-hacker@cygnus.com mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

vfork



Here are the answers I got so far.

Instead of vfork clone should be called as:
clone(CLONE_VFORK | CLONE_VM | SIGCHLD, 0)

I fear we have to add this asap to glibc and release directly glibc
2.0.111.  Since pre8 still contains __NR_vfork it might (I'm not sure
- and I don't have time to investigate this now) be that all glibc
2.0.110s compiled for ix86 with Uli's patch will be broken with Linux
2.2.0-pre8+ :-(

Andreas



   From: Andreas Jaeger <aj@arthur.rhein-neckar.de>
   Date: 	19 Jan 1999 09:04:13 +0100

   Should glibc revert to using fork instead of vfork or is there a
   special way, e.g. with using CLONE_VFORK, to get vfork back?

vfork() == clone(CLONE_VFORK | CLONE_VM | SIGCHLD, 0)

Later,
David S. Miller
davem@dm.cobaltmicro.com




> 
> 
> Hi,
> 
> the "real" patch-2.2.0-pre8 now removed sys_vfork on ix86 (but not
> __NR_vfork in asm-i386/unistd.h).  Was this really intented and has
> vfork now disappeared?  What's the situation on the other
> architectures?  Should glibc revert to using fork instead of vfork or
> is there a special way, e.g. with using CLONE_VFORK, to get vfork
> back?

On all archs, clone (CLONE_VM|CLONE_VFORK|SIGCHLD, NULL)
will do the job, plus I think alpha, sparc and sparc64 will have regular
vfork syscall (as they have to implement it for DU/Solaris/SunOS
compatibility anyway).
I think the __NR_vfork in i386's unistd.h could go away, I think vfork has
not been in l-k for long and nobody released yet a libc with that vfork...

Cheers,
    Jakub
___________________________________________________________________
Jakub Jelinek | jj@sunsite.mff.cuni.cz | http://sunsite.mff.cuni.cz
Administrator of SunSITE Czech Republic, MFF, Charles University
___________________________________________________________________
UltraLinux  |  http://ultra.linux.cz/  |  http://ultra.penguin.cz/
Linux version 2.2.0-pre7 on a sparc64 machine (3958.37 BogoMips)
___________________________________________________________________




-- 
 Andreas Jaeger   aj@arthur.rhein-neckar.de    jaeger@informatik.uni-kl.de
  for pgp-key finger ajaeger@aixd1.rhrk.uni-kl.de

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]