Go to file
Adhemerval Zanella Netto e7190fc73d linux: Add pidfd_getpid
This interface allows to obtain the associated process ID from the
process file descriptor.  It is done by parsing the procps fdinfo
information.  Its prototype is:

   pid_t pidfd_getpid (int fd)

It returns the associated pid or -1 in case of an error and sets the
errno accordingly.  The possible errno values are those from open, read,
and close (used on procps parsing), along with:

   - EBADF if the FD is negative, does not have a PID associated, or if
     the fdinfo fields contain a value larger than pid_t.

   - EREMOTE if the PID is in a separate namespace.

   - ESRCH if the process is already terminated.

Checked on x86_64-linux-gnu on Linux 4.15 (no CLONE_PIDFD or waitid
support), Linux 5.4 (full support), and Linux 6.2.

Reviewed-by: Florian Weimer <fweimer@redhat.com>
2023-09-05 13:08:59 -03:00
ChangeLog.old Create ChangeLog.old/ChangeLog.27 2023-07-30 21:45:27 +02:00
argp argp-parse: Get rid of alloca 2023-08-28 16:49:27 +00:00
assert
benchtests
bits linux: Add posix_spawnattr_{get, set}cgroup_np (BZ 26371) 2023-09-05 13:08:48 -03:00
catgets gencat: Get rid of alloca. 2023-08-28 16:42:53 +00:00
conform
crypt
csu
ctype
debug chk: Add and fix hidden builtin definitions for *_chk 2023-08-03 22:46:48 +02:00
dirent
dlfcn
elf elf: Fix slow tls access after dlopen [BZ #19924] 2023-09-01 08:21:37 +01:00
gmon
gnulib
grp
gshadow
hesiod
htl __call_tls_dtors: Use call_function_static_weak 2023-09-04 20:03:37 +02:00
hurd hurd: Avoid including thread_state.h in installed header 2023-09-05 11:58:26 +02:00
iconv iconv: restore verbosity with unrecognized encoding names (bug 30694) 2023-08-02 13:30:04 +02:00
iconvdata add GB18030-2022 charmap and test the entire GB18030 charmap [BZ #30243] 2023-08-29 19:02:30 +02:00
include posix: Add pidfd_spawn and pidfd_spawnp (BZ 30349) 2023-09-05 13:08:59 -03:00
inet nscd: Do not rebuild getaddrinfo (bug 30709) 2023-08-11 10:10:16 +02:00
intl intl: Treat C.UTF-8 locale like C locale (BZ# 16621) 2023-09-04 15:31:36 +02:00
io io/tst-statvfs: fix statfs().f_type comparison test on some arches 2023-08-15 17:08:23 +02:00
libio hurd: Fix tst-openloc 2023-07-20 23:42:56 +02:00
locale
localedata add GB18030-2022 charmap and test the entire GB18030 charmap [BZ #30243] 2023-08-29 19:02:30 +02:00
login unistd: Avoid PLT entries with _FORTIFY_SOURCE 2023-07-05 16:59:48 +02:00
mach
malloc malloc: Remove bin scanning from memalign (bug 30723) 2023-08-15 08:07:36 +02:00
manual linux: Add pidfd_getpid 2023-09-05 13:08:59 -03:00
math
mathvec
misc misc/bits/syslog.h: Clearly separate declaration from definition 2023-07-05 16:59:48 +02:00
nis
nptl __call_tls_dtors: Use call_function_static_weak 2023-09-04 20:03:37 +02:00
nptl_db
nscd nscd: Skip unusable entries in first pass in prune_cache (bug 30800) 2023-08-29 08:28:38 +02:00
nss Restore lookup of IPv4 mapped addresses in files database (bug 25457) 2023-07-24 13:16:24 +02:00
po translations: update cs, nl, vi 2023-07-27 00:21:13 +02:00
posix posix: Add pidfd_spawn and pidfd_spawnp (BZ 30349) 2023-09-05 13:08:59 -03:00
pwd
resolv resolv/nss_dns/dns-host: Get rid of alloca. 2023-08-14 20:50:40 +00:00
resource
rt Exclude routines from fortification 2023-07-05 16:59:48 +02:00
scripts Use GMP 6.3.0, MPFR 4.2.1 in build-many-glibcs.py 2023-08-29 14:11:35 +00:00
setjmp chk: Add and fix hidden builtin definitions for *_chk 2023-08-03 22:46:48 +02:00
shadow
signal
socket Exclude routines from fortification 2023-07-05 16:59:48 +02:00
soft-fp
stdio-common fxprintf: Get rid of alloca 2023-08-15 14:28:25 +00:00
stdlib __call_tls_dtors: Use call_function_static_weak 2023-09-04 20:03:37 +02:00
string string: Fix tester build with fortify enable with gcc < 12 2023-08-18 07:59:55 -05:00
sunrpc sunrpc: Fix netname build with older gcc 2023-07-26 09:45:22 -03:00
support
sysdeps linux: Add pidfd_getpid 2023-09-05 13:08:59 -03:00
sysvipc
termios
time
timezone
wcsmbs vfscanf-internal: Remove potentially unbounded allocas 2023-07-06 10:46:46 -03:00
wctype
.clang-format
.gitattributes
.gitignore
CONTRIBUTED-BY
COPYING
COPYING.LIB
INSTALL elf: Check that --list-diagnostics output has the expected syntax 2023-08-25 14:19:16 +02:00
LICENSES
MAINTAINERS
Makeconfig configure: Add -Wall again to the default CFLAGS 2023-08-15 08:07:50 +02:00
Makefile scripts: Fix fortify checks if compiler does not support _FORTIFY_SOURCE=3 2023-07-20 17:58:26 -03:00
Makefile.help
Makefile.in
Makerules
NEWS linux: Add pidfd_getpid 2023-09-05 13:08:59 -03:00
README
Rules scripts: Fix fortify checks if compiler does not support _FORTIFY_SOURCE=3 2023-07-20 17:58:26 -03:00
SECURITY.md
SHARED-FILES
abi-tags
aclocal.m4 configure: Use autoconf 2.71 2023-07-17 10:08:10 -04:00
config.h.in LoongArch: Add minuimum binutils required version 2023-08-14 09:47:09 +08:00
config.make.in configure: Remove --enable-all-warnings option 2023-08-01 15:35:25 -03:00
configure configure: Remove --enable-all-warnings option 2023-08-01 15:35:25 -03:00
configure.ac configure: Remove --enable-all-warnings option 2023-08-01 15:35:25 -03:00
extra-lib.mk
gen-locales.mk
libc-abis
libof-iterator.mk
o-iterator.mk
shlib-versions
test-skeleton.c
version.h Open master branch for glibc 2.39 development 2023-07-31 20:07:55 +02:00

README

This directory contains the sources of the GNU C Library.
See the file "version.h" for what release version you have.

The GNU C Library is the standard system C library for all GNU systems,
and is an important part of what makes up a GNU system.  It provides the
system API for all programs written in C and C-compatible languages such
as C++ and Objective C; the runtime facilities of other programming
languages use the C library to access the underlying operating system.

In GNU/Linux systems, the C library works with the Linux kernel to
implement the operating system behavior seen by user applications.
In GNU/Hurd systems, it works with a microkernel and Hurd servers.

The GNU C Library implements much of the POSIX.1 functionality in the
GNU/Hurd system, using configurations i[4567]86-*-gnu and x86_64-gnu.

When working with Linux kernels, this version of the GNU C Library
requires Linux kernel version 3.2 or later.

Also note that the shared version of the libgcc_s library must be
installed for the pthread library to work correctly.

The GNU C Library supports these configurations for using Linux kernels:

	aarch64*-*-linux-gnu
	alpha*-*-linux-gnu
	arc*-*-linux-gnu
	arm-*-linux-gnueabi
	csky-*-linux-gnuabiv2
	hppa-*-linux-gnu
	i[4567]86-*-linux-gnu
	x86_64-*-linux-gnu	Can build either x86_64 or x32
	ia64-*-linux-gnu
	loongarch64-*-linux-gnu Hardware floating point, LE only.
	m68k-*-linux-gnu
	microblaze*-*-linux-gnu
	mips-*-linux-gnu
	mips64-*-linux-gnu
	or1k-*-linux-gnu
	powerpc-*-linux-gnu	Hardware or software floating point, BE only.
	powerpc64*-*-linux-gnu	Big-endian and little-endian.
	s390-*-linux-gnu
	s390x-*-linux-gnu
	riscv32-*-linux-gnu
	riscv64-*-linux-gnu
	sh[34]-*-linux-gnu
	sparc*-*-linux-gnu
	sparc64*-*-linux-gnu

If you are interested in doing a port, please contact the glibc
maintainers; see https://www.gnu.org/software/libc/ for more
information.

See the file INSTALL to find out how to configure, build, and install
the GNU C Library.  You might also consider reading the WWW pages for
the C library at https://www.gnu.org/software/libc/.

The GNU C Library is (almost) completely documented by the Texinfo manual
found in the `manual/' subdirectory.  The manual is still being updated
and contains some known errors and omissions; we regret that we do not
have the resources to work on the manual as much as we would like.  For
corrections to the manual, please file a bug in the `manual' component,
following the bug-reporting instructions below.  Please be sure to check
the manual in the current development sources to see if your problem has
already been corrected.

Please see https://www.gnu.org/software/libc/bugs.html for bug reporting
information.  We are now using the Bugzilla system to track all bug reports.
This web page gives detailed information on how to report bugs properly.

The GNU C Library is free software.  See the file COPYING.LIB for copying
conditions, and LICENSES for notices about a few contributions that require
these additional notices to be distributed.  License copyright years may be
listed using range notation, e.g., 1996-2015, indicating that every year in
the range, inclusive, is a copyrightable year that would otherwise be listed
individually.