where to look at userspace implementation of fork() and clone()?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



  in robert love's "linux kernel development" book (p. 31), i read:

"The fork(), vfork() and __clone() library calls all invoke the
clone() system call with the requisite flags."  assuming that,
nowadays, it would be __clone2() and not __clone(), where in the
source for glibc-2.7 could i see the implementation of those calls?

  if i just look in the glibc source tree for files with the name
fork*, i get:

./nptl/sysdeps/unix/sysv/linux/s390/fork.c
./nptl/sysdeps/unix/sysv/linux/fork.h
./nptl/sysdeps/unix/sysv/linux/ia64/fork.c
./nptl/sysdeps/unix/sysv/linux/i386/fork.c
./nptl/sysdeps/unix/sysv/linux/x86_64/fork.c
./nptl/sysdeps/unix/sysv/linux/alpha/fork.c
./nptl/sysdeps/unix/sysv/linux/sh/fork.c
./nptl/sysdeps/unix/sysv/linux/powerpc/fork.c
./nptl/sysdeps/unix/sysv/linux/sparc/fork.c
./nptl/sysdeps/unix/sysv/linux/fork.c
./sysdeps/mach/hurd/fork.c
./sysdeps/generic/fork.h
./sysdeps/unix/sysv/linux/ia64/fork.S
./sysdeps/unix/sysv/linux/sparc/fork.S
./sysdeps/unix/i386/fork.S
./sysdeps/unix/fork.S
./sysdeps/unix/sparc/fork.S
./posix/fork.c
./login/forkpty.c

  so how would i follow the logic from the initial call to fork() to
the underlying sys_clone system call?  or am i looking in the wrong
place?

rday
--

========================================================================
Robert P. J. Day
Linux Consulting, Training and Annoying Kernel Pedantry:
    Have classroom, will lecture.

http://crashcourse.ca                          Waterloo, Ontario, CANADA
========================================================================

--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx
Please read the FAQ at http://kernelnewbies.org/FAQ


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux