summaryrefslogtreecommitdiff
path: root/libc/sysdeps/linux/i386/vfork.S
diff options
context:
space:
mode:
Diffstat (limited to 'libc/sysdeps/linux/i386/vfork.S')
-rw-r--r--libc/sysdeps/linux/i386/vfork.S10
1 files changed, 10 insertions, 0 deletions
diff --git a/libc/sysdeps/linux/i386/vfork.S b/libc/sysdeps/linux/i386/vfork.S
index 8005ff1d2..c9db2f48c 100644
--- a/libc/sysdeps/linux/i386/vfork.S
+++ b/libc/sysdeps/linux/i386/vfork.S
@@ -18,9 +18,19 @@
__vfork:
popl %ecx
+
+#ifdef SAVE_PID
+ SAVE_PID
+#endif
+
movl $__NR_vfork,%eax
int $0x80
pushl %ecx
+
+#ifdef RESTORE_PID
+ RESTORE_PID
+#endif
+
cmpl $-4095,%eax
jae __syscall_error
ret