3 ms·
Yep: $ grep fork /usr/include/asm/unistd_64.h #define __NR_fork 57 __SYSCALL(__NR_fork, stub_fork) #define __NR_vfork 58 __SYSCALL(__NR_vf
by andrewvc 16y ago
Yep:
$ grep fork /usr/include/asm/unistd_64.h
#define __NR_fork 57
__SYSCALL(__NR_fork, stub_fork)
#define __NR_vfork 58
__SYSCALL(__NR_vfork, stub_vfork)
$ strace -f ruby -e 'syscall 57' 2>&1 | egrep 'fork|clone'
fork(Process 4138 attached (waiting for parent)
$ strace -f ruby -e 'fork' 2>&1 | egrep 'fork|clone'
execve("/home/andrew/.rvm/rubies/ree-1.8.7-2010.02/bin/ruby", ["ruby", "-e", "fork"], [/* 47 vars */]) = 0
clone(Process 4145 attached