This is the mail archive of the
libc-hacker@cygnus.com
mailing list for the glibc project.
Re: A test for vfork
- To: Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
- Subject: Re: A test for vfork
- From: Andreas Jaeger <aj@arthur.rhein-neckar.de>
- Date: 15 Jan 1999 17:33:30 +0100
- Cc: libc-hacker@cygnus.com
- Mail-Copies-To: never
- References: <vyzu2xsvo6n.fsf@issan.cs.uni-dortmund.de>
>>>>> Andreas Schwab writes:
> Here is a test for vfork which should tell you if it is implemented
> correctly. Especially the generic source linux/vfork.c is unusable for
> machines that put the return pc on the stack (like ix86). Remember that
> the stack is shared between the parent and the child, thus any function
> call in the child will clobber the return pc from vfork of the parent.
> See the existing implementations under sysdeps/unix for hints.
Thanks for the test. Ulrich, please add it as test in the posix subdirectory!
The tests failed (as already expected) for me:
with glibc 2.0.108:
$ ./vfork-test
Before vfork
After vfork (parent)
But with glibc 2.0.110 I get:
$ LD_LIBRARY_PATH=/usr/glibc/src/buildreport/19990114/ /usr/glibc/src/buildreport/19990114/elf/ld-linux.so.2 ./vfork-test
Before vfork
Segmentation fault
Ok, anybody providing an ix86 specific vfork implementation for glibc?
Andreas
--
Andreas Jaeger aj@arthur.rhein-neckar.de jaeger@informatik.uni-kl.de
for pgp-key finger ajaeger@aixd1.rhrk.uni-kl.de