summaryrefslogtreecommitdiff
path: root/nptl/sysdeps/unix/sysv/linux/i386/vfork.S
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2004-03-10 05:25:48 +0000
committerUlrich Drepper <drepper@redhat.com>2004-03-10 05:25:48 +0000
commit8b9d605485be779bb03778e780e9875525ec2ca4 (patch)
tree38c566c233a1d11a10b2bb68a488dfd9e17e9b04 /nptl/sysdeps/unix/sysv/linux/i386/vfork.S
parent9363dbb847a7e29d1abfffabc59fb142cf956df2 (diff)
Update.
2004-02-09 Jakub Jelinek <jakub@redhat.com> * posix/Makefile (tests): Add tst-vfork2. * posix/tst-vfork1.c (do_test): Fix comment. * posix/tst-vfork2.c: New test.
Diffstat (limited to 'nptl/sysdeps/unix/sysv/linux/i386/vfork.S')
-rw-r--r--nptl/sysdeps/unix/sysv/linux/i386/vfork.S8
1 files changed, 6 insertions, 2 deletions
diff --git a/nptl/sysdeps/unix/sysv/linux/i386/vfork.S b/nptl/sysdeps/unix/sysv/linux/i386/vfork.S
index 2b60a5ea5e..52336102c7 100644
--- a/nptl/sysdeps/unix/sysv/linux/i386/vfork.S
+++ b/nptl/sysdeps/unix/sysv/linux/i386/vfork.S
@@ -21,9 +21,13 @@
/* Save the PID value. */
#define SAVE_PID \
movl %gs:PID, %edx; \
- movl $-1, %gs:PID
+ movl %edx, %eax; \
+ negl %eax; \
+ jne 1f; \
+ movl $0x80000000, %eax; \
+1: movl %eax, %gs:PID
-/* Restore the old PID value in the parent. In the child store 0. */
+/* Restore the old PID value in the parent. */
#define RESTORE_PID \
testl %eax, %eax; \
je 1f; \