summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlejandro Colomar <alx@kernel.org>2023-08-02 21:34:52 +0200
committerAlejandro Colomar <alx@kernel.org>2023-08-03 00:53:51 +0200
commitc383cff1a681164ff7052cbd48840041b5ce760c (patch)
tree1c4c0b733f4c16b5783b41bebb19194a9ef62ad1
parent42d51ca85333d695e32ca7c6381e9a39f18a262b (diff)
New upstream version 6.05.01upstream/6.05.01
This is a scripted patch: $ git ls-files | xargs rm; $ rm -r */; $ wget https://mirrors.edge.kernel.org/pub/linux/docs/man-pages/man-pages-6.05.01.tar.gz \ -O /tmp/man-pages-6.05.01.tar.gz; $ wget https://mirrors.edge.kernel.org/pub/linux/docs/man-pages/man-pages-6.05.01.tar.sign \ -O /tmp/man-pages-6.05.01.tar.sign; $ gunzip /tmp/man-pages-6.05.01.tar.gz; $ gpg --verify /tmp/man-pages-6.05.01.tar{.sign,}; gpg: Signature made Thu Aug 3 00:22:33 2023 CEST gpg: using RSA key EA3A87F0A4EBA030E45DF2409E8C1AFBBEFFDB32 gpg: Good signature from "Alejandro Colomar <alx@kernel.org>" [ultimate] gpg: aka "Alejandro Colomar Andres <alx.manpages@gmail.com>" [ultimate] $ tar xf /tmp/man-pages-6.05.01.tar -C /tmp/; $ mv /tmp/man-pages-6.05.01/{*,.*} .; Signed-off-by: Alejandro Colomar <alx@kernel.org>
-rw-r--r--.gitignore2
-rw-r--r--.mailmap4
-rw-r--r--CONTRIBUTING203
-rw-r--r--Changes268
-rw-r--r--Changes.old323
-rw-r--r--INSTALL136
-rw-r--r--LICENSES/Linux-man-pages-1-para.txt4
-rw-r--r--LICENSES/Linux-man-pages-copyleft-2-para.txt8
-rw-r--r--LICENSES/Linux-man-pages-copyleft-var.txt16
-rw-r--r--Makefile185
-rw-r--r--README92
-rw-r--r--RELEASE156
-rw-r--r--etc/groff/tmac/checkstyle.tmac13
-rw-r--r--lib/build-src.mk120
-rw-r--r--lib/build.mk44
-rw-r--r--lib/dist.mk72
-rw-r--r--lib/install-html.mk43
-rw-r--r--lib/install-man.mk131
-rw-r--r--lib/lint-man.mk130
-rw-r--r--lib/lint.mk39
-rw-r--r--lib/src.mk25
-rw-r--r--lsm6
-rw-r--r--man1/getent.12
-rw-r--r--man1/iconv.14
-rw-r--r--man1/intro.14
-rw-r--r--man1/ldd.12
-rw-r--r--man1/locale.116
-rw-r--r--man1/localedef.14
-rw-r--r--man1/memusage.116
-rw-r--r--man1/memusagestat.12
-rw-r--r--man1/mtrace.12
-rw-r--r--man1/pldd.112
-rw-r--r--man1/sprof.124
-rw-r--r--man1/time.16
-rw-r--r--man2/_exit.213
-rw-r--r--man2/_syscall.216
-rw-r--r--man2/accept.245
-rw-r--r--man2/access.2110
-rw-r--r--man2/acct.26
-rw-r--r--man2/add_key.218
-rw-r--r--man2/adjtimex.214
-rw-r--r--man2/alarm.26
-rw-r--r--man2/alloc_hugepages.27
-rw-r--r--man2/arch_prctl.26
-rw-r--r--man2/bdflush.210
-rw-r--r--man2/bind.235
-rw-r--r--man2/bpf.254
-rw-r--r--man2/brk.24
-rw-r--r--man2/cacheflush.217
-rw-r--r--man2/capget.212
-rw-r--r--man2/chdir.26
-rw-r--r--man2/chmod.226
-rw-r--r--man2/chown.241
-rw-r--r--man2/chroot.26
-rw-r--r--man2/clock_getres.277
-rw-r--r--man2/clock_nanosleep.213
-rw-r--r--man2/clone.2139
-rw-r--r--man2/close.26
-rw-r--r--man2/close_range.239
-rw-r--r--man2/connect.211
-rw-r--r--man2/copy_file_range.255
-rw-r--r--man2/create_module.214
-rw-r--r--man2/delete_module.227
-rw-r--r--man2/dup.238
-rw-r--r--man2/epoll_create.245
-rw-r--r--man2/epoll_ctl.220
-rw-r--r--man2/epoll_wait.231
-rw-r--r--man2/eventfd.2118
-rw-r--r--man2/execve.2158
-rw-r--r--man2/execveat.213
-rw-r--r--man2/exit_group.28
-rw-r--r--man2/fallocate.218
-rw-r--r--man2/fanotify_init.212
-rw-r--r--man2/fanotify_mark.210
-rw-r--r--man2/fcntl.269
-rw-r--r--man2/flock.2116
-rw-r--r--man2/fork.225
-rw-r--r--man2/fsync.212
-rw-r--r--man2/futex.288
-rw-r--r--man2/futimesat.225
-rw-r--r--man2/get_kernel_syms.214
-rw-r--r--man2/get_mempolicy.231
-rw-r--r--man2/get_robust_list.22
-rw-r--r--man2/getcpu.240
-rw-r--r--man2/getdents.230
-rw-r--r--man2/getdomainname.218
-rw-r--r--man2/getgid.240
-rw-r--r--man2/getgroups.268
-rw-r--r--man2/gethostname.223
-rw-r--r--man2/getitimer.252
-rw-r--r--man2/getpagesize.27
-rw-r--r--man2/getpeername.214
-rw-r--r--man2/getpid.271
-rw-r--r--man2/getpriority.26
-rw-r--r--man2/getrandom.211
-rw-r--r--man2/getresuid.218
-rw-r--r--man2/getrlimit.267
-rw-r--r--man2/getrusage.219
-rw-r--r--man2/getsid.215
-rw-r--r--man2/getsockname.214
-rw-r--r--man2/getsockopt.213
-rw-r--r--man2/gettid.217
-rw-r--r--man2/gettimeofday.258
-rw-r--r--man2/getuid.29
-rw-r--r--man2/getunwind.211
-rw-r--r--man2/getxattr.213
-rw-r--r--man2/idle.211
-rw-r--r--man2/init_module.232
-rw-r--r--man2/inotify_add_watch.28
-rw-r--r--man2/inotify_init.218
-rw-r--r--man2/inotify_rm_watch.210
-rw-r--r--man2/intro.22
-rw-r--r--man2/io_cancel.218
-rw-r--r--man2/io_destroy.216
-rw-r--r--man2/io_getevents.220
-rw-r--r--man2/io_setup.220
-rw-r--r--man2/io_submit.222
-rw-r--r--man2/ioctl.213
-rw-r--r--man2/ioctl_console.22
-rw-r--r--man2/ioctl_fat.285
-rw-r--r--man2/ioctl_ficlonerange.211
-rw-r--r--man2/ioctl_fideduperange.215
-rw-r--r--man2/ioctl_fslabel.213
-rw-r--r--man2/ioctl_getfsmap.215
-rw-r--r--man2/ioctl_iflags.26
-rw-r--r--man2/ioctl_ns.238
-rw-r--r--man2/ioctl_pipe.264
-rw-r--r--man2/ioctl_tty.230
-rw-r--r--man2/ioctl_userfaultfd.216
-rw-r--r--man2/ioperm.226
-rw-r--r--man2/iopl.212
-rw-r--r--man2/ioprio_set.213
-rw-r--r--man2/ipc.210
-rw-r--r--man2/kcmp.245
-rw-r--r--man2/kexec_load.216
-rw-r--r--man2/keyctl.260
-rw-r--r--man2/kill.234
-rw-r--r--man2/landlock_add_rule.210
-rw-r--r--man2/landlock_create_ruleset.28
-rw-r--r--man2/landlock_restrict_self.28
-rw-r--r--man2/link.247
-rw-r--r--man2/listen.29
-rw-r--r--man2/listxattr.245
-rw-r--r--man2/llseek.29
-rw-r--r--man2/lookup_dcookie.214
-rw-r--r--man2/lseek.224
-rw-r--r--man2/madvise.231
-rw-r--r--man2/mbind.269
-rw-r--r--man2/membarrier.275
-rw-r--r--man2/memfd_create.262
-rw-r--r--man2/memfd_secret.212
-rw-r--r--man2/migrate_pages.223
-rw-r--r--man2/mincore.222
-rw-r--r--man2/mkdir.232
-rw-r--r--man2/mknod.235
-rw-r--r--man2/mlock.2100
-rw-r--r--man2/mmap.2146
-rw-r--r--man2/mmap2.211
-rw-r--r--man2/modify_ldt.25
-rw-r--r--man2/mount.224
-rw-r--r--man2/mount_setattr.267
-rw-r--r--man2/move_pages.222
-rw-r--r--man2/mprotect.255
-rw-r--r--man2/mq_getsetattr.24
-rw-r--r--man2/mremap.222
-rw-r--r--man2/msgctl.230
-rw-r--r--man2/msgget.218
-rw-r--r--man2/msgop.244
-rw-r--r--man2/msync.254
-rw-r--r--man2/nanosleep.248
-rw-r--r--man2/nfsservctl.214
-rw-r--r--man2/nice.236
-rw-r--r--man2/open.2295
-rw-r--r--man2/open_by_handle_at.2100
-rw-r--r--man2/openat2.213
-rw-r--r--man2/outb.26
-rw-r--r--man2/pause.26
-rw-r--r--man2/pciconfig_read.26
-rw-r--r--man2/perf_event_open.279
-rw-r--r--man2/perfmonctl.218
-rw-r--r--man2/personality.2119
-rw-r--r--man2/pidfd_getfd.212
-rw-r--r--man2/pidfd_open.228
-rw-r--r--man2/pidfd_send_signal.234
-rw-r--r--man2/pipe.245
-rw-r--r--man2/pivot_root.260
-rw-r--r--man2/pkey_alloc.217
-rw-r--r--man2/poll.2123
-rw-r--r--man2/posix_fadvise.277
-rw-r--r--man2/prctl.241
-rw-r--r--man2/pread.233
-rw-r--r--man2/process_madvise.215
-rw-r--r--man2/process_vm_readv.218
-rw-r--r--man2/ptrace.223
-rw-r--r--man2/query_module.212
-rw-r--r--man2/quotactl.238
-rw-r--r--man2/read.211
-rw-r--r--man2/readahead.228
-rw-r--r--man2/readdir.28
-rw-r--r--man2/readlink.276
-rw-r--r--man2/readv.296
-rw-r--r--man2/reboot.26
-rw-r--r--man2/recv.272
-rw-r--r--man2/recvmmsg.227
-rw-r--r--man2/remap_file_pages.214
-rw-r--r--man2/removexattr.216
-rw-r--r--man2/rename.236
-rw-r--r--man2/request_key.223
-rw-r--r--man2/restart_syscall.210
-rw-r--r--man2/rmdir.26
-rw-r--r--man2/rt_sigqueueinfo.216
-rw-r--r--man2/s390_guarded_storage.213
-rw-r--r--man2/s390_pci_mmio_write.210
-rw-r--r--man2/s390_runtime_instr.211
-rw-r--r--man2/s390_sthyi.28
-rw-r--r--man2/sched_get_priority_max.26
-rw-r--r--man2/sched_rr_get_interval.241
-rw-r--r--man2/sched_setaffinity.239
-rw-r--r--man2/sched_setattr.210
-rw-r--r--man2/sched_setparam.26
-rw-r--r--man2/sched_setscheduler.250
-rw-r--r--man2/sched_yield.245
-rw-r--r--man2/seccomp.250
-rw-r--r--man2/seccomp_unotify.2322
-rw-r--r--man2/select.280
-rw-r--r--man2/select_tut.2102
-rw-r--r--man2/semctl.2108
-rw-r--r--man2/semget.226
-rw-r--r--man2/semop.223
-rw-r--r--man2/send.234
-rw-r--r--man2/sendfile.256
-rw-r--r--man2/sendmmsg.231
-rw-r--r--man2/set_mempolicy.231
-rw-r--r--man2/set_thread_area.216
-rw-r--r--man2/set_tid_address.211
-rw-r--r--man2/seteuid.210
-rw-r--r--man2/setfsgid.234
-rw-r--r--man2/setfsuid.218
-rw-r--r--man2/setgid.230
-rw-r--r--man2/setns.228
-rw-r--r--man2/setpgid.255
-rw-r--r--man2/setresuid.247
-rw-r--r--man2/setreuid.222
-rw-r--r--man2/setsid.26
-rw-r--r--man2/setuid.257
-rw-r--r--man2/setup.213
-rw-r--r--man2/setxattr.213
-rw-r--r--man2/sgetmask.28
-rw-r--r--man2/shmctl.240
-rw-r--r--man2/shmget.28
-rw-r--r--man2/shmop.280
-rw-r--r--man2/shutdown.29
-rw-r--r--man2/sigaction.2172
-rw-r--r--man2/sigaltstack.223
-rw-r--r--man2/signal.278
-rw-r--r--man2/signalfd.282
-rw-r--r--man2/sigpending.246
-rw-r--r--man2/sigprocmask.282
-rw-r--r--man2/sigreturn.26
-rw-r--r--man2/sigsuspend.249
-rw-r--r--man2/sigwaitinfo.292
-rw-r--r--man2/socket.211
-rw-r--r--man2/socketcall.29
-rw-r--r--man2/socketpair.221
-rw-r--r--man2/splice.247
-rw-r--r--man2/spu_create.228
-rw-r--r--man2/spu_run.228
-rw-r--r--man2/stat.250
-rw-r--r--man2/statfs.2124
-rw-r--r--man2/statx.225
-rw-r--r--man2/stime.26
-rw-r--r--man2/subpage_prot.213
-rw-r--r--man2/swapon.28
-rw-r--r--man2/symlink.237
-rw-r--r--man2/sync.245
-rw-r--r--man2/sync_file_range.227
-rw-r--r--man2/syscall.214
-rw-r--r--man2/syscalls.212
-rw-r--r--man2/sysctl.228
-rw-r--r--man2/sysfs.26
-rw-r--r--man2/sysinfo.210
-rw-r--r--man2/syslog.27
-rw-r--r--man2/tee.224
-rw-r--r--man2/time.226
-rw-r--r--man2/timer_create.2140
-rw-r--r--man2/timer_delete.29
-rw-r--r--man2/timer_getoverrun.211
-rw-r--r--man2/timer_settime.211
-rw-r--r--man2/timerfd_create.240
-rw-r--r--man2/times.267
-rw-r--r--man2/tkill.224
-rw-r--r--man2/truncate.252
-rw-r--r--man2/umask.26
-rw-r--r--man2/umount.231
-rw-r--r--man2/uname.248
-rw-r--r--man2/unimplemented.22
-rw-r--r--man2/unlink.222
-rw-r--r--man2/unshare.232
-rw-r--r--man2/uselib.28
-rw-r--r--man2/userfaultfd.2112
-rw-r--r--man2/ustat.29
-rw-r--r--man2/utime.215
-rw-r--r--man2/utimensat.284
-rw-r--r--man2/vfork.2103
-rw-r--r--man2/vhangup.25
-rw-r--r--man2/vm86.25
-rw-r--r--man2/vmsplice.212
-rw-r--r--man2/wait.263
-rw-r--r--man2/wait4.26
-rw-r--r--man2/write.211
-rw-r--r--man2type/open_how.2type4
-rw-r--r--man3/CPU_SET.326
-rw-r--r--man3/INFINITY.34
-rw-r--r--man3/MAX.312
-rw-r--r--man3/MB_CUR_MAX.36
-rw-r--r--man3/MB_LEN_MAX.36
-rw-r--r--man3/_Generic.314
-rw-r--r--man3/__ppc_get_timebase.337
-rw-r--r--man3/__ppc_set_ppr_med.335
-rw-r--r--man3/__ppc_yield.314
-rw-r--r--man3/__setfpucw.37
-rw-r--r--man3/a64l.314
-rw-r--r--man3/abort.320
-rw-r--r--man3/abs.326
-rw-r--r--man3/acos.314
-rw-r--r--man3/acosh.312
-rw-r--r--man3/addseverity.321
-rw-r--r--man3/adjtime.310
-rw-r--r--man3/aio_cancel.317
-rw-r--r--man3/aio_error.317
-rw-r--r--man3/aio_fsync.317
-rw-r--r--man3/aio_init.310
-rw-r--r--man3/aio_read.317
-rw-r--r--man3/aio_return.317
-rw-r--r--man3/aio_suspend.317
-rw-r--r--man3/aio_write.317
-rw-r--r--man3/alloca.315
-rw-r--r--man3/arc4random.320
-rw-r--r--man3/argz_add.310
-rw-r--r--man3/asin.314
-rw-r--r--man3/asinh.312
-rw-r--r--man3/asprintf.314
-rw-r--r--man3/assert.320
-rw-r--r--man3/assert_perror.310
-rw-r--r--man3/atan.314
-rw-r--r--man3/atan2.314
-rw-r--r--man3/atanh.314
-rw-r--r--man3/atexit.354
-rw-r--r--man3/atof.312
-rw-r--r--man3/atoi.329
-rw-r--r--man3/backtrace.340
-rw-r--r--man3/basename.318
-rw-r--r--man3/bcmp.39
-rw-r--r--man3/bcopy.313
-rw-r--r--man3/bindresvport.315
-rw-r--r--man3/bsd_signal.325
-rw-r--r--man3/bsearch.326
-rw-r--r--man3/bstring.32
-rw-r--r--man3/bswap.312
-rw-r--r--man3/btowc.312
-rw-r--r--man3/btree.32
-rw-r--r--man3/byteorder.312
-rw-r--r--man3/bzero.334
-rw-r--r--man3/cabs.315
-rw-r--r--man3/cacos.333
-rw-r--r--man3/cacosh.329
-rw-r--r--man3/canonicalize_file_name.310
-rw-r--r--man3/carg.315
-rw-r--r--man3/casin.315
-rw-r--r--man3/casinh.315
-rw-r--r--man3/catan.329
-rw-r--r--man3/catanh.329
-rw-r--r--man3/catgets.315
-rw-r--r--man3/catopen.336
-rw-r--r--man3/cbrt.312
-rw-r--r--man3/ccos.315
-rw-r--r--man3/ccosh.39
-rw-r--r--man3/ceil.314
-rw-r--r--man3/cexp.315
-rw-r--r--man3/cexp2.32
-rw-r--r--man3/cfree.321
-rw-r--r--man3/cimag.321
-rw-r--r--man3/circleq.326
-rw-r--r--man3/clearenv.325
-rw-r--r--man3/clock.337
-rw-r--r--man3/clock_getcpuclockid.327
-rw-r--r--man3/clog.315
-rw-r--r--man3/clog10.315
-rw-r--r--man3/clog2.34
-rw-r--r--man3/closedir.312
-rw-r--r--man3/cmsg.363
-rw-r--r--man3/confstr.314
-rw-r--r--man3/conj.315
-rw-r--r--man3/copysign.321
-rw-r--r--man3/cos.314
-rw-r--r--man3/cosh.312
-rw-r--r--man3/cpow.315
-rw-r--r--man3/cproj.319
-rw-r--r--man3/creal.321
-rw-r--r--man3/crypt.354
-rw-r--r--man3/csin.315
-rw-r--r--man3/csinh.315
-rw-r--r--man3/csqrt.315
-rw-r--r--man3/ctan.315
-rw-r--r--man3/ctanh.315
-rw-r--r--man3/ctermid.312
-rw-r--r--man3/ctime.3129
-rw-r--r--man3/daemon.320
-rw-r--r--man3/dbopen.32
-rw-r--r--man3/des_crypt.349
-rw-r--r--man3/difftime.314
-rw-r--r--man3/dirfd.311
-rw-r--r--man3/div.314
-rw-r--r--man3/dl_iterate_phdr.370
-rw-r--r--man3/dladdr.327
-rw-r--r--man3/dlerror.318
-rw-r--r--man3/dlinfo.352
-rw-r--r--man3/dlopen.369
-rw-r--r--man3/dlsym.330
-rw-r--r--man3/drand48.314
-rw-r--r--man3/drand48_r.310
-rw-r--r--man3/duplocale.328
-rw-r--r--man3/dysize.314
-rw-r--r--man3/ecvt.312
-rw-r--r--man3/ecvt_r.310
-rw-r--r--man3/encrypt.364
-rw-r--r--man3/end.310
-rw-r--r--man3/endian.319
-rw-r--r--man3/envz_add.316
-rw-r--r--man3/erf.314
-rw-r--r--man3/erfc.314
-rw-r--r--man3/err.323
-rw-r--r--man3/errno.32
-rw-r--r--man3/error.315
-rw-r--r--man3/ether_aton.312
-rw-r--r--man3/euidaccess.321
-rw-r--r--man3/exec.356
-rw-r--r--man3/exit.312
-rw-r--r--man3/exp.314
-rw-r--r--man3/exp10.316
-rw-r--r--man3/exp2.315
-rw-r--r--man3/expm1.320
-rw-r--r--man3/fabs.314
-rw-r--r--man3/fclose.312
-rw-r--r--man3/fcloseall.310
-rw-r--r--man3/fdim.315
-rw-r--r--man3/fenv.317
-rw-r--r--man3/ferror.317
-rw-r--r--man3/fexecve.320
-rw-r--r--man3/fflush.314
-rw-r--r--man3/ffs.324
-rw-r--r--man3/fgetc.314
-rw-r--r--man3/fgetgrent.310
-rw-r--r--man3/fgetpwent.310
-rw-r--r--man3/fgetwc.312
-rw-r--r--man3/fgetws.312
-rw-r--r--man3/fileno.314
-rw-r--r--man3/finite.38
-rw-r--r--man3/flockfile.312
-rw-r--r--man3/floor.316
-rw-r--r--man3/fma.317
-rw-r--r--man3/fmax.315
-rw-r--r--man3/fmemopen.346
-rw-r--r--man3/fmin.315
-rw-r--r--man3/fmod.316
-rw-r--r--man3/fmtmsg.344
-rw-r--r--man3/fnmatch.326
-rw-r--r--man3/fopen.331
-rw-r--r--man3/fopencookie.391
-rw-r--r--man3/fpathconf.312
-rw-r--r--man3/fpclassify.322
-rw-r--r--man3/fpurge.320
-rw-r--r--man3/fputwc.312
-rw-r--r--man3/fputws.312
-rw-r--r--man3/fread.330
-rw-r--r--man3/frexp.320
-rw-r--r--man3/fseek.312
-rw-r--r--man3/fseeko.315
-rw-r--r--man3/ftime.323
-rw-r--r--man3/ftok.312
-rw-r--r--man3/fts.330
-rw-r--r--man3/ftw.368
-rw-r--r--man3/futimes.330
-rw-r--r--man3/fwide.36
-rw-r--r--man3/gamma.316
-rw-r--r--man3/gcvt.313
-rw-r--r--man3/get_nprocs.312
-rw-r--r--man3/get_phys_pages.310
-rw-r--r--man3/getaddrinfo.3122
-rw-r--r--man3/getaddrinfo_a.387
-rw-r--r--man3/getauxval.318
-rw-r--r--man3/getcontext.314
-rw-r--r--man3/getcwd.387
-rw-r--r--man3/getdate.332
-rw-r--r--man3/getdirentries.312
-rw-r--r--man3/getdtablesize.327
-rw-r--r--man3/getentropy.312
-rw-r--r--man3/getenv.327
-rw-r--r--man3/getfsent.329
-rw-r--r--man3/getgrent.318
-rw-r--r--man3/getgrent_r.329
-rw-r--r--man3/getgrnam.324
-rw-r--r--man3/getgrouplist.336
-rw-r--r--man3/gethostbyname.377
-rw-r--r--man3/gethostid.340
-rw-r--r--man3/getifaddrs.352
-rw-r--r--man3/getipnodebyname.311
-rw-r--r--man3/getline.327
-rw-r--r--man3/getloadavg.322
-rw-r--r--man3/getlogin.361
-rw-r--r--man3/getmntent.324
-rw-r--r--man3/getnameinfo.335
-rw-r--r--man3/getnetent.328
-rw-r--r--man3/getnetent_r.313
-rw-r--r--man3/getopt.397
-rw-r--r--man3/getpass.315
-rw-r--r--man3/getprotoent.326
-rw-r--r--man3/getprotoent_r.339
-rw-r--r--man3/getpt.321
-rw-r--r--man3/getpw.310
-rw-r--r--man3/getpwent.321
-rw-r--r--man3/getpwent_r.329
-rw-r--r--man3/getpwnam.337
-rw-r--r--man3/getrpcent.315
-rw-r--r--man3/getrpcent_r.313
-rw-r--r--man3/getrpcport.313
-rw-r--r--man3/gets.312
-rw-r--r--man3/getservent.326
-rw-r--r--man3/getservent_r.341
-rw-r--r--man3/getspnam.340
-rw-r--r--man3/getsubopt.338
-rw-r--r--man3/getttyent.311
-rw-r--r--man3/getusershell.310
-rw-r--r--man3/getutent.336
-rw-r--r--man3/getutmp.316
-rw-r--r--man3/getw.311
-rw-r--r--man3/getwchar.312
-rw-r--r--man3/glob.318
-rw-r--r--man3/gnu_get_libc_version.318
-rw-r--r--man3/grantpt.336
-rw-r--r--man3/group_member.34
-rw-r--r--man3/gsignal.314
-rw-r--r--man3/hash.32
-rw-r--r--man3/hsearch.358
-rw-r--r--man3/hypot.312
-rw-r--r--man3/iconv.353
-rw-r--r--man3/iconv_close.315
-rw-r--r--man3/iconv_open.315
-rw-r--r--man3/if_nameindex.336
-rw-r--r--man3/if_nametoindex.315
-rw-r--r--man3/ilogb.314
-rw-r--r--man3/index.310
-rw-r--r--man3/inet.353
-rw-r--r--man3/inet_net_pton.338
-rw-r--r--man3/inet_ntop.313
-rw-r--r--man3/inet_pton.330
-rw-r--r--man3/initgroups.310
-rw-r--r--man3/insque.354
-rw-r--r--man3/intro.32
-rw-r--r--man3/isalpha.3207
-rw-r--r--man3/isatty.312
-rw-r--r--man3/isfdtype.320
-rw-r--r--man3/isgreater.316
-rw-r--r--man3/iswalnum.319
-rw-r--r--man3/iswalpha.312
-rw-r--r--man3/iswblank.312
-rw-r--r--man3/iswcntrl.312
-rw-r--r--man3/iswctype.312
-rw-r--r--man3/iswdigit.312
-rw-r--r--man3/iswgraph.312
-rw-r--r--man3/iswlower.312
-rw-r--r--man3/iswprint.312
-rw-r--r--man3/iswpunct.312
-rw-r--r--man3/iswspace.319
-rw-r--r--man3/iswupper.312
-rw-r--r--man3/iswxdigit.312
-rw-r--r--man3/j0.341
-rw-r--r--man3/key_setsecret.38
-rw-r--r--man3/killpg.313
-rw-r--r--man3/ldexp.314
-rw-r--r--man3/lgamma.341
-rw-r--r--man3/lio_listio.317
-rw-r--r--man3/list.328
-rw-r--r--man3/localeconv.314
-rw-r--r--man3/lockf.312
-rw-r--r--man3/log.314
-rw-r--r--man3/log10.314
-rw-r--r--man3/log1p.312
-rw-r--r--man3/log2.315
-rw-r--r--man3/logb.323
-rw-r--r--man3/login.320
-rw-r--r--man3/lrint.317
-rw-r--r--man3/lround.317
-rw-r--r--man3/lsearch.314
-rw-r--r--man3/lseek64.38
-rw-r--r--man3/makecontext.345
-rw-r--r--man3/makedev.331
-rw-r--r--man3/mallinfo.360
-rw-r--r--man3/malloc.3111
-rw-r--r--man3/malloc_get_state.310
-rw-r--r--man3/malloc_hook.326
-rw-r--r--man3/malloc_info.355
-rw-r--r--man3/malloc_stats.314
-rw-r--r--man3/malloc_trim.314
-rw-r--r--man3/malloc_usable_size.343
-rw-r--r--man3/mallopt.328
-rw-r--r--man3/matherr.328
-rw-r--r--man3/mblen.322
-rw-r--r--man3/mbrlen.312
-rw-r--r--man3/mbrtowc.312
-rw-r--r--man3/mbsinit.312
-rw-r--r--man3/mbsnrtowcs.310
-rw-r--r--man3/mbsrtowcs.314
-rw-r--r--man3/mbstowcs.364
-rw-r--r--man3/mbtowc.324
-rw-r--r--man3/mcheck.348
-rw-r--r--man3/memccpy.312
-rw-r--r--man3/memchr.340
-rw-r--r--man3/memcmp.330
-rw-r--r--man3/memcpy.314
-rw-r--r--man3/memfrob.313
-rw-r--r--man3/memmem.315
-rw-r--r--man3/memmove.312
-rw-r--r--man3/mempcpy.315
-rw-r--r--man3/memset.312
-rw-r--r--man3/mkdtemp.317
-rw-r--r--man3/mkfifo.329
-rw-r--r--man3/mkstemp.350
-rw-r--r--man3/mktemp.313
-rw-r--r--man3/modf.314
-rw-r--r--man3/mpool.35
-rw-r--r--man3/mq_close.312
-rw-r--r--man3/mq_getattr.332
-rw-r--r--man3/mq_notify.339
-rw-r--r--man3/mq_open.316
-rw-r--r--man3/mq_receive.316
-rw-r--r--man3/mq_send.316
-rw-r--r--man3/mq_unlink.312
-rw-r--r--man3/mtrace.316
-rw-r--r--man3/nan.316
-rw-r--r--man3/netlink.38
-rw-r--r--man3/newlocale.346
-rw-r--r--man3/nextafter.313
-rw-r--r--man3/nextup.312
-rw-r--r--man3/nl_langinfo.318
-rw-r--r--man3/ntp_gettime.330
-rw-r--r--man3/offsetof.314
-rw-r--r--man3/on_exit.318
-rw-r--r--man3/open_memstream.322
-rw-r--r--man3/opendir.320
-rw-r--r--man3/openpty.315
-rw-r--r--man3/perror.352
-rw-r--r--man3/popen.321
-rw-r--r--man3/posix_fallocate.320
-rw-r--r--man3/posix_madvise.313
-rw-r--r--man3/posix_memalign.388
-rw-r--r--man3/posix_openpt.320
-rw-r--r--man3/posix_spawn.367
-rw-r--r--man3/pow.322
-rw-r--r--man3/pow10.319
-rw-r--r--man3/powerof2.34
-rw-r--r--man3/printf.3166
-rw-r--r--man3/profil.312
-rw-r--r--man3/program_invocation_name.311
-rw-r--r--man3/psignal.315
-rw-r--r--man3/pthread_atfork.36
-rw-r--r--man3/pthread_attr_init.368
-rw-r--r--man3/pthread_attr_setaffinity_np.314
-rw-r--r--man3/pthread_attr_setdetachstate.312
-rw-r--r--man3/pthread_attr_setguardsize.317
-rw-r--r--man3/pthread_attr_setinheritsched.315
-rw-r--r--man3/pthread_attr_setschedparam.315
-rw-r--r--man3/pthread_attr_setschedpolicy.315
-rw-r--r--man3/pthread_attr_setscope.312
-rw-r--r--man3/pthread_attr_setsigmask_np.314
-rw-r--r--man3/pthread_attr_setstack.315
-rw-r--r--man3/pthread_attr_setstackaddr.319
-rw-r--r--man3/pthread_attr_setstacksize.312
-rw-r--r--man3/pthread_cancel.357
-rw-r--r--man3/pthread_cleanup_push.353
-rw-r--r--man3/pthread_cleanup_push_defer_np.310
-rw-r--r--man3/pthread_create.370
-rw-r--r--man3/pthread_detach.312
-rw-r--r--man3/pthread_equal.312
-rw-r--r--man3/pthread_exit.312
-rw-r--r--man3/pthread_getattr_default_np.336
-rw-r--r--man3/pthread_getattr_np.372
-rw-r--r--man3/pthread_getcpuclockid.345
-rw-r--r--man3/pthread_join.312
-rw-r--r--man3/pthread_kill.330
-rw-r--r--man3/pthread_kill_other_threads_np.328
-rw-r--r--man3/pthread_mutex_consistent.324
-rw-r--r--man3/pthread_mutexattr_getpshared.36
-rw-r--r--man3/pthread_mutexattr_init.36
-rw-r--r--man3/pthread_mutexattr_setrobust.338
-rw-r--r--man3/pthread_rwlockattr_setkind_np.312
-rw-r--r--man3/pthread_self.312
-rw-r--r--man3/pthread_setaffinity_np.346
-rw-r--r--man3/pthread_setcancelstate.324
-rw-r--r--man3/pthread_setconcurrency.315
-rw-r--r--man3/pthread_setname_np.343
-rw-r--r--man3/pthread_setschedparam.397
-rw-r--r--man3/pthread_setschedprio.315
-rw-r--r--man3/pthread_sigmask.332
-rw-r--r--man3/pthread_sigqueue.320
-rw-r--r--man3/pthread_spin_init.37
-rw-r--r--man3/pthread_spin_lock.39
-rw-r--r--man3/pthread_testcancel.315
-rw-r--r--man3/pthread_tryjoin_np.322
-rw-r--r--man3/pthread_yield.322
-rw-r--r--man3/ptsname.342
-rw-r--r--man3/putenv.319
-rw-r--r--man3/putgrent.310
-rw-r--r--man3/putpwent.310
-rw-r--r--man3/puts.312
-rw-r--r--man3/putwchar.312
-rw-r--r--man3/qecvt.321
-rw-r--r--man3/qsort.333
-rw-r--r--man3/raise.314
-rw-r--r--man3/rand.357
-rw-r--r--man3/random.328
-rw-r--r--man3/random_r.310
-rw-r--r--man3/rcmd.340
-rw-r--r--man3/re_comp.312
-rw-r--r--man3/readdir.332
-rw-r--r--man3/readdir_r.312
-rw-r--r--man3/realpath.341
-rw-r--r--man3/recno.32
-rw-r--r--man3/regex.3308
-rw-r--r--man3/remainder.362
-rw-r--r--man3/remove.312
-rw-r--r--man3/remquo.317
-rw-r--r--man3/resolver.312
-rw-r--r--man3/rewinddir.312
-rw-r--r--man3/rexec.324
-rw-r--r--man3/rint.312
-rw-r--r--man3/round.315
-rw-r--r--man3/roundup.34
-rw-r--r--man3/rpc.38
-rw-r--r--man3/rpmatch.318
-rw-r--r--man3/rtime.320
-rw-r--r--man3/rtnetlink.323
-rw-r--r--man3/scalb.331
-rw-r--r--man3/scalbln.321
-rw-r--r--man3/scandir.348
-rw-r--r--man3/scanf.314
-rw-r--r--man3/sched_getcpu.315
-rw-r--r--man3/seekdir.314
-rw-r--r--man3/sem_close.312
-rw-r--r--man3/sem_destroy.312
-rw-r--r--man3/sem_getvalue.312
-rw-r--r--man3/sem_init.312
-rw-r--r--man3/sem_open.312
-rw-r--r--man3/sem_post.310
-rw-r--r--man3/sem_unlink.312
-rw-r--r--man3/sem_wait.346
-rw-r--r--man3/setaliasent.319
-rw-r--r--man3/setbuf.326
-rw-r--r--man3/setenv.324
-rw-r--r--man3/setjmp.344
-rw-r--r--man3/setlocale.368
-rw-r--r--man3/setlogmask.312
-rw-r--r--man3/setnetgrent.343
-rw-r--r--man3/shm_open.3121
-rw-r--r--man3/siginterrupt.319
-rw-r--r--man3/signbit.313
-rw-r--r--man3/significand.321
-rw-r--r--man3/sigpause.357
-rw-r--r--man3/sigqueue.337
-rw-r--r--man3/sigset.343
-rw-r--r--man3/sigsetops.334
-rw-r--r--man3/sigvec.348
-rw-r--r--man3/sigwait.316
-rw-r--r--man3/sin.316
-rw-r--r--man3/sincos.314
-rw-r--r--man3/sinh.314
-rw-r--r--man3/sleep.320
-rw-r--r--man3/slist.332
-rw-r--r--man3/sockatmark.324
-rw-r--r--man3/sqrt.314
-rw-r--r--man3/sscanf.321
-rw-r--r--man3/stailq.334
-rw-r--r--man3/static_assert.320
-rw-r--r--man3/statvfs.356
-rw-r--r--man3/stdarg.331
-rw-r--r--man3/stdin.314
-rw-r--r--man3/stdio.312
-rw-r--r--man3/stdio_ext.310
-rw-r--r--man3/stpncpy.370
-rw-r--r--man3/strcasecmp.314
-rw-r--r--man3/strchr.332
-rw-r--r--man3/strcmp.328
-rw-r--r--man3/strcoll.312
-rw-r--r--man3/strcpy.341
-rw-r--r--man3/strdup.331
-rw-r--r--man3/strerror.359
-rw-r--r--man3/strfmon.314
-rw-r--r--man3/strfromd.332
-rw-r--r--man3/strfry.313
-rw-r--r--man3/strftime.336
-rw-r--r--man3/string.32
-rw-r--r--man3/strlen.312
-rw-r--r--man3/strncat.330
-rw-r--r--man3/strnlen.310
-rw-r--r--man3/strpbrk.312
-rw-r--r--man3/strptime.316
-rw-r--r--man3/strsep.324
-rw-r--r--man3/strsignal.351
-rw-r--r--man3/strspn.312
-rw-r--r--man3/strstr.327
-rw-r--r--man3/strtod.341
-rw-r--r--man3/strtoimax.312
-rw-r--r--man3/strtok.343
-rw-r--r--man3/strtol.343
-rw-r--r--man3/strtoul.321
-rw-r--r--man3/strverscmp.320
-rw-r--r--man3/strxfrm.312
-rw-r--r--man3/swab.312
-rw-r--r--man3/sysconf.312
-rw-r--r--man3/syslog.361
-rw-r--r--man3/system.314
-rw-r--r--man3/sysv_signal.314
-rw-r--r--man3/tailq.330
-rw-r--r--man3/tan.314
-rw-r--r--man3/tanh.314
-rw-r--r--man3/tcgetpgrp.318
-rw-r--r--man3/tcgetsid.318
-rw-r--r--man3/telldir.314
-rw-r--r--man3/tempnam.314
-rw-r--r--man3/termios.374
-rw-r--r--man3/tgamma.319
-rw-r--r--man3/timegm.317
-rw-r--r--man3/timeradd.37
-rw-r--r--man3/tmpfile.328
-rw-r--r--man3/tmpnam.334
-rw-r--r--man3/toascii.314
-rw-r--r--man3/toupper.334
-rw-r--r--man3/towctrans.312
-rw-r--r--man3/towlower.333
-rw-r--r--man3/towupper.333
-rw-r--r--man3/trunc.315
-rw-r--r--man3/tsearch.362
-rw-r--r--man3/ttyname.314
-rw-r--r--man3/ttyslot.318
-rw-r--r--man3/tzset.314
-rw-r--r--man3/ualarm.320
-rw-r--r--man3/ulimit.314
-rw-r--r--man3/undocumented.32
-rw-r--r--man3/ungetwc.312
-rw-r--r--man3/unlocked_stdio.3101
-rw-r--r--man3/unlockpt.316
-rw-r--r--man3/updwtmp.317
-rw-r--r--man3/uselocale.39
-rw-r--r--man3/usleep.317
-rw-r--r--man3/wcpcpy.38
-rw-r--r--man3/wcpncpy.38
-rw-r--r--man3/wcrtomb.312
-rw-r--r--man3/wcscasecmp.316
-rw-r--r--man3/wcscat.312
-rw-r--r--man3/wcschr.312
-rw-r--r--man3/wcscmp.312
-rw-r--r--man3/wcscpy.312
-rw-r--r--man3/wcscspn.312
-rw-r--r--man3/wcsdup.313
-rw-r--r--man3/wcslen.312
-rw-r--r--man3/wcsncasecmp.316
-rw-r--r--man3/wcsncat.312
-rw-r--r--man3/wcsncmp.312
-rw-r--r--man3/wcsncpy.312
-rw-r--r--man3/wcsnlen.314
-rw-r--r--man3/wcsnrtombs.310
-rw-r--r--man3/wcspbrk.312
-rw-r--r--man3/wcsrchr.312
-rw-r--r--man3/wcsrtombs.314
-rw-r--r--man3/wcsspn.312
-rw-r--r--man3/wcsstr.312
-rw-r--r--man3/wcstoimax.312
-rw-r--r--man3/wcstok.312
-rw-r--r--man3/wcstombs.320
-rw-r--r--man3/wcswidth.312
-rw-r--r--man3/wctob.312
-rw-r--r--man3/wctomb.322
-rw-r--r--man3/wctrans.312
-rw-r--r--man3/wctype.312
-rw-r--r--man3/wcwidth.312
-rw-r--r--man3/wmemchr.312
-rw-r--r--man3/wmemcmp.312
-rw-r--r--man3/wmemcpy.312
-rw-r--r--man3/wmemmove.312
-rw-r--r--man3/wmemset.312
-rw-r--r--man3/wordexp.326
-rw-r--r--man3/wprintf.314
-rw-r--r--man3/xcrypt.312
-rw-r--r--man3/xdr.38
-rw-r--r--man3/y0.343
-rw-r--r--man3const/EOF.3const2
-rw-r--r--man3const/EXIT_SUCCESS.3const15
-rw-r--r--man3const/NULL.3const2
-rw-r--r--man3head/printf.h.3head121
-rw-r--r--man3head/sysexits.h.3head8
-rw-r--r--man3type/FILE.3type7
-rw-r--r--man3type/aiocb.3type6
-rw-r--r--man3type/blkcnt_t.3type6
-rw-r--r--man3type/blksize_t.3type6
-rw-r--r--man3type/cc_t.3type6
-rw-r--r--man3type/clock_t.3type6
-rw-r--r--man3type/clockid_t.3type6
-rw-r--r--man3type/dev_t.3type6
-rw-r--r--man3type/div_t.3type6
-rw-r--r--man3type/double_t.3type6
-rw-r--r--man3type/epoll_event.3type12
-rw-r--r--man3type/fenv_t.3type6
-rw-r--r--man3type/id_t.3type6
-rw-r--r--man3type/intN_t.3type11
-rw-r--r--man3type/intmax_t.3type6
-rw-r--r--man3type/intptr_t.3type6
-rw-r--r--man3type/iovec.3type6
-rw-r--r--man3type/itimerspec.3type4
-rw-r--r--man3type/lconv.3type6
-rw-r--r--man3type/mode_t.3type6
-rw-r--r--man3type/off_t.3type27
-rw-r--r--man3type/ptrdiff_t.3type7
-rw-r--r--man3type/regex_t.3type62
-rw-r--r--man3type/regmatch_t.3type2
-rw-r--r--man3type/regoff_t.3type2
-rw-r--r--man3type/size_t.3type31
-rw-r--r--man3type/sockaddr.3type19
-rw-r--r--man3type/stat.3type18
-rw-r--r--man3type/time_t.3type44
-rw-r--r--man3type/timer_t.3type6
-rw-r--r--man3type/timespec.3type12
-rw-r--r--man3type/timeval.3type6
-rw-r--r--man3type/tm.3type33
-rw-r--r--man3type/va_list.3type7
-rw-r--r--man3type/void.3type7
-rw-r--r--man4/cciss.428
-rw-r--r--man4/console_codes.42
-rw-r--r--man4/cpuid.42
-rw-r--r--man4/dsp56k.410
-rw-r--r--man4/fd.42
-rw-r--r--man4/full.42
-rw-r--r--man4/fuse.46
-rw-r--r--man4/hd.42
-rw-r--r--man4/hpsa.42
-rw-r--r--man4/initrd.42
-rw-r--r--man4/intro.42
-rw-r--r--man4/lirc.44
-rw-r--r--man4/loop.422
-rw-r--r--man4/lp.42
-rw-r--r--man4/mem.42
-rw-r--r--man4/mouse.42
-rw-r--r--man4/msr.42
-rw-r--r--man4/null.42
-rw-r--r--man4/pts.42
-rw-r--r--man4/ram.42
-rw-r--r--man4/random.44
-rw-r--r--man4/rtc.42
-rw-r--r--man4/sd.42
-rw-r--r--man4/sk98lin.48
-rw-r--r--man4/smartpqi.42
-rw-r--r--man4/st.42
-rw-r--r--man4/tty.42
-rw-r--r--man4/ttyS.42
-rw-r--r--man4/vcs.46
-rw-r--r--man4/veth.42
-rw-r--r--man4/wavelan.42
-rw-r--r--man5/acct.519
-rw-r--r--man5/charmap.52
-rw-r--r--man5/core.526
-rw-r--r--man5/dir_colors.513
-rw-r--r--man5/elf.514
-rw-r--r--man5/erofs.597
-rw-r--r--man5/filesystems.510
-rw-r--r--man5/ftpusers.52
-rw-r--r--man5/gai.conf.52
-rw-r--r--man5/group.52
-rw-r--r--man5/host.conf.518
-rw-r--r--man5/hosts.56
-rw-r--r--man5/hosts.equiv.52
-rw-r--r--man5/intro.52
-rw-r--r--man5/issue.52
-rw-r--r--man5/locale.52
-rw-r--r--man5/motd.52
-rw-r--r--man5/networks.52
-rw-r--r--man5/nologin.52
-rw-r--r--man5/nscd.conf.52
-rw-r--r--man5/nss.52
-rw-r--r--man5/nsswitch.conf.54
-rw-r--r--man5/passwd.52
-rw-r--r--man5/proc.541
-rw-r--r--man5/protocols.52
-rw-r--r--man5/repertoiremap.52
-rw-r--r--man5/resolv.conf.525
-rw-r--r--man5/rpc.52
-rw-r--r--man5/securetty.52
-rw-r--r--man5/services.52
-rw-r--r--man5/shells.52
-rw-r--r--man5/slabinfo.52
-rw-r--r--man5/sysfs.512
-rw-r--r--man5/termcap.55
-rw-r--r--man5/tmpfs.54
-rw-r--r--man5/ttytype.52
-rw-r--r--man5/tzfile.5197
-rw-r--r--man5/utmp.525
-rw-r--r--man6/intro.62
-rw-r--r--man7/address_families.72
-rw-r--r--man7/aio.7101
-rw-r--r--man7/armscii-8.72
-rw-r--r--man7/arp.710
-rw-r--r--man7/ascii.724
-rw-r--r--man7/attributes.74
-rw-r--r--man7/boot.741
-rw-r--r--man7/bootparam.72
-rw-r--r--man7/bpf-helpers.7440
-rw-r--r--man7/capabilities.717
-rw-r--r--man7/cgroup_namespaces.74
-rw-r--r--man7/cgroups.74
-rw-r--r--man7/charsets.722
-rw-r--r--man7/complex.78
-rw-r--r--man7/cp1251.72
-rw-r--r--man7/cp1252.72
-rw-r--r--man7/cpuset.718
-rw-r--r--man7/credentials.73
-rw-r--r--man7/ddp.711
-rw-r--r--man7/environ.72
-rw-r--r--man7/epoll.732
-rw-r--r--man7/fanotify.7177
-rw-r--r--man7/feature_test_macros.773
-rw-r--r--man7/fifo.711
-rw-r--r--man7/futex.72
-rw-r--r--man7/glob.725
-rw-r--r--man7/hier.713
-rw-r--r--man7/hostname.72
-rw-r--r--man7/icmp.711
-rw-r--r--man7/inode.725
-rw-r--r--man7/inotify.7110
-rw-r--r--man7/intro.72
-rw-r--r--man7/ip.7142
-rw-r--r--man7/ipc_namespaces.72
-rw-r--r--man7/ipv6.718
-rw-r--r--man7/iso_8859-1.72
-rw-r--r--man7/iso_8859-10.72
-rw-r--r--man7/iso_8859-11.72
-rw-r--r--man7/iso_8859-13.72
-rw-r--r--man7/iso_8859-14.72
-rw-r--r--man7/iso_8859-15.72
-rw-r--r--man7/iso_8859-16.72
-rw-r--r--man7/iso_8859-2.72
-rw-r--r--man7/iso_8859-3.72
-rw-r--r--man7/iso_8859-4.72
-rw-r--r--man7/iso_8859-5.72
-rw-r--r--man7/iso_8859-6.72
-rw-r--r--man7/iso_8859-7.72
-rw-r--r--man7/iso_8859-8.72
-rw-r--r--man7/iso_8859-9.72
-rw-r--r--man7/kernel_lockdown.72
-rw-r--r--man7/keyrings.72
-rw-r--r--man7/koi8-r.72
-rw-r--r--man7/koi8-u.72
-rw-r--r--man7/landlock.7277
-rw-r--r--man7/libc.72
-rw-r--r--man7/locale.710
-rw-r--r--man7/mailaddr.72
-rw-r--r--man7/man-pages.765
-rw-r--r--man7/man.772
-rw-r--r--man7/math_error.76
-rw-r--r--man7/mount_namespaces.712
-rw-r--r--man7/mq_overview.72
-rw-r--r--man7/namespaces.78
-rw-r--r--man7/netdevice.711
-rw-r--r--man7/netlink.730
-rw-r--r--man7/network_namespaces.74
-rw-r--r--man7/nptl.72
-rw-r--r--man7/numa.710
-rw-r--r--man7/operator.72
-rw-r--r--man7/packet.711
-rw-r--r--man7/path_resolution.72
-rw-r--r--man7/persistent-keyring.72
-rw-r--r--man7/pid_namespaces.74
-rw-r--r--man7/pipe.714
-rw-r--r--man7/pkeys.722
-rw-r--r--man7/posixoptions.72
-rw-r--r--man7/process-keyring.72
-rw-r--r--man7/pthreads.74
-rw-r--r--man7/pty.72
-rw-r--r--man7/queue.76
-rw-r--r--man7/random.72
-rw-r--r--man7/raw.711
-rw-r--r--man7/regex.717
-rw-r--r--man7/rtld-audit.742
-rw-r--r--man7/rtnetlink.718
-rw-r--r--man7/sched.72
-rw-r--r--man7/sem_overview.72
-rw-r--r--man7/session-keyring.76
-rw-r--r--man7/shm_overview.72
-rw-r--r--man7/sigevent.72
-rw-r--r--man7/signal-safety.72
-rw-r--r--man7/signal.76
-rw-r--r--man7/sock_diag.768
-rw-r--r--man7/socket.715
-rw-r--r--man7/spufs.72
-rw-r--r--man7/standards.76
-rw-r--r--man7/string_copying.766
-rw-r--r--man7/suffixes.77
-rw-r--r--man7/symlink.714
-rw-r--r--man7/system_data_types.730
-rw-r--r--man7/sysvipc.72
-rw-r--r--man7/tcp.715
-rw-r--r--man7/termio.72
-rw-r--r--man7/thread-keyring.72
-rw-r--r--man7/time.72
-rw-r--r--man7/time_namespaces.76
-rw-r--r--man7/udp.754
-rw-r--r--man7/udplite.72
-rw-r--r--man7/unicode.718
-rw-r--r--man7/units.72
-rw-r--r--man7/unix.7137
-rw-r--r--man7/uri.7110
-rw-r--r--man7/user-keyring.72
-rw-r--r--man7/user-session-keyring.72
-rw-r--r--man7/user_namespaces.7146
-rw-r--r--man7/utf-8.74
-rw-r--r--man7/uts_namespaces.72
-rw-r--r--man7/vdso.74
-rw-r--r--man7/vsock.72
-rw-r--r--man7/x25.711
-rw-r--r--man7/xattr.72
-rw-r--r--man8/iconvconfig.82
-rw-r--r--man8/intro.82
-rw-r--r--man8/ld.so.88
-rw-r--r--man8/ldconfig.84
-rw-r--r--man8/nscd.82
-rw-r--r--man8/sln.82
-rw-r--r--man8/tzselect.8138
-rw-r--r--man8/zdump.851
-rw-r--r--man8/zic.8262
-rwxr-xr-x[-rw-r--r--]scripts/FIXME_list.sh0
-rwxr-xr-x[-rw-r--r--]scripts/LinuxManBook/BuildLinuxMan.pl0
-rw-r--r--scripts/LinuxManBook/LMBfront.t2
-rw-r--r--scripts/LinuxManBook/anmark.tmac2
-rwxr-xr-x[-rw-r--r--]scripts/LinuxManBook/devpdf/download0
-rwxr-xr-x[-rw-r--r--]scripts/LinuxManBook/gropdf0
-rwxr-xr-x[-rw-r--r--]scripts/add_parens_for_own_funcs.sh0
-rw-r--r--scripts/bash_aliases12
-rwxr-xr-x[-rw-r--r--]scripts/convert_to_utf_8.sh0
-rwxr-xr-x[-rw-r--r--]scripts/find_dots_no_parens.sh0
-rwxr-xr-x[-rw-r--r--]scripts/find_repeated_words.sh0
-rwxr-xr-x[-rw-r--r--]scripts/find_slashes_no_parens.sh0
-rwxr-xr-x[-rw-r--r--]scripts/man_show_fixme.sh0
-rwxr-xr-x[-rw-r--r--]scripts/markup_check.sh0
-rwxr-xr-x[-rw-r--r--]scripts/unformat_parens.sh0
-rw-r--r--share/lint/groff/man.ignore.grep3
-rw-r--r--share/lint/mandoc/man.ignore.grep6
-rw-r--r--share/lint/mandoc/mdoc.ignore.grep5
-rw-r--r--share/mk/build/_.mk52
-rw-r--r--share/mk/build/catman.mk89
-rw-r--r--share/mk/build/groff.mk39
-rw-r--r--share/mk/build/html.mk (renamed from lib/build-html.mk)22
-rw-r--r--share/mk/build/pdf.mk68
-rw-r--r--share/mk/build/pre.mk47
-rw-r--r--share/mk/build/ps.mk68
-rw-r--r--share/mk/build/src.mk117
-rw-r--r--share/mk/check/_.mk18
-rw-r--r--share/mk/check/catman.mk51
-rw-r--r--share/mk/cmd.mk (renamed from lib/cmd.mk)16
-rw-r--r--share/mk/compress.mk40
-rw-r--r--share/mk/dist.mk96
-rw-r--r--share/mk/install/_.mk (renamed from lib/install.mk)24
-rw-r--r--share/mk/install/html.mk36
-rw-r--r--share/mk/install/man.mk202
-rw-r--r--share/mk/lint/_.mk18
-rw-r--r--share/mk/lint/c.mk (renamed from lib/lint-c.mk)41
-rw-r--r--share/mk/lint/man/_.mk16
-rw-r--r--share/mk/lint/man/man.mk69
-rw-r--r--share/mk/lint/man/mdoc.mk44
-rw-r--r--share/mk/src.mk37
-rw-r--r--share/mk/verbose.mk (renamed from lib/verbose.mk)10
-rw-r--r--share/mk/version.mk (renamed from lib/version.mk)11
1178 files changed, 17057 insertions, 14445 deletions
diff --git a/.gitignore b/.gitignore
index 904829dc0..8786f3c2a 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,5 +1,5 @@
# Default $builddir:
-/tmp/
+/.tmp/
# checkpatch spurious output. I hope we fix that some day.
/.checkpatch-camelcase.git.
diff --git a/.mailmap b/.mailmap
deleted file mode 100644
index 64280e139..000000000
--- a/.mailmap
+++ /dev/null
@@ -1,4 +0,0 @@
-Alejandro Colomar <alx@kernel.org> <alx.manpages@gmail.com>
-Alejandro Colomar <alx@kernel.org> <alx@nginx.com>
-Alejandro Colomar <alx@kernel.org> <colomar.6.4.3@gmail.com>
-Alejandro Colomar <alx@kernel.org> <alejandro.colomar@exfo.com>
diff --git a/CONTRIBUTING b/CONTRIBUTING
index 3b4408108..b08000bed 100644
--- a/CONTRIBUTING
+++ b/CONTRIBUTING
@@ -2,33 +2,37 @@ Name
Contributing - instructions for contributing to the project
Synopsis
- Mailing list, patches, lint, style guide, bug reports, and notes
+ Mailing list, patches, lint & check, style guide, bug reports,
+ and notes
Description
Mailing list
- The main discussions regarding development of the project, patches,
- bugs, news, doubts, etc. happen on the mailing list. To send an email
- to the project, send it to both maintainers and CC the mailing list:
+ The main discussions regarding development of the project,
+ patches, bugs, news, doubts, etc. happen on the mailing list.
+ To send an email to the project, send it to Alejandro and CC the
+ mailing list:
To: Alejandro Colomar <alx@kernel.org>
Cc: <linux-man@vger.kernel.org>
- Please CC any relevant developers and mailing lists that may know about
- or be interestend in the discussion. If your email discusses a feature
- or change, and you know which developers added the feature or made the
- change that your email discusses, please CC them on the email; with
- luck they may review and comment on it. If you don't know who the
- developers are, you may be able to discover that information from
- mailing list archives or from git(1) logs or logs in other version
- control systems. Obviously, if you are the developer of the feature
- being discussed in a man-pages email, please identify yourself as such.
+ Please CC any relevant developers and mailing lists that may know
+ about or be interested in the discussion. If your email
+ discusses a feature or change, and you know which developers
+ added the feature or made the change that your email discusses,
+ please CC them on the email; with luck they may review and
+ comment on it. If you don't know who the developers are, you may
+ be able to discover that information from mailing list archives
+ or from git(1) logs or logs in other version control systems.
+ Obviously, if you are the developer of the feature being
+ discussed in a man-pages email, please identify yourself as such.
Relevant mailing lists may include:
Cc: LKML <linux-kernel@vger.kernel.org>
+ Cc: Linux API <linux-api@vger.kernel.org>
Cc: Glibc <libc-alpha@sourceware.org>
- For other kernel mailing lists and maintainers, check the <MAINTAINERS>
- file in the Linux kernel repository.
+ For other kernel mailing lists and maintainers, check the
+ <MAINTAINERS> file in the Linux kernel repository.
Please don't send HTML email; it will be discarded by the list.
@@ -37,8 +41,8 @@ Description
<https://marc.info/?l=linux-man>
Subscription:
- Send a message to <majordomo@vger.kernel.org> containing the
- following body:
+ Send a message to <majordomo@vger.kernel.org> containing
+ the following body:
subscribe linux-man
@@ -54,61 +58,68 @@ Description
If you know how to fix a problem in a manual page (if not, see
"Reporting bugs" below), then send a patch in an email.
- - Follow the instructions for sending mail to the mailing list above.
+ - Follow the instructions for sending mail to the mailing list
+ above.
- - The subject of the email should contain "[patch]" in the subject line.
+ - The subject of the email should contain "[patch]" in the
+ subject line.
- The above is the minimum needed so that someone might respond to your
- patch. If you did that and someone does not respond within a few days,
- then ping the email thread, "replying to all". Make sure to send it to
- the maintainers in addition to the mailing list.
+ The above is the minimum needed so that someone might respond to
+ your patch. If you did that and someone does not respond within
+ a few days, then ping the email thread, "replying to all". Make
+ sure to send it to the maintainers in addition to the mailing
+ list.
- To make your patch even more useful, please note the following points:
+ To make your patch even more useful, please note the following
+ points:
- - Write a suitable subject line. Make sure to mention the name(s) of
- the page(s) being patched. Example:
+ - Write a suitable subject line. Make sure to mention the
+ name(s) of the page(s) being patched. Example:
[patch] shmop.2: Add "(void *)" cast to RETURN VALUE
- - Sign your patch with "Signed-off-by:". Read about the "Developer's
- Certificate of Origin" at
+ - Sign your patch with "Signed-off-by:". Read about the
+ "Developer's Certificate of Origin" at
<https://www.kernel.org/doc/Documentation/process/submitting-patches.rst>.
When appropriate, other tags documented in that file, such as
- "Reported-by:", "Reviewed-by:", "Acked-by:", and "Suggested-by:" can
- be added to the patch. The man-pages project also uses a
- "Cowritten-by:" tag with the obvious meaning. Example:
+ "Reported-by:", "Reviewed-by:", "Acked-by:", and
+ "Suggested-by:" can be added to the patch. The man-pages
+ project also uses a "Cowritten-by:" tag with the obvious
+ meaning. Example:
Signed-off-by: Alejandro Colomar <alx@kernel.org>
- Describe how you obtained the information in your patch. For
example, was it:
- - by reading (or writing) the relevant kernel or (g)libc source
- code? Please provide a pointer to the following code.
+ - by reading (or writing) the relevant kernel or (g)libc
+ source code? Please provide a pointer to the following
+ code.
- from a commit message in the kernel or (g)libc source code
repository? Please provide a commit ID.
- - by writing a test program? Send it with the patch, but please
- make sure it's as simple as possible, and provide instructions on
- how to use it and/or a demo run.
+ - by writing a test program? Send it with the patch, but
+ please make sure it's as simple as possible, and provide
+ instructions on how to use it and/or a demo run.
- - from a standards document? Please name the standard, and quote
- the relevant text.
+ - from a standards document? Please name the standard, and
+ quote the relevant text.
- from other documentation? Please provide a pointer to that
documentation.
- - from a mailing list or online forum? Please provide a URL if
- possible.
+ - from a mailing list or online forum? Please provide a URL
+ if possible.
- - Send patches in diff -u format, inline inside the email message. If
- you're worried about your mailer breaking the patch, the send it
- both inline and as an attachment. You may find it useful to employ
- git-send-email(1) and git-format-patch(1).
+ - Send patches in diff -u format, inline inside the email
+ message. If you're worried about your mailer breaking the
+ patch, the send it both inline and as an attachment. You may
+ find it useful to employ git-send-email(1) and
+ git-format-patch(1).
- - Where relevant, include source code comments that cite commit hashes
- for relevant kernel or glibc changes:
+ - Where relevant, include source code comments that cite commit
+ hashes for relevant kernel or glibc changes:
.\" commit <40-character-git-hash>
@@ -117,88 +128,92 @@ Description
- ffix: Formatting fix.
- tfix: Typo fix.
- wfix: Minor wording fix.
- - srcfix: Change to manual page source that doesn't affect output.
+ - srcfix: Change to manual page source that doesn't affect
+ the output.
Example:
[patch] tcp.7: tfix
- Send logically separate patches. For unrelated pages, or for
- logically-separate issues in the same page, send separate emails.
+ logically-separate issues in the same page, send separate
+ emails.
- - Make patches against the latest version of the manual page. Use
- git(1) for getting the latest version.
+ - Make patches against the latest version of the manual page.
+ Use git(1) for getting the latest version.
- Lint
+ Lint & check
If you plan to patch a manual page, consider running the linters
- configured in the build system, to make sure your change doesn't add
- new warnings. However, you might still get warnings that are not your
- fault. To minimize that, do the following steps:
+ and checks configured in the build system, to make sure your
+ change doesn't add new warnings. However, you might still get
+ warnings that are not your fault. To minimize that, do the
+ following steps:
- (1) Lint first all of the pages, so that make(1) knows that it only
- needs to lint again pages that you will touch. This example is
- shown with '-j' because it would take a long time (around a couple
- of minutes) to run without parallel execution.
+ (1) First use make(1)'s -t option, so that make(1) knows that it
+ only needs to lint & check again pages that you will touch.
- $ make -ij lint >/dev/null 2>&1
+ $ make -t lint check >/dev/null
- (2) Touch the page that you'll edit, and run make(1) again, to see
- which warnings you'll still see from that page that are not your
- fault.
+ (2) Run make(1) again, asking it to imagine that the page wou'll
+ modify has been touched, to see which warnings you'll still
+ see from that page that are not your fault.
- $ touch man2/membarrier.2 # replace by the page you'll modify
- $ make -k lint
+ $ # replace 'man2/membarrier.2' by the page you'll modify
+ $ make -W man2/membarrier.2 -k lint check
- (3) Apply your changes, and then run make(1) again. You can ignore
- warnings that you saw in step (2), but if you see any new ones,
- please fix them if you know how, or at least note them in your
- patch email.
+ (3) Apply your changes, and then run make(1) again. You can
+ ignore warnings that you saw in step (2), but if you see any
+ new ones, please fix them if you know how, or at least note
+ them in your patch email.
$ vi man2/membarrier.2 # do your work
- $ make -k lint
+ $ make -k lint check
- See <INSTALL> for a list of dependencies that this feature requires.
- If you can't meet them all, don't worry; it will still run the linters
- that you have available.
+ See <INSTALL> for a list of dependencies that this feature
+ requires. If you can't meet them all, don't worry; it will still
+ run the linters and checks that you have available.
Style guide
- For a description of the preferred layout of manual pages, as well as
- some style guide notes, see:
+ For a description of the preferred layout of manual pages, as
+ well as some style guide notes, see:
$ man 7 man-pages
It will also be interesting to consult groff_man(7) and
- groff_man_style(7) for understanding and writing good man(7) source code.
+ groff_man_style(7) for understanding and writing good man(7)
+ source code.
Reporting bugs
- Report bugs to the mailing list, following the instructions above for
- sending mails to the list. If you can write a patch (see instructions
- for sending patches above), it's preferred.
+ Report bugs to the mailing list, following the instructions above
+ for sending mails to the list. If you can write a patch (see
+ instructions for sending patches above), it's preferred.
- If you're unsure if the bug is in the manual page or in the code being
- documented (kernel, glibc, ...), it's best to send the report to both
- at the same time, that is, CC all the mailing lists that may be
- concerned by the report.
+ If you're unsure if the bug is in the manual page or in the code
+ being documented (kernel, glibc, ...), it's best to send the
+ report to both at the same time, that is, CC all the mailing
+ lists that may be concerned by the report.
- Some distributions (for example Debian) apply patches to the upstream
- manual pages. If you suspect the bug is in one of those patches,
- report it to your distribution maintainer.
+ Some distributions (for example Debian) apply patches to the
+ upstream manual pages. If you suspect the bug is in one of those
+ patches, report it to your distribution maintainer.
Send logically separate reports. For unrelated pages, or for
logically-separate issues in the same page, send separate emails.
- There's also a bugzilla, but we don't use it as much as the mailing list.
+ There's also a bugzilla, but we don't use it as much as the
+ mailing list.
Notes
External and autogenerated pages
- A few pages come from external sources. Fixes to the pages should
- really go to the upstream source.
+ A few pages come from external sources. Fixes to the pages
+ should really go to the upstream source.
- tzfile(5), zdump(8), and zic(8) come from the tz project
- <https://www.iana.org/time-zones>.
+ tzfile(5), tzselect(8), zdump(8), and zic(8) come from the tz
+ project <https://www.iana.org/time-zones>.
- bpf-helpers(7) is autogenerated from the Linux kernel sources using
- scripts. See man-pages commits 53666f6c3 and 19c7f7839 for details.
+ bpf-helpers(7) is autogenerated from the Linux kernel sources
+ using scripts. See man-pages commits 53666f6c3 and 19c7f7839 for
+ details.
Bugs
Bugzilla:
@@ -207,11 +222,7 @@ Bugs
See also
man-pages(7)
- <https://www.kernel.org/doc/man-pages/contributing.html>
<https://www.kernel.org/doc/man-pages/linux-man-ml.html>
- <https://www.kernel.org/doc/man-pages/patches.html>
- <https://www.kernel.org/doc/man-pages/reporting_bugs.html>
- <https://www.kernel.org/doc/man-pages/reporting_code_bugs.html>
<https://www.kernel.org/doc/man-pages/missing_pages.html>
<https://www.kernel.org/doc/man-pages/code_of_conduct.html>
<https://www.kernel.org/doc/Documentation/process/submitting-patches.rst>
diff --git a/Changes b/Changes
index 001b58a27..1d2c60860 100644
--- a/Changes
+++ b/Changes
@@ -1,6 +1,6 @@
-==================== Changes in man-pages-6.03 ====================
+==================== Changes in man-pages-6.05 ====================
-Released: 2023-02-12, Xulilla
+Released: 2023-08-01, Aldaya
Contributors
@@ -10,47 +10,105 @@ The following people contributed patches/fixes, reports, notes,
ideas, and discussions that have been incorporated in changes in
this release:
-Aaron Peter Bachmann <aaron_ng@inode.at>
-Adhemerval Zanella <adhemerval.zanella@linaro.org>
+"David S. Miller" <davem@davemloft.net>
+"G. Branden Robinson" <g.branden.robinson@gmail.com>
+A. Wilcox <AWilcox@wilcox-tech.com>
+Adam Dobes <adobes@redhat.com>
Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
+Alan Cox <alan@llwyncelyn.cymru>
Alejandro Colomar <alx@kernel.org>
-Alex Colomar <alx.manpages@gmail.com>
-Arsen Arsenović <arsen@aarsen.me>
-Bernd Petrovitsch <bernd@petrovitsch.priv.at>
+Alexei Starovoitov <ast@kernel.org>
+Andreas Schwab <schwab@suse.de>
+Andrew Clayton <andrew@digital-domain.net>
+Andrew Morton <akpm@linux-foundation.org>
+Avinesh Kumar <akumar@suse.de>
+Bastien Roucariès <rouca@debian.org>
+Bjarni Ingi Gislason <bjarniig@simnet.is>
Brian Inglis <Brian.Inglis@Shaw.ca>
-Colin Cross <ccross@google.com>
-Cristian Rodríguez <crrodriguez@opensuse.org>
-Deri James <deri@chuzzlewit.myzen.co.uk>
+Bruno Haible <bruno@clisp.org>
+Carsten Grohmann <carstengrohmann@gmx.de>
+Colin Watson <cjwatson@debian.org>
+Cyril Hrubis <chrubis@suse.cz>
+DJ Delorie <dj@redhat.com>
+Daniel Verkamp <daniel@drv.nu>
+David Howells <dhowells@redhat.com>
+Dirk Gouders <dirk@gouders.net>
+Dmitry Goncharov <dgoncharov@users.sf.net>
+Eli Zaretskii <eliz@gnu.org>
Elliott Hughes <enh@google.com>
-Eric Biggers <ebiggers@kernel.org>
+Eric Biggers <ebiggers@google.com>
+Eric Blake <eblake@redhat.com>
+Eric Wong <e@80x24.org>
+Fangrui Song <maskray@google.com>
Florian Weimer <fweimer@redhat.com>
-"G. Branden Robinson" <g.branden.robinson@gmail.com>
-Günther Noack <gnoack3000@gmail.com>
+Gavin Smith <gavinsmith0123@gmail.com>
+Guillem Jover <guillem@hadrons.org>
+Günther Noack <gnoack@google.com>
Helge Kreutzmann <debian@helgefjell.de>
-Ian Abbott <abbotti@mev.co.uk>
+Igor Sysoev <igor@sysoev.ru>
+Ingo Schwarze <schwarze@openbsd.org>
+Jakub Jelinek <jakub@redhat.com>
+Jakub Sitnicki <jakub@cloudflare.com>
Jakub Wilk <jwilk@jwilk.net>
-Jan Engelhardt <jengelh@inai.de>
-"Jason A. Donenfeld" <Jason@zx2c4.com>
-Jonny Grant <jg@jguk.org>
+Johannes Weiner <hannes@cmpxchg.org>
+John Gilmore <gnu@toad.com>
+John Hubbard <jhubbard@nvidia.com>
+John Scott <jscott@posteo.net>
+Jonathan Corbet <corbet@lwn.net>
+Jonathan Wakely <jwakely@redhat.com>
Joseph Myers <joseph@codesourcery.com>
-Kees Cook <keescook@chromium.org>
+Josh Triplett <josh@joshtriplett.org>
+Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
+Larry McVoy <lm@mcvoy.com>
Lennart Jablonka <humm@ljabl.com>
+Linus Heckemann <git@sphalerite.org>
+Lukas Javorsky <ljavorsk@redhat.com>
+Marcos Fouces <marcos@debian.org>
Mario Blaettermann <mario.blaettermann@gmail.com>
-Mark Galeck <markgaleck@gmail.com>
-Namhyung Kim <namhyung@kernel.org>
-Nick Gregory <nick@nickgregory.me>
-Pasha Tatashin <tatashin@google.com>
+Martin (Joey) Schulze <joey@infodrom.org>
+Masami Hiramatsu <mhiramat@kernel.org>
+Masatake YAMATO <yamato@redhat.com>
+Matthew House <mattlloydhouse@gmail.com>
+Matthew Wilcox (Oracle) <willy@infradead.org>
+Michael Kerrisk <mtk.manpages@gmail.com>
+Michael Weiß <michael.weiss@aisec.fraunhofer.de>
+Mickaël Salaün <mic@digikod.net>
+Mike Frysinger <vapier@gentoo.org>
+Mike Kravetz <mike.kravetz@oracle.com>
+Mingye Wang <arthur200126@gmail.com>
+Nadav Amit <namit@vmware.com>
+Nick Desaulniers <ndesaulniers@google.com>
+Oskari Pirhonen <xxc3ncoredxx@gmail.com>
+Paul E. McKenney <paulmck@kernel.org>
Paul Eggert <eggert@cs.ucla.edu>
-<Radisson97@gmx.de>
+Paul Floyd <pjfloyd@wanadoo.fr>
+Paul Smith <psmith@gnu.org>
+Philip Guenther <guenther@gmail.com>
+Ralph Corderoy <ralph@inputplus.co.uk>
+Reuben Thomas <rrt@sc3d.org>
+Rich Felker <dalias@libc.org>
+Richard Biener <richard.guenther@gmail.com>
Sam James <sam@gentoo.org>
-Samanta Navarro <ferivoz@riseup.net>
-"Serge E. Hallyn" <serge@hallyn.com>
+Serge Hallyn <serge@hallyn.com>
+Seth David Schoen <schoen@loyalty.org>
+Siddhesh Poyarekar <siddhesh@gotplt.org>
+Simon Horman <simon.horman@corigine.com>
Stefan Puiu <stefan.puiu@gmail.com>
-Suren Baghdasaryan <surenb@google.com>
-Thomas Weißschuh <linux@weissschuh.net>
-Walter Harms <wharms@bfs.de>
+Steffen Nurpmeso <steffen@sdaoden.eu>
+Szabolcs Nagy <nsz@port70.net>
+Thomas Weißschuh <thomas@t-8ch.de>
+Tom Schwindl <schwindl@posteo.de>
+Tomáš Golembiovský <tgolembi@redhat.com>
+Torbjorn SVENSSON <torbjorn.svensson@foss.st.com>
+Ulrich Drepper <drepper@redhat.com>
+Vahid Noormofidi <vnoormof@nvidia.com>
+Vlastimil Babka <vbabka@suse.cz>
Wilco Dijkstra <Wilco.Dijkstra@arm.com>
+Xi Ruoyao <xry111@xry111.site>
+Yang Xu <xuyang2018.jy@fujitsu.com>
+Yedidyah Bar David <didi@redhat.com>
Zack Weinberg <zack@owlfolio.org>
+Zijun Zhao <zijunzhao@google.com>
Apologies if I missed anyone!
@@ -58,127 +116,103 @@ Apologies if I missed anyone!
New and rewritten pages
-----------------------
+man2/
+ ioctl_pipe.2
+
man3/
- arc4random.3
- powerof2.3
- roundup.3
+ regex.3
-man3head/
- printf.h.3head
+man5/
+ erofs.5
Newly documented interfaces in existing pages
---------------------------------------------
-perf_event_open.2
- PERF_COUNT_SW_BPF_OUTPUT
- PERF_COUNT_SW_CGROUP_SWITCHES
- PERF_FORMAT_LOST
- PERF_RECORD_MISC_MMAP_BUILD_ID
- PERF_RECORD_MISC_SWITCH_OUT_PREEMPT
- PERF_SAMPLE_CODE_PAGE_SIZE
- PERF_SAMPLE_DATA_PAGE_SIZE
- PERF_SAMPLE_WEIGHT_STRUCT
+bpf.2
+ EAGAIN
- struct perf_event_attr::build_id
- struct perf_event_attr::inherit_thread
- struct perf_event_attr::remove_on_exec
- struct perf_event_attr::sigtrap
- struct perf_event_attr::aux_sample_size
- struct perf_event_attr::sig_data
+ioctl_userfaultfd.2
+ UFFD_FEATURE_EXACT_ADDRESS
- union perf_sample_weight
+prctl.2
+ PR_GET_AUXV
- struct read_format::values[]::lost
+recv.2
+ MSG_CMSG_CLOEXEC
- struct::weight
- struct::data_page_size
- struct::code_page_size
- struct::size
- struct::data
+statx.2
+ STAT_ATTR_MOUNT_ROOT
- struct:: ::build_id_size
- struct:: ::build_id
+syscall.2
+ ENOSYS
-prctl.2
- PR_SET_VMA
- PR_SET_VMA_ANON_NAME
+resolv.conf.5
+ no-aaaa
+ RES_NOAAAA
+
+tmpfs.5
+ CONFIG_TRANSPARENT_HUGEPAGE
+
+ip.7
+ IP_LOCAL_PORT_RANGE
+
+rtnetlink.7
+ IFLA_PERM_ADDRESS
New and changed links
---------------------
-man3/
- arc4random_buf.3 (arc4random(3))
- arc4random_uniform.3 (arc4random(3))
- register_printf_modifier.3 (printf.h(3head))
- register_printf_specifier.3 (printf.h(3head))
- register_printf_type.3 (printf.h(3head))
-
-man3const/
- PA_CHAR.3const (printf.h(3head))
- PA_DOUBLE.3const (printf.h(3head))
- PA_FLAG_LONG.3const (printf.h(3head))
- PA_FLAG_LONG_DOUBLE.3const (printf.h(3head))
- PA_FLAG_LONG_LONG.3const (printf.h(3head))
- PA_FLAG_PTR.3const (printf.h(3head))
- PA_FLAG_SHORT.3const (printf.h(3head))
- PA_FLOAT.3const (printf.h(3head))
- PA_INT.3const (printf.h(3head))
- PA_LAST.3const (printf.h(3head))
- PA_POINTER.3const (printf.h(3head))
- PA_STRING.3const (printf.h(3head))
- PA_WCHAR.3const (printf.h(3head))
- PA_WSTRING.3const (printf.h(3head))
-
man3type/
- printf_arginfo_size_function.3type (printf.h(3head))
- printf_function.3type (printf.h(3head))
- printf_info.3type (printf.h(3head))
- printf_va_arg_function.3type (printf.h(3head))
+ regex_t.3type (regex(3))
+ regmatch_t.3type (regex(3))
+ regoff_t.3type (regex(3))
Global changes
--------------
-- Build system:
- - Add scripts to produce a book of the Linux man-pages.
- - Add lint-c-cppcheck to the make(1) targets to run the cppcheck(1)
- linter.
-
-- TH:
- - Use correct letter case in page titles. This started in 6.02, but
- there were still many cases left.
-
-- SYNOPSIS:
- - Mark some functions as deprecated.
+- Types:
+ - Document functions using off64_t as if they used off_t (except
+ for lseek64()).
-- STANDARDS:
- - Remove most references to ISO C89. We still document it in
- standards(7), but it's an ancient language version that this
- project
- regards as obsolescent, so in the STANDARDS sections for APIs we
- only take into account C99 and later and POSIX.1-2001 and later
- (with few exceptions where older standards are relevant).
+- Build system:
+ - Keep file modes in the release tarball.
+ - Fix symlink installation (`make install LINK_PAGES=symlink`).
+ - Add support for using bzip2(1), lzip(1), and xz(1) when installing
+ pages and creating release tarballs.
+ - Create reproducible release tarballs.
+ - Move makefiles from lib/ to share/mk/.
+ - Support mdoc(7) pages.
+ - Relicense Makefiles as GPL-3.0-or-later.
+ - Build PostScript and PDF manual pages.
+ - Add support for running our build system on arbitrary source
+ trees; this makes it possible to easily run our linters on another
+ project's manual pages as easily as `make lint MANDIR=~/src/groff`
+
+- Licenses:
+ - Relicense ddp.7 from VERBATIM_ONE_PARA to Linux-man-pages-copyleft.
+ - Relicense dir_colors.5 from LDPv1 to GPL-2.0-or-later.
+ - Use new SPDX license identifiers:
+ - Linux-man-pages-1-para (was VERBATIM_ONE_PARA)
+ - Linux-man-pages-copyleft-2-para (was VERBATIM_TWO_PARA)
+ - Linux-man-pages-copyleft-var (was VERBATIM_PROF)
- ffix:
- - Change \- to - where appropriate
- - Improve readability of numbers:
- - Show BCD magic numbers that are meaningful in hex as hex,
- rather than weird decimal numbers.
- - Use IEC multipliers.
- - Format ranges consistently using interval notation: [min, max].
-
-- srcfix:
- - Use \[] escapes.
+ - use `\%`
+ - un-bracket tbl(1) tables
Changes to individual pages
---------------------------
-timespec.3type
- Update tv_nsec according to C2x.
-
The manual pages (and other files in the repository) have been improved
beyond what this changelog covers. To learn more about changes applied
to individual pages, use git(1).
+
+
+==================== Changes in man-pages-6.05.01 =================
+
+- Build system:
+ - Ignore dot-dirs within $MANDIR
diff --git a/Changes.old b/Changes.old
index 040e54c65..3dfc4bc94 100644
--- a/Changes.old
+++ b/Changes.old
@@ -55593,3 +55593,326 @@ madvise.2
The manual pages (and other files in the repository) have been improved
beyond what this changelog covers. To learn more about changes applied
to individual pages, use git(1).
+
+
+==================== Changes in man-pages-6.03 ====================
+
+Released: 2023-02-12, Xulilla
+
+
+Contributors
+------------
+
+The following people contributed patches/fixes, reports, notes,
+ideas, and discussions that have been incorporated in changes in
+this release:
+
+Aaron Peter Bachmann <aaron_ng@inode.at>
+Adhemerval Zanella <adhemerval.zanella@linaro.org>
+Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
+Alejandro Colomar <alx@kernel.org>
+Alex Colomar <alx.manpages@gmail.com>
+Arsen Arsenović <arsen@aarsen.me>
+Bernd Petrovitsch <bernd@petrovitsch.priv.at>
+Brian Inglis <Brian.Inglis@Shaw.ca>
+Colin Cross <ccross@google.com>
+Cristian Rodríguez <crrodriguez@opensuse.org>
+Deri James <deri@chuzzlewit.myzen.co.uk>
+Elliott Hughes <enh@google.com>
+Eric Biggers <ebiggers@kernel.org>
+Florian Weimer <fweimer@redhat.com>
+"G. Branden Robinson" <g.branden.robinson@gmail.com>
+Günther Noack <gnoack3000@gmail.com>
+Helge Kreutzmann <debian@helgefjell.de>
+Ian Abbott <abbotti@mev.co.uk>
+Jakub Wilk <jwilk@jwilk.net>
+Jan Engelhardt <jengelh@inai.de>
+"Jason A. Donenfeld" <Jason@zx2c4.com>
+Jonny Grant <jg@jguk.org>
+Joseph Myers <joseph@codesourcery.com>
+Kees Cook <keescook@chromium.org>
+Lennart Jablonka <humm@ljabl.com>
+Mario Blaettermann <mario.blaettermann@gmail.com>
+Mark Galeck <markgaleck@gmail.com>
+Namhyung Kim <namhyung@kernel.org>
+Nick Gregory <nick@nickgregory.me>
+Pasha Tatashin <tatashin@google.com>
+Paul Eggert <eggert@cs.ucla.edu>
+<Radisson97@gmx.de>
+Sam James <sam@gentoo.org>
+Samanta Navarro <ferivoz@riseup.net>
+"Serge E. Hallyn" <serge@hallyn.com>
+Stefan Puiu <stefan.puiu@gmail.com>
+Suren Baghdasaryan <surenb@google.com>
+Thomas Weißschuh <linux@weissschuh.net>
+Walter Harms <wharms@bfs.de>
+Wilco Dijkstra <Wilco.Dijkstra@arm.com>
+Zack Weinberg <zack@owlfolio.org>
+
+Apologies if I missed anyone!
+
+
+New and rewritten pages
+-----------------------
+
+man3/
+ arc4random.3
+ powerof2.3
+ roundup.3
+
+man3head/
+ printf.h.3head
+
+
+Newly documented interfaces in existing pages
+---------------------------------------------
+
+perf_event_open.2
+ PERF_COUNT_SW_BPF_OUTPUT
+ PERF_COUNT_SW_CGROUP_SWITCHES
+ PERF_FORMAT_LOST
+ PERF_RECORD_MISC_MMAP_BUILD_ID
+ PERF_RECORD_MISC_SWITCH_OUT_PREEMPT
+ PERF_SAMPLE_CODE_PAGE_SIZE
+ PERF_SAMPLE_DATA_PAGE_SIZE
+ PERF_SAMPLE_WEIGHT_STRUCT
+
+ struct perf_event_attr::build_id
+ struct perf_event_attr::inherit_thread
+ struct perf_event_attr::remove_on_exec
+ struct perf_event_attr::sigtrap
+ struct perf_event_attr::aux_sample_size
+ struct perf_event_attr::sig_data
+
+ union perf_sample_weight
+
+ struct read_format::values[]::lost
+
+ struct::weight
+ struct::data_page_size
+ struct::code_page_size
+ struct::size
+ struct::data
+
+ struct:: ::build_id_size
+ struct:: ::build_id
+
+prctl.2
+ PR_SET_VMA
+ PR_SET_VMA_ANON_NAME
+
+
+New and changed links
+---------------------
+
+man3/
+ arc4random_buf.3 (arc4random(3))
+ arc4random_uniform.3 (arc4random(3))
+ register_printf_modifier.3 (printf.h(3head))
+ register_printf_specifier.3 (printf.h(3head))
+ register_printf_type.3 (printf.h(3head))
+
+man3const/
+ PA_CHAR.3const (printf.h(3head))
+ PA_DOUBLE.3const (printf.h(3head))
+ PA_FLAG_LONG.3const (printf.h(3head))
+ PA_FLAG_LONG_DOUBLE.3const (printf.h(3head))
+ PA_FLAG_LONG_LONG.3const (printf.h(3head))
+ PA_FLAG_PTR.3const (printf.h(3head))
+ PA_FLAG_SHORT.3const (printf.h(3head))
+ PA_FLOAT.3const (printf.h(3head))
+ PA_INT.3const (printf.h(3head))
+ PA_LAST.3const (printf.h(3head))
+ PA_POINTER.3const (printf.h(3head))
+ PA_STRING.3const (printf.h(3head))
+ PA_WCHAR.3const (printf.h(3head))
+ PA_WSTRING.3const (printf.h(3head))
+
+man3type/
+ printf_arginfo_size_function.3type (printf.h(3head))
+ printf_function.3type (printf.h(3head))
+ printf_info.3type (printf.h(3head))
+ printf_va_arg_function.3type (printf.h(3head))
+
+
+Global changes
+--------------
+
+- Build system:
+ - Add scripts to produce a book of the Linux man-pages.
+ - Add lint-c-cppcheck to the make(1) targets to run the cppcheck(1)
+ linter.
+
+- TH:
+ - Use correct letter case in page titles. This started in 6.02, but
+ there were still many cases left.
+
+- SYNOPSIS:
+ - Mark some functions as deprecated.
+
+- STANDARDS:
+ - Remove most references to ISO C89. We still document it in
+ standards(7), but it's an ancient language version that this
+ project
+ regards as obsolescent, so in the STANDARDS sections for APIs we
+ only take into account C99 and later and POSIX.1-2001 and later
+ (with few exceptions where older standards are relevant).
+
+- ffix:
+ - Change \- to - where appropriate
+ - Improve readability of numbers:
+ - Show BCD magic numbers that are meaningful in hex as hex,
+ rather than weird decimal numbers.
+ - Use IEC multipliers.
+ - Format ranges consistently using interval notation: [min, max].
+
+- srcfix:
+ - Use \[] escapes.
+
+
+Changes to individual pages
+---------------------------
+
+timespec.3type
+ Update tv_nsec according to C2x.
+
+
+The manual pages (and other files in the repository) have been improved
+beyond what this changelog covers. To learn more about changes applied
+to individual pages, use git(1).
+
+
+==================== Changes in man-pages-6.04 ====================
+
+Released: 2023-04-03, Aldaya
+
+
+Contributors
+------------
+
+The following people contributed patches/fixes, reports, notes,
+ideas, and discussions that have been incorporated in changes in
+this release:
+
+Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
+Alejandro Colomar <alx@kernel.org>
+Andrew Clayton <andrew@digital-domain.net>
+Brian Inglis <Brian.Inglis@Shaw.ca>
+"Carlos O'Donell" <carlos@redhat.com>
+Christian Brauner <brauner@kernel.org>
+Christoph Lameter <cl@linux.com>
+Dmitry Goncharov <dgoncharov@users.sf.net>
+"Dmitry V. Levin" <ldv@strace.io>
+Elliott Hughes <enh@google.com>
+Elvira Khabirova <lineprinter0@gmail.com>
+Fotios Valasiadis <fvalasiad@gmail.com>
+"G. Branden Robinson" <g.branden.robinson@gmail.com>
+Guy Shefy <guyshefyb@gmail.com>
+Günther Noack <gnoack3000@gmail.com>
+Helge Kreutzmann <debian@helgefjell.de>
+Iker Pedrosa <ipedrosa@redhat.com>
+Jack Pearson <jack@pearson.onl>
+Jakub Wilk <jwilk@jwilk.net>
+Marco Bonelli <marco@mebeim.net>
+Matt Jolly <Matt.Jolly@footclan.ninja>
+Mickaël Salaün <mic@digikod.net>
+Nate Eldredge <nate@thatsmathematics.com>
+Oskari Pirhonen <xxc3ncoredxx@gmail.com>
+Patrick Reader <_@pxeger.com>
+Paul Eggert <eggert@cs.ucla.edu>
+Paul Smith <psmith@gnu.org>
+Ralph Corderoy <ralph@inputplus.co.uk>
+Rodrigo Campos <rodrigo@sdfg.com.ar>
+Samanta Navarro <ferivoz@riseup.net>
+Serge Hallyn <serge@hallyn.com>
+Simon Horman <simon.horman@corigine.com>
+Timo Stark <t.stark@nginx.com>
+Tom Schwindl <schwindl@posteo.de>
+"Valentin V. Bartenev" <vbartenev@gmail.com>
+Vincent Lefevre <vincent@vinc17.net>
+Vladislav Ivanishin <vlad@ispras.ru>
+Willem de Bruijn <willemb@google.com>
+Wu Zhenyu <wuzhenyu@ustc.edu>
+Yedidyah Bar David <didi@redhat.com>
+Younes Manton <younes.m@gmail.com>
+<imachug@yandex.ru>
+<pabeni@redhat.com>
+
+
+Apologies if I missed anyone!
+
+
+Newly documented interfaces in existing pages
+---------------------------------------------
+
+proc.5
+ KPF_PGTABLE (Linux 4.18)
+
+landlock.7
+ LANDLOCK_ACCESS_FS_REFER (Linux 5.19)
+ LANDLOCK_ACCESS_FS_TRUNCATE (Linux 6.02)
+
+udp.7
+ UDP_GRO (Linux 5.0)
+ UDP_SEGMENT (Linux 4.18)
+
+
+Global changes
+--------------
+
+- Sections:
+ - Add HISTORY.
+ - HISTORY: Restore C89 references.
+ - Repurpose VERSIONS.
+ - Simplify STANDARDS.
+ - SYNOPSIS: Mark several functions as deprecated.
+
+- Build system:
+ - Support installing in different mandirs
+ (e.g., man3typedir='/usr/share/man/man3').
+ - Support installing compressed pages (Z='.gz').
+ - Support installing link pages as symlinks (LINK_PAGES='symlink').
+ - Add make(1) 'check' target. This has been split from 'lint'.
+ 'lint' will check the source code, and 'check' will check the
+ rendered pages (as a user will read them). There are currently
+ several pages that fail this `make check`, and distributors that
+ depend on this can workaround it by touching a few files:
+
+ $ make check -k -j >/dev/null 2>/dev/null;
+ $ make check -k 2>/dev/null;
+ GREP .tmp/man/man1/memusage.1.check-catman.touch
+ TROFF .tmp/man/man2/fanotify_init.2.cat.set
+ TROFF .tmp/man/man2/gettimeofday.2.cat.set
+ TROFF .tmp/man/man2/s390_sthyi.2.cat.set
+ GREP .tmp/man/man3/mallopt.3.check-catman.touch
+ TROFF .tmp/man/man3/unlocked_stdio.3.cat.set
+ TROFF .tmp/man/man4/console_codes.4.cat.set
+ TROFF .tmp/man/man4/lirc.4.cat.set
+ GREP .tmp/man/man4/smartpqi.4.check-catman.touch
+ GREP .tmp/man/man4/veth.4.check-catman.touch
+ TROFF .tmp/man/man5/proc.5.cat.set
+ GREP .tmp/man/man5/slabinfo.5.check-catman.touch
+ TROFF .tmp/man/man5/tzfile.5.cat.set
+ TROFF .tmp/man/man7/address_families.7.cat.set
+ TROFF .tmp/man/man7/ascii.7.cat.set
+ TROFF .tmp/man/man7/bpf-helpers.7.cat.set
+ GREP .tmp/man/man7/keyrings.7.check-catman.touch
+ GREP .tmp/man/man7/uri.7.check-catman.touch
+ TROFF .tmp/man/man8/tzselect.8.cat.set
+ TROFF .tmp/man/man8/zdump.8.cat.set
+ TROFF .tmp/man/man8/zic.8.cat.set
+
+ After touching the previous files, `make check` will succeed:
+
+ $ make check -k 2>/dev/null | awk '{print $2}' | xargs touch;
+ $ make check -j >/dev/null;
+ $ echo $?
+ 0
+
+
+Changes to individual pages
+---------------------------
+
+The manual pages (and other files in the repository) have been improved
+beyond what this changelog covers. To learn more about changes applied
+to individual pages, use git(1).
diff --git a/INSTALL b/INSTALL
index da1e53e6b..d12fd7ae5 100644
--- a/INSTALL
+++ b/INSTALL
@@ -6,29 +6,30 @@ Synopsis
Description
(a) Use a package manager
- If you want to install the manual pages into your system, consider
- installing them through your package manager from an official release,
- instead of installing them from this repository. This repository
- contains the newest manual pages, but using an official release and the
- system package manager offers important benefits. On a Debian system
- it would be:
+ If you want to install the manual pages into your system,
+ consider installing them through your package manager from an
+ official release, instead of installing them from this
+ repository. This repository contains the newest manual pages,
+ but using an official release and the system package manager
+ offers important benefits. On a Debian system it would be:
$ sudo apt-get install -V manpages-dev manpages
- If you prefer to install the manual pages from this repository, maybe
- because your system ships a too old version, consider updating the
- package offered by your system. See the <RELEASE> file, and also
- talk to the maintainer of the package in your distribution.
+ If you prefer to install the manual pages from this repository,
+ maybe because your system ships a too old version, consider
+ updating the package offered by your system. See the <RELEASE>
+ file, and also talk to the maintainer of the package in your
+ distribution.
(b) Install manually from source
- If you are contributing to the project, you may want to install the
- manual pages from this repository to test them, instead of using an
- official release. Or maybe your distribution installs packages from
- source code without any package manager.
+ If you are contributing to the project, you may want to install
+ the manual pages from this repository to test them, instead of
+ using an official release. Or maybe your distribution installs
+ packages from source code without any package manager.
- In most cases, you just want to install all of the manual pages, and
- nothing else. To install them in the default system directory (per GNU
- guidelines), use:
+ In most cases, you just want to install all of the manual pages,
+ and nothing else. To install them in the default system
+ directory (per GNU guidelines), use:
$ sudo make install
@@ -38,35 +39,33 @@ Description
A few features can be used to tweak the install:
- Directory Variables
- To check about all of the directory variables available, compare the
- GNU Coding Standards with the Makefile and the helper makefiles (see
- the sections "Standards" and "Files" below). The most common ones that
- you may use are:
+ Variables
+ There are many variables available with which you can tweak
+ the build system. Most of them are directory variables and
+ command variables, based on the GNU Coding Standards. Others
+ are specially designed for this project. To see all of the
+ available variables, use:
+
+ $ make help-variables
+
+ The most common ones that you may use are:
- DESTDIR
- prefix
- Command Variables
- Some commands use flags. A command named 'command' will have a
- variable COMMAND to specify an alternative command name. To append
- flags to the default ones, set the variable EXTRA_COMMANDFLAGS. To
- overwrite the flags, set the variable COMMANDFLAGS.
-
- Verbose
Use V=1 for a more verbose output from the makefiles:
$ sudo make install V=1
Uninstall
- You can uninstall the pages with the following command (but see the
- "Caveats" section below):
+ You can uninstall the pages with the following command (but
+ see the "Caveats" section below):
$ sudo make uninstall
Targets
- There are targets for more granular control, such as 'install-man3'.
- See the help to know all of them:
+ There are targets for more granular control, such as
+ 'install-man3'. See the help to know all of them:
$ make help
@@ -84,13 +83,17 @@ Description
- xargs(1)
- For installing:
+ - gzip(1)
- install(1)
+ - ln(1)
+ - sponge(1)
+ - test(1)
- For uninstalling / cleaning:
- rm(1)
- rmdir(1)
- - For linting man(7) source:
+ - For linting/building/checking man(7) source:
- eqn(1)
- grotty(1)
- head(1)
@@ -99,19 +102,19 @@ Description
- tbl(1)
- troff(1) >= 1.23.0 - GNU troff is required.
- - For linting C source:
+ - For linting/building C source:
- cc(1) - GCC or Clang
- clang-tidy(1)
- cpplint(1)
- iwyu(1)
- - man(1)
+ - mandoc(1)
- mkdir(1)
- pkg-config(1)
- tac(1)
- libbsd-dev
- And one that isn't packaged, but can be extracted from the Linux
- kernel source tree in <scripts/checkpatch.pl>:
+ And one that isn't packaged, but can be extracted from the
+ Linux kernel source tree in <scripts/checkpatch.pl>:
- checkpatch(1)
@@ -122,26 +125,26 @@ Description
- man(1)
- groff(1) | mandoc(1)
- Lint (experimental)
- You can lint both the manual pages, and the example C programs
- contained in them. See 'make help' for a list of targets that can be
- used.
+ Lint & check
+ You can lint and check both the manual pages, and the example C
+ programs contained in them. See 'make help' for a list of
+ targets that can be used.
Files
- Makefile, lib/install-man.mk, lib/install.mk
- Main makefiles for installing (however, others may also be used by
- inclusion).
+ Makefile, share/mk/install-man.mk, share/mk/install.mk
+ Main makefiles for installing (however, others may also be used
+ by inclusion).
- lib/cmd.mk
+ share/mk/cmd.mk
Command variables.
- lib/install-html.mk
+ share/mk/install-html.mk
Makefile to install HTML manual pages.
- lib/verbose.mk
+ share/mk/verbose.mk
Handle verbose settings.
- lib/*.mk
+ share/mk/*
Other makefiles.
man*/*
@@ -158,27 +161,30 @@ Standards
And the Filesystem Hierarchy Standard:
<https://refspecs.linuxfoundation.org/FHS_3.0/fhs/index.html>
- But deviate from them in some cases, the most notable case being the
- use of directories for manual subsections, such as <man3type/>.
+ But deviate from them in some cases, the most notable case being
+ the use of directories for manual subsections, such as
+ <man3type/>.
Caveats
Uninstall
- You can uninstall the pages. However, take into account that it will
- only uninstall pages that exist in the repository. This means that if
- you installed the manual pages from source from an older version of the
- repository with 'make install', and some page was [re]moved later, it
- won't be uninstalled. You should probably install with a prefix of
- prefix=/opt/local/man-pages to be able to nuke the directory later with
- 'rm -r /opt/local/man-pages'. However, you'll need to modify your
- $MANPATH to be able to use those manual pages as if they were in a
- system path.
+ You can uninstall the pages. However, take into account that it
+ will only uninstall pages that exist in the repository. This
+ means that if you installed the manual pages from source from an
+ older version of the repository with 'make install', and some
+ page was [re]moved later, it won't be uninstalled. You should
+ probably install with a prefix of prefix=/opt/local/man-pages to
+ be able to nuke the directory later with
+ 'rm -r /opt/local/man-pages'. However, you'll need to modify
+ your $MANPATH to be able to use those manual pages as if they
+ were in a system path.
Version and last-modified date
- If you're an end user or a distributor, make sure you do this (install)
- from a tarball, and not from the git repository. The manual pages in
- the repository have placeholders for the version and last modified date,
- which are filled when creating the tarball. You can create your own
- tarball, for which you need to read the RELEASE file.
+ If you're an end user or a distributor, make sure you do this
+ (install) from a tarball, and not from the git repository. The
+ manual pages in the repository have placeholders for the version
+ and last modified date, which are filled when creating the
+ tarball. You can create your own tarball, for which you need to
+ read the RELEASE file.
See also
gmake(1)
diff --git a/LICENSES/Linux-man-pages-1-para.txt b/LICENSES/Linux-man-pages-1-para.txt
new file mode 100644
index 000000000..6eff9081a
--- /dev/null
+++ b/LICENSES/Linux-man-pages-1-para.txt
@@ -0,0 +1,4 @@
+Permission is granted to distribute possibly modified
+copies of this page provided the header is included
+verbatim, and in case of nontrivial modification author
+and date of the modification is added to the header.
diff --git a/LICENSES/Linux-man-pages-copyleft-2-para.txt b/LICENSES/Linux-man-pages-copyleft-2-para.txt
new file mode 100644
index 000000000..b0871675b
--- /dev/null
+++ b/LICENSES/Linux-man-pages-copyleft-2-para.txt
@@ -0,0 +1,8 @@
+Permission is granted to make and distribute verbatim copies of this
+manual provided the copyright notice and this permission notice are
+preserved on all copies.
+
+Permission is granted to copy and distribute modified versions of this
+manual under the conditions for verbatim copying, provided that the
+entire resulting derived work is distributed under the terms of a
+permission notice identical to this one.
diff --git a/LICENSES/Linux-man-pages-copyleft-var.txt b/LICENSES/Linux-man-pages-copyleft-var.txt
new file mode 100644
index 000000000..174230355
--- /dev/null
+++ b/LICENSES/Linux-man-pages-copyleft-var.txt
@@ -0,0 +1,16 @@
+Permission is granted to make and distribute verbatim copies of
+this manual provided the copyright notice and this permission
+notice are preserved on all copies.
+
+Permission is granted to copy and distribute modified versions of
+this manual under the conditions for verbatim copying, provided
+that the entire resulting derived work is distributed under the
+terms of a permission notice identical to this one.
+
+Since the Linux kernel and libraries are constantly changing, this
+manual page may be incorrect or out-of-date. The author(s) assume
+no responsibility for errors or omissions, or for damages resulting
+from the use of the information contained herein.
+
+Formatted or processed versions of this manual, if unaccompanied by
+the source, must acknowledge the copyright and authors of this work.
diff --git a/Makefile b/Makefile
index 66f02dea8..56f288cbd 100644
--- a/Makefile
+++ b/Makefile
@@ -1,6 +1,6 @@
########################################################################
-# Copyright (C) 2021, 2022 Alejandro Colomar <alx@kernel.org>
-# SPDX-License-Identifier: GPL-2.0 OR LGPL-2.0
+# Copyright 2021-2022, Alejandro Colomar <alx@kernel.org>
+# SPDX-License-Identifier: GPL-3.0-or-later
########################################################################
# Conventions:
#
@@ -16,62 +16,89 @@
# is in a variable of the same name but without the '_'. The subdir is
# named after this project: <*/man>.
# - Variables ending in '_rm' refer to files that can be removed (exist).
-# - Variables ending in '_rmdir' refer to dirs that can be removed (exist).
# - Targets of the form '%-rm' remove their corresponding file '%'.
-# - Targets of the form '%/.-rmdir' remove their corresponding dir '%/'.
-# - Targets of the form '%/.' create their corresponding directory '%/'.
-# - Every file or directory to be created depends on its parent directory.
-# This avoids race conditions caused by `mkdir -p`. Only the root
-# directories are created with parents.
-# - The 'FORCE' target is used to make phony some variables that can't be
-# .PHONY to avoid some optimizations.
#
########################################################################
+
+ifndef MAKEFILE_INCLUDED
+MAKEFILE_INCLUDED := 1
+
+
SHELL := /usr/bin/env bash -Eeuo pipefail
MAKEFLAGS += --no-builtin-rules
MAKEFLAGS += --no-builtin-variables
-MAKEFLAGS += --no-print-directory
MAKEFLAGS += --warn-undefined-variables
-srcdir := .
+srcdir := .
+DATAROOTDIR := $(srcdir)/share
+MAKEFILEDIR := $(DATAROOTDIR)/mk
.PHONY: all
-all: build
- @:
+all: build;
.PHONY: help
help:
- $(info Targets:)
- $(info )
$(info all Alias for "build")
$(info )
$(info clean Remove $$(builddir))
$(info )
- $(info build Alias for "build-html")
+ $(info build Wrapper for build-* targets)
+ $(info )
+ $(info build-pre Preprocess man pages; alias for "build-pre-tbl")
+ $(info build-pre-preconv Preprocess man pages with preconv(1))
+ $(info build-pre-tbl Preprocess man pages with tbl(1))
+ $(info )
+ $(info build-catman Build cat pages; alias for "build-catman-grotty")
+ $(info build-catman-eqn eqn(1) step of "build-catman")
+ $(info build-catman-troff Wrapper for build-catman-troff-* targets)
+ $(info build-catman-troff-man troff(1) step of "build-catman" for man(7) pages)
+ $(info build-catman-troff-mdoc troff(1) step of "build-catman" for mdoc(7) pages)
+ $(info build-catman-grotty grotty(1) step of "build-catman")
$(info )
$(info build-html Build HTML manual pages)
$(info html Alias for "build-html")
$(info )
+ $(info build-pdf Build PDF manual pages; alias for "build-pdf-grops")
+ $(info build-pdf-eqn eqn(1) step of "build-pdf")
+ $(info build-pdf-troff Wrapper for build-pdf-troff-* targets)
+ $(info build-pdf-troff-man troff(1) step of "build-pdf" for man(7) pages)
+ $(info build-pdf-troff-mdoc troff(1) step of "build-pdf" for mdoc(7) pages)
+ $(info build-pdf-gropdf gropdf(1) step of "build-pdf")
+ $(info )
+ $(info build-ps Build PostScript manual pages; alias for "build-ps-grops")
+ $(info build-ps-eqn eqn(1) step of "build-ps")
+ $(info build-ps-troff Wrapper for build-ps-troff-* targets)
+ $(info build-ps-troff-man troff(1) step of "build-ps" for man(7) pages)
+ $(info build-ps-troff-mdoc troff(1) step of "build-ps" for mdoc(7) pages)
+ $(info build-ps-grops grops(1) step of "build-ps")
+ $(info )
$(info build-src Alias for "build-src-ld")
$(info build-src-c Extract C programs from EXAMPLES)
$(info build-src-cc Compile C programs from EXAMPLES)
$(info build-src-ld Link C programs from EXAMPLES)
$(info )
- $(info lint Wrapper for "lint-c lint-man")
+ $(info lint Wrapper for "lint-c lint-man lint-mdoc")
$(info lint-c Wrapper for lint-c-* targets)
$(info lint-c-checkpatch Lint C programs from EXAMPLES with checkpatch(1))
$(info lint-c-clang-tidy Lint C programs from EXAMPLES with clang-tidy(1))
+ $(info lint-c-cppcheck Lint C programs from EXAMPLES with cppcheck(1))
$(info lint-c-cpplint Lint C programs from EXAMPLES with cpplint(1))
$(info lint-c-iwyu Lint C programs from EXAMPLES with iwyu(1))
$(info lint-man Wrapper for lint-man-* targets)
- $(info lint-man-groff Lint man pages with groff(1))
- $(info lint-man-mandoc Lint man pages with mandoc(1))
- $(info lint-man-tbl Lint man pages about '\" t' comment for tbl(1))
+ $(info lint-man-mandoc Lint man(7) pages with mandoc(1))
+ $(info lint-man-tbl Lint man(7) pages about '\" t' comment for tbl(1))
+ $(info lint-mdoc Wrapper for lint-mdoc-* targets)
+ $(info lint-mdoc-mandoc Lint mdoc(7) pages with mandoc(1))
+ $(info )
+ $(info check Alias for "check-catman")
+ $(info check-catman Check cat pages; alias for "check-catman-grep")
+ $(info check-catman-col Filter cat pages with col(1))
+ $(info check-catman-grep Check cat pages with grep(1))
$(info )
$(info [un]install Alias for "[un]install-man")
$(info [un]install-man Wrapper for [un]install-man* targets)
@@ -92,30 +119,116 @@ help:
$(info )
$(info dist Wrapper for dist-* targets)
$(info dist-tar Create a tarball of the repository)
+ $(info dist-bz2 Create a compressed tarball (.tar.bz2))
$(info dist-gz Create a compressed tarball (.tar.gz))
+ $(info dist-lz Create a compressed tarball (.tar.lz))
$(info dist-xz Create a compressed tarball (.tar.xz))
$(info )
$(info help Print this help)
+ $(info help-variables Print all variables available, and their default values)
$(info )
- $(info Variables:)
- $(info )
- $(info V Define to non-empty string for verbose output)
.SECONDEXPANSION:
-include $(srcdir)/lib/build.mk
-include $(srcdir)/lib/build-html.mk
-include $(srcdir)/lib/build-src.mk
-include $(srcdir)/lib/dist.mk
-include $(srcdir)/lib/install.mk
-include $(srcdir)/lib/install-html.mk
-include $(srcdir)/lib/install-man.mk
-include $(srcdir)/lib/lint.mk
-include $(srcdir)/lib/lint-c.mk
-include $(srcdir)/lib/lint-man.mk
-include $(srcdir)/lib/verbose.mk
+MK := \
+ $(srcdir)/Makefile \
+ $(wildcard $(addprefix $(MAKEFILEDIR)/, *.mk */*.mk */*/*.mk))
+include $(MK)
+$(MK):: ;
+
+
+.PHONY: help-variables
+help-variables:
+ $(info V Define to non-empty string for verbose output)
+ $(info )
+ $(info LINK_PAGES How to install link pages. [".so", "symlink"])
+ $(info Z Install pages compressed. ["", ".bz2", ".gz", ".lz", ".xz"])
+ $(info )
+ $(info DISTNAME $$(git describe))
+ $(info DISTVERSION /$$DISTNAME/s/man-pages-//)
+ $(info )
+ $(info # Directory variables:)
+ $(info )
+ $(info builddir .tmp)
+ $(info DESTDIR )
+ $(info prefix /usr/local)
+ $(info mandir $$(datarootdir)/man)
+ $(info docdir $$(datarootdir)/doc)
+ $(info )
+ $(info man1dir $$(mandir)/man1)
+ $(info man2dir $$(mandir)/man2)
+ $(info man2typedir $$(mandir)/man2type)
+ $(info man3dir $$(mandir)/man3)
+ $(info man3constdir $$(mandir)/man3const)
+ $(info man3headdir $$(mandir)/man3head)
+ $(info man3typedir $$(mandir)/man3type)
+ $(info man4dir $$(mandir)/man4)
+ $(info man5dir $$(mandir)/man5)
+ $(info man6dir $$(mandir)/man6)
+ $(info man7dir $$(mandir)/man7)
+ $(info man8dir $$(mandir)/man8)
+ $(info )
+ $(info htmldir $$(docdir))
+ $(info htmlext .html)
+ $(info )
+ $(info # Command variables (and flags):)
+ $(info )
+ $(info - MANWIDTH)
+ $(info - NROFF_OUT_DEVICE)
+ $(info PRECONV {EXTRA_,}PRECONVFLAGS)
+ $(info TBL)
+ $(info EQN {EXTRA_,}EQNFLAGS)
+ $(info TROFF {EXTRA_,}TROFFFLAGS{,_MAN,_MDOC} {EXTRA_,}NROFFFLAGS)
+ $(info GROPDF {EXTRA_,}GROPDFFLAGS)
+ $(info GROPS {EXTRA_,}GROPSFLAGS)
+ $(info GROTTY {EXTRA_,}GROTTYFLAGS)
+ $(info COL {EXTRA_,}COLFLAGS)
+ $(info )
+ $(info MANDOC {EXTRA_,}MANDOCFLAGS)
+ $(info MAN2HTML {EXTRA_,}MAN2HTMLFLAGS)
+ $(info )
+ $(info BZIP2 {EXTRA_,}BZIP2FLAGS)
+ $(info CP)
+ $(info ECHO)
+ $(info EXPR)
+ $(info FIND)
+ $(info GIT)
+ $(info GZIP {EXTRA_,}GZIPFLAGS)
+ $(info HEAD)
+ $(info LN)
+ $(info LOCALE)
+ $(info LZIP {EXTRA_,}LZIPFLAGS)
+ $(info PKGCONF)
+ $(info SED)
+ $(info SORT)
+ $(info SPONGE)
+ $(info TAC)
+ $(info TAIL)
+ $(info TAR)
+ $(info TEST)
+ $(info XARGS)
+ $(info XZ {EXTRA_,}XZFLAGS)
+ $(info )
+ $(info INSTALL)
+ $(info INSTALL_DATA)
+ $(info MKDIR)
+ $(info RM)
+ $(info )
+ $(info - {EXTRA_,}CPPFLAGS)
+ $(info CC {EXTRA_,}CFLAGS)
+ $(info LD {EXTRA_,}LDFLAGS {EXTRA_,}LDLIBS)
+ $(info )
+ $(info CHECKPATCH {EXTRA_,}CHECKPATCHFLAGS)
+ $(info CLANG-TIDY {EXTRA_,}CLANG-TIDYFLAGS)
+ $(info CPPCHECK {EXTRA_,}CPPCHECKFLAGS)
+ $(info CPPLINT {EXTRA_,}CPPLINTFLAGS)
+ $(info IWYU {EXTRA_,}IWYUFLAGS)
+ $(info )
+
+
+.DELETE_ON_ERROR:
-FORCE:
+endif #include guard
diff --git a/README b/README
index adbcea103..9925ac13f 100644
--- a/README
+++ b/README
@@ -2,17 +2,18 @@ Name
Linux man-pages - manual pages for GNU/Linux
Synopsis
- This package contains GNU/Linux manual pages for sections 1 through 8.
+ This package contains GNU/Linux manual pages for sections 1
+ through 8.
Description
- The manual pages in this project document primarily the Linux kernel
- and the GNU C library, but also consider relevant differences in other
- kernels or C libraries.
+ The manual pages in this project document primarily the Linux
+ kernel and the GNU C library, but also consider relevant
+ differences in other kernels or C libraries.
These pages are most of the section 2, 3, 4, 5, 7 man pages for
- GNU/Linux. A few pages are provided in sections 1 and 8 for commands
- that are not documented in other packages, and there are a few pages in
- sections 5 and 8 for the timezone utilities.
+ GNU/Linux. A few pages are provided in sections 1 and 8 for
+ commands that are not documented in other packages, and there are
+ a few pages in sections 5 and 8 for the timezone utilities.
Files
CONTRIBUTING
@@ -31,11 +32,12 @@ Files
Instructions for releasing and distributing new versions.
Changes, Changes.old
- Change log. Includes most relevant changes. However, it's not as
- complete as the git(1) log.
+ Change log. Includes most relevant changes. However, it's not
+ as complete as the git(1) log.
- Makefile, lib/*.mk
- Build system. For help, consult the <INSTALL> file, and run 'make help'.
+ Makefile, share/mk/*
+ Build system. For help, consult the <INSTALL> file, and run
+ 'make help'.
lsm
Linux software map. See also <https://lsm.qqx.org/>.
@@ -47,7 +49,8 @@ Files
Licenses in use by the project.
etc/*
- Configuration files for (linter) programs called by the build system.
+ Configuration files for (linter) programs called by the build
+ system.
man*/*
Manual pages.
@@ -55,42 +58,81 @@ Files
scripts/*
Useful scripts for maintainers.
- tmp/
+ .tmp/
Default directory for files created by the build system.
Versions
- Tarballs of releases starting from 2.00 are available at
- <https://mirrors.edge.kernel.org/pub/linux/docs/man-pages/>.
+ Tarballs
+ <https://mirrors.edge.kernel.org/pub/linux/docs/man-pages/>
- The git(1) repository can be found at:
+ Git
<git://git.kernel.org/pub/scm/docs/man-pages/man-pages.git>
+ <https://git.kernel.org/pub/scm/docs/man-pages/man-pages.git/>
A secondary git(1) repository can be found at:
<git://www.alejandro-colomar.es/src/alx/linux/man-pages/man-pages.git>
+ <http://www.alejandro-colomar.es/src/alx/linux/man-pages/man-pages.git/>
-Caveats
- Some projects provide their own manual pages, not related to the Linux
- man-pages project.
+ Online man-pages
+ PDF
+ <https://mirrors.edge.kernel.org/pub/linux/docs/man-pages/book/>
-Bugs
- See the <CONTRIBUTING> file.
+History
+ Tarballs
+ Tarballs of man-pages-1.* releases are available at:
+ <https://www.win.tue.nl/~aeb/ftpdocs/linux-local/manpages.archive/>
-Maintainers
+ Maintainers
Alejandro Colomar <alx@kernel.org> <http://www.alejandro-colomar.es/>
2020 - present (5.09 - HEAD)
Michael Kerrisk <mtk.manpages@gmail.com> <https://man7.org/>
- 2004 - 2021 (2.00 - 5.13)
+ 2004 - 2021 (2.00 - 5.13)
Andries Brouwer <aeb@cwi.nl> <https://www.win.tue.nl/~aeb>
1995 - 2004 (1.6 - 1.70)
Rik Faith <https://www.cs.unc.edu/~faith/>
1993 - 1995 (1.0 - 1.5)
+Caveats
+ Some projects provide their own manual pages, not related to the
+ Linux man-pages project.
+
+Bugs
+ See the <CONTRIBUTING> file.
+
Copyright
- Several free/open source licenses. See the <LICENSES/> directory, and
- the comment at the top of each source file.
+ Several free/open source licenses. See the <LICENSES/>
+ directory, and the comment at the top of each source file.
See also
man-pages(7)
Website
<http://www.kernel.org/doc/man-pages/index.html>.
+
+ Downstream packages
+ Arch man-pages
+ <https://archlinux.org/packages/core/any/man-pages/>
+ Debian manpages
+ <https://tracker.debian.org/pkg/manpages>
+ Fedora rpms/man-pages
+ <https://src.fedoraproject.org/rpms/man-pages>
+ Gentoo sys-apps/man-pages
+ <https://packages.gentoo.org/packages/sys-apps/man-pages>
+ openSUSE man-pages
+ <https://software.opensuse.org/package/man-pages>
+
+ Related projects
+ Debian manpages-l10n
+ <https://manpages-l10n-team.pages.debian.net/manpages-l10n/>
+ GNU C Library (glibc)
+ <https://www.gnu.org/software/libc/>
+ GNU Compiler Collection (GCC)
+ <https://gcc.gnu.org/>
+ GNU roff (groff)
+ <https://www.gnu.org/software/groff/>
+ Linux kernel
+ <https://www.kernel.org/doc/html/latest/
+ man-db
+ <https://man-db.gitlab.io/man-db/>
+ mandoc
+ <https://mandoc.bsd.lv/>
diff --git a/RELEASE b/RELEASE
index 3b1864f34..aff32873d 100644
--- a/RELEASE
+++ b/RELEASE
@@ -5,15 +5,15 @@ Synopsis
Change log, git tag, tarball, LSM, email, and push.
Description
- This are the instructions to release a new official version of the
- project. However, these should also be useful for those who simply
- want to package a random commit (this is done for example by Gentoo).
- For packaging a random commit without an official release, you only
- need step (4) "Tarball".
+ This are the instructions to release a new official version of
+ the project. However, these should also be useful for those who
+ simply want to package a random commit (this is done for example
+ by Gentoo). For packaging a random commit without an official
+ release, you only need step (4) "Tarball".
Dependencies
- The following list of dependencies states what the build system (the
- makefiles) need to perform the relevant (dist) targets:
+ The following list of dependencies states what the build system
+ (the makefiles) need to perform the relevant (dist) targets:
- echo(1)
- expr(1)
@@ -30,8 +30,8 @@ Description
- xargs(1)
- xz(1)
- Apart from that, the following commands are also needed for other tasks
- shown below:
+ Apart from that, the following commands are also needed for other
+ tasks shown below:
- gpg(1)
- kup(1)
@@ -46,82 +46,82 @@ Description
(2) Changes
- Fill the <Changes> file. For that you can check older commits,
- like d4e80a7748 "Changes: Ready for 6.01". It needs manual
- intervention, but in that commit log you can check a few commands
- that will help.
+ Fill the <Changes> file. For that you can check older
+ commits: `git log -p --grep 'Changes: Ready for 6'`. It
+ needs manual intervention, but in those commit logs you can
+ check a few commands that will help.
- Remember to change the version number, the date, and the
location.
- - Remove any headers not used for a specific release (usually\
- happens with "New and changed links").
+ - Remove any headers not used for a specific release
+ (usually happens with "New and changed links").
- The structure is a bit freestyle, but keep it organized.
- man-pages-6.00 was a huge release, so it might help to check it:
- 51228378bec7 "Changes: Ready for 6.00".
+ Check how previous releases did it.
- Commit:
$ git add Changes
- $ git commit -sm "Changes: Ready for ${new}"
+ $ git commit -sm "Changes: Ready for $new"
(3) Tag
Create a signed tag. The tag message should note the most
- important changes in the version being released, since it will be
- read by users and packagers. It should include any information
- that is especially relevant for them. Check old tags such as
- 'man-pages-6.00' or 'man-pages-6.01'.
+ important changes in the version being released, since it
+ will be read by users and packagers. It should include any
+ information that is especially relevant for them. Check old
+ tags:
+ `git tag | grep 'man-pages-6' | tac | xargs git show --stat`
- Tag:
- $ git tag -s man-pages-${new}
+ $ git tag -s man-pages-$new
(4) Tarball
Creating the tarball will embed in the manual pages both the
- version number, and the date of last modification (in the git
- repository, the pages have placeholders for the date and the
- version).
+ version number, and the date of last modification (in the
+ git repository, the pages have placeholders for the date and
+ the version).
- You need to create a set of tarballs, sign the .tar archive, and
- upload the compressed tarballs to <kernel.org>.
+ You need to create a set of tarballs, sign the .tar archive,
+ and upload the compressed tarballs to <kernel.org>.
In case you're creating a tarball for distributing a random
- commit, it might be interesting to tweak a few parameters; check
- the variables available at <lib/dist.mk>, and any makefiles
- included by that one. See the "Versions" section below.
+ commit, it might be interesting to tweak a few parameters;
+ check the variables available at <share/mk/dist.mk>, and any
+ makefiles included by that one. See the "Versions" section
+ below.
- Create the tarball:
- $ make dist
+ $ make -Bj4 dist
- Since it takes a few seconds, you may prefer to run it in
- parallel:
+ Alternatively, you may want to only create a specific
+ kind of tarball with one of the following targets:
- $ make -j dist
+ $ make -Bj4 dist-tar dist-xz dist-gz
- Alternatively, you may want to only create a specific kind of
- tarball with one of the following targets:
+ - Sign the tarball:
- $ make dist-tar dist-xz dist-gz
+ $ cd .tmp/
+ $ gpg --detach-sign --armor man-pages-$new.tar
- - Sign the tarball:
+ - Verify the signature:
- $ cd tmp/
- $ gpg --detach-sign --armor man-pages-${new}.tar
+ $ gpg --verify man-pages-$new.tar{.asc,}
- Upload the tarball:
- $ kup put man-pages-${new}.tar.xz man-pages-${new}.tar.asc \
+ $ kup put man-pages-$new.tar.{xz,asc} \
/pub/linux/docs/man-pages/
$ cd ..
(5) LSM
- Update the <lsm> file. Check old commits, like
- c11cb1ca844d "Ready for 6.01".
+ Update the <lsm> file. Check old commits:
+ `git log -p -- lsm`.
- Update the project version number.
@@ -132,29 +132,30 @@ Description
- Commit:
$ git add lsm
- $ git commit -sm "lsm: Released ${new}"
+ $ git commit -sm "lsm: Released $new"
- - Send (email) the lsm file to <lsm@qqx.org> with the subject
- "add".
+ - Send (email) the lsm file to <lsm@qqx.org> with the
+ subject "add".
(6) Email
Send an announce email to linux-man, LKML, libc-alpha, and
- possibly others that might be interested in the release, such as
- distribution maintainers, or those who have contributed to the
- release.
+ possibly others that might be interested in the release,
+ such as distribution maintainers, or those who have
+ contributed to the release.
The email should contain a mix of the git tag message, the
- contents of Changes, and anything else that might be relevant.
- Check old emails such as
+ contents of Changes, and anything else that might be
+ relevant. Check old emails such as
<https://lore.kernel.org/linux-man/4ba6c215-6d28-1769-52d3-04941b962ff3@kernel.org/T/#u>.
- The subject of the email should be "man-pages-${new} released".
+ The subject of the email should be
+ "man-pages-$new released".
(7) Changes.old
- Move the contents of <Changes> to <Changes.old>, and prepare for
- the next release.
+ Move the contents of <Changes> to <Changes.old>, and prepare
+ for the next release.
- Copy contents of <Changes> to <Changes.old>:
@@ -163,23 +164,23 @@ Description
- Empty <Changes>:
- $ git checkout man-pages-${new}^^ -- Changes
+ $ git checkout man-pages-$new^^ -- Changes
- Commit:
$ git add Changes Changes.old
$ git commit -sm \
- "Start of man-pages-NEXT: Move Changes to Changes.old"
+ "Start of man-pages-NEXT: Move Changes to Changes.old"
(8) Push
- You've finished. When you confirm it's good, push to the git
- repository.
+ You've finished. When you confirm it's good, push to the
+ git repository.
- Push:
$ git push
- $ git push korg man-pages-${new}
+ $ git push korg man-pages-$new
korg is just my name for the remote.
@@ -187,29 +188,30 @@ Files
Changes, Changes.old
Change log. Includes most relevant changes.
- Makefile, lib/dist.mk, lib/version.mk
- Main makefiles used for releasing (however, others may also be used by
- inclusion).
+ Makefile, share/mk/dist.mk, share/mk/version.mk
+ Main makefiles used for releasing (however, others may also be
+ used by inclusion).
lsm
Linux software map. See also <https://lsm.qqx.org/>.
- tmp/man-pages-<version>.tar{,.xz,.gz}
- Generated tarballs. You can generate all with 'make dist', or generate
- only some of them, with 'make dist-tar', 'make dist-xz', or
- 'make dist-gz'.
+ .tmp/man-pages-<version>.tar{,.xz,.gz}
+ Generated tarballs. You can generate all with 'make -B dist', or
+ generate only some of them, with 'make -B dist-tar',
+ 'make -B dist-xz', or 'make -B dist-gz'.
Versions
- Use the DISTVERSION variable when running make(1) to specify a version
- different than the default, which is generated with git-describe(1).
- This needs to be done from the git repository, and won't work from an
- extracted tarball.
+ Use the DISTVERSION variable when running make(1) to specify a
+ version different than the default, which is generated with
+ git-describe(1). This needs to be done from the git repository,
+ and won't work from an extracted tarball.
- $ make dist-xz DISTVERSION=6.01+43
+ $ make -B dist-xz DISTVERSION=6.01+43
Caveats
- The version and date of last modification for each page is hardcoded
- by the Makefile into the pages when the tarball is generated. This
- means that it's not possible to generate a valid tarball from another
- extracted tarball, since the version and date will not be updated.
- Tarballs need to be created from the git(1) repository.
+ The version and date of last modification for each page is
+ hardcoded by the Makefile into the pages when the tarball is
+ generated. This means that it's not possible to generate a valid
+ tarball from another extracted tarball, since the version and
+ date will not be updated. Tarballs need to be created from the
+ git(1) repository.
diff --git a/etc/groff/tmac/checkstyle.tmac b/etc/groff/tmac/checkstyle.tmac
deleted file mode 100644
index 1d96cac10..000000000
--- a/etc/groff/tmac/checkstyle.tmac
+++ /dev/null
@@ -1,13 +0,0 @@
-.am an-style-warn
-. ds LANDMINE\"
-..
-.\"
-.de end-of-input-macro
-. if d LANDMINE .ab found style problems; aborting
-..
-.\"
-.em end-of-input-macro
-.\"
-.de an-blank-line-trap
-. sp
-..
diff --git a/lib/build-src.mk b/lib/build-src.mk
deleted file mode 100644
index b6ec587b1..000000000
--- a/lib/build-src.mk
+++ /dev/null
@@ -1,120 +0,0 @@
-########################################################################
-# Copyright (C) 2021, 2022 Alejandro Colomar <alx@kernel.org>
-# SPDX-License-Identifier: GPL-2.0 OR LGPL-2.0
-########################################################################
-
-
-ifndef MAKEFILE_BUILD_SRC_INCLUDED
-MAKEFILE_BUILD_SRC_INCLUDED := 1
-
-
-include $(srcdir)/lib/build.mk
-include $(srcdir)/lib/cmd.mk
-include $(srcdir)/lib/lint.mk
-include $(srcdir)/lib/src.mk
-include $(srcdir)/lib/verbose.mk
-
-
-PKG-CONFIG_LIBS := libbsd-overlay
-
-
-DEFAULT_CPPFLAGS := $(shell $(PKG-CONFIG) --cflags $(PKG-CONFIG_LIBS) $(HIDE_ERR))
-EXTRA_CPPFLAGS :=
-CPPFLAGS := $(DEFAULT_CPPFLAGS) $(EXTRA_CPPFLAGS)
-
-DEFAULT_CFLAGS := -std=gnu17
-DEFAULT_CFLAGS += -Wall
-DEFAULT_CFLAGS += -Wextra
-DEFAULT_CFLAGS += -Wstrict-prototypes
-DEFAULT_CFLAGS += -Wdeclaration-after-statement
-DEFAULT_CFLAGS += -Werror
-DEFAULT_CFLAGS += -Wno-error=unused-parameter
-DEFAULT_CFLAGS += -Wno-error=sign-compare
-DEFAULT_CFLAGS += -Wno-error=format
-DEFAULT_CFLAGS += -Wno-error=uninitialized
-#DEFAULT_CFLAGS += -Wno-error=declaration-after-statement
-EXTRA_CFLAGS :=
-CFLAGS := $(DEFAULT_CFLAGS) $(EXTRA_CFLAGS)
-
-DEFAULT_LDFLAGS := -Wl,--as-needed
-DEFAULT_LDFLAGS += -Wl,--no-allow-shlib-undefined
-DEFAULT_LDFLAGS += -Wl,--no-copy-dt-needed-entries
-DEFAULT_LDFLAGS += -Wl,--no-undefined
-DEFAULT_LDFLAGS += $(shell $(PKG-CONFIG) --libs-only-L $(PKG-CONFIG_LIBS) $(HIDE_ERR))
-DEFAULT_LDFLAGS += $(shell $(PKG-CONFIG) --libs-only-other $(PKG-CONFIG_LIBS) $(HIDE_ERR))
-EXTRA_LDFLAGS :=
-LDFLAGS := $(DEFAULT_LDFLAGS) $(EXTRA_LDFLAGS)
-
-DEFAULT_LDLIBS := -lc
-DEFAULT_LDLIBS += $(shell $(PKG-CONFIG) --libs-only-l $(PKG-CONFIG_LIBS) $(HIDE_ERR))
-EXTRA_LDLIBS :=
-LDLIBS := $(DEFAULT_LDLIBS) $(EXTRA_LDLIBS)
-
-
-CC := cc
-LD := $(CC) $(CFLAGS)
-MAN := man
-
-
-_SRCPAGEDIRS := $(patsubst $(MANDIR)/%,$(_SRCDIR)/%.d,$(LINTMAN))
-
-_UNITS_src_src := $(patsubst $(MANDIR)/%,$(_SRCDIR)/%,$(shell \
- $(FIND) $(MANDIR)/man*/ -type f \
- | $(GREP) '$(MANEXT)' \
- | $(XARGS) $(GREP) -l '^\.TH ' \
- | while read m; do \
- <$$m \
- $(SED) -n "s,^\... SRC BEGIN (\(.*.[ch]\))$$,$$m.d/\1,p"; \
- done \
- | $(SORT)))
-_UNITS_src_h := $(filter %.h,$(_UNITS_src_src))
-_UNITS_src_c := $(filter %.c,$(_UNITS_src_src))
-_UNITS_src_o := $(patsubst %.c,%.o,$(_UNITS_src_c))
-_UNITS_src_bin := $(patsubst %.c,%,$(_UNITS_src_c))
-
-
-$(_SRCPAGEDIRS): $(_SRCDIR)/%.d: $(MANDIR)/% | $$(@D)/.
- $(info MKDIR $@)
- $(MKDIR) $@
- touch $@
-
-$(_UNITS_src_src): $$(patsubst $(_SRCDIR)/%.d,$(MANDIR)/%,$$(@D)) | $$(@D)
-$(_UNITS_src_c): $$(filter $$(@D)/%.h,$(_UNITS_src_h))
-$(_UNITS_src_src):
- $(info SED $@)
- <$< \
- $(SED) -n \
- -e '/^\.TH/,/^\.SH/{/^\.SH/!p}' \
- -e '/^\.SH EXAMPLES/p' \
- -e "/^\... SRC BEGIN ($(@F))$$/,/^\... SRC END$$/p" \
- | $(MAN) -P cat -l - \
- | $(SED) '/^[^ ]/d' \
- | $(SED) 's/^ //' \
- >$@
-
-$(_UNITS_src_o): $(_SRCDIR)/%.o: $(_SRCDIR)/%.c
- $(info CC $@)
- $(CC) -c $(CPPFLAGS) $(CFLAGS) -o $@ $<
-
-$(_UNITS_src_bin): $(_SRCDIR)/%: $(_SRCDIR)/%.o
- $(info LD $@)
- $(LD) $(LDFLAGS) -o $@ $< $(LDLIBS)
-
-
-.PHONY: build-src-c
-build-src-c: $(_UNITS_src_c)
- @:
-
-.PHONY: build-src-cc
-build-src-cc: $(_UNITS_src_o)
- @:
-
-.PHONY: build-src-ld
-build-src-ld: $(_UNITS_src_bin)
- @:
-
-.PHONY: build-src
-build-src: build-src-ld
-
-
-endif # MAKEFILE_BUILD_SRC_INCLUDED
diff --git a/lib/build.mk b/lib/build.mk
deleted file mode 100644
index d362819de..000000000
--- a/lib/build.mk
+++ /dev/null
@@ -1,44 +0,0 @@
-########################################################################
-# Copyright (C) 2021, 2022 Alejandro Colomar <alx@kernel.org>
-# SPDX-License-Identifier: GPL-2.0 OR LGPL-2.0
-########################################################################
-
-
-ifndef MAKEFILE_BUILD_INCLUDED
-MAKEFILE_BUILD_INCLUDED := 1
-
-
-include $(srcdir)/lib/src.mk
-
-
-builddir := tmp
-
-_SRCDIR := $(builddir)/src
-
-
-MKDIR := mkdir -p
-RM := rm
-
-
-_SRCDIRS := $(patsubst $(MANDIR)/%,$(_SRCDIR)/%/.,$(MANDIRS))
-
-
-$(_SRCDIRS): %/.: | $$(dir %). $(_SRCDIR)/.
-
-
-$(builddir)/%/.:
- $(info MKDIR $(@D)/)
- $(MKDIR) $(@D)
-
-
-.PHONY: build
-build: build-html
- @:
-
-.PHONY: clean
-clean:
- $(info RM -rf $(builddir))
- $(RM) -rf $(builddir)
-
-
-endif # MAKEFILE_BUILD_INCLUDED
diff --git a/lib/dist.mk b/lib/dist.mk
deleted file mode 100644
index 76b155282..000000000
--- a/lib/dist.mk
+++ /dev/null
@@ -1,72 +0,0 @@
-########################################################################
-# Copyright (C) 2021, 2022 Alejandro Colomar <alx@kernel.org>
-# SPDX-License-Identifier: GPL-2.0 OR LGPL-2.0
-########################################################################
-
-
-ifndef MAKEFILE_DIST_INCLUDED
-MAKEFILE_DIST_INCLUDED := 1
-
-
-include $(srcdir)/lib/build.mk
-include $(srcdir)/lib/cmd.mk
-include $(srcdir)/lib/install.mk
-include $(srcdir)/lib/version.mk
-include $(srcdir)/lib/verbose.mk
-
-
-
-_DISTDIR := $(builddir)/dist
-
-DISTFILES := $(shell $(GIT) ls-files $(HIDE_ERR) | $(SED) 's,^,$(srcdir)/,')
-_DISTFILES := $(patsubst $(srcdir)/%,$(_DISTDIR)/%,$(DISTFILES))
-_DISTPAGES := $(filter $(_DISTDIR)/man%,$(_DISTFILES))
-_DISTOTHERS := $(filter-out $(_DISTDIR)/man%,$(_DISTFILES))
-
-DISTFILE := $(builddir)/$(DISTNAME).tar
-compression := gz xz
-dist := $(foreach x,$(compression),dist-$(x))
-
-
-$(_DISTPAGES): $(_DISTDIR)/man%: $(srcdir)/man% FORCE | $$(@D)/.
- $(info INSTALL $@)
- $(INSTALL_DATA) -T $< $@
- $(SED) -i '/^.TH/s/(unreleased)/$(DISTVERSION)/' $@
- $(SED) -i "/^.TH/s/(date)/$$(git log --format=%cs -1 -- $<)/" $@
-
-$(_DISTOTHERS): $(_DISTDIR)/%: $(srcdir)/% | $$(@D)/.
- $(info INSTALL $@)
- $(INSTALL_DATA) -T $< $@
-
-
-$(DISTFILE): $(_DISTFILES) | $$(@D)/.
- $(info TAR $@)
- $(TAR) cf $@ -T /dev/null
- $(GIT) ls-files \
- | $(SED) 's,^,$(_DISTDIR)/,' \
- | $(XARGS) $(TAR) rf $@ -C $(srcdir) \
- --transform 's,^$(_DISTDIR),$(DISTNAME),'
-
-$(DISTFILE).gz: %.gz: % | $$(@D)/.
- $(info GZIP $@)
- $(GZIP) -knf $<
-
-$(DISTFILE).xz: %.xz: % | $$(@D)/.
- $(info XZ $@)
- $(XZ) -kf $<
-
-
-.PHONY: dist-tar
-dist-tar: $(DISTFILE)
- @:
-
-.PHONY: $(dist)
-$(dist): dist-%: $(DISTFILE).%
- @:
-
-.PHONY: dist
-dist: $(dist)
- @:
-
-
-endif # MAKEFILE_DIST_INCLUDED
diff --git a/lib/install-html.mk b/lib/install-html.mk
deleted file mode 100644
index 2531ad503..000000000
--- a/lib/install-html.mk
+++ /dev/null
@@ -1,43 +0,0 @@
-########################################################################
-# Copyright (C) 2021, 2022 Alejandro Colomar <alx@kernel.org>
-# SPDX-License-Identifier: GPL-2.0 OR LGPL-2.0
-########################################################################
-
-
-ifndef MAKEFILE_INSTALL_HTML_INCLUDED
-MAKEFILE_INSTALL_HTML_INCLUDED := 1
-
-
-include $(srcdir)/lib/build-html.mk
-include $(srcdir)/lib/install.mk
-
-
-htmldir := $(docdir)
-htmldir_ := $(htmldir)/man
-_htmldir := $(DESTDIR)$(htmldir_)
-
-
-_htmlpages := $(patsubst $(_HTMLDIR)/%,$(_htmldir)/%,$(_HTMLPAGES))
-_htmldirs := $(patsubst $(_HTMLDIR)/%,$(_htmldir)/%,$(_HTMLDIRS))
-_htmlpages_rm := $(addsuffix -rm,$(wildcard $(_htmlpages)))
-_htmldirs_rmdir := $(addsuffix -rmdir,$(wildcard $(_htmldirs)))
-_htmldir_rmdir := $(addsuffix -rmdir,$(wildcard $(_htmldir)/.))
-
-
-$(_htmlpages): $(_htmldir)/%: $(_HTMLDIR)/% | $$(@D)/.
- $(info INSTALL $@)
- $(INSTALL_DATA) -T $< $@
-
-$(_htmldirs): %/.: | $$(dir %). $(_htmldir)/.
-
-
-.PHONY: install-html
-install-html: $(_htmlpages)
- @:
-
-.PHONY: uninstall-html
-uninstall-html: $(_htmldir_rmdir) $(_htmldirs_rmdir) $(_htmlpages_rm)
- @:
-
-
-endif # MAKEFILE_INSTALL_HTML_INCLUDED
diff --git a/lib/install-man.mk b/lib/install-man.mk
deleted file mode 100644
index c3a32a89a..000000000
--- a/lib/install-man.mk
+++ /dev/null
@@ -1,131 +0,0 @@
-########################################################################
-# Copyright (C) 2021, 2022 Alejandro Colomar <alx@kernel.org>
-# SPDX-License-Identifier: GPL-2.0 OR LGPL-2.0
-########################################################################
-
-
-ifndef MAKEFILE_INSTALL_MAN_INCLUDED
-MAKEFILE_INSTALL_MAN_INCLUDED := 1
-
-
-include $(srcdir)/lib/install.mk
-include $(srcdir)/lib/src.mk
-
-
-mandir := $(datarootdir)/man
-man1dir := $(mandir)/man1
-man2dir := $(mandir)/man2
-man2typedir := $(mandir)/man2type
-man3dir := $(mandir)/man3
-man3constdir:= $(mandir)/man3const
-man3headdir := $(mandir)/man3head
-man3typedir := $(mandir)/man3type
-man4dir := $(mandir)/man4
-man5dir := $(mandir)/man5
-man6dir := $(mandir)/man6
-man7dir := $(mandir)/man7
-man8dir := $(mandir)/man8
-man1ext := .1
-man2ext := .2
-man2typeext := .2type
-man3ext := .3
-man3headext := .3head
-man3typeext := .3type
-man4ext := .4
-man5ext := .5
-man6ext := .6
-man7ext := .7
-man8ext := .8
-_mandir := $(DESTDIR)$(mandir)
-
-
-_manpages := $(patsubst $(MANDIR)/%,$(_mandir)/%,$(MANPAGES))
-_man1pages := $(filter %$(man1ext),$(_manpages))
-_man2pages := $(filter %$(man2ext),$(_manpages))
-_man2typepages := $(filter %$(man2typeext),$(_manpages))
-_man3pages := $(filter %$(man3ext),$(_manpages))
-_man3constpages:= $(filter %$(man3constext),$(_manpages))
-_man3headpages := $(filter %$(man3headext),$(_manpages))
-_man3typepages := $(filter %$(man3typeext),$(_manpages))
-_man4pages := $(filter %$(man4ext),$(_manpages))
-_man5pages := $(filter %$(man5ext),$(_manpages))
-_man6pages := $(filter %$(man6ext),$(_manpages))
-_man7pages := $(filter %$(man7ext),$(_manpages))
-_man8pages := $(filter %$(man8ext),$(_manpages))
-
-_mandirs := $(patsubst $(MANDIR)/%,$(_mandir)/%/.,$(MANDIRS))
-_man1dir := $(filter %man1/.,$(_mandirs))
-_man2dir := $(filter %man2/.,$(_mandirs))
-_man2typedir := $(filter %man2type/.,$(_mandirs))
-_man3dir := $(filter %man3/.,$(_mandirs))
-_man3constdir:= $(filter %man3const/.,$(_mandirs))
-_man3headdir := $(filter %man3head/.,$(_mandirs))
-_man3typedir := $(filter %man3type/.,$(_mandirs))
-_man4dir := $(filter %man4/.,$(_mandirs))
-_man5dir := $(filter %man5/.,$(_mandirs))
-_man6dir := $(filter %man6/.,$(_mandirs))
-_man7dir := $(filter %man7/.,$(_mandirs))
-_man8dir := $(filter %man8/.,$(_mandirs))
-
-_man1pages_rm := $(addsuffix -rm,$(wildcard $(_man1pages)))
-_man2pages_rm := $(addsuffix -rm,$(wildcard $(_man2pages)))
-_man2typepages_rm := $(addsuffix -rm,$(wildcard $(_man2typepages)))
-_man3pages_rm := $(addsuffix -rm,$(wildcard $(_man3pages)))
-_man3constpages_rm:= $(addsuffix -rm,$(wildcard $(_man3constpages)))
-_man3headpages_rm := $(addsuffix -rm,$(wildcard $(_man3headpages)))
-_man3typepages_rm := $(addsuffix -rm,$(wildcard $(_man3typepages)))
-_man4pages_rm := $(addsuffix -rm,$(wildcard $(_man4pages)))
-_man5pages_rm := $(addsuffix -rm,$(wildcard $(_man5pages)))
-_man6pages_rm := $(addsuffix -rm,$(wildcard $(_man6pages)))
-_man7pages_rm := $(addsuffix -rm,$(wildcard $(_man7pages)))
-_man8pages_rm := $(addsuffix -rm,$(wildcard $(_man8pages)))
-
-_mandirs_rmdir := $(addsuffix -rmdir,$(wildcard $(_mandirs)))
-_man1dir_rmdir := $(addsuffix -rmdir,$(wildcard $(_man1dir)))
-_man2dir_rmdir := $(addsuffix -rmdir,$(wildcard $(_man2dir)))
-_man2typedir_rmdir := $(addsuffix -rmdir,$(wildcard $(_man2typedir)))
-_man3dir_rmdir := $(addsuffix -rmdir,$(wildcard $(_man3dir)))
-_man3constdir_rmdir:= $(addsuffix -rmdir,$(wildcard $(_man3constdir)))
-_man3headdir_rmdir := $(addsuffix -rmdir,$(wildcard $(_man3headdir)))
-_man3typedir_rmdir := $(addsuffix -rmdir,$(wildcard $(_man3typedir)))
-_man4dir_rmdir := $(addsuffix -rmdir,$(wildcard $(_man4dir)))
-_man5dir_rmdir := $(addsuffix -rmdir,$(wildcard $(_man5dir)))
-_man6dir_rmdir := $(addsuffix -rmdir,$(wildcard $(_man6dir)))
-_man7dir_rmdir := $(addsuffix -rmdir,$(wildcard $(_man7dir)))
-_man8dir_rmdir := $(addsuffix -rmdir,$(wildcard $(_man8dir)))
-_mandir_rmdir := $(addsuffix -rmdir,$(wildcard $(_mandir)/.))
-
-MAN_SECTIONS := 1 2 2type 3 3const 3head 3type 4 5 6 7 8
-install_manX := $(foreach x,$(MAN_SECTIONS),install-man$(x))
-installdirs_manX := $(foreach x,$(MAN_SECTIONS),installdirs-man$(x))
-uninstall_manX := $(foreach x,$(MAN_SECTIONS),uninstall-man$(x))
-
-
-$(_manpages): $(_mandir)/man%: $(MANDIR)/man% | $$(@D)/.
- $(info INSTALL $@)
- $(INSTALL_DATA) -T $< $@
-
-$(_mandirs): %/.: | $$(dir %). $(_mandir)/.
-
-$(_mandirs_rmdir): $(_mandir)/man%/.-rmdir: $$(_man%pages_rm) FORCE
-$(_mandir_rmdir): $(uninstall_manX) FORCE
-
-
-.PHONY: $(install_manX)
-$(install_manX): install-man%: $$(_man%pages)
- @:
-
-.PHONY: install-man
-install-man: $(install_manX)
- @:
-
-.PHONY: $(uninstall_manX)
-$(uninstall_manX): uninstall-man%: $$(_man%pages_rm) $$(_man%dir_rmdir)
- @:
-
-.PHONY: uninstall-man
-uninstall-man: $(_mandir_rmdir) $(uninstall_manX)
- @:
-
-
-endif # MAKEFILE_INSTALL_MAN_INCLUDED
diff --git a/lib/lint-man.mk b/lib/lint-man.mk
deleted file mode 100644
index 8e66291cc..000000000
--- a/lib/lint-man.mk
+++ /dev/null
@@ -1,130 +0,0 @@
-########################################################################
-# Copyright (C) 2021, 2022 Alejandro Colomar <alx@kernel.org>
-# SPDX-License-Identifier: GPL-2.0 OR LGPL-2.0
-########################################################################
-
-
-ifndef MAKEFILE_LINT_MAN_INCLUDED
-MAKEFILE_LINT_MAN_INCLUDED := 1
-
-
-include $(srcdir)/lib/cmd.mk
-include $(srcdir)/lib/lint.mk
-include $(srcdir)/lib/src.mk
-
-
-TMACDIR := $(SYSCONFDIR)/groff/tmac
-
-
-MANWIDTH ?= 80
-TROFF_LINE_LENGTH := $(shell $(EXPR) $(MANWIDTH) - 2)
-TROFF_OUT_DEVICE := $(shell $(LOCALE) charmap \
- | $(GREP) -i 'utf-*8' >/dev/null \
- && $(ECHO) utf8 \
- || $(ECHO) ascii)
-
-TBL := tbl
-
-DEFAULT_EQNFLAGS := -T$(TROFF_OUT_DEVICE)
-EXTRA_EQNFLAGS :=
-EQNFLAGS := $(DEFAULT_EQNFLAGS) $(EXTRA_EQNFLAGS)
-EQN := eqn
-
-TMACFILES := $(shell $(FIND) $(TMACDIR) -not -type d | $(SORT))
-TMACNAMES := $(basename $(notdir $(TMACFILES)))
-TROFF_CHECKSTYLE_LVL := 3
-DEFAULT_TROFFFLAGS := -man
-DEFAULT_TROFFFLAGS += -t
-DEFAULT_TROFFFLAGS += -M $(TMACDIR)
-DEFAULT_TROFFFLAGS += $(foreach x,$(TMACNAMES),-m $(x))
-DEFAULT_TROFFFLAGS += -rCHECKSTYLE=$(TROFF_CHECKSTYLE_LVL)
-DEFAULT_TROFFFLAGS += -ww
-DEFAULT_TROFFFLAGS += -T$(TROFF_OUT_DEVICE)
-DEFAULT_TROFFFLAGS += -rLL=$(TROFF_LINE_LENGTH)n
-EXTRA_TROFFFLAGS :=
-TROFFFLAGS := $(DEFAULT_TROFFFLAGS) $(EXTRA_TROFFFLAGS)
-TROFF := troff
-
-DEFAULT_GROTTYFLAGS := -c
-EXTRA_GROTTYFLAGS :=
-GROTTYFLAGS := $(DEFAULT_GROTTYFLAGS) $(EXTRA_GROTTYFLAGS)
-GROTTY := grotty
-
-DEFAULT_COLFLAGS := -b
-DEFAULT_COLFLAGS += -p
-DEFAULT_COLFLAGS += -x
-EXTRA_COLFLAGS :=
-COLFLAGS := $(DEFAULT_COLFLAGS) $(EXTRA_COLFLAGS)
-COL := col
-
-DEFAULT_MANDOCFLAGS := -man
-DEFAULT_MANDOCFLAGS += -Tlint
-EXTRA_MANDOCFLAGS :=
-MANDOCFLAGS := $(DEFAULT_MANDOCFLAGS) $(EXTRA_MANDOCFLAGS)
-MANDOC := mandoc
-
-
-_LINT_man_groff :=$(patsubst $(MANDIR)/%,$(_LINTDIR)/%.lint-man.groff.touch,$(LINTMAN))
-_LINT_man_mandoc:=$(patsubst $(MANDIR)/%,$(_LINTDIR)/%.lint-man.mandoc.touch,$(LINTMAN))
-_LINT_man_tbl :=$(patsubst $(MANDIR)/%,$(_LINTDIR)/%.lint-man.tbl.touch,$(LINTMAN))
-
-
-linters_man := groff mandoc tbl
-lint_man := $(foreach x,$(linters_man),lint-man-$(x))
-
-
-$(_LINT_man_groff): $(_LINTDIR)/%.lint-man.groff.touch: $(MANDIR)/% | $$(@D)/.
- $(info LINT (groff) $@)
- $(TBL) $< \
- | $(EQN) $(EQNFLAGS) \
- | $(TROFF) $(TROFFFLAGS) \
- | $(GROTTY) $(GROTTYFLAGS) \
- | $(COL) $(COLFLAGS) \
- | (! $(GREP) -n '.\{$(MANWIDTH)\}.' | $(SED) 's,^,$<:,' >&2)
- touch $@
-
-$(_LINT_man_mandoc): $(_LINTDIR)/%.lint-man.mandoc.touch: $(MANDIR)/% | $$(@D)/.
- $(info LINT (mandoc) $@)
- ! ($(MANDOC) $(MANDOCFLAGS) $< 2>&1 \
- | $(GREP) -v 'STYLE: lower case character in document title:' \
- | $(GREP) -v 'UNSUPP: ignoring macro in table:' \
- | $(GREP) -v 'WARNING: cannot parse date, using it verbatim: TH (date)' \
- | $(GREP) -v 'WARNING: empty block: UR' \
- ||:; \
- ) \
- | $(GREP) '.' >&2
- touch $@
-
-$(_LINT_man_tbl): $(_LINTDIR)/%.lint-man.tbl.touch: $(MANDIR)/% | $$(@D)/.
- $(info LINT (tbl) $@)
- if $(GREP) -q '^\.TS$$' $< && ! $(HEAD) -n1 $< | $(GREP) -q '\\" t$$'; \
- then \
- >&2 $(ECHO) "$<:1: missing '\\\" t' comment:"; \
- >&2 $(HEAD) -n1 <$<; \
- exit 1; \
- fi
- if $(HEAD) -n1 $< | $(GREP) -q '\\" t$$' && ! $(GREP) -q '^\.TS$$' $<; \
- then \
- >&2 $(ECHO) "$<:1: spurious '\\\" t' comment:"; \
- >&2 $(HEAD) -n1 <$<; \
- exit 1; \
- fi
- if $(TAIL) -n+2 <$< | $(GREP) -q '\\" t$$'; \
- then \
- >&2 $(ECHO) "$<: spurious '\\\" t' not in first line:"; \
- >&2 $(GREP) -n '\\" t$$' $< /dev/null; \
- exit 1; \
- fi
- touch $@
-
-
-.PHONY: $(lint_man)
-$(lint_man): lint-man-%: $$(_LINT_man_%)
- @:
-
-.PHONY: lint-man
-lint-man: $(lint_man)
- @:
-
-
-endif # MAKEFILE_LINT_MAN_INCLUDED
diff --git a/lib/lint.mk b/lib/lint.mk
deleted file mode 100644
index 9233372df..000000000
--- a/lib/lint.mk
+++ /dev/null
@@ -1,39 +0,0 @@
-########################################################################
-# Copyright (C) 2021, 2022 Alejandro Colomar <alx@kernel.org>
-# SPDX-License-Identifier: GPL-2.0 OR LGPL-2.0
-########################################################################
-
-
-ifndef MAKEFILE_LINT_INCLUDED
-MAKEFILE_LINT_INCLUDED := 1
-
-
-include $(srcdir)/lib/build.mk
-include $(srcdir)/lib/cmd.mk
-include $(srcdir)/lib/src.mk
-
-
-SYSCONFDIR := $(srcdir)/etc
-
-_LINTDIR := $(builddir)/lint
-
-
-LINTMAN := $(shell $(FIND) $(MANDIR)/man*/ -type f \
- | $(GREP) '$(MANEXT)' \
- | $(XARGS) $(GREP) -l '^\.TH ' \
- | $(SORT))
-_LINTDIRS := $(patsubst $(MANDIR)/%,$(_LINTDIR)/%/.,$(MANDIRS))
-
-
-lint := lint-c lint-man
-
-
-$(_LINTDIRS): %/.: | $$(dir %). $(_LINTDIR)/.
-
-
-.PHONY: lint
-lint: $(lint)
- @:
-
-
-endif # MAKEFILE_LINT_INCLUDED
diff --git a/lib/src.mk b/lib/src.mk
deleted file mode 100644
index 3cce2085a..000000000
--- a/lib/src.mk
+++ /dev/null
@@ -1,25 +0,0 @@
-########################################################################
-# Copyright (C) 2021, 2022 Alejandro Colomar <alx@kernel.org>
-# SPDX-License-Identifier: GPL-2.0 OR LGPL-2.0
-########################################################################
-
-
-ifndef MAKEFILE_SRC_INCLUDED
-MAKEFILE_SRC_INCLUDED := 1
-
-
-include $(srcdir)/lib/cmd.mk
-
-
-MANDIR := $(srcdir)
-MANEXT := \.[0-9]\w*$
-
-
-MANPAGES := $(shell $(FIND) $(MANDIR)/man*/ -type f \
- | $(GREP) '$(MANEXT)' \
- | $(SORT))
-MANDIRS := $(shell $(FIND) $(MANDIR)/man* -type d \
- | $(SORT))
-
-
-endif # MAKEFILE_SRC_INCLUDED
diff --git a/lsm b/lsm
index e56a51e7a..29c26119b 100644
--- a/lsm
+++ b/lsm
@@ -1,7 +1,7 @@
Begin4
Title: Linux man-pages
-Version: 6.02
-Entered-date: 2022-12-22
+Version: 6.05
+Entered-date: 2023-08-01
Description: Manual pages for GNU/Linux. This package contains
manual pages for sections 2, 3, 4, 5, and 7, and
subsections of those. Only a few pages are provided in
@@ -9,7 +9,7 @@ Description: Manual pages for GNU/Linux. This package contains
Keywords: man pages
Maintained-by: Alejandro Colomar <alx@kernel.org>
Primary-site: http://www.kernel.org/pub/linux/docs/man-pages
- 2.6M man-pages-6.02.tar.gz
+ 3.0M man-pages-6.05.tar.gz
Copying-policy: several; the pages are all freely distributable as long as
nroff source is provided
End
diff --git a/man1/getent.1 b/man1/getent.1
index 22446749f..1168fc5fe 100644
--- a/man1/getent.1
+++ b/man1/getent.1
@@ -3,7 +3,7 @@
.\"
.\" SPDX-License-Identifier: GPL-2.0-or-later
.\"
-.TH getent 1 2023-01-07 "Linux man-pages 6.03"
+.TH getent 1 2023-01-07 "Linux man-pages 6.05.01"
.SH NAME
getent \- get entries from Name Service Switch libraries
.SH SYNOPSIS
diff --git a/man1/iconv.1 b/man1/iconv.1
index 6a6c0a2c4..39fb6ba2f 100644
--- a/man1/iconv.1
+++ b/man1/iconv.1
@@ -2,7 +2,7 @@
.\"
.\" SPDX-License-Identifier: GPL-2.0-or-later
.\"
-.TH iconv 1 2023-02-05 "Linux man-pages 6.03"
+.TH iconv 1 2023-03-30 "Linux man-pages 6.05.01"
.SH NAME
iconv \- convert text from one character encoding to another
.SH SYNOPSIS
@@ -160,6 +160,8 @@ Depending on the architecture,
the above files may instead be located at directories with the path prefix
.IR /usr/lib64 .
.SH STANDARDS
+POSIX.1-2008.
+.SH HISTORY
POSIX.1-2001.
.SH EXAMPLES
Convert text from the ISO 8859-15 character encoding to UTF-8:
diff --git a/man1/intro.1 b/man1/intro.1
index 99edc0df5..06905e1d1 100644
--- a/man1/intro.1
+++ b/man1/intro.1
@@ -2,7 +2,7 @@
.\"
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
-.TH intro 1 2023-02-05 "Linux man-pages 6.03"
+.TH intro 1 2023-05-03 "Linux man-pages 6.05.01"
.SH NAME
intro \- introduction to user commands
.SH DESCRIPTION
@@ -69,7 +69,7 @@ Su Mo Tu We Th Fr Sa
11 12 13 14 15 16 17
18 19 20 21 22 23 24
25 26 27 28 29 30 31
-
+\&
.RB "$ " ls
bin tel
.RB "$ " "ls \-l"
diff --git a/man1/ldd.1 b/man1/ldd.1
index 32154eaa5..1c894def1 100644
--- a/man1/ldd.1
+++ b/man1/ldd.1
@@ -8,7 +8,7 @@
.\"
.\" SPDX-License-Identifier: GPL-1.0-or-later
.\"
-.TH ldd 1 2023-02-05 "Linux man-pages 6.03"
+.TH ldd 1 2023-02-05 "Linux man-pages 6.05.01"
.SH NAME
ldd \- print shared object dependencies
.SH SYNOPSIS
diff --git a/man1/locale.1 b/man1/locale.1
index 5526e4cdf..31ca0ea9c 100644
--- a/man1/locale.1
+++ b/man1/locale.1
@@ -2,7 +2,7 @@
.\"
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
-.TH locale 1 2023-02-05 "Linux man-pages 6.03"
+.TH locale 1 2023-05-03 "Linux man-pages 6.05.01"
.SH NAME
locale \- get locale-specific information
.SH SYNOPSIS
@@ -119,7 +119,9 @@ Usual default locale archive location.
.I /usr/share/i18n/locales
Usual default path for locale definition files.
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008.
+POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001.
.SH EXAMPLES
.EX
$ \fBlocale\fP
@@ -137,24 +139,24 @@ LC_TELEPHONE="en_US.UTF\-8"
LC_MEASUREMENT="en_US.UTF\-8"
LC_IDENTIFICATION="en_US.UTF\-8"
LC_ALL=
-
+.PP
$ \fBlocale date_fmt\fP
%a %b %e %H:%M:%S %Z %Y
-
+.PP
$ \fBlocale \-k date_fmt\fP
date_fmt="%a %b %e %H:%M:%S %Z %Y"
-
+.PP
$ \fBlocale \-ck date_fmt\fP
LC_TIME
date_fmt="%a %b %e %H:%M:%S %Z %Y"
-
+.PP
$ \fBlocale LC_TELEPHONE\fP
+%c (%a) %l
(%a) %l
11
1
UTF\-8
-
+.PP
$ \fBlocale \-k LC_TELEPHONE\fP
tel_int_fmt="+%c (%a) %l"
tel_dom_fmt="(%a) %l"
diff --git a/man1/localedef.1 b/man1/localedef.1
index 7b8d190c3..13dd2f042 100644
--- a/man1/localedef.1
+++ b/man1/localedef.1
@@ -8,11 +8,11 @@
.\" This manual page was initially written by Richard Braakman
.\" on behalf of the Debian GNU/Linux Project and anyone else
.\" who wants it. It was amended by Alastair McKinstry to
-.\" explain new ISO 14652 elements, and amended further by
+.\" explain new ISO/IEC 14652 elements, and amended further by
.\" Lars Wirzenius to document new functionality (as of GNU
.\" C library 2.3.5).
.\"
-.TH localedef 1 2023-02-10 "Linux man-pages 6.03"
+.TH localedef 1 2023-03-12 "Linux man-pages 6.05.01"
.SH NAME
localedef \- compile locale definition files
.SH SYNOPSIS
diff --git a/man1/memusage.1 b/man1/memusage.1
index 1e2a572f8..03a5094ee 100644
--- a/man1/memusage.1
+++ b/man1/memusage.1
@@ -2,7 +2,7 @@
.\" and Copyright (C) 2014, Michael Kerrisk <mtk.manpages@gmail.com>
.\"
.\" SPDX-License-Identifier: GPL-2.0-or-later
-.TH memusage 1 2023-01-07 "Linux man-pages 6.03"
+.TH memusage 1 2023-05-03 "Linux man-pages 6.05.01"
.SH NAME
memusage \- profile memory usage of a program
.SH SYNOPSIS
@@ -223,35 +223,35 @@ $ \fBmemusagestat memusage.dat memusage.png\fP
.EX
#include <stdio.h>
#include <stdlib.h>
-
+\&
#define CYCLES 20
-
+\&
int
main(int argc, char *argv[])
{
int i, j;
size_t size;
int *p;
-
+\&
size = sizeof(*p) * 100;
printf("malloc: %zu\en", size);
p = malloc(size);
-
+\&
for (i = 0; i < CYCLES; i++) {
if (i < CYCLES / 2)
j = i;
else
j\-\-;
-
+\&
size = sizeof(*p) * (j * 50 + 110);
printf("realloc: %zu\en", size);
p = realloc(p, size);
-
+\&
size = sizeof(*p) * ((j + 1) * 150 + 110);
printf("realloc: %zu\en", size);
p = realloc(p, size);
}
-
+\&
free(p);
exit(EXIT_SUCCESS);
}
diff --git a/man1/memusagestat.1 b/man1/memusagestat.1
index 7173f31c9..afce0522d 100644
--- a/man1/memusagestat.1
+++ b/man1/memusagestat.1
@@ -1,7 +1,7 @@
.\" Copyright (c) 2013, Peter Schiffer <pschiffe@redhat.com>
.\"
.\" SPDX-License-Identifier: GPL-2.0-or-later
-.TH memusagestat 1 2022-10-30 "Linux man-pages 6.03"
+.TH memusagestat 1 2022-10-30 "Linux man-pages 6.05.01"
.SH NAME
memusagestat \- generate graphic from memory profiling data
.SH SYNOPSIS
diff --git a/man1/mtrace.1 b/man1/mtrace.1
index 18173f694..56498d766 100644
--- a/man1/mtrace.1
+++ b/man1/mtrace.1
@@ -1,7 +1,7 @@
.\" Copyright (c) 2013, Peter Schiffer (pschiffe@redhat.com)
.\"
.\" SPDX-License-Identifier: GPL-2.0-or-later
-.TH mtrace 1 2022-10-30 "Linux man-pages 6.03"
+.TH mtrace 1 2022-10-30 "Linux man-pages 6.05.01"
.SH NAME
mtrace \- interpret the malloc trace log
.SH SYNOPSIS
diff --git a/man1/pldd.1 b/man1/pldd.1
index fb6825d33..f6859bc2a 100644
--- a/man1/pldd.1
+++ b/man1/pldd.1
@@ -2,7 +2,7 @@
.\"
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
-.TH pldd 1 2023-02-05 "Linux man-pages 6.03"
+.TH pldd 1 2023-03-30 "Linux man-pages 6.05.01"
.SH NAME
pldd \- display dynamic shared objects linked into a process
.SH SYNOPSIS
@@ -39,15 +39,13 @@ or no command-line arguments are supplied,
exists with a status of 1.
If given an invalid option, it exits with the status 64.
.SH VERSIONS
-.B pldd
-is available since glibc 2.15.
-.SH STANDARDS
-The
-.B pldd
-command is not specified by POSIX.1.
Some other systems
.\" There are man pages on Solaris and HP-UX.
have a similar command.
+.SH STANDARDS
+None.
+.SH HISTORY
+glibc 2.15.
.SH NOTES
The command
.PP
diff --git a/man1/sprof.1 b/man1/sprof.1
index e187673c4..186dad4db 100644
--- a/man1/sprof.1
+++ b/man1/sprof.1
@@ -2,7 +2,7 @@
.\"
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
-.TH sprof 1 2023-01-07 "Linux man-pages 6.03"
+.TH sprof 1 2023-05-03 "Linux man-pages 6.05.01"
.SH NAME
sprof \- read and display shared object profiling data
.SH SYNOPSIS
@@ -53,9 +53,7 @@ Display a short usage message and exit.
.BR \-V ", " \-\-version
Display the program version and exit.
.SH STANDARDS
-The
-.B sprof
-command is a GNU extension, not present in POSIX.1.
+GNU.
.SH EXAMPLES
The following example demonstrates the use of
.BR sprof .
@@ -67,10 +65,10 @@ First, the code of the main program:
.EX
$ \fBcat prog.c\fP
#include <stdlib.h>
-
+\&
void x1(void);
void x2(void);
-
+\&
int
main(int argc, char *argv[])
{
@@ -92,27 +90,27 @@ construct the shared object:
.EX
$ \fBcat libdemo.c\fP
#include <unistd.h>
-
+\&
void
consumeCpu1(int lim)
{
for (unsigned int j = 0; j < lim; j++)
getppid();
}
-
+\&
void
x1(void) {
for (unsigned int j = 0; j < 100; j++)
consumeCpu1(200000);
}
-
+\&
void
consumeCpu2(int lim)
{
for (unsigned int j = 0; j < lim; j++)
getppid();
}
-
+\&
void
x2(void)
{
@@ -213,7 +211,7 @@ option to generate a flat profile with counts and ticks:
.EX
$ \fBsprof \-p libdemo.so.1 $LD_PROFILE_OUTPUT/libdemo.so.1.profile\fP
Flat profile:
-
+\&
Each sample counts as 0.01 seconds.
% cumulative self self total
time seconds seconds calls us/call us/call name
@@ -231,9 +229,9 @@ option generates a call graph:
.in +4n
.EX
$ \fBsprof \-q libdemo.so.1 $LD_PROFILE_OUTPUT/libdemo.so.1.profile\fP
-
+\&
index % time self children called name
-
+\&
0.00 0.00 100/100 x1 [1]
[0] 100.0 0.00 0.00 100 consumeCpu1 [0]
\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-
diff --git a/man1/time.1 b/man1/time.1
index 85c55aaba..df09106af 100644
--- a/man1/time.1
+++ b/man1/time.1
@@ -4,12 +4,12 @@
.\"
.\" SPDX-License-Identifier: GPL-1.0-or-later
.\"
-.TH time 1 2023-02-05 "Linux man-pages 6.03"
+.TH time 1 2023-07-30 "Linux man-pages 6.05.01"
.SH NAME
time \- time a simple command or give resource usage
.SH SYNOPSIS
-.B time \c
-.RI [ options ] " command " [ arguments... ]
+.B time
+.RI [ option \~.\|.\|.\&] " command " [ argument \~.\|.\|.]
.SH DESCRIPTION
The
.B time
diff --git a/man2/_exit.2 b/man2/_exit.2
index e23d0d0b5..22cccd991 100644
--- a/man2/_exit.2
+++ b/man2/_exit.2
@@ -6,7 +6,7 @@
.\" Modified Wed Jul 21 23:02:38 1993 by Rik Faith <faith@cs.unc.edu>
.\" Modified 2001-11-17, aeb
.\"
-.TH _exit 2 2023-01-22 "Linux man-pages 6.03"
+.TH _exit 2 2023-03-30 "Linux man-pages 6.05.01"
.SH NAME
_exit, _Exit \- terminate the calling process
.SH LIBRARY
@@ -60,8 +60,15 @@ is equivalent to
.SH RETURN VALUE
These functions do not return.
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, SVr4, 4.3BSD.
-The function
+.TP
+.BR _exit ()
+POSIX.1-2008.
+.TP
+.BR _Exit ()
+C11, POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001, SVr4, 4.3BSD.
+.PP
.BR _Exit ()
was introduced by C99.
.SH NOTES
diff --git a/man2/_syscall.2 b/man2/_syscall.2
index b26da05b8..ef6542ffb 100644
--- a/man2/_syscall.2
+++ b/man2/_syscall.2
@@ -16,7 +16,7 @@
.\" 2007-10-23 mtk: created as a new page, by taking the content
.\" specific to the _syscall() macros from intro(2).
.\"
-.TH _syscall 2 2023-02-05 "Linux man-pages 6.03"
+.TH _syscall 2 2023-05-03 "Linux man-pages 6.05.01"
.SH NAME
_syscall \- invoking a system call without library support (OBSOLETE)
.SH SYNOPSIS
@@ -68,9 +68,9 @@ you call the system call by
.SH FILES
.I /usr/include/linux/unistd.h
.SH STANDARDS
-The use of these macros is Linux-specific, and deprecated.
-.SH NOTES
-Starting around kernel 2.6.18, the _syscall macros were removed
+Linux.
+.SH HISTORY
+Starting around Linux 2.6.18, the _syscall macros were removed
from header files supplied to user space.
Use
.BR syscall (2)
@@ -79,7 +79,7 @@ instead.
on those architectures,
.BR syscall (2)
was always required.)
-.PP
+.SH NOTES
The _syscall() macros
.I "do not"
produce a prototype.
@@ -130,15 +130,15 @@ passed by-value or by-pointer (for aggregates like structs).
#include <errno.h>
#include <linux/unistd.h> /* for _syscallX macros/related stuff */
#include <linux/kernel.h> /* for struct sysinfo */
-
+\&
_syscall1(int, sysinfo, struct sysinfo *, info);
-
+\&
int
main(void)
{
struct sysinfo s_info;
int error;
-
+\&
error = sysinfo(&s_info);
printf("code error = %d\en", error);
printf("Uptime = %lds\enLoad: 1 min %lu / 5 min %lu / 15 min %lu\en"
diff --git a/man2/accept.2 b/man2/accept.2
index 5d2742c98..340fdb83c 100644
--- a/man2/accept.2
+++ b/man2/accept.2
@@ -10,7 +10,7 @@
.\" Modified 2004-06-17 by Michael Kerrisk <mtk.manpages@gmail.com>
.\" 2008-12-04, mtk, Add documentation of accept4()
.\"
-.TH accept 2 2022-12-04 "Linux man-pages 6.03"
+.TH accept 2 2023-04-05 "Linux man-pages 6.05.01"
.SH NAME
accept, accept4 \- accept a connection on a socket
.SH LIBRARY
@@ -254,26 +254,6 @@ The value
.B ERESTARTSYS
may be seen during a trace.
.SH VERSIONS
-The
-.BR accept4 ()
-system call is available starting with Linux 2.6.28;
-support in glibc is available starting with glibc 2.10.
-.SH STANDARDS
-.BR accept ():
-POSIX.1-2001, POSIX.1-2008,
-SVr4, 4.4BSD
-.RB ( accept ()
-first appeared in 4.2BSD).
-.\" The BSD man page documents five possible error returns
-.\" (EBADF, ENOTSOCK, EOPNOTSUPP, EWOULDBLOCK, EFAULT).
-.\" POSIX.1-2001 documents errors
-.\" EAGAIN, EBADF, ECONNABORTED, EINTR, EINVAL, EMFILE,
-.\" ENFILE, ENOBUFS, ENOMEM, ENOTSOCK, EOPNOTSUPP, EPROTO, EWOULDBLOCK.
-.\" In addition, SUSv2 documents EFAULT and ENOSR.
-.PP
-.BR accept4 ()
-is a nonstandard Linux extension.
-.PP
On Linux, the new socket returned by
.BR accept ()
does \fInot\fP inherit file status flags such as
@@ -288,6 +268,29 @@ Portable programs should not rely on inheritance or noninheritance
of file status flags and always explicitly set all required flags on
the socket returned from
.BR accept ().
+.SH STANDARDS
+.TP
+.BR accept ()
+POSIX.1-2008.
+.TP
+.BR accept4 ()
+Linux.
+.SH HISTORY
+.TP
+.BR accept ()
+POSIX.1-2001, SVr4, 4.4BSD
+.RB ( accept ()
+first appeared in 4.2BSD).
+.\" The BSD man page documents five possible error returns
+.\" (EBADF, ENOTSOCK, EOPNOTSUPP, EWOULDBLOCK, EFAULT).
+.\" POSIX.1-2001 documents errors
+.\" EAGAIN, EBADF, ECONNABORTED, EINTR, EINVAL, EMFILE,
+.\" ENFILE, ENOBUFS, ENOMEM, ENOTSOCK, EOPNOTSUPP, EPROTO, EWOULDBLOCK.
+.\" In addition, SUSv2 documents EFAULT and ENOSR.
+.TP
+.BR accept4 ()
+Linux 2.6.28,
+glibc 2.10.
.SH NOTES
There may not always be a connection waiting after a
.B SIGIO
diff --git a/man2/access.2 b/man2/access.2
index d5fce7855..3f492d28a 100644
--- a/man2/access.2
+++ b/man2/access.2
@@ -20,7 +20,7 @@
.\" Modified 2004-06-23 by Michael Kerrisk
.\" 2007-06-10, mtk, various parts rewritten, and added BUGS section.
.\"
-.TH access 2 2023-02-05 "Linux man-pages 6.03"
+.TH access 2 2023-03-30 "Linux man-pages 6.05.01"
.SH NAME
access, faccessat, faccessat2 \- check user's permissions for a file
.SH LIBRARY
@@ -275,21 +275,65 @@ Write permission was requested for a file on a read-only filesystem.
Write access was requested to an executable which is being
executed.
.SH VERSIONS
+If the calling process has appropriate privileges (i.e., is superuser),
+POSIX.1-2001 permits an implementation to indicate success for an
+.B X_OK
+check even if none of the execute file permission bits are set.
+.\" HPU-UX 11 and Tru64 5.1 do this.
+Linux does not do this.
+.\"
+.SS C library/kernel differences
+The raw
.BR faccessat ()
-was added in Linux 2.6.16;
-library support was added in glibc 2.4.
-.PP
-.BR faccessat2 ()
-was added in Linux 5.8.
+system call takes only the first three arguments.
+The
+.B AT_EACCESS
+and
+.B AT_SYMLINK_NOFOLLOW
+flags are actually implemented within the glibc wrapper function for
+.BR faccessat ().
+If either of these flags is specified, then the wrapper function employs
+.BR fstatat (2)
+to determine access permissions, but see BUGS.
+.\"
+.SS glibc notes
+On older kernels where
+.BR faccessat ()
+is unavailable (and when the
+.B AT_EACCESS
+and
+.B AT_SYMLINK_NOFOLLOW
+flags are not specified),
+the glibc wrapper function falls back to the use of
+.BR access ().
+When
+.I pathname
+is a relative pathname,
+glibc constructs a pathname based on the symbolic link in
+.I /proc/self/fd
+that corresponds to the
+.I dirfd
+argument.
.SH STANDARDS
-.BR access ():
-SVr4, 4.3BSD, POSIX.1-2001, POSIX.1-2008.
-.PP
-.BR faccessat ():
+.TP
+.BR access ()
+.TQ
+.BR faccessat ()
POSIX.1-2008.
-.PP
-.BR faccessat2 ():
-Linux-specific.
+.TP
+.BR faccessat2 ()
+Linux.
+.SH HISTORY
+.TP
+.BR access ()
+SVr4, 4.3BSD, POSIX.1-2001.
+.TP
+.BR faccessat ()
+Linux 2.6.16,
+glibc 2.4.
+.TP
+.BR faccessat2 ()
+Linux 5.8.
.SH NOTES
.BR Warning :
Using these calls to check if a user is authorized to, for example,
@@ -316,13 +360,6 @@ is denied, even if some of the other access types in
.I mode
are permitted.
.PP
-If the calling process has appropriate privileges (i.e., is superuser),
-POSIX.1-2001 permits an implementation to indicate success for an
-.B X_OK
-check even if none of the execute file permission bits are set.
-.\" HPU-UX 11 and Tru64 5.1 do this.
-Linux does not do this.
-.PP
A file is accessible only if the permissions on each of the
directories in the path prefix of
.I pathname
@@ -346,39 +383,6 @@ which checks permissions.
(NFS versions 3 and higher perform the check on the server.)
Similar problems can occur to FUSE mounts.
.\"
-.\"
-.SS C library/kernel differences
-The raw
-.BR faccessat ()
-system call takes only the first three arguments.
-The
-.B AT_EACCESS
-and
-.B AT_SYMLINK_NOFOLLOW
-flags are actually implemented within the glibc wrapper function for
-.BR faccessat ().
-If either of these flags is specified, then the wrapper function employs
-.BR fstatat (2)
-to determine access permissions, but see BUGS.
-.\"
-.SS glibc notes
-On older kernels where
-.BR faccessat ()
-is unavailable (and when the
-.B AT_EACCESS
-and
-.B AT_SYMLINK_NOFOLLOW
-flags are not specified),
-the glibc wrapper function falls back to the use of
-.BR access ().
-When
-.I pathname
-is a relative pathname,
-glibc constructs a pathname based on the symbolic link in
-.I /proc/self/fd
-that corresponds to the
-.I dirfd
-argument.
.SH BUGS
Because the Linux kernel's
.BR faccessat ()
diff --git a/man2/acct.2 b/man2/acct.2
index 064d6c0c1..de03a0eb5 100644
--- a/man2/acct.2
+++ b/man2/acct.2
@@ -9,7 +9,7 @@
.\" Modified 1998-11-04 by Tigran Aivazian <tigran@sco.com>
.\" Modified 2004-05-27, 2004-06-17, 2004-06-23 by Michael Kerrisk
.\"
-.TH acct 2 2022-12-03 "Linux man-pages 6.03"
+.TH acct 2 2023-03-30 "Linux man-pages 6.05.01"
.SH NAME
acct \- switch process accounting on or off
.SH LIBRARY
@@ -118,7 +118,9 @@ refers to a file on a read-only filesystem.
.B EUSERS
There are no more free file structures or we ran out of memory.
.SH STANDARDS
-SVr4, 4.3BSD (but not POSIX).
+None.
+.SH HISTORY
+SVr4, 4.3BSD.
.\" SVr4 documents an EBUSY error condition, but no EISDIR or ENOSYS.
.\" Also AIX and HP-UX document EBUSY (attempt is made
.\" to enable accounting when it is already enabled), as does Solaris
diff --git a/man2/add_key.2 b/man2/add_key.2
index d1f96900c..570db1170 100644
--- a/man2/add_key.2
+++ b/man2/add_key.2
@@ -4,7 +4,7 @@
.\"
.\" SPDX-License-Identifier: GPL-2.0-or-later
.\"
-.TH add_key 2 2023-02-05 "Linux man-pages 6.03"
+.TH add_key 2 2023-05-03 "Linux man-pages 6.05.01"
.SH NAME
add_key \- add a key to the kernel's key management facility
.SH LIBRARY
@@ -208,10 +208,10 @@ and the
started with a period (\[aq].\[aq]).
Keyrings with descriptions (names)
that begin with a period are reserved to the implementation.
-.SH VERSIONS
-This system call first appeared in Linux 2.6.10.
.SH STANDARDS
-This system call is a nonstandard Linux extension.
+Linux.
+.SH HISTORY
+Linux 2.6.10.
.SH NOTES
glibc does not provide a wrapper for this system call.
A wrapper is provided in the
@@ -245,27 +245,27 @@ $ \fBgrep \[aq]64a4dca\[aq] /proc/keys\fP
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-
+\&
int
main(int argc, char *argv[])
{
key_serial_t key;
-
+\&
if (argc != 4) {
fprintf(stderr, "Usage: %s type description payload\en",
argv[0]);
exit(EXIT_FAILURE);
}
-
+\&
key = add_key(argv[1], argv[2], argv[3], strlen(argv[3]),
KEY_SPEC_SESSION_KEYRING);
if (key == \-1) {
perror("add_key");
exit(EXIT_FAILURE);
}
-
+\&
printf("Key ID is %jx\en", (uintmax_t) key);
-
+\&
exit(EXIT_SUCCESS);
}
.EE
diff --git a/man2/adjtimex.2 b/man2/adjtimex.2
index 7e4dea1fb..c850a3d13 100644
--- a/man2/adjtimex.2
+++ b/man2/adjtimex.2
@@ -8,7 +8,7 @@
.\" Modified 1997-07-30 by Paul Slootman <paul@wurtel.demon.nl>
.\" Modified 2004-05-27 by Michael Kerrisk <mtk.manpages@gmail.com>
.\"
-.TH adjtimex 2 2023-02-10 "Linux man-pages 6.03"
+.TH adjtimex 2 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
adjtimex, clock_adjtime, ntp_adjtime \- tune kernel clock
.SH LIBRARY
@@ -90,7 +90,7 @@ the constants used for
.BR ntp_adjtime ()
are equivalent but differently named.)
It is a bit mask containing a
-.RI bitwise- or
+bitwise OR
combination of zero or more of the following bits:
.TP
.B ADJ_OFFSET
@@ -543,18 +543,18 @@ lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR \%ntp_adjtime ()
T} Thread safety MT-Safe
.TE
.sp 1
.SH STANDARDS
-None of these interfaces is described in POSIX.1
-.PP
+.TP
.BR adjtimex ()
-and
+.TQ
.BR clock_adjtime ()
-are Linux-specific and should not be used in programs
-intended to be portable.
+Linux.
.PP
The preferred API for the NTP daemon is
.BR ntp_adjtime ().
diff --git a/man2/alarm.2 b/man2/alarm.2
index 17e69ceb0..cae0890d4 100644
--- a/man2/alarm.2
+++ b/man2/alarm.2
@@ -7,7 +7,7 @@
.\" Modified Sun Jul 21 21:25:26 1996 by Andries Brouwer <aeb@cwi.nl>
.\" Modified Wed Nov 6 03:46:05 1996 by Eric S. Raymond <esr@thyrsus.com>
.\"
-.TH alarm 2 2022-10-30 "Linux man-pages 6.03"
+.TH alarm 2 2023-03-30 "Linux man-pages 6.05.01"
.SH NAME
alarm \- set an alarm clock for delivery of a signal
.SH LIBRARY
@@ -40,7 +40,9 @@ returns the number of seconds remaining until any previously scheduled
alarm was due to be delivered, or zero if there was no previously
scheduled alarm.
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, SVr4, 4.3BSD.
+POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001, SVr4, 4.3BSD.
.SH NOTES
.BR alarm ()
and
diff --git a/man2/alloc_hugepages.2 b/man2/alloc_hugepages.2
index 564190565..33671dae3 100644
--- a/man2/alloc_hugepages.2
+++ b/man2/alloc_hugepages.2
@@ -2,7 +2,7 @@
.\"
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
-.TH alloc_hugepages 2 2022-12-04 "Linux man-pages 6.03"
+.TH alloc_hugepages 2 2023-03-30 "Linux man-pages 6.05.01"
.SH NAME
alloc_hugepages, free_hugepages \- allocate or free huge pages
.SH SYNOPSIS
@@ -114,10 +114,11 @@ This can be read and written.
Gives info on the number of configured hugetlb pages and on their size
in the three variables HugePages_Total, HugePages_Free, Hugepagesize.
.SH STANDARDS
-These extinct system calls were specific to Linux on Intel processors.
-.SH NOTES
+Linux on Intel processors.
+.SH HISTORY
These system calls are gone;
they existed only in Linux 2.5.36 through to Linux 2.5.54.
+.SH NOTES
Now the hugetlbfs filesystem can be used instead.
Memory backed by huge pages (if the CPU supports them) is obtained by
using
diff --git a/man2/arch_prctl.2 b/man2/arch_prctl.2
index 5f33beae8..04a3633f3 100644
--- a/man2/arch_prctl.2
+++ b/man2/arch_prctl.2
@@ -2,7 +2,7 @@
.\"
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
-.TH arch_prctl 2 2022-10-30 "Linux man-pages 6.03"
+.TH arch_prctl 2 2023-03-30 "Linux man-pages 6.05.01"
.SH NAME
arch_prctl \- set architecture-specific thread state
.SH LIBRARY
@@ -133,9 +133,7 @@ is outside the process address space.
.\" .SH AUTHOR
.\" Man page written by Andi Kleen.
.SH STANDARDS
-.BR arch_prctl ()
-is a Linux/x86-64 extension and should not be used in programs intended
-to be portable.
+Linux/x86-64.
.SH NOTES
.BR arch_prctl ()
is supported only on Linux/x86-64 for 64-bit programs currently.
diff --git a/man2/bdflush.2 b/man2/bdflush.2
index 104a0d69e..d97949e6a 100644
--- a/man2/bdflush.2
+++ b/man2/bdflush.2
@@ -5,7 +5,7 @@
.\" Modified 1997-01-31 by Eric S. Raymond <esr@thyrsus.com>
.\" Modified 2004-06-17 by Michael Kerrisk <mtk.manpages@gmail.com>
.\"
-.TH bdflush 2 2022-12-04 "Linux man-pages 6.03"
+.TH bdflush 2 2023-03-30 "Linux man-pages 6.05.01"
.SH NAME
bdflush \- start, flush, or tune buffer-dirty-flush daemon
.SH SYNOPSIS
@@ -93,12 +93,10 @@ or to write an invalid value to a parameter.
Caller does not have the
.B CAP_SYS_ADMIN
capability.
-.SH VERSIONS
-Since glibc 2.23, glibc no longer supports this obsolete system call.
.SH STANDARDS
-.BR bdflush ()
-is Linux-specific and should not be used in programs
-intended to be portable.
+Linux.
+.SH HISTORY
+Since glibc 2.23, glibc no longer supports this obsolete system call.
.SH SEE ALSO
.BR sync (1),
.BR fsync (2),
diff --git a/man2/bind.2 b/man2/bind.2
index 50501d6b9..6288c4138 100644
--- a/man2/bind.2
+++ b/man2/bind.2
@@ -18,7 +18,7 @@
.\" $Id: bind.2,v 1.3 1999/04/23 19:56:07 freitag Exp $
.\" Modified 2004-06-23 by Michael Kerrisk <mtk.manpages@gmail.com>
.\"
-.TH bind 2 2023-02-05 "Linux man-pages 6.03"
+.TH bind 2 2023-05-03 "Linux man-pages 6.05.01"
.SH NAME
bind \- bind a name to a socket
.SH LIBRARY
@@ -185,7 +185,9 @@ A component of the path prefix is not a directory.
.B EROFS
The socket inode would reside on a read-only filesystem.
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, SVr4, 4.4BSD
+POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001, SVr4, 4.4BSD
.RB ( bind ()
first appeared in 4.2BSD).
.\" SVr4 documents an additional
@@ -196,11 +198,6 @@ first appeared in 4.2BSD).
.\" and
.\" .B EISDIR
.\" UNIX-domain error conditions.
-.SH NOTES
-For background on the
-.I socklen_t
-type, see
-.BR accept (2).
.SH BUGS
The transparent proxy options are not described.
.\" FIXME Document transparent proxy options
@@ -225,50 +222,50 @@ domain, and accept connections:
#include <sys/socket.h>
#include <sys/un.h>
#include <unistd.h>
-
+\&
#define MY_SOCK_PATH "/somepath"
#define LISTEN_BACKLOG 50
-
+\&
#define handle_error(msg) \e
do { perror(msg); exit(EXIT_FAILURE); } while (0)
-
+\&
int
main(void)
{
int sfd, cfd;
socklen_t peer_addr_size;
struct sockaddr_un my_addr, peer_addr;
-
+\&
sfd = socket(AF_UNIX, SOCK_STREAM, 0);
if (sfd == \-1)
handle_error("socket");
-
+\&
memset(&my_addr, 0, sizeof(my_addr));
my_addr.sun_family = AF_UNIX;
strncpy(my_addr.sun_path, MY_SOCK_PATH,
sizeof(my_addr.sun_path) \- 1);
-
+\&
if (bind(sfd, (struct sockaddr *) &my_addr,
sizeof(my_addr)) == \-1)
handle_error("bind");
-
+\&
if (listen(sfd, LISTEN_BACKLOG) == \-1)
handle_error("listen");
-
+\&
/* Now we can accept incoming connections one
at a time using accept(2). */
-
+\&
peer_addr_size = sizeof(peer_addr);
cfd = accept(sfd, (struct sockaddr *) &peer_addr,
&peer_addr_size);
if (cfd == \-1)
handle_error("accept");
-
+\&
/* Code to deal with incoming connection(s)... */
-
+\&
if (close(sfd) == \-1)
handle_error("close");
-
+\&
if (unlink(MY_SOCK_PATH) == \-1)
handle_error("unlink");
}
diff --git a/man2/bpf.2 b/man2/bpf.2
index 174776989..4df108d12 100644
--- a/man2/bpf.2
+++ b/man2/bpf.2
@@ -3,7 +3,7 @@
.\"
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
-.TH bpf 2 2023-02-05 "Linux man-pages 6.03"
+.TH bpf 2 2023-07-28 "Linux man-pages 6.05.01"
.SH NAME
bpf \- perform a command on an extended BPF map or program
.SH SYNOPSIS
@@ -175,7 +175,7 @@ union bpf_attr {
__u32 max_entries; /* maximum number of entries
in a map */
};
-
+\&
struct { /* Used by BPF_MAP_*_ELEM and BPF_MAP_GET_NEXT_KEY
commands */
__u32 map_fd;
@@ -186,7 +186,7 @@ union bpf_attr {
};
__u64 flags;
};
-
+\&
struct { /* Used by BPF_PROG_LOAD */
__u32 prog_type;
__u32 insn_cnt;
@@ -247,7 +247,7 @@ bpf_create_map(enum bpf_map_type map_type,
.value_size = value_size,
.max_entries = max_entries
};
-
+\&
return bpf(BPF_MAP_CREATE, &attr, sizeof(attr));
}
.EE
@@ -392,7 +392,7 @@ bpf_lookup_elem(int fd, const void *key, void *value)
.key = ptr_to_u64(key),
.value = ptr_to_u64(value),
};
-
+\&
return bpf(BPF_MAP_LOOKUP_ELEM, &attr, sizeof(attr));
}
.EE
@@ -431,7 +431,7 @@ bpf_update_elem(int fd, const void *key, const void *value,
.value = ptr_to_u64(value),
.flags = flags,
};
-
+\&
return bpf(BPF_MAP_UPDATE_ELEM, &attr, sizeof(attr));
}
.EE
@@ -500,7 +500,7 @@ bpf_delete_elem(int fd, const void *key)
.map_fd = fd,
.key = ptr_to_u64(key),
};
-
+\&
return bpf(BPF_MAP_DELETE_ELEM, &attr, sizeof(attr));
}
.EE
@@ -533,7 +533,7 @@ bpf_get_next_key(int fd, const void *key, void *next_key)
.key = ptr_to_u64(key),
.next_key = ptr_to_u64(next_key),
};
-
+\&
return bpf(BPF_MAP_GET_NEXT_KEY, &attr, sizeof(attr));
}
.EE
@@ -714,7 +714,7 @@ with this eBPF program.
.in +4n
.EX
char bpf_log_buf[LOG_BUF_SIZE];
-
+\&
int
bpf_prog_load(enum bpf_prog_type type,
const struct bpf_insn *insns, int insn_cnt,
@@ -729,7 +729,7 @@ bpf_prog_load(enum bpf_prog_type type,
.log_size = LOG_BUF_SIZE,
.log_level = 1,
};
-
+\&
return bpf(BPF_PROG_LOAD, &attr, sizeof(attr));
}
.EE
@@ -991,6 +991,16 @@ and examine
.I log_buf
for the specific reason provided by the verifier.
.TP
+.B EAGAIN
+For
+.BR BPF_PROG_LOAD ,
+indicates that needed resources are blocked.
+This happens when the verifier detects pending signals
+while it is checking the validity of the bpf program.
+In this case, just call
+.BR bpf ()
+again with the same parameters.
+.TP
.B EBADF
.I fd
is not an open file descriptor.
@@ -1052,14 +1062,10 @@ The call was made without sufficient privilege
(without the
.B CAP_SYS_ADMIN
capability).
-.SH VERSIONS
-The
-.BR bpf ()
-system call first appeared in Linux 3.18.
.SH STANDARDS
-The
-.BR bpf ()
-system call is Linux-specific.
+Linux.
+.SH HISTORY
+Linux 3.18.
.SH NOTES
Prior to Linux 4.4, all
.BR bpf ()
@@ -1201,7 +1207,7 @@ main(int argc, char *argv[])
{
int sock, map_fd, prog_fd, key;
long long value = 0, tcp_cnt, udp_cnt;
-
+\&
map_fd = bpf_create_map(BPF_MAP_TYPE_ARRAY, sizeof(key),
sizeof(value), 256);
if (map_fd < 0) {
@@ -1209,7 +1215,7 @@ main(int argc, char *argv[])
/* likely not run as root */
return 1;
}
-
+\&
struct bpf_insn prog[] = {
BPF_MOV64_REG(BPF_REG_6, BPF_REG_1), /* r6 = r1 */
BPF_LD_ABS(BPF_B, ETH_HLEN + offsetof(struct iphdr, protocol)),
@@ -1230,15 +1236,15 @@ main(int argc, char *argv[])
BPF_MOV64_IMM(BPF_REG_0, 0), /* r0 = 0 */
BPF_EXIT_INSN(), /* return r0 */
};
-
+\&
prog_fd = bpf_prog_load(BPF_PROG_TYPE_SOCKET_FILTER, prog,
sizeof(prog) / sizeof(prog[0]), "GPL");
-
+\&
sock = open_raw_sock("lo");
-
+\&
assert(setsockopt(sock, SOL_SOCKET, SO_ATTACH_BPF, &prog_fd,
sizeof(prog_fd)) == 0);
-
+\&
for (;;) {
key = IPPROTO_TCP;
assert(bpf_lookup_elem(map_fd, &key, &tcp_cnt) == 0);
@@ -1247,7 +1253,7 @@ main(int argc, char *argv[])
printf("TCP %lld UDP %lld packets\en", tcp_cnt, udp_cnt);
sleep(1);
}
-
+\&
return 0;
}
.EE
diff --git a/man2/brk.2 b/man2/brk.2
index ca65ba2e5..2cc61a974 100644
--- a/man2/brk.2
+++ b/man2/brk.2
@@ -7,7 +7,7 @@
.\" Modified Wed Jul 21 19:52:58 1993 by Rik Faith <faith@cs.unc.edu>
.\" Modified Sun Aug 21 17:40:38 1994 by Rik Faith <faith@cs.unc.edu>
.\"
-.TH brk 2 2022-12-04 "Linux man-pages 6.03"
+.TH brk 2 2023-03-30 "Linux man-pages 6.05.01"
.SH NAME
brk, sbrk \- change data segment size
.SH LIBRARY
@@ -95,6 +95,8 @@ is returned, and
is set to
.BR ENOMEM .
.SH STANDARDS
+None.
+.SH HISTORY
4.3BSD; SUSv1, marked LEGACY in SUSv2, removed in POSIX.1-2001.
.\"
.\" .BR brk ()
diff --git a/man2/cacheflush.2 b/man2/cacheflush.2
index cad01d522..733462e07 100644
--- a/man2/cacheflush.2
+++ b/man2/cacheflush.2
@@ -3,7 +3,7 @@
.\"
.\" SPDX-License-Identifier: GPL-2.0-or-later
.\"
-.TH cacheflush 2 2023-02-05 "Linux man-pages 6.03"
+.TH cacheflush 2 2023-03-30 "Linux man-pages 6.05.01"
.SH NAME
cacheflush \- flush contents of instruction and/or data cache
.SH LIBRARY
@@ -61,20 +61,13 @@ is not one of
or
.B BCACHE
(but see BUGS).
-.SH STANDARDS
-Historically, this system call was available on all MIPS UNIX variants
-including RISC/os, IRIX, Ultrix, NetBSD, OpenBSD, and FreeBSD
-(and also on some non-UNIX MIPS operating systems), so that
-the existence of this call in MIPS operating systems is a de-facto
-standard.
-.SS Caveat
+.SH VERSIONS
.BR cacheflush ()
should not be used in programs intended to be portable.
On Linux, this call first appeared on the MIPS architecture,
but nowadays, Linux provides a
.BR cacheflush ()
system call on some other architectures, but with different arguments.
-.SH NOTES
.SS Architecture-specific variants
glibc provides a wrapper for this system call,
with the prototype shown in SYNOPSIS,
@@ -127,6 +120,12 @@ the prototype for this built-in function uses
instead of
.I void *
for the parameters.
+.SH STANDARDS
+Historically, this system call was available on all MIPS UNIX variants
+including RISC/os, IRIX, Ultrix, NetBSD, OpenBSD, and FreeBSD
+(and also on some non-UNIX MIPS operating systems), so that
+the existence of this call in MIPS operating systems is a de-facto
+standard.
.SH BUGS
Linux kernels older than Linux 2.6.11 ignore the
.I addr
diff --git a/man2/capget.2 b/man2/capget.2
index da1d5414b..9c4ba7df2 100644
--- a/man2/capget.2
+++ b/man2/capget.2
@@ -11,7 +11,7 @@
.\" 64-bit capability sets in Linux 2.6.2[45].
.\" Modified 2009-01-26, andi kleen
.\"
-.TH capget 2 2023-02-05 "Linux man-pages 6.03"
+.TH capget 2 2023-05-03 "Linux man-pages 6.05.01"
.SH NAME
capget, capset \- set/get capabilities of thread(s)
.SH LIBRARY
@@ -58,23 +58,23 @@ The structures are defined as follows.
.EX
#define _LINUX_CAPABILITY_VERSION_1 0x19980330
#define _LINUX_CAPABILITY_U32S_1 1
-
+\&
/* V2 added in Linux 2.6.25; deprecated */
#define _LINUX_CAPABILITY_VERSION_2 0x20071026
.\" commit e338d263a76af78fe8f38a72131188b58fceb591
.\" Added 64 bit capability support
#define _LINUX_CAPABILITY_U32S_2 2
-
+\&
/* V3 added in Linux 2.6.26 */
#define _LINUX_CAPABILITY_VERSION_3 0x20080522
.\" commit ca05a99a54db1db5bca72eccb5866d2a86f8517f
#define _LINUX_CAPABILITY_U32S_3 2
-
+\&
typedef struct __user_cap_header_struct {
__u32 version;
int pid;
} *cap_user_header_t;
-
+\&
typedef struct __user_cap_data_struct {
__u32 effective;
__u32 permitted;
@@ -245,7 +245,7 @@ instead of 0.)
.B ESRCH
No such thread.
.SH STANDARDS
-These system calls are Linux-specific.
+Linux.
.SH NOTES
The portable interface to the capability querying and setting
functions is provided by the
diff --git a/man2/chdir.2 b/man2/chdir.2
index c8200a641..5aca7bf98 100644
--- a/man2/chdir.2
+++ b/man2/chdir.2
@@ -10,7 +10,7 @@
.\" Modified 1997-08-21 by Joseph S. Myers <jsm28@cam.ac.uk>
.\" Modified 2004-06-23 by Michael Kerrisk <mtk.manpages@gmail.com>
.\"
-.TH chdir 2 2023-02-05 "Linux man-pages 6.03"
+.TH chdir 2 2023-03-30 "Linux man-pages 6.05.01"
.SH NAME
chdir, fchdir \- change working directory
.SH LIBRARY
@@ -109,7 +109,9 @@ is not a valid file descriptor.
.I fd
does not refer to a directory.
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, SVr4, 4.4BSD.
+POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001, SVr4, 4.4BSD.
.SH NOTES
The current working directory is the starting point for interpreting
relative pathnames (those not starting with \[aq]/\[aq]).
diff --git a/man2/chmod.2 b/man2/chmod.2
index 2986f1065..b1c130e74 100644
--- a/man2/chmod.2
+++ b/man2/chmod.2
@@ -9,7 +9,7 @@
.\" <michael@cantor.informatik.rwth-aachen.de>: NFS details
.\" Modified 2004-06-23 by Michael Kerrisk <mtk.manpages@gmail.com>
.\"
-.TH chmod 2 2023-02-05 "Linux man-pages 6.03"
+.TH chmod 2 2023-03-30 "Linux man-pages 6.05.01"
.SH NAME
chmod, fchmod, fchmodat \- change permissions of a file
.SH LIBRARY
@@ -300,17 +300,6 @@ The file is marked immutable or append-only.
.B EROFS
The named file resides on a read-only filesystem.
.SH VERSIONS
-.BR fchmodat ()
-was added in Linux 2.6.16;
-library support was added in glibc 2.4.
-.SH STANDARDS
-.BR chmod (),
-.BR fchmod ():
-4.4BSD, SVr4, POSIX.1-2001i, POSIX.1-2008.
-.PP
-.BR fchmodat ():
-POSIX.1-2008.
-.SH NOTES
.SS C library/kernel differences
The GNU C library
.BR fchmodat ()
@@ -334,6 +323,19 @@ glibc constructs a pathname based on the symbolic link in
that corresponds to the
.I dirfd
argument.
+.SH STANDARDS
+POSIX.1-2008.
+.SH HISTORY
+.TP
+.BR chmod ()
+.TQ
+.BR fchmod ()
+4.4BSD, SVr4, POSIX.1-2001.
+.TP
+.BR fchmodat ()
+POSIX.1-2008.
+Linux 2.6.16,
+glibc 2.4.
.SH SEE ALSO
.BR chmod (1),
.BR chown (2),
diff --git a/man2/chown.2 b/man2/chown.2
index 93558cacb..ff7c6dd1a 100644
--- a/man2/chown.2
+++ b/man2/chown.2
@@ -15,7 +15,7 @@
.\" (bsdgroups versus sysvgroups, and the effect of the parent
.\" directory's set-group-ID mode bit).
.\"
-.TH chown 2 2023-02-05 "Linux man-pages 6.03"
+.TH chown 2 2023-05-03 "Linux man-pages 6.05.01"
.SH NAME
chown, fchown, lchown, fchownat \- change ownership of a file
.SH LIBRARY
@@ -278,15 +278,6 @@ The file is marked immutable or append-only.
.B EROFS
The named file resides on a read-only filesystem.
.SH VERSIONS
-.BR fchownat ()
-was added in Linux 2.6.16;
-library support was added in glibc 2.4.
-.SH STANDARDS
-.BR chown (),
-.BR fchown (),
-.BR lchown ():
-4.4BSD, SVr4, POSIX.1-2001, POSIX.1-2008.
-.PP
The 4.4BSD version can be
used only by the superuser (that is, ordinary users cannot give away files).
.\" chown():
@@ -295,9 +286,21 @@ used only by the superuser (that is, ordinary users cannot give away files).
.\" fchown():
.\" SVr4 documents additional EINVAL, EIO, EINTR, and ENOLINK
.\" error conditions.
-.PP
-.BR fchownat ():
+.SH STANDARDS
+POSIX.1-2008.
+.SH HISTORY
+.TP
+.BR chown ()
+.TQ
+.BR fchown ()
+.TQ
+.BR lchown ()
+4.4BSD, SVr4, POSIX.1-2001.
+.TP
+.BR fchownat ()
POSIX.1-2008.
+Linux 2.6.16,
+glibc 2.4.
.SH NOTES
.SS Ownership of new files
When a new file is created (by, for example,
@@ -425,36 +428,36 @@ to perform a lookup in the system password file).
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
-
+\&
int
main(int argc, char *argv[])
{
char *endptr;
uid_t uid;
struct passwd *pwd;
-
+\&
if (argc != 3 || argv[1][0] == \[aq]\e0\[aq]) {
fprintf(stderr, "%s <owner> <file>\en", argv[0]);
exit(EXIT_FAILURE);
}
-
+\&
uid = strtol(argv[1], &endptr, 10); /* Allow a numeric string */
-
+\&
if (*endptr != \[aq]\e0\[aq]) { /* Was not pure numeric string */
pwd = getpwnam(argv[1]); /* Try getting UID for username */
if (pwd == NULL) {
perror("getpwnam");
exit(EXIT_FAILURE);
}
-
+\&
uid = pwd\->pw_uid;
}
-
+\&
if (chown(argv[2], uid, \-1) == \-1) {
perror("chown");
exit(EXIT_FAILURE);
}
-
+\&
exit(EXIT_SUCCESS);
}
.EE
diff --git a/man2/chroot.2 b/man2/chroot.2
index 88a1dff30..d872b8af3 100644
--- a/man2/chroot.2
+++ b/man2/chroot.2
@@ -10,7 +10,7 @@
.\" Modified 1997-08-21 by Joseph S. Myers <jsm28@cam.ac.uk>
.\" Modified 2004-06-23 by Michael Kerrisk <mtk.manpages@gmail.com>
.\"
-.TH chroot 2 2023-02-05 "Linux man-pages 6.03"
+.TH chroot 2 2023-04-03 "Linux man-pages 6.05.01"
.SH NAME
chroot \- change root directory
.SH LIBRARY
@@ -136,6 +136,8 @@ is not a directory.
.B EPERM
The caller has insufficient privilege.
.SH STANDARDS
+None.
+.SH HISTORY
SVr4, 4.4BSD, SUSv2 (marked LEGACY).
This function is not part of POSIX.1-2001.
.\" SVr4 documents additional EINTR, ENOLINK and EMULTIHOP error conditions.
@@ -148,7 +150,7 @@ The root directory is left unchanged by
.BR execve (2).
.PP
The magic symbolic link,
-.IR /proc/[pid]/root ,
+.IR /proc/ pid /root ,
can be used to discover a process's root directory; see
.BR proc (5)
for details.
diff --git a/man2/clock_getres.2 b/man2/clock_getres.2
index 71f642fae..170215d17 100644
--- a/man2/clock_getres.2
+++ b/man2/clock_getres.2
@@ -9,7 +9,7 @@
.\" 2003-08-24 aeb, large parts rewritten
.\" 2004-08-06 Christoph Lameter <clameter@sgi.com>, SMP note
.\"
-.TH clock_getres 2 2023-02-12 "Linux man-pages 6.03"
+.TH clock_getres 2 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
clock_getres, clock_gettime, clock_settime \- clock and time functions
.SH LIBRARY
@@ -226,11 +226,11 @@ dynamic clock ID.
#define CLOCKFD 3
#define FD_TO_CLOCKID(fd) ((\[ti](clockid_t) (fd) << 3) | CLOCKFD)
#define CLOCKID_TO_FD(clk) ((unsigned int) \[ti]((clk) >> 3))
-
+\&
struct timespec ts;
clockid_t clkid;
int fd;
-
+\&
fd = open("/dev/ptp0", O_RDWR);
clkid = FD_TO_CLOCKID(fd);
clock_gettime(clkid, &ts);
@@ -307,45 +307,24 @@ specified.
.B EPERM
.BR clock_settime ()
does not have permission to set the clock indicated.
-.SH VERSIONS
-These system calls first appeared in Linux 2.6.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR clock_getres (),
.BR clock_gettime (),
.BR clock_settime ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
-.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, SUSv2.
-.PP
-On POSIX systems on which these functions are available, the symbol
-.B _POSIX_TIMERS
-is defined in \fI<unistd.h>\fP to a value greater than 0.
-The symbols
-.BR _POSIX_MONOTONIC_CLOCK ,
-.BR _POSIX_CPUTIME ,
-.B _POSIX_THREAD_CPUTIME
-indicate that
-.BR CLOCK_MONOTONIC ,
-.BR CLOCK_PROCESS_CPUTIME_ID ,
-.B CLOCK_THREAD_CPUTIME_ID
-are available.
-(See also
-.BR sysconf (3).)
-.SH NOTES
+.SH VERSIONS
POSIX.1 specifies the following:
.RS
.PP
@@ -370,12 +349,32 @@ clocks using
On Linux, these clocks are not settable
(i.e., no process has "appropriate privileges").
.\" See http://bugzilla.kernel.org/show_bug.cgi?id=11972
-.\"
.SS C library/kernel differences
On some architectures, an implementation of
.BR clock_gettime ()
is provided in the
.BR vdso (7).
+.SH STANDARDS
+POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001, SUSv2.
+Linux 2.6.
+.PP
+On POSIX systems on which these functions are available, the symbol
+.B _POSIX_TIMERS
+is defined in \fI<unistd.h>\fP to a value greater than 0.
+The symbols
+.BR _POSIX_MONOTONIC_CLOCK ,
+.BR _POSIX_CPUTIME ,
+.B _POSIX_THREAD_CPUTIME
+indicate that
+.BR CLOCK_MONOTONIC ,
+.BR CLOCK_PROCESS_CPUTIME_ID ,
+.B CLOCK_THREAD_CPUTIME_ID
+are available.
+(See also
+.BR sysconf (3).)
+POSIX.1-2008 makes these APIs mandatory.
.\"
.SS Historical note for SMP systems
Before Linux added kernel support for
@@ -444,7 +443,7 @@ CLOCK_BOOTTIME : 72691.019 (20h 11m 31s)
.\" SRC BEGIN (clock_getres.c)
.EX
/* clock_times.c
-
+\&
Licensed under GNU General Public License v2 or later.
*/
#define _XOPEN_SOURCE 600
@@ -453,48 +452,48 @@ CLOCK_BOOTTIME : 72691.019 (20h 11m 31s)
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
-
+\&
#define SECS_IN_DAY (24 * 60 * 60)
-
+\&
static void
displayClock(clockid_t clock, const char *name, bool showRes)
{
long days;
struct timespec ts;
-
+\&
if (clock_gettime(clock, &ts) == \-1) {
perror("clock_gettime");
exit(EXIT_FAILURE);
}
-
+\&
printf("%\-15s: %10jd.%03ld (", name,
(intmax_t) ts.tv_sec, ts.tv_nsec / 1000000);
-
+\&
days = ts.tv_sec / SECS_IN_DAY;
if (days > 0)
printf("%ld days + ", days);
-
+\&
printf("%2dh %2dm %2ds",
(int) (ts.tv_sec % SECS_IN_DAY) / 3600,
(int) (ts.tv_sec % 3600) / 60,
(int) ts.tv_sec % 60);
printf(")\en");
-
+\&
if (clock_getres(clock, &ts) == \-1) {
perror("clock_getres");
exit(EXIT_FAILURE);
}
-
+\&
if (showRes)
printf(" resolution: %10jd.%09ld\en",
(intmax_t) ts.tv_sec, ts.tv_nsec);
}
-
+\&
int
main(int argc, char *argv[])
{
bool showRes = argc > 1;
-
+\&
displayClock(CLOCK_REALTIME, "CLOCK_REALTIME", showRes);
#ifdef CLOCK_TAI
displayClock(CLOCK_TAI, "CLOCK_TAI", showRes);
diff --git a/man2/clock_nanosleep.2 b/man2/clock_nanosleep.2
index 29c06bb7b..d1e53a6c4 100644
--- a/man2/clock_nanosleep.2
+++ b/man2/clock_nanosleep.2
@@ -3,7 +3,7 @@
.\"
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
-.TH clock_nanosleep 2 2023-02-12 "Linux man-pages 6.03"
+.TH clock_nanosleep 2 2023-03-30 "Linux man-pages 6.05.01"
.SH NAME
clock_nanosleep \- high-resolution sleep with specifiable clock
.SH LIBRARY
@@ -172,13 +172,12 @@ is not a permitted value for
.B ENOTSUP
The kernel does not support sleeping against this
.IR clockid .
-.SH VERSIONS
-The
-.BR clock_nanosleep ()
-system call first appeared in Linux 2.6.
-Support is available since glibc 2.1.
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008.
+POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001.
+Linux 2.6,
+glibc 2.1.
.SH NOTES
If the interval specified in
.I request
diff --git a/man2/clone.2 b/man2/clone.2
index c59455fc8..38d2b9054 100644
--- a/man2/clone.2
+++ b/man2/clone.2
@@ -38,7 +38,7 @@
.\" 2008-11-19, mtk, document CLONE_NEWIPC
.\" 2008-11-19, Jens Axboe, mtk, document CLONE_IO
.\"
-.TH clone 2 2023-02-05 "Linux man-pages 6.03"
+.TH clone 2 2023-05-03 "Linux man-pages 6.05.01"
.SH NAME
clone, __clone2, clone3 \- create a child process
.SH LIBRARY
@@ -413,7 +413,7 @@ mask in the remainder of this page.
.PP
The
.I flags
-mask is specified as a bitwise-OR of zero or more of
+mask is specified as a bitwise OR of zero or more of
the constants listed below.
Except as noted below, these flags are available
(and have the same effect) in both
@@ -1436,6 +1436,16 @@ One of the PIDs specified in
.I set_tid
was an invalid.
.TP
+.BR EINVAL " (" clone3 "() only)"
+.\" commit 7f192e3cd316ba58c88dfa26796cf77789dd9872
+.B CLONE_THREAD
+or
+.B CLONE_PARENT
+was specified in the
+.I flags
+mask, but a signal was specified in
+.I exit_signal.
+.TP
.BR EINVAL " (AArch64 only, Linux 4.6 and earlier)"
.I stack
was not aligned to a 128-bit boundary.
@@ -1543,25 +1553,7 @@ See the discussion of the
.B ENOSPC
error above.
.SH VERSIONS
-The
-.BR clone3 ()
-system call first appeared in Linux 5.3.
-.\" There is no entry for
-.\" .BR clone ()
-.\" in libc5.
-.\" glibc2 provides
-.\" .BR clone ()
-.\" as described in this manual page.
-.SH STANDARDS
-These system calls
-are Linux-specific and should not be used in programs
-intended to be portable.
-.SH NOTES
-One use of these systems calls
-is to implement threads: multiple flows of control in a program that
-run concurrently in a shared address space.
-.PP
-Note that the glibc
+The glibc
.BR clone ()
wrapper function makes some changes
in the memory pointed to by
@@ -1577,31 +1569,10 @@ is used to recursively create children,
do not use the buffer employed for the parent's stack
as the stack of the child.
.PP
-The
-.BR kcmp (2)
-system call can be used to test whether two processes share various
-resources such as a file descriptor table,
-System V semaphore undo operations, or a virtual address space.
-.PP
-Handlers registered using
-.BR pthread_atfork (3)
-are not executed during a clone call.
-.PP
-In the Linux 2.4.x series,
-.B CLONE_THREAD
-generally does not make the parent of the new thread the same
-as the parent of the calling process.
-However, from Linux 2.4.7 to Linux 2.4.18 the
-.B CLONE_THREAD
-flag implied the
-.B CLONE_PARENT
-flag (as in Linux 2.6.0 and later).
-.PP
On i386,
.BR clone ()
should not be called through vsyscall, but directly through
.IR "int $0x80" .
-.\"
.SS C library/kernel differences
The raw
.BR clone ()
@@ -1738,7 +1709,29 @@ and
.I stack_size
specifies the size of the stack pointed to by
.IR stack_base .
+.SH STANDARDS
+Linux.
+.SH HISTORY
+.TP
+.BR clone3 ()
+Linux 5.3.
+.\" There is no entry for
+.\" .BR clone ()
+.\" in libc5.
+.\" glibc2 provides
+.\" .BR clone ()
+.\" as described in this manual page.
.SS Linux 2.4 and earlier
+In the Linux 2.4.x series,
+.B CLONE_THREAD
+generally does not make the parent of the new thread the same
+as the parent of the calling process.
+However, from Linux 2.4.7 to Linux 2.4.18 the
+.B CLONE_THREAD
+flag implied the
+.B CLONE_PARENT
+flag (as in Linux 2.6.0 and later).
+.PP
In Linux 2.4 and earlier,
.BR clone ()
does not take arguments
@@ -1746,6 +1739,20 @@ does not take arguments
.IR tls ,
and
.IR child_tid .
+.SH NOTES
+One use of these systems calls
+is to implement threads: multiple flows of control in a program that
+run concurrently in a shared address space.
+.PP
+The
+.BR kcmp (2)
+system call can be used to test whether two processes share various
+resources such as a file descriptor table,
+System V semaphore undo operations, or a virtual address space.
+.PP
+Handlers registered using
+.BR pthread_atfork (3)
+are not executed during a clone call.
.SH BUGS
GNU C library versions 2.3.4 up to and including 2.24
contained a wrapper function for
@@ -1781,9 +1788,9 @@ To get the truth, it was sometimes necessary to use code such as the following:
.in +4n
.EX
#include <syscall.h>
-
+\&
pid_t mypid;
-
+\&
mypid = syscall(SYS_getpid);
.EE
.in
@@ -1841,34 +1848,34 @@ so we should include it for portability.
#include <sys/utsname.h>
#include <sys/wait.h>
#include <unistd.h>
-
+\&
static int /* Start function for cloned child */
childFunc(void *arg)
{
struct utsname uts;
-
+\&
/* Change hostname in UTS namespace of child. */
-
+\&
if (sethostname(arg, strlen(arg)) == \-1)
err(EXIT_FAILURE, "sethostname");
-
+\&
/* Retrieve and display hostname. */
-
+\&
if (uname(&uts) == \-1)
err(EXIT_FAILURE, "uname");
printf("uts.nodename in child: %s\en", uts.nodename);
-
+\&
/* Keep the namespace open for a while, by sleeping.
This allows some experimentation\-\-for example, another
process might join the namespace. */
-
+\&
sleep(200);
-
+\&
return 0; /* Child terminates now */
}
-
+\&
#define STACK_SIZE (1024 * 1024) /* Stack size for cloned child */
-
+\&
int
main(int argc, char *argv[])
{
@@ -1876,44 +1883,44 @@ main(int argc, char *argv[])
char *stackTop; /* End of stack buffer */
pid_t pid;
struct utsname uts;
-
+\&
if (argc < 2) {
fprintf(stderr, "Usage: %s <child\-hostname>\en", argv[0]);
exit(EXIT_SUCCESS);
}
-
+\&
/* Allocate memory to be used for the stack of the child. */
-
+\&
stack = mmap(NULL, STACK_SIZE, PROT_READ | PROT_WRITE,
MAP_PRIVATE | MAP_ANONYMOUS | MAP_STACK, \-1, 0);
if (stack == MAP_FAILED)
err(EXIT_FAILURE, "mmap");
-
+\&
stackTop = stack + STACK_SIZE; /* Assume stack grows downward */
-
+\&
/* Create child that has its own UTS namespace;
child commences execution in childFunc(). */
-
+\&
pid = clone(childFunc, stackTop, CLONE_NEWUTS | SIGCHLD, argv[1]);
if (pid == \-1)
err(EXIT_FAILURE, "clone");
printf("clone() returned %jd\en", (intmax_t) pid);
-
+\&
/* Parent falls through to here */
-
+\&
sleep(1); /* Give child time to change its hostname */
-
+\&
/* Display hostname in parent\[aq]s UTS namespace. This will be
different from hostname in child\[aq]s UTS namespace. */
-
+\&
if (uname(&uts) == \-1)
err(EXIT_FAILURE, "uname");
printf("uts.nodename in parent: %s\en", uts.nodename);
-
+\&
if (waitpid(pid, NULL, 0) == \-1) /* Wait for child */
err(EXIT_FAILURE, "waitpid");
printf("child has terminated\en");
-
+\&
exit(EXIT_SUCCESS);
}
.EE
diff --git a/man2/close.2 b/man2/close.2
index 21b808d0d..239979bd5 100644
--- a/man2/close.2
+++ b/man2/close.2
@@ -13,7 +13,7 @@
.\" Modified 2000-07-22 by Nicolás Lichtmaier <nick@debian.org>
.\" added note about close(2) not guaranteeing that data is safe on close.
.\"
-.TH close 2 2022-10-30 "Linux man-pages 6.03"
+.TH close 2 2023-03-30 "Linux man-pages 6.05.01"
.SH NAME
close \- close a file descriptor
.SH LIBRARY
@@ -81,7 +81,9 @@ See NOTES for a discussion of why
.BR close ()
should not be retried after an error.
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, SVr4, 4.3BSD.
+POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001, SVr4, 4.3BSD.
.\" SVr4 documents an additional ENOLINK error condition.
.SH NOTES
A successful close does not guarantee that the data has been successfully
diff --git a/man2/close_range.2 b/man2/close_range.2
index 72fc4758c..c1aa3dbb7 100644
--- a/man2/close_range.2
+++ b/man2/close_range.2
@@ -3,7 +3,7 @@
.\"
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
-.TH close_range 2 2023-02-10 "Linux man-pages 6.03"
+.TH close_range 2 2023-05-03 "Linux man-pages 6.05.01"
.SH NAME
close_range \- close all file descriptors in a given range
.SH LIBRARY
@@ -72,13 +72,12 @@ flag is specified.
.TP
.B ENOMEM
Insufficient kernel memory was available.
-.SH VERSIONS
-.BR close_range ()
-first appeared in Linux 5.9.
-Library support was added in glibc 2.34.
.SH STANDARDS
-.BR close_range ()
-is a nonstandard function that is also present on FreeBSD.
+None.
+.SH HISTORY
+FreeBSD.
+Linux 5.9,
+glibc 2.34.
.SH NOTES
.SS Closing all open file descriptors
.\" 278a5fbaed89dacd04e9d052f4594ffd0e0585de
@@ -208,9 +207,9 @@ result from the calls to
#include <stdlib.h>
#include <sys/syscall.h>
#include <unistd.h>
-
+\&
/* Show the contents of the symbolic links in /proc/self/fd */
-
+\&
static void
show_fds(void)
{
@@ -218,35 +217,35 @@ show_fds(void)
char path[PATH_MAX], target[PATH_MAX];
ssize_t len;
struct dirent *dp;
-
+\&
dirp = opendir("/proc/self/fd");
if (dirp == NULL) {
perror("opendir");
exit(EXIT_FAILURE);
}
-
+\&
for (;;) {
dp = readdir(dirp);
if (dp == NULL)
break;
-
+\&
if (dp\->d_type == DT_LNK) {
snprintf(path, sizeof(path), "/proc/self/fd/%s",
dp\->d_name);
-
+\&
len = readlink(path, target, sizeof(target));
printf("%s ==> %.*s\en", path, (int) len, target);
}
}
-
+\&
closedir(dirp);
}
-
+\&
int
main(int argc, char *argv[])
{
int fd;
-
+\&
for (size_t j = 1; j < argc; j++) {
fd = open(argv[j], O_RDONLY);
if (fd == \-1) {
@@ -255,16 +254,16 @@ main(int argc, char *argv[])
}
printf("%s opened as FD %d\en", argv[j], fd);
}
-
+\&
show_fds();
-
+\&
printf("========= About to call close_range() =======\en");
-
+\&
if (syscall(SYS_close_range, 3, \[ti]0U, 0) == \-1) {
perror("close_range");
exit(EXIT_FAILURE);
}
-
+\&
show_fds();
exit(EXIT_FAILURE);
}
diff --git a/man2/connect.2 b/man2/connect.2
index e23b03067..abd9e871e 100644
--- a/man2/connect.2
+++ b/man2/connect.2
@@ -16,7 +16,7 @@
.\" Modified 1998, 1999 by Andi Kleen
.\" Modified 2004-06-23 by Michael Kerrisk <mtk.manpages@gmail.com>
.\"
-.TH connect 2 2022-12-04 "Linux man-pages 6.03"
+.TH connect 2 2023-03-30 "Linux man-pages 6.05.01"
.SH NAME
connect \- initiate a connection on a socket
.SH LIBRARY
@@ -213,7 +213,9 @@ busy to accept new connections.
Note that for IP sockets the timeout may
be very long when syncookies are enabled on the server.
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, SVr4, 4.4BSD,
+POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001, SVr4, 4.4BSD,
.RB (connect ()
first appeared in 4.2BSD).
.\" SVr4 documents the additional
@@ -229,11 +231,6 @@ first appeared in 4.2BSD).
.\" It also
.\" documents many additional error conditions not described here.
.SH NOTES
-For background on the
-.I socklen_t
-type, see
-.BR accept (2).
-.PP
If
.BR connect ()
fails, consider the state of the socket as unspecified.
diff --git a/man2/copy_file_range.2 b/man2/copy_file_range.2
index 00cfc955a..8bea2e87b 100644
--- a/man2/copy_file_range.2
+++ b/man2/copy_file_range.2
@@ -2,7 +2,7 @@
.\"
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
-.TH copy_file_range 2 2023-02-05 "Linux man-pages 6.03"
+.TH copy_file_range 2 2023-07-15 "Linux man-pages 6.05.01"
.SH NAME
copy_file_range \- Copy a range of data from one file to another
.SH LIBRARY
@@ -11,10 +11,11 @@ Standard C library
.SH SYNOPSIS
.nf
.B #define _GNU_SOURCE
+.B #define _FILE_OFFSET_BITS 64
.B #include <unistd.h>
.PP
-.BI "ssize_t copy_file_range(int " fd_in ", off64_t *_Nullable " off_in ,
-.BI " int " fd_out ", off64_t *_Nullable " off_out ,
+.BI "ssize_t copy_file_range(int " fd_in ", off_t *_Nullable " off_in ,
+.BI " int " fd_out ", off_t *_Nullable " off_out ,
.BI " size_t " len ", unsigned int " flags );
.fi
.SH DESCRIPTION
@@ -185,12 +186,6 @@ are not on the same filesystem,
and the source and target filesystems are not of the same type,
or do not support cross-filesystem copy.
.SH VERSIONS
-The
-.BR copy_file_range ()
-system call first appeared in Linux 4.5, but glibc 2.27 provides a user-space
-emulation when it is not available.
-.\" https://sourceware.org/git/?p=glibc.git;a=commit;f=posix/unistd.h;h=bad7a0c81f501fbbcc79af9eaa4b8254441c4a1f
-.PP
A major rework of the kernel implementation occurred in Linux 5.3.
Areas of the API that weren't clearly defined were clarified and the API bounds
are much more strictly checked than on earlier kernels.
@@ -204,9 +199,12 @@ See BUGS for behavior prior to Linux 5.19.
Applications should target the behaviour and requirements of Linux 5.19,
that was also backported to earlier stable kernels.
.SH STANDARDS
-The
-.BR copy_file_range ()
-system call is a nonstandard Linux and GNU extension.
+Linux, GNU.
+.SH HISTORY
+Linux 4.5,
+but glibc 2.27 provides a user-space
+emulation when it is not available.
+.\" https://sourceware.org/git/?p=glibc.git;a=commit;f=posix/unistd.h;h=bad7a0c81f501fbbcc79af9eaa4b8254441c4a1f
.SH NOTES
If
.I fd_in
@@ -227,6 +225,18 @@ gives filesystems an opportunity to implement "copy acceleration" techniques,
such as the use of reflinks (i.e., two or more inodes that share
pointers to the same copy-on-write disk blocks)
or server-side-copy (in the case of NFS).
+.PP
+.B _FILE_OFFSET_BITS
+should be defined to be 64 in code that uses non-null
+.I off_in
+or
+.I off_out
+or that takes the address of
+.BR copy_file_range ,
+if the code is intended to be portable
+to traditional 32-bit x86 and ARM platforms where
+.BR off_t 's
+width defaults to 32 bits.
.SH BUGS
In Linux 5.3 to Linux 5.18,
cross-filesystem copies were implemented by the kernel,
@@ -237,53 +247,54 @@ the call failed to copy, while still reporting success.
.\" SRC BEGIN (copy_file_range.c)
.EX
#define _GNU_SOURCE
+#define _FILE_OFFSET_BITS 64
#include <fcntl.h>
#include <stdio.h>
#include <stdlib.h>
#include <sys/stat.h>
#include <unistd.h>
-
+\&
int
main(int argc, char *argv[])
{
int fd_in, fd_out;
- off64_t len, ret;
+ off_t len, ret;
struct stat stat;
-
+\&
if (argc != 3) {
fprintf(stderr, "Usage: %s <source> <destination>\en", argv[0]);
exit(EXIT_FAILURE);
}
-
+\&
fd_in = open(argv[1], O_RDONLY);
if (fd_in == \-1) {
perror("open (argv[1])");
exit(EXIT_FAILURE);
}
-
+\&
if (fstat(fd_in, &stat) == \-1) {
perror("fstat");
exit(EXIT_FAILURE);
}
-
+\&
len = stat.st_size;
-
+\&
fd_out = open(argv[2], O_CREAT | O_WRONLY | O_TRUNC, 0644);
if (fd_out == \-1) {
perror("open (argv[2])");
exit(EXIT_FAILURE);
}
-
+\&
do {
ret = copy_file_range(fd_in, NULL, fd_out, NULL, len, 0);
if (ret == \-1) {
perror("copy_file_range");
exit(EXIT_FAILURE);
}
-
+\&
len \-= ret;
} while (len > 0 && ret > 0);
-
+\&
close(fd_in);
close(fd_out);
exit(EXIT_SUCCESS);
diff --git a/man2/create_module.2 b/man2/create_module.2
index cfcce1239..d159cb113 100644
--- a/man2/create_module.2
+++ b/man2/create_module.2
@@ -5,7 +5,7 @@
.\" 2006-02-09, some reformatting by Luc Van Oostenryck; some
.\" reformatting and rewordings by mtk
.\"
-.TH create_module 2 2022-12-04 "Linux man-pages 6.03"
+.TH create_module 2 2023-03-30 "Linux man-pages 6.05.01"
.SH NAME
create_module \- create a loadable module entry
.SH SYNOPSIS
@@ -53,14 +53,12 @@ The caller was not privileged
(did not have the
.B CAP_SYS_MODULE
capability).
-.SH VERSIONS
-This system call is present only up until Linux 2.4;
-it was removed in Linux 2.6.
-.\" Removed in Linux 2.5.48
.SH STANDARDS
-.BR create_module ()
-is Linux-specific.
-.SH NOTES
+Linux.
+.SH HISTORY
+Removed in Linux 2.6.
+.\" Removed in Linux 2.5.48
+.PP
This obsolete system call is not supported by glibc.
No declaration is provided in glibc headers, but, through a quirk of history,
glibc versions before glibc 2.23 did export an ABI for this system call.
diff --git a/man2/delete_module.2 b/man2/delete_module.2
index ad20fac2d..a909729d0 100644
--- a/man2/delete_module.2
+++ b/man2/delete_module.2
@@ -2,7 +2,7 @@
.\"
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
-.TH delete_module 2 2023-02-05 "Linux man-pages 6.03"
+.TH delete_module 2 2023-03-30 "Linux man-pages 6.05.01"
.SH NAME
delete_module \- unload a kernel module
.SH LIBRARY
@@ -160,9 +160,8 @@ but the reference count of this module is nonzero and
was not specified in
.IR flags .
.SH STANDARDS
-.BR delete_module ()
-is Linux-specific.
-.SH NOTES
+Linux.
+.SH HISTORY
The
.BR delete_module ()
system call is not supported by glibc.
@@ -173,16 +172,6 @@ it is (before glibc 2.23) sufficient to
manually declare the interface in your code;
alternatively, you can invoke the system call using
.BR syscall (2).
-.PP
-The uninterruptible sleep that may occur if
-.B O_NONBLOCK
-is omitted from
-.I flags
-is considered undesirable, because the sleeping process is left
-in an unkillable state.
-As at Linux 3.7, specifying
-.B O_NONBLOCK
-is optional, but in future kernels it is likely to become mandatory.
.SS Linux 2.4 and earlier
In Linux 2.4 and earlier, the system call took only one argument:
.PP
@@ -197,6 +186,16 @@ Some further details of differences in the behavior of
in Linux 2.4 and earlier are
.I not
currently explained in this manual page.
+.SH NOTES
+The uninterruptible sleep that may occur if
+.B O_NONBLOCK
+is omitted from
+.I flags
+is considered undesirable, because the sleeping process is left
+in an unkillable state.
+As at Linux 3.7, specifying
+.B O_NONBLOCK
+is optional, but in future kernels it is likely to become mandatory.
.SH SEE ALSO
.BR create_module (2),
.BR init_module (2),
diff --git a/man2/dup.2 b/man2/dup.2
index 85dac61ff..b7187ed59 100644
--- a/man2/dup.2
+++ b/man2/dup.2
@@ -14,7 +14,7 @@
.\" details for dup2().
.\" 2008-10-09, mtk: add description of dup3()
.\"
-.TH dup 2 2023-02-05 "Linux man-pages 6.03"
+.TH dup 2 2023-05-03 "Linux man-pages 6.05.01"
.SH NAME
dup, dup2, dup3 \- duplicate a file descriptor
.SH LIBRARY
@@ -197,20 +197,28 @@ The per-process limit on the number of open file descriptors has been reached
.B RLIMIT_NOFILE
in
.BR getrlimit (2)).
-.SH VERSIONS
-.BR dup3 ()
-was added in Linux 2.6.27;
-glibc support is available since glibc 2.9.
.SH STANDARDS
-.BR dup (),
-.BR dup2 ():
-POSIX.1-2001, POSIX.1-2008, SVr4, 4.3BSD.
-.PP
+.TP
+.BR dup ()
+.TQ
+.BR dup2 ()
+POSIX.1-2008.
+.TP
.BR dup3 ()
-is Linux-specific.
+Linux.
+.SH HISTORY
+.TP
+.BR dup ()
+.TQ
+.BR dup2 ()
+POSIX.1-2001, SVr4, 4.3BSD.
.\" SVr4 documents additional
.\" EINTR and ENOLINK error conditions. POSIX.1 adds EINTR.
.\" The EBUSY return is Linux-specific.
+.TP
+.BR dup3 ()
+Linux 2.6.27,
+glibc 2.9.
.SH NOTES
The error returned by
.BR dup2 ()
@@ -247,21 +255,21 @@ Instead, code something like the following could be used:
/* Obtain a duplicate of \[aq]newfd\[aq] that can subsequently
be used to check for close() errors; an EBADF error
means that \[aq]newfd\[aq] was not open. */
-
+\&
tmpfd = dup(newfd);
if (tmpfd == \-1 && errno != EBADF) {
/* Handle unexpected dup() error. */
}
-
+\&
/* Atomically duplicate \[aq]oldfd\[aq] on \[aq]newfd\[aq]. */
-
+\&
if (dup2(oldfd, newfd) == \-1) {
/* Handle dup2() error. */
}
-
+\&
/* Now check for close() errors on the file originally
referred to by \[aq]newfd\[aq]. */
-
+\&
if (tmpfd != \-1) {
if (close(tmpfd) == \-1) {
/* Handle errors from close. */
diff --git a/man2/epoll_create.2 b/man2/epoll_create.2
index 5591e88df..8d2c0be40 100644
--- a/man2/epoll_create.2
+++ b/man2/epoll_create.2
@@ -8,7 +8,7 @@
.\" Modified 2005-04-04 by Marko Kohtala <marko.kohtala@gmail.com>
.\" 2008-10-10, mtk: add description of epoll_create1()
.\"
-.TH epoll_create 2 2022-12-04 "Linux man-pages 6.03"
+.TH epoll_create 2 2023-07-16 "Linux man-pages 6.05.01"
.SH NAME
epoll_create, epoll_create1 \- open an epoll file descriptor
.SH LIBRARY
@@ -28,7 +28,7 @@ creates a new
instance.
Since Linux 2.6.8, the
.I size
-argument is ignored, but must be greater than zero; see NOTES.
+argument is ignored, but must be greater than zero; see HISTORY.
.PP
.BR epoll_create ()
returns a file descriptor referring to the new epoll instance.
@@ -83,14 +83,6 @@ Invalid value specified in
.IR flags .
.TP
.B EMFILE
-The per-user limit on the number of epoll instances imposed by
-.I /proc/sys/fs/epoll/max_user_instances
-was encountered.
-See
-.BR epoll (7)
-for further details.
-.TP
-.B EMFILE
The per-process limit on the number of open file descriptors has been reached.
.TP
.B ENFILE
@@ -98,22 +90,20 @@ The system-wide limit on the total number of open files has been reached.
.TP
.B ENOMEM
There was insufficient memory to create the kernel object.
-.SH VERSIONS
+.SH STANDARDS
+Linux.
+.SH HISTORY
+.TP
.BR epoll_create ()
-was added in Linux 2.6.
-Library support is provided in glibc 2.3.2.
-.PP
+Linux 2.6,
+glibc 2.3.2.
.\" To be precise: kernel 2.5.44.
.\" The interface should be finalized by Linux kernel 2.5.66.
+.TP
.BR epoll_create1 ()
-was added in Linux 2.6.27.
-Library support is provided in glibc 2.9.
-.SH STANDARDS
-.BR epoll_create ()
-and
-.BR epoll_create1 ()
-are Linux-specific.
-.SH NOTES
+Linux 2.6.27,
+glibc 2.9.
+.PP
In the initial
.BR epoll_create ()
implementation, the
@@ -136,6 +126,17 @@ must still be greater than zero,
in order to ensure backward compatibility when new
.B epoll
applications are run on older kernels.
+.PP
+Prior to Linux 2.6.29,
+.\" commit 9df04e1f25effde823a600e755b51475d438f56b
+a
+.I /proc/sys/fs/epoll/max_user_instances
+kernel parameter limited live epolls for each real user ID,
+and caused
+.BR epoll_create ()
+to fail with
+.B EMFILE
+on overrun.
.SH SEE ALSO
.BR close (2),
.BR epoll_ctl (2),
diff --git a/man2/epoll_ctl.2 b/man2/epoll_ctl.2
index 9dd3dcd03..e8ee1e6f5 100644
--- a/man2/epoll_ctl.2
+++ b/man2/epoll_ctl.2
@@ -4,7 +4,7 @@
.\"
.\" SPDX-License-Identifier: GPL-2.0-or-later
.\"
-.TH epoll_ctl 2 2022-12-04 "Linux man-pages 6.03"
+.TH epoll_ctl 2 2023-04-03 "Linux man-pages 6.05.01"
.SH NAME
epoll_ctl \- control interface for an epoll file descriptor
.SH LIBRARY
@@ -14,8 +14,8 @@ Standard C library
.nf
.B #include <sys/epoll.h>
.PP
-.BI "int epoll_ctl(int " epfd ", int " op ", int " fd \
-", struct epoll_event *_Nullable " event );
+.BI "int epoll_ctl(int " epfd ", int " op ", int " fd ,
+.BI " struct epoll_event *_Nullable " event );
.fi
.SH DESCRIPTION
This system call is used to add, modify, or remove
@@ -369,15 +369,13 @@ does not support
This error can occur if
.I fd
refers to, for example, a regular file or a directory.
-.SH VERSIONS
-.BR epoll_ctl ()
-was added to in Linux 2.6.
-.\" To be precise: kernel 2.5.44.
-.\" The interface should be finalized by Linux kernel 2.5.66.
-Library support is provided in glibc 2.3.2.
.SH STANDARDS
-.BR epoll_ctl ()
-is Linux-specific.
+Linux.
+.SH HISTORY
+Linux 2.6,
+.\" To be precise: Linux 2.5.44.
+.\" The interface should be finalized by Linux 2.5.66.
+glibc 2.3.2.
.SH NOTES
The
.B epoll
diff --git a/man2/epoll_wait.2 b/man2/epoll_wait.2
index 476f70f82..5efaada9d 100644
--- a/man2/epoll_wait.2
+++ b/man2/epoll_wait.2
@@ -6,7 +6,7 @@
.\"
.\" 2007-04-30: mtk, Added description of epoll_pwait()
.\"
-.TH epoll_wait 2 2023-02-05 "Linux man-pages 6.03"
+.TH epoll_wait 2 2023-05-03 "Linux man-pages 6.05.01"
.SH NAME
epoll_wait, epoll_pwait, epoll_pwait2 \-
wait for an I/O event on an epoll file descriptor
@@ -136,7 +136,7 @@ executing the following calls:
.in +4n
.EX
sigset_t origmask;
-
+\&
pthread_sigmask(SIG_SETMASK, &sigmask, &origmask);
ready = epoll_wait(epfd, &events, maxevents, timeout);
pthread_sigmask(SIG_SETMASK, &origmask, NULL);
@@ -207,25 +207,22 @@ is not an
file descriptor, or
.I maxevents
is less than or equal to zero.
-.SH VERSIONS
+.SH STANDARDS
+Linux.
+.SH HISTORY
+.TP
.BR epoll_wait ()
-was added in Linux 2.6.
-.\" To be precise: kernel 2.5.44.
+Linux 2.6,
+.\" To be precise: Linux 2.5.44.
.\" The interface should be finalized by Linux 2.5.66.
-Library support is provided in glibc 2.3.2.
-.PP
+glibc 2.3.2.
+.TP
.BR epoll_pwait ()
-was added in Linux 2.6.19.
-Library support is provided in glibc 2.6.
-.PP
-.BR epoll_pwait2 ()
-was added in Linux 5.11.
-.SH STANDARDS
-.BR epoll_wait (),
-.BR epoll_pwait (),
-and
+Linux 2.6.19,
+glibc 2.6.
+.TP
.BR epoll_pwait2 ()
-are Linux-specific.
+Linux 5.11.
.SH NOTES
While one thread is blocked in a call to
.BR epoll_wait (),
diff --git a/man2/eventfd.2 b/man2/eventfd.2
index 36c522d61..7be6a3a9d 100644
--- a/man2/eventfd.2
+++ b/man2/eventfd.2
@@ -6,7 +6,7 @@
.\"
.\" 2008-10-10, mtk: describe eventfd2(), and EFD_NONBLOCK and EFD_CLOEXEC
.\"
-.TH eventfd 2 2023-02-10 "Linux man-pages 6.03"
+.TH eventfd 2 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
eventfd \- create a file descriptor for event notification
.SH LIBRARY
@@ -246,41 +246,70 @@ Could not mount (internal) anonymous inode device.
.B ENOMEM
There was insufficient memory to create a new
eventfd file descriptor.
-.SH VERSIONS
-.BR eventfd ()
-is available since Linux 2.6.22.
-Working support is provided since glibc 2.8.
-.\" eventfd() is in glibc 2.7, but reportedly does not build
-The
-.BR eventfd2 ()
-system call (see NOTES) is available since Linux 2.6.27.
-Since glibc 2.9, the
-.BR eventfd ()
-wrapper will employ the
-.BR eventfd2 ()
-system call, if it is supported by the kernel.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR eventfd ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
+.SH VERSIONS
+.SS C library/kernel differences
+There are two underlying Linux system calls:
+.BR eventfd ()
+and the more recent
+.BR eventfd2 ().
+The former system call does not implement a
+.I flags
+argument.
+The latter system call implements the
+.I flags
+values described above.
+The glibc wrapper function will use
+.BR eventfd2 ()
+where it is available.
+.SS Additional glibc features
+The GNU C library defines an additional type,
+and two functions that attempt to abstract some of the details of
+reading and writing on an eventfd file descriptor:
+.PP
+.in +4n
+.EX
+typedef uint64_t eventfd_t;
+\&
+int eventfd_read(int fd, eventfd_t *value);
+int eventfd_write(int fd, eventfd_t value);
+.EE
+.in
+.PP
+The functions perform the read and write operations on an
+eventfd file descriptor,
+returning 0 if the correct number of bytes was transferred,
+or \-1 otherwise.
.SH STANDARDS
+Linux, GNU.
+.SH HISTORY
+.TP
.BR eventfd ()
-and
+Linux 2.6.22,
+glibc 2.8.
+.\" eventfd() is in glibc 2.7, but reportedly does not build
+.TP
+.BR eventfd2 ()
+Linux 2.6.27 (see VERSIONS).
+Since glibc 2.9, the
+.BR eventfd ()
+wrapper will employ the
.BR eventfd2 ()
-are Linux-specific.
+system call, if it is supported by the kernel.
.SH NOTES
Applications can use an eventfd file descriptor instead of a pipe (see
.BR pipe (2))
@@ -320,39 +349,6 @@ directory.
See
.BR proc (5)
for further details.
-.\"
-.SS C library/kernel differences
-There are two underlying Linux system calls:
-.BR eventfd ()
-and the more recent
-.BR eventfd2 ().
-The former system call does not implement a
-.I flags
-argument.
-The latter system call implements the
-.I flags
-values described above.
-The glibc wrapper function will use
-.BR eventfd2 ()
-where it is available.
-.SS Additional glibc features
-The GNU C library defines an additional type,
-and two functions that attempt to abstract some of the details of
-reading and writing on an eventfd file descriptor:
-.PP
-.in +4n
-.EX
-typedef uint64_t eventfd_t;
-
-int eventfd_read(int fd, eventfd_t *value);
-int eventfd_write(int fd, eventfd_t value);
-.EE
-.in
-.PP
-The functions perform the read and write operations on an
-eventfd file descriptor,
-returning 0 if the correct number of bytes was transferred,
-or \-1 otherwise.
.SH EXAMPLES
The following program creates an eventfd file descriptor
and then forks to create a child process.
@@ -387,23 +383,23 @@ Parent read 28 (0x1c) from efd
#include <stdlib.h>
#include <sys/eventfd.h>
#include <unistd.h>
-
+\&
int
main(int argc, char *argv[])
{
int efd;
uint64_t u;
ssize_t s;
-
+\&
if (argc < 2) {
fprintf(stderr, "Usage: %s <num>...\en", argv[0]);
exit(EXIT_FAILURE);
}
-
+\&
efd = eventfd(0, 0);
if (efd == \-1)
err(EXIT_FAILURE, "eventfd");
-
+\&
switch (fork()) {
case 0:
for (size_t j = 1; j < argc; j++) {
@@ -415,19 +411,19 @@ main(int argc, char *argv[])
err(EXIT_FAILURE, "write");
}
printf("Child completed write loop\en");
-
+\&
exit(EXIT_SUCCESS);
-
+\&
default:
sleep(2);
-
+\&
printf("Parent about to read\en");
s = read(efd, &u, sizeof(uint64_t));
if (s != sizeof(uint64_t))
err(EXIT_FAILURE, "read");
printf("Parent read %"PRIu64" (%#"PRIx64") from efd\en", u, u);
exit(EXIT_SUCCESS);
-
+\&
case \-1:
err(EXIT_FAILURE, "fork");
}
diff --git a/man2/execve.2 b/man2/execve.2
index 753e6e58e..ae1863cee 100644
--- a/man2/execve.2
+++ b/man2/execve.2
@@ -14,7 +14,7 @@
.\" 2007-09-14 Ollie Wild <aaw@google.com>, mtk
.\" Add text describing limits on command-line arguments + environment
.\"
-.TH execve 2 2023-02-05 "Linux man-pages 6.03"
+.TH execve 2 2023-05-03 "Linux man-pages 6.05.01"
.SH NAME
execve \- execute program
.SH LIBRARY
@@ -552,44 +552,9 @@ See
.TP
.B ETXTBSY
The specified executable was open for writing by one or more processes.
-.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, SVr4, 4.3BSD.
+.SH VERSIONS
POSIX does not document the #! behavior, but it exists
(with some variations) on other UNIX systems.
-.\" SVr4 documents additional error
-.\" conditions EAGAIN, EINTR, ELIBACC, ENOLINK, EMULTIHOP; POSIX does not
-.\" document ETXTBSY, EPERM, EFAULT, ELOOP, EIO, ENFILE, EMFILE, EINVAL,
-.\" EISDIR or ELIBBAD error conditions.
-.SH NOTES
-One sometimes sees
-.BR execve ()
-(and the related functions described in
-.BR exec (3))
-described as "executing a
-.I new
-process" (or similar).
-This is a highly misleading description:
-there is no new process;
-many attributes of the calling process remain unchanged
-(in particular, its PID).
-All that
-.BR execve ()
-does is arrange for an existing process (the calling process)
-to execute a new program.
-.PP
-Set-user-ID and set-group-ID processes can not be
-.BR ptrace (2)d.
-.PP
-The result of mounting a filesystem
-.I nosuid
-varies across Linux kernel versions:
-some will refuse execution of set-user-ID and set-group-ID
-executables when this would
-give the user powers they did not have already (and return
-.BR EPERM ),
-some will just ignore the set-user-ID and set-group-ID bits and
-.BR exec ()
-successfully.
.PP
On Linux,
.I argv
@@ -623,23 +588,6 @@ resource limit changes, then the value reported by
will also change,
to reflect the fact that the limit on space for holding
command-line arguments and environment variables has changed.
-.PP
-In most cases where
-.BR execve ()
-fails, control returns to the original executable image,
-and the caller of
-.BR execve ()
-can then handle the error.
-However, in (rare) cases (typically caused by resource exhaustion),
-failure may occur past the point of no return:
-the original executable image has been torn down,
-but the new image could not be completely built.
-In such cases, the kernel kills the process with a
-.\" commit 19d860a140beac48a1377f179e693abe86a9dac9
-.B SIGSEGV
-.RB ( SIGKILL
-until Linux 3.17)
-signal.
.\"
.SS Interpreter scripts
The kernel imposes a maximum length on the text that follows the
@@ -671,15 +619,72 @@ are used to delimit the arguments.
.PP
Linux (like most other modern UNIX systems)
ignores the set-user-ID and set-group-ID bits on scripts.
-.\"
-.\" .SH BUGS
-.\" Some Linux versions have failed to check permissions on ELF
-.\" interpreters. This is a security hole, because it allows users to
-.\" open any file, such as a rewinding tape device, for reading. Some
-.\" Linux versions have also had other security holes in
-.\" .BR execve ()
-.\" that could be exploited for denial of service by a suitably crafted
-.\" ELF binary. There are no known problems with Linux 2.0.34 or Linux 2.2.15.
+.SH STANDARDS
+POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001, SVr4, 4.3BSD.
+.\" SVr4 documents additional error
+.\" conditions EAGAIN, EINTR, ELIBACC, ENOLINK, EMULTIHOP; POSIX does not
+.\" document ETXTBSY, EPERM, EFAULT, ELOOP, EIO, ENFILE, EMFILE, EINVAL,
+.\" EISDIR or ELIBBAD error conditions.
+.PP
+With UNIX\ V6, the argument list of an
+.BR exec ()
+call was ended by 0,
+while the argument list of
+.I main
+was ended by \-1.
+Thus, this argument list was not directly usable in a further
+.BR exec ()
+call.
+Since UNIX\ V7, both are NULL.
+.SH NOTES
+One sometimes sees
+.BR execve ()
+(and the related functions described in
+.BR exec (3))
+described as "executing a
+.I new
+process" (or similar).
+This is a highly misleading description:
+there is no new process;
+many attributes of the calling process remain unchanged
+(in particular, its PID).
+All that
+.BR execve ()
+does is arrange for an existing process (the calling process)
+to execute a new program.
+.PP
+Set-user-ID and set-group-ID processes can not be
+.BR ptrace (2)d.
+.PP
+The result of mounting a filesystem
+.I nosuid
+varies across Linux kernel versions:
+some will refuse execution of set-user-ID and set-group-ID
+executables when this would
+give the user powers they did not have already (and return
+.BR EPERM ),
+some will just ignore the set-user-ID and set-group-ID bits and
+.BR exec ()
+successfully.
+.PP
+In most cases where
+.BR execve ()
+fails, control returns to the original executable image,
+and the caller of
+.BR execve ()
+can then handle the error.
+However, in (rare) cases (typically caused by resource exhaustion),
+failure may occur past the point of no return:
+the original executable image has been torn down,
+but the new image could not be completely built.
+In such cases, the kernel kills the process with a
+.\" commit 19d860a140beac48a1377f179e693abe86a9dac9
+.B SIGSEGV
+.RB ( SIGKILL
+until Linux 3.17)
+signal.
.SS execve() and EAGAIN
A more detailed explanation of the
.B EAGAIN
@@ -755,17 +760,6 @@ process flag.
The flag is also cleared if a subsequent call to
.BR fork (2)
by this process succeeds.
-.SS Historical
-With UNIX\ V6, the argument list of an
-.BR exec ()
-call was ended by 0,
-while the argument list of
-.I main
-was ended by \-1.
-Thus, this argument list was not directly usable in a further
-.BR exec ()
-call.
-Since UNIX\ V7, both are NULL.
.\"
.\" .SH BUGS
.\" Some Linux versions have failed to check permissions on ELF
@@ -783,16 +777,16 @@ It just echoes its command-line arguments, one per line.
.\" SRC BEGIN (myecho.c)
.EX
/* myecho.c */
-
+\&
#include <stdio.h>
#include <stdlib.h>
-
+\&
int
main(int argc, char *argv[])
{
for (size_t j = 0; j < argc; j++)
printf("argv[%zu]: %s\en", j, argv[j]);
-
+\&
exit(EXIT_SUCCESS);
}
.EE
@@ -806,24 +800,24 @@ argument:
.\" SRC BEGIN (execve.c)
.EX
/* execve.c */
-
+\&
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
-
+\&
int
main(int argc, char *argv[])
{
static char *newargv[] = { NULL, "hello", "world", NULL };
static char *newenviron[] = { NULL };
-
+\&
if (argc != 2) {
fprintf(stderr, "Usage: %s <file\-to\-exec>\en", argv[0]);
exit(EXIT_FAILURE);
}
-
+\&
newargv[0] = argv[1];
-
+\&
execve(argv[1], newargv, newenviron);
perror("execve"); /* execve() returns only on error */
exit(EXIT_FAILURE);
diff --git a/man2/execveat.2 b/man2/execveat.2
index 5b262a011..22c468a52 100644
--- a/man2/execveat.2
+++ b/man2/execveat.2
@@ -3,7 +3,7 @@
.\"
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
-.TH execveat 2 2023-01-02 "Linux man-pages 6.03"
+.TH execveat 2 2023-03-30 "Linux man-pages 6.05.01"
.SH NAME
execveat \- execute program relative to a directory file descriptor
.SH LIBRARY
@@ -145,14 +145,11 @@ See BUGS.
is relative and
.I dirfd
is a file descriptor referring to a file other than a directory.
-.SH VERSIONS
-.BR execveat ()
-was added in Linux 3.19.
-Library support was added in glibc 2.34.
.SH STANDARDS
-The
-.BR execveat ()
-system call is Linux-specific.
+Linux.
+.SH HISTORY
+Linux 3.19,
+glibc 2.34.
.SH NOTES
In addition to the reasons explained in
.BR openat (2),
diff --git a/man2/exit_group.2 b/man2/exit_group.2
index dac09fd5a..3515406a1 100644
--- a/man2/exit_group.2
+++ b/man2/exit_group.2
@@ -2,7 +2,7 @@
.\"
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
-.TH exit_group 2 2022-11-05 "Linux man-pages 6.03"
+.TH exit_group 2 2023-03-30 "Linux man-pages 6.05.01"
.SH NAME
exit_group \- exit all threads in a process
.SH LIBRARY
@@ -26,10 +26,10 @@ This system call terminates all threads
in the calling process's thread group.
.SH RETURN VALUE
This system call does not return.
-.SH VERSIONS
-This call is present since Linux 2.5.35.
.SH STANDARDS
-This call is Linux-specific.
+Linux.
+.SH HISTORY
+Linux 2.5.35.
.SH NOTES
Since glibc 2.3, this is the system call invoked when the
.BR _exit (2)
diff --git a/man2/fallocate.2 b/man2/fallocate.2
index 917d468a4..e46265893 100644
--- a/man2/fallocate.2
+++ b/man2/fallocate.2
@@ -6,7 +6,7 @@
.\" 2011-09-19: Added FALLOC_FL_PUNCH_HOLE
.\" 2011-09-19: Substantial restructuring of the page
.\"
-.TH fallocate 2 2023-02-05 "Linux man-pages 6.03"
+.TH fallocate 2 2023-03-30 "Linux man-pages 6.05.01"
.SH NAME
fallocate \- manipulate file space
.SH LIBRARY
@@ -463,17 +463,17 @@ or
but the file referred to by
.I fd
is currently being executed.
-.SH VERSIONS
+.SH STANDARDS
+Linux.
+.SH HISTORY
+.TP
.BR fallocate ()
-is available since Linux 2.6.23.
-Support is provided since glibc 2.10.
-The
+Linux 2.6.23,
+glibc 2.10.
+.TP
.B FALLOC_FL_*
-flags are defined in glibc headers only since glibc 2.18.
+glibc 2.18.
.\" See http://sourceware.org/bugzilla/show_bug.cgi?id=14964
-.SH STANDARDS
-.BR fallocate ()
-is Linux-specific.
.SH SEE ALSO
.BR fallocate (1),
.BR ftruncate (2),
diff --git a/man2/fanotify_init.2 b/man2/fanotify_init.2
index 9b1053564..f48e43a82 100644
--- a/man2/fanotify_init.2
+++ b/man2/fanotify_init.2
@@ -1,7 +1,7 @@
-\" Copyright (C) 2013, Heinrich Schuchardt <xypron.glpk@gmx.de>
+.\" Copyright (C) 2013, Heinrich Schuchardt <xypron.glpk@gmx.de>
.\"
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
-.TH fanotify_init 2 2023-02-05 "Linux man-pages 6.03"
+.TH fanotify_init 2 2023-07-08 "Linux man-pages 6.05.01"
.SH NAME
fanotify_init \- create and initialize fanotify group
.SH LIBRARY
@@ -460,9 +460,6 @@ The fanotify API is available only if the kernel was configured with
.B EPERM
The operation is not permitted because the caller lacks a required capability.
.SH VERSIONS
-.BR fanotify_init ()
-was introduced in Linux 2.6.36 and enabled in Linux 2.6.37.
-.PP
Prior to Linux 5.13,
.\" commit 7cea2a3c505e87a9d6afc78be4a7f7be636a73a7
calling
@@ -516,7 +513,10 @@ A user will also not receive the pid that generated the event, unless the
listening process itself generated the event.
.RE
.SH STANDARDS
-This system call is Linux-specific.
+Linux.
+.SH HISTORY
+Linux 2.6.37.
+.\" was introduced in Linux 2.6.36 and enabled in Linux 2.6.37.
.SH BUGS
The following bug was present before Linux 3.18:
.IP \[bu] 3
diff --git a/man2/fanotify_mark.2 b/man2/fanotify_mark.2
index 07f89cbfe..d1f7eecc4 100644
--- a/man2/fanotify_mark.2
+++ b/man2/fanotify_mark.2
@@ -1,7 +1,7 @@
.\" Copyright (C) 2013, Heinrich Schuchardt <xypron.glpk@gmx.de>
.\"
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
-.TH fanotify_mark 2 2023-02-05 "Linux man-pages 6.03"
+.TH fanotify_mark 2 2023-03-30 "Linux man-pages 6.05.01"
.SH NAME
fanotify_mark \- add, remove, or modify an fanotify mark on a filesystem
object
@@ -761,11 +761,11 @@ which uses a different
than its root superblock.
This error can be returned only with an fanotify group that identifies
filesystem objects by file handles.
-.SH VERSIONS
-.BR fanotify_mark ()
-was introduced in Linux 2.6.36 and enabled in Linux 2.6.37.
.SH STANDARDS
-This system call is Linux-specific.
+Linux.
+.SH HISTORY
+Linux 2.6.37.
+.\" was introduced in Linux 2.6.36 and enabled in Linux 2.6.37.
.SH NOTES
.SS FAN_OPEN_EXEC and FAN_OPEN_EXEC_PERM
When using either
diff --git a/man2/fcntl.2 b/man2/fcntl.2
index 818d4df75..936204448 100644
--- a/man2/fcntl.2
+++ b/man2/fcntl.2
@@ -44,7 +44,7 @@
.\" 2017-06-26, Jens Axboe <axboe@kernel.dk>
.\" Document F_{GET,SET}_RW_HINT and F_{GET,SET}_FILE_RW_HINT
.\"
-.TH fcntl 2 2023-02-05 "Linux man-pages 6.03"
+.TH fcntl 2 2023-03-30 "Linux man-pages 6.05.01"
.SH NAME
fcntl \- manipulate file descriptor
.SH LIBRARY
@@ -1810,38 +1810,7 @@ was not open for writing
or the current set of seals on the file already includes
.BR F_SEAL_SEAL .
.SH STANDARDS
-SVr4, 4.3BSD, POSIX.1-2001.
-Only the operations
-.BR F_DUPFD ,
-.BR F_GETFD ,
-.BR F_SETFD ,
-.BR F_GETFL ,
-.BR F_SETFL ,
-.BR F_GETLK ,
-.BR F_SETLK ,
-and
-.B F_SETLKW
-are specified in POSIX.1-2001.
-.PP
-.B F_GETOWN
-and
-.B F_SETOWN
-are specified in POSIX.1-2001.
-(To get their definitions, define either
-.\" .BR _BSD_SOURCE ,
-.\" or
-.B _XOPEN_SOURCE
-with the value 500 or greater, or
-.B _POSIX_C_SOURCE
-with the value 200809L or greater.)
-.PP
-.B F_DUPFD_CLOEXEC
-is specified in POSIX.1-2008.
-(To get this definition, define
-.B _POSIX_C_SOURCE
-with the value 200809L or greater, or
-.B _XOPEN_SOURCE
-with the value 700 or greater.)
+POSIX.1-2008.
.PP
.BR F_GETOWN_EX ,
.BR F_SETOWN_EX ,
@@ -1874,6 +1843,40 @@ and
.B F_GET_SEALS
are Linux-specific.
.\" FIXME . Once glibc adds support, add a note about FTM requirements
+.SH HISTORY
+SVr4, 4.3BSD, POSIX.1-2001.
+.PP
+Only the operations
+.BR F_DUPFD ,
+.BR F_GETFD ,
+.BR F_SETFD ,
+.BR F_GETFL ,
+.BR F_SETFL ,
+.BR F_GETLK ,
+.BR F_SETLK ,
+and
+.B F_SETLKW
+are specified in POSIX.1-2001.
+.PP
+.B F_GETOWN
+and
+.B F_SETOWN
+are specified in POSIX.1-2001.
+(To get their definitions, define either
+.\" .BR _BSD_SOURCE ,
+.\" or
+.B _XOPEN_SOURCE
+with the value 500 or greater, or
+.B _POSIX_C_SOURCE
+with the value 200809L or greater.)
+.PP
+.B F_DUPFD_CLOEXEC
+is specified in POSIX.1-2008.
+(To get this definition, define
+.B _POSIX_C_SOURCE
+with the value 200809L or greater, or
+.B _XOPEN_SOURCE
+with the value 700 or greater.)
.SH NOTES
The errors returned by
.BR dup2 (2)
diff --git a/man2/flock.2 b/man2/flock.2
index a240a603f..5f2917f42 100644
--- a/man2/flock.2
+++ b/man2/flock.2
@@ -12,7 +12,7 @@
.\" FIXME Maybe document LOCK_MAND, LOCK_RW, LOCK_READ, LOCK_WRITE
.\" which only have effect for SAMBA.
.\"
-.TH flock 2 2022-12-04 "Linux man-pages 6.03"
+.TH flock 2 2023-03-30 "Linux man-pages 6.05.01"
.SH NAME
flock \- apply or remove an advisory lock on an open file
.SH LIBRARY
@@ -121,16 +121,7 @@ The kernel ran out of memory for allocating lock records.
The file is locked and the
.B LOCK_NB
flag was selected.
-.SH STANDARDS
-4.4BSD (the
-.BR flock ()
-call first appeared in 4.2BSD).
-A version of
-.BR flock (),
-possibly implemented in terms of
-.BR fcntl (2),
-appears on most UNIX systems.
-.SH NOTES
+.SH VERSIONS
Since Linux 2.0,
.BR flock ()
is implemented as a system call in its own right rather
@@ -153,38 +144,43 @@ and
locks
.I do
interact with one another.)
-.PP
-.BR flock ()
-places advisory locks only; given suitable permissions on a file,
-a process is free to ignore the use of
+.SS CIFS details
+Up to Linux 5.4,
.BR flock ()
-and perform I/O on the file.
+is not propagated over SMB.
+A file with such locks will not appear locked for remote clients.
.PP
+Since Linux 5.5,
.BR flock ()
-and
+locks are emulated with SMB byte-range locks on the entire file.
+Similarly to NFS, this means that
.BR fcntl (2)
-locks have different semantics with respect to forked processes and
-.BR dup (2).
-On systems that implement
-.BR flock ()
-using
-.BR fcntl (2),
-the semantics of
+and
.BR flock ()
-will be different from those described in this manual page.
+locks interact with one another.
+Another important side-effect is that the locks are not advisory anymore:
+any IO on a locked file will always fail with
+.B EACCES
+when done from a separate file descriptor.
+This difference originates from the design of locks in the SMB protocol,
+which provides mandatory locking semantics.
.PP
-Converting a lock
-(shared to exclusive, or vice versa) is not guaranteed to be atomic:
-the existing lock is first removed, and then a new lock is established.
-Between these two steps,
-a pending lock request by another process may be granted,
-with the result that the conversion either blocks, or fails if
-.B LOCK_NB
-was specified.
-(This is the original BSD behavior,
-and occurs on many other implementations.)
-.\" Kernel 2.5.21 changed things a little: during lock conversion
-.\" it is now the highest priority process that will get the lock -- mtk
+Remote and mandatory locking semantics may vary with
+SMB protocol, mount options and server type.
+See
+.BR mount.cifs (8)
+for additional information.
+.SH STANDARDS
+BSD.
+.SH HISTORY
+4.4BSD (the
+.BR flock ()
+call first appeared in 4.2BSD).
+A version of
+.BR flock (),
+possibly implemented in terms of
+.BR fcntl (2),
+appears on most UNIX systems.
.SS NFS details
Up to Linux 2.6.11,
.BR flock ()
@@ -222,32 +218,38 @@ see the discussion of the
.I "local_lock"
option in
.BR nfs (5).
-.SS CIFS details
-Up to Linux 5.4,
+.SH NOTES
.BR flock ()
-is not propagated over SMB.
-A file with such locks will not appear locked for remote clients.
+places advisory locks only; given suitable permissions on a file,
+a process is free to ignore the use of
+.BR flock ()
+and perform I/O on the file.
.PP
-Since Linux 5.5,
.BR flock ()
-locks are emulated with SMB byte-range locks on the entire file.
-Similarly to NFS, this means that
-.BR fcntl (2)
and
+.BR fcntl (2)
+locks have different semantics with respect to forked processes and
+.BR dup (2).
+On systems that implement
.BR flock ()
-locks interact with one another.
-Another important side-effect is that the locks are not advisory anymore:
-any IO on a locked file will always fail with
-.B EACCES
-when done from a separate file descriptor.
-This difference originates from the design of locks in the SMB protocol,
-which provides mandatory locking semantics.
+using
+.BR fcntl (2),
+the semantics of
+.BR flock ()
+will be different from those described in this manual page.
.PP
-Remote and mandatory locking semantics may vary with
-SMB protocol, mount options and server type.
-See
-.BR mount.cifs (8)
-for additional information.
+Converting a lock
+(shared to exclusive, or vice versa) is not guaranteed to be atomic:
+the existing lock is first removed, and then a new lock is established.
+Between these two steps,
+a pending lock request by another process may be granted,
+with the result that the conversion either blocks, or fails if
+.B LOCK_NB
+was specified.
+(This is the original BSD behavior,
+and occurs on many other implementations.)
+.\" Kernel 2.5.21 changed things a little: during lock conversion
+.\" it is now the highest priority process that will get the lock -- mtk
.SH SEE ALSO
.BR flock (1),
.BR close (2),
diff --git a/man2/fork.2 b/man2/fork.2
index 9ef7d3584..607a86bd0 100644
--- a/man2/fork.2
+++ b/man2/fork.2
@@ -16,7 +16,7 @@
.\" Greatly expanded, to describe all attributes that differ
.\" parent and child.
.\"
-.TH fork 2 2023-02-05 "Linux man-pages 6.03"
+.TH fork 2 2023-05-03 "Linux man-pages 6.05.01"
.SH NAME
fork \- create a child process
.SH LIBRARY
@@ -259,14 +259,7 @@ hardware without a Memory-Management Unit).
.\" commit 4a2c7a7837da1b91468e50426066d988050e4d56
System call was interrupted by a signal and will be restarted.
(This can be seen only during a trace.)
-.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, SVr4, 4.3BSD.
-.SH NOTES
-Under Linux,
-.BR fork ()
-is implemented using copy-on-write pages, so the only penalty that it incurs
-is the time and memory required to duplicate the parent's page tables,
-and to create a unique task structure for the child.
+.SH VERSIONS
.SS C library/kernel differences
Since glibc 2.3.3,
.\" nptl/sysdeps/unix/sysv/linux/fork.c
@@ -291,6 +284,16 @@ The glibc wrapper invokes any fork handlers that have been
established using
.BR pthread_atfork (3).
.\" and does some magic to ensure that getpid(2) returns the right value.
+.SH STANDARDS
+POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001, SVr4, 4.3BSD.
+.SH NOTES
+Under Linux,
+.BR fork ()
+is implemented using copy-on-write pages, so the only penalty that it incurs
+is the time and memory required to duplicate the parent's page tables,
+and to create a unique task structure for the child.
.SH EXAMPLES
See
.BR pipe (2)
@@ -305,12 +308,12 @@ for more examples.
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
-
+\&
int
main(void)
{
pid_t pid;
-
+\&
if (signal(SIGCHLD, SIG_IGN) == SIG_ERR) {
perror("signal");
exit(EXIT_FAILURE);
diff --git a/man2/fsync.2 b/man2/fsync.2
index 5cbbe2923..623e7cad9 100644
--- a/man2/fsync.2
+++ b/man2/fsync.2
@@ -15,7 +15,7 @@
.\" 2006-04-28, mtk, substantial rewrite of various parts.
.\" 2012-02-27 Various changes by Christoph Hellwig <hch@lst.de>
.\"
-.TH fsync 2 2023-02-05 "Linux man-pages 6.03"
+.TH fsync 2 2023-03-30 "Linux man-pages 6.05.01"
.SH NAME
fsync, fdatasync \- synchronize a file's in-core state with storage device
.SH LIBRARY
@@ -142,9 +142,7 @@ space at the time of a
.BR write (2)
system call, and some previous write failed due to insufficient
storage space.
-.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, 4.3BSD.
-.PP
+.SH VERSIONS
On POSIX systems on which
.BR fdatasync ()
is available,
@@ -157,12 +155,16 @@ to a value greater than 0.
.\" POSIX.1-2001: It shall be defined to -1 or 0 or 200112L.
.\" -1: unavailable, 0: ask using sysconf().
.\" glibc defines them to 1.
-.SH NOTES
+.PP
On some UNIX systems (but not Linux),
.I fd
must be a
.I writable
file descriptor.
+.SH STANDARDS
+POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001, 4.3BSD.
.PP
In Linux 2.2 and earlier,
.BR fdatasync ()
diff --git a/man2/futex.2 b/man2/futex.2
index 949e22bf9..43b107543 100644
--- a/man2/futex.2
+++ b/man2/futex.2
@@ -19,7 +19,7 @@
.\" FIXME Do we need to add some text regarding Torvald Riegel's 2015-01-24 mail
.\" http://thread.gmane.org/gmane.linux.kernel/1703405/focus=1873242
.\"
-.TH futex 2 2023-02-05 "Linux man-pages 6.03"
+.TH futex 2 2023-05-03 "Linux man-pages 6.05.01"
.SH NAME
futex \- fast user-space locking
.SH LIBRARY
@@ -1738,9 +1738,10 @@ and the timeout expired before the operation completed.
.\"
.\""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
.\"
-.SH VERSIONS
-Futexes were first made available in a stable kernel release
-with Linux 2.6.0.
+.SH STANDARDS
+Linux.
+.SH HISTORY
+Linux 2.6.0.
.PP
Initial futex support was merged in Linux 2.5.7 but with different
semantics from what was described above.
@@ -1748,19 +1749,6 @@ A four-argument system call with the semantics
described in this page was introduced in Linux 2.5.40.
A fifth argument was added in Linux 2.5.70,
and a sixth argument was added in Linux 2.6.7.
-.SH STANDARDS
-This system call is Linux-specific.
-.SH NOTES
-Several higher-level programming abstractions are implemented via futexes,
-including POSIX semaphores and
-various POSIX threads synchronization mechanisms
-(mutexes, condition variables, read-write locks, and barriers).
-.\" TODO FIXME(Torvald) Above, we cite this section and claim it contains
-.\" details on the synchronization semantics; add the C11 equivalents
-.\" here (or whatever we find consensus for).
-.\"
-.\""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
-.\"
.SH EXAMPLES
The program below demonstrates use of futexes in a program where a parent
process and a child process use a pair of futexes located inside a
@@ -1793,10 +1781,10 @@ Child (18535) 4
.\" SRC BEGIN (futex.c)
.EX
/* futex_demo.c
-
+\&
Usage: futex_demo [nloops]
(Default: 5)
-
+\&
Demonstrate the use of futexes in a program where parent and child
use a pair of futexes located inside a shared anonymous mapping to
synchronize access to a shared resource: the terminal. The two
@@ -1817,9 +1805,9 @@ Child (18535) 4
#include <sys/time.h>
#include <sys/wait.h>
#include <unistd.h>
-
+\&
static uint32_t *futex1, *futex2, *iaddr;
-
+\&
static int
futex(uint32_t *uaddr, int futex_op, uint32_t val,
const struct timespec *timeout, uint32_t *uaddr2, uint32_t val3)
@@ -1827,111 +1815,111 @@ futex(uint32_t *uaddr, int futex_op, uint32_t val,
return syscall(SYS_futex, uaddr, futex_op, val,
timeout, uaddr2, val3);
}
-
+\&
/* Acquire the futex pointed to by \[aq]futexp\[aq]: wait for its value to
become 1, and then set the value to 0. */
-
+\&
static void
fwait(uint32_t *futexp)
{
long s;
const uint32_t one = 1;
-
+\&
/* atomic_compare_exchange_strong(ptr, oldval, newval)
atomically performs the equivalent of:
-
+\&
if (*ptr == *oldval)
*ptr = newval;
-
+\&
It returns true if the test yielded true and *ptr was updated. */
-
+\&
while (1) {
-
+\&
/* Is the futex available? */
if (atomic_compare_exchange_strong(futexp, &one, 0))
break; /* Yes */
-
+\&
/* Futex is not available; wait. */
-
+\&
s = futex(futexp, FUTEX_WAIT, 0, NULL, NULL, 0);
if (s == \-1 && errno != EAGAIN)
err(EXIT_FAILURE, "futex\-FUTEX_WAIT");
}
}
-
+\&
/* Release the futex pointed to by \[aq]futexp\[aq]: if the futex currently
has the value 0, set its value to 1 and then wake any futex waiters,
so that if the peer is blocked in fwait(), it can proceed. */
-
+\&
static void
fpost(uint32_t *futexp)
{
long s;
const uint32_t zero = 0;
-
+\&
/* atomic_compare_exchange_strong() was described
in comments above. */
-
+\&
if (atomic_compare_exchange_strong(futexp, &zero, 1)) {
s = futex(futexp, FUTEX_WAKE, 1, NULL, NULL, 0);
if (s == \-1)
err(EXIT_FAILURE, "futex\-FUTEX_WAKE");
}
}
-
+\&
int
main(int argc, char *argv[])
{
pid_t childPid;
unsigned int nloops;
-
+\&
setbuf(stdout, NULL);
-
+\&
nloops = (argc > 1) ? atoi(argv[1]) : 5;
-
+\&
/* Create a shared anonymous mapping that will hold the futexes.
Since the futexes are being shared between processes, we
subsequently use the "shared" futex operations (i.e., not the
ones suffixed "_PRIVATE"). */
-
+\&
iaddr = mmap(NULL, sizeof(*iaddr) * 2, PROT_READ | PROT_WRITE,
MAP_ANONYMOUS | MAP_SHARED, \-1, 0);
if (iaddr == MAP_FAILED)
err(EXIT_FAILURE, "mmap");
-
+\&
futex1 = &iaddr[0];
futex2 = &iaddr[1];
-
+\&
*futex1 = 0; /* State: unavailable */
*futex2 = 1; /* State: available */
-
+\&
/* Create a child process that inherits the shared anonymous
mapping. */
-
+\&
childPid = fork();
if (childPid == \-1)
err(EXIT_FAILURE, "fork");
-
+\&
if (childPid == 0) { /* Child */
for (unsigned int j = 0; j < nloops; j++) {
fwait(futex1);
printf("Child (%jd) %u\en", (intmax_t) getpid(), j);
fpost(futex2);
}
-
+\&
exit(EXIT_SUCCESS);
}
-
+\&
/* Parent falls through to here. */
-
+\&
for (unsigned int j = 0; j < nloops; j++) {
fwait(futex2);
printf("Parent (%jd) %u\en", (intmax_t) getpid(), j);
fpost(futex1);
}
-
+\&
wait(NULL);
-
+\&
exit(EXIT_SUCCESS);
}
.EE
@@ -1977,7 +1965,7 @@ Drepper, U., 2011. \fIFutexes Are Tricky\fP,
.UR http://www.akkadia.org/drepper/futex.pdf
.UE
.PP
-Futex example library, futex-*.tar.bz2 at
+Futex example library, futex\-*.tar.bz2 at
.br
.UR https://mirrors.kernel.org\:/pub\:/linux\:/kernel\:/people\:/rusty/
.UE
diff --git a/man2/futimesat.2 b/man2/futimesat.2
index 34b75255b..4a120cd9a 100644
--- a/man2/futimesat.2
+++ b/man2/futimesat.2
@@ -2,7 +2,7 @@
.\"
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
-.TH futimesat 2 2023-02-05 "Linux man-pages 6.03"
+.TH futimesat 2 2023-03-30 "Linux man-pages 6.05.01"
.SH NAME
futimesat \- change timestamps of a file relative to a \
directory file descriptor
@@ -100,25 +100,26 @@ is relative and
.I dirfd
is a file descriptor referring to a file other than a directory.
.SH VERSIONS
+.SS glibc
+If
+.I pathname
+is NULL, then the glibc
.BR futimesat ()
-was added in Linux 2.6.16;
-library support was added in glibc 2.4.
+wrapper function updates the times for the file referred to by
+.IR dirfd .
+.\" The Solaris futimesat() also has this strangeness.
.SH STANDARDS
-This system call is nonstandard.
+None.
+.SH HISTORY
+Linux 2.6.16,
+glibc 2.4.
+.PP
It was implemented from a specification that was proposed for POSIX.1,
but that specification was replaced by the one for
.BR utimensat (2).
.PP
A similar system call exists on Solaris.
.SH NOTES
-.SS glibc notes
-If
-.I pathname
-is NULL, then the glibc
-.BR futimesat ()
-wrapper function updates the times for the file referred to by
-.IR dirfd .
-.\" The Solaris futimesat() also has this strangeness.
.SH SEE ALSO
.BR stat (2),
.BR utimensat (2),
diff --git a/man2/get_kernel_syms.2 b/man2/get_kernel_syms.2
index b48b013ac..307d9ca04 100644
--- a/man2/get_kernel_syms.2
+++ b/man2/get_kernel_syms.2
@@ -5,7 +5,7 @@
.\" 2006-02-09, some reformatting by Luc Van Oostenryck; some
.\" reformatting and rewordings by mtk
.\"
-.TH get_kernel_syms 2 2022-12-04 "Linux man-pages 6.03"
+.TH get_kernel_syms 2 2023-03-30 "Linux man-pages 6.05.01"
.SH NAME
get_kernel_syms \- retrieve exported kernel and module symbols
.SH SYNOPSIS
@@ -55,14 +55,12 @@ There is only one possible error return:
.B ENOSYS
.BR get_kernel_syms ()
is not supported in this version of the kernel.
-.SH VERSIONS
-This system call is present only up until Linux 2.4;
-it was removed in Linux 2.6.
-.\" Removed in Linux 2.5.48
.SH STANDARDS
-.BR get_kernel_syms ()
-is Linux-specific.
-.SH NOTES
+Linux.
+.SH HISTORY
+Removed in Linux 2.6.
+.\" Removed in Linux 2.5.48
+.PP
This obsolete system call is not supported by glibc.
No declaration is provided in glibc headers, but, through a quirk of history,
glibc versions before glibc 2.23 did export an ABI for this system call.
diff --git a/man2/get_mempolicy.2 b/man2/get_mempolicy.2
index 9e9756ea3..45b8f2fcf 100644
--- a/man2/get_mempolicy.2
+++ b/man2/get_mempolicy.2
@@ -1,30 +1,13 @@
+.\" SPDX-License-Identifier: Linux-man-pages-copyleft-var
+.\"
.\" Copyright 2003,2004 Andi Kleen, SuSE Labs.
.\" and Copyright 2007 Lee Schermerhorn, Hewlett Packard
.\"
-.\" %%%LICENSE_START(VERBATIM_PROF)
-.\" Permission is granted to make and distribute verbatim copies of this
-.\" manual provided the copyright notice and this permission notice are
-.\" preserved on all copies.
-.\"
-.\" Permission is granted to copy and distribute modified versions of this
-.\" manual under the conditions for verbatim copying, provided that the
-.\" entire resulting derived work is distributed under the terms of a
-.\" permission notice identical to this one.
-.\"
-.\" Since the Linux kernel and libraries are constantly changing, this
-.\" manual page may be incorrect or out-of-date. The author(s) assume no
-.\" responsibility for errors or omissions, or for damages resulting from
-.\" the use of the information contained herein.
-.\"
-.\" Formatted or processed versions of this manual, if unaccompanied by
-.\" the source, must acknowledge the copyright and authors of this work.
-.\" %%%LICENSE_END
-.\"
.\" 2006-02-03, mtk, substantial wording changes and other improvements
.\" 2007-08-27, Lee Schermerhorn <Lee.Schermerhorn@hp.com>
.\" more precise specification of behavior.
.\"
-.TH get_mempolicy 2 2023-02-05 "Linux man-pages 6.03"
+.TH get_mempolicy 2 2023-07-16 "Linux man-pages 6.05.01"
.SH NAME
get_mempolicy \- retrieve NUMA memory policy for a thread
.SH LIBRARY
@@ -235,12 +218,10 @@ or
(And there are other
.B EINVAL
cases.)
-.SH VERSIONS
-The
-.BR get_mempolicy ()
-system call was added in Linux 2.6.7.
.SH STANDARDS
-This system call is Linux-specific.
+Linux.
+.SH HISTORY
+Linux 2.6.7.
.SH NOTES
For information on library support, see
.BR numa (7).
diff --git a/man2/get_robust_list.2 b/man2/get_robust_list.2
index 85c53b41e..7ca481736 100644
--- a/man2/get_robust_list.2
+++ b/man2/get_robust_list.2
@@ -7,7 +7,7 @@
.\" FIXME Something could be added to this page (or exit(2))
.\" about exit_robust_list processing
.\"
-.TH get_robust_list 2 2022-10-30 "Linux man-pages 6.03"
+.TH get_robust_list 2 2022-10-30 "Linux man-pages 6.05.01"
.SH NAME
get_robust_list, set_robust_list \- get/set list of robust futexes
.SH LIBRARY
diff --git a/man2/getcpu.2 b/man2/getcpu.2
index 9066a20c9..f90401f13 100644
--- a/man2/getcpu.2
+++ b/man2/getcpu.2
@@ -1,15 +1,10 @@
-.\" This man page is Copyright (C) 2006 Andi Kleen <ak@muc.de>.
+.\" SPDX-License-Identifier: Linux-man-pages-1-para
.\"
-.\" %%%LICENSE_START(VERBATIM_ONE_PARA)
-.\" Permission is granted to distribute possibly modified copies
-.\" of this page provided the header is included verbatim,
-.\" and in case of nontrivial modification author and date
-.\" of the modification is added to the header.
-.\" %%%LICENSE_END
+.\" This man page is Copyright (C) 2006 Andi Kleen <ak@muc.de>.
.\"
.\" 2008, mtk, various edits
.\"
-.TH getcpu 2 2022-12-04 "Linux man-pages 6.03"
+.TH getcpu 2 2023-07-15 "Linux man-pages 6.05.01"
.SH NAME
getcpu \- determine CPU and NUMA node on which the calling thread is running
.SH LIBRARY
@@ -64,24 +59,11 @@ is set to indicate the error.
.TP
.B EFAULT
Arguments point outside the calling process's address space.
-.SH VERSIONS
-.BR getcpu ()
-was added in Linux 2.6.19 for x86-64 and i386.
-Library support was added in glibc 2.29
-(Earlier glibc versions did not provide a wrapper for this system call,
-necessitating the use of
-.BR syscall (2).)
.SH STANDARDS
-.BR getcpu ()
-is Linux-specific.
-.SH NOTES
-Linux makes a best effort to make this call as fast as possible.
-(On some architectures, this is done via an implementation in the
-.BR vdso (7).)
-The intention of
-.BR getcpu ()
-is to allow programs to make optimizations with per-CPU data
-or for NUMA optimization.
+Linux.
+.SH HISTORY
+Linux 2.6.19 (x86-64 and i386),
+glibc 2.29.
.\"
.SS C library/kernel differences
The kernel system call has a third argument:
@@ -148,6 +130,14 @@ migrating threads between CPUs, and so the argument is now ignored.
.\" although in practice the scheduler's attempt to maintain
.\" soft CPU affinity means that the information is unlikely to change
.\" over the course of the caching interval.
+.SH NOTES
+Linux makes a best effort to make this call as fast as possible.
+(On some architectures, this is done via an implementation in the
+.BR vdso (7).)
+The intention of
+.BR getcpu ()
+is to allow programs to make optimizations with per-CPU data
+or for NUMA optimization.
.SH SEE ALSO
.BR mbind (2),
.BR sched_setaffinity (2),
diff --git a/man2/getdents.2 b/man2/getdents.2
index 5dfc5353c..604a6ef6d 100644
--- a/man2/getdents.2
+++ b/man2/getdents.2
@@ -8,7 +8,7 @@
.\" Derived from 'readdir.2'.
.\" Modified Tue Oct 22 08:11:14 EDT 1996 by Eric S. Raymond <esr@thyrsus.com>
.\"
-.TH getdents 2 2023-02-05 "Linux man-pages 6.03"
+.TH getdents 2 2023-05-03 "Linux man-pages 6.05.01"
.SH NAME
getdents, getdents64 \- get directory entries
.SH LIBRARY
@@ -198,19 +198,19 @@ No such directory.
.B ENOTDIR
File descriptor does not refer to a directory.
.SH STANDARDS
+None.
+.SH HISTORY
SVr4.
.\" SVr4 documents additional ENOLINK, EIO error conditions.
-.SH NOTES
-Library support for
+.TP
.BR getdents64 ()
-was added in glibc 2.30;
+glibc 2.30.
+.SH NOTES
glibc does not provide a wrapper for
.BR getdents ();
call
.BR getdents ()
-(or
-.BR getdents64 ()
-on earlier glibc versions) using
+using
.BR syscall (2).
In that case you will need to define the
.I linux_dirent
@@ -259,16 +259,16 @@ inode# file type d_reclen d_off d_name
#include <stdlib.h>
#include <sys/syscall.h>
#include <unistd.h>
-
+\&
struct linux_dirent {
unsigned long d_ino;
off_t d_off;
unsigned short d_reclen;
char d_name[];
};
-
+\&
#define BUF_SIZE 1024
-
+\&
int
main(int argc, char *argv[])
{
@@ -277,19 +277,19 @@ main(int argc, char *argv[])
char buf[BUF_SIZE];
long nread;
struct linux_dirent *d;
-
+\&
fd = open(argc > 1 ? argv[1] : ".", O_RDONLY | O_DIRECTORY);
if (fd == \-1)
err(EXIT_FAILURE, "open");
-
+\&
for (;;) {
nread = syscall(SYS_getdents, fd, buf, BUF_SIZE);
if (nread == \-1)
err(EXIT_FAILURE, "getdents");
-
+\&
if (nread == 0)
break;
-
+\&
printf("\-\-\-\-\-\-\-\-\-\-\-\-\-\-\- nread=%ld \-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\en", nread);
printf("inode# file type d_reclen d_off d_name\en");
for (size_t bpos = 0; bpos < nread;) {
@@ -308,7 +308,7 @@ main(int argc, char *argv[])
bpos += d\->d_reclen;
}
}
-
+\&
exit(EXIT_SUCCESS);
}
.EE
diff --git a/man2/getdomainname.2 b/man2/getdomainname.2
index 5e04738a9..b65cbfbd2 100644
--- a/man2/getdomainname.2
+++ b/man2/getdomainname.2
@@ -6,7 +6,7 @@
.\" Modified 2004-06-17 by Michael Kerrisk <mtk.manpages@gmail.com>
.\" Modified 2008-11-27 by mtk
.\"
-.TH getdomainname 2 2022-10-30 "Linux man-pages 6.03"
+.TH getdomainname 2 2023-03-30 "Linux man-pages 6.05.01"
.SH NAME
getdomainname, setdomainname \- get/set NIS domain name
.SH LIBRARY
@@ -98,14 +98,7 @@ is NULL or
is longer than
.I len
bytes.
-.SH STANDARDS
-POSIX does not specify these calls.
-.\" But they appear on most systems...
-.SH NOTES
-Since Linux 1.0, the limit on the length of a domain name,
-including the terminating null byte, is 64 bytes.
-In older kernels, it was 8 bytes.
-.PP
+.SH VERSIONS
On most Linux architectures (including x86),
there is no
.BR getdomainname ()
@@ -115,6 +108,13 @@ as a library function that returns a copy of the
.I domainname
field returned from a call to
.BR uname (2).
+.SH STANDARDS
+None.
+.\" But they appear on most systems...
+.SH HISTORY
+Since Linux 1.0, the limit on the length of a domain name,
+including the terminating null byte, is 64 bytes.
+In older kernels, it was 8 bytes.
.SH SEE ALSO
.BR gethostname (2),
.BR sethostname (2),
diff --git a/man2/getgid.2 b/man2/getgid.2
index efca9a7fc..a1f64e00a 100644
--- a/man2/getgid.2
+++ b/man2/getgid.2
@@ -2,7 +2,7 @@
.\"
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
-.TH getgid 2 2022-10-30 "Linux man-pages 6.03"
+.TH getgid 2 2023-03-30 "Linux man-pages 6.05.01"
.SH NAME
getgid, getegid \- get group identity
.SH LIBRARY
@@ -27,9 +27,27 @@ and never modify
.\" https://www.austingroupbugs.net/view.php?id=511
.\" 0000511: getuid and friends should not modify errno
.IR errno .
+.SH VERSIONS
+On Alpha, instead of a pair of
+.BR getgid ()
+and
+.BR getegid ()
+system calls, a single
+.BR getxgid ()
+system call is provided, which returns a pair of real and effective GIDs.
+The glibc
+.BR getgid ()
+and
+.BR getegid ()
+wrapper functions transparently deal with this.
+See
+.BR syscall (2)
+for details regarding register mapping.
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, 4.3BSD.
-.SH NOTES
+POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001, 4.3BSD.
+.PP
The original Linux
.BR getgid ()
and
@@ -45,22 +63,6 @@ The glibc
and
.BR getegid ()
wrapper functions transparently deal with the variations across kernel versions.
-.PP
-On Alpha, instead of a pair of
-.BR getgid ()
-and
-.BR getegid ()
-system calls, a single
-.BR getxgid ()
-system call is provided, which returns a pair of real and effective GIDs.
-The glibc
-.BR getgid ()
-and
-.BR getegid ()
-wrapper functions transparently deal with this.
-See
-.BR syscall (2)
-for details regarding register mapping.
.SH SEE ALSO
.BR getresgid (2),
.BR setgid (2),
diff --git a/man2/getgroups.2 b/man2/getgroups.2
index cd0d83699..eb282b9f5 100644
--- a/man2/getgroups.2
+++ b/man2/getgroups.2
@@ -9,7 +9,7 @@
.\" 2008-05-03, mtk, expanded and rewrote parts of DESCRIPTION and RETURN
.\" VALUE, made style of page more consistent with man-pages style.
.\"
-.TH getgroups 2 2023-02-05 "Linux man-pages 6.03"
+.TH getgroups 2 2023-03-30 "Linux man-pages 6.05.01"
.SH NAME
getgroups, setgroups \- get/set list of supplementary group IDs
.SH LIBRARY
@@ -138,15 +138,48 @@ See the description of
.IR /proc/ pid /setgroups
in
.BR user_namespaces (7).
+.SH VERSIONS
+.SS C library/kernel differences
+At the kernel level, user IDs and group IDs are a per-thread attribute.
+However, POSIX requires that all threads in a process
+share the same credentials.
+The NPTL threading implementation handles the POSIX requirements by
+providing wrapper functions for
+the various system calls that change process UIDs and GIDs.
+These wrapper functions (including the one for
+.BR setgroups ())
+employ a signal-based technique to ensure
+that when one thread changes credentials,
+all of the other threads in the process also change their credentials.
+For details, see
+.BR nptl (7).
.SH STANDARDS
-.BR getgroups ():
-SVr4, 4.3BSD, POSIX.1-2001, POSIX.1-2008.
-.PP
-.BR setgroups ():
+.TP
+.BR getgroups ()
+POSIX.1-2008.
+.TP
+.BR setgroups ()
+None.
+.SH HISTORY
+.TP
+.BR getgroups ()
+SVr4, 4.3BSD, POSIX.1-2001.
+.TP
+.BR setgroups ()
SVr4, 4.3BSD.
Since
.BR setgroups ()
requires privilege, it is not covered by POSIX.1.
+.PP
+The original Linux
+.BR getgroups ()
+system call supported only 16-bit group IDs.
+Subsequently, Linux 2.4 added
+.BR getgroups32 (),
+supporting 32-bit IDs.
+The glibc
+.BR getgroups ()
+wrapper function transparently deals with the variation across kernel versions.
.SH NOTES
A process can have up to
.B NGROUPS_MAX
@@ -176,31 +209,6 @@ cannot be larger than one more than this value.
Since Linux 2.6.4, the maximum number of supplementary group IDs is also
exposed via the Linux-specific read-only file,
.IR /proc/sys/kernel/ngroups_max .
-.PP
-The original Linux
-.BR getgroups ()
-system call supported only 16-bit group IDs.
-Subsequently, Linux 2.4 added
-.BR getgroups32 (),
-supporting 32-bit IDs.
-The glibc
-.BR getgroups ()
-wrapper function transparently deals with the variation across kernel versions.
-.\"
-.SS C library/kernel differences
-At the kernel level, user IDs and group IDs are a per-thread attribute.
-However, POSIX requires that all threads in a process
-share the same credentials.
-The NPTL threading implementation handles the POSIX requirements by
-providing wrapper functions for
-the various system calls that change process UIDs and GIDs.
-These wrapper functions (including the one for
-.BR setgroups ())
-employ a signal-based technique to ensure
-that when one thread changes credentials,
-all of the other threads in the process also change their credentials.
-For details, see
-.BR nptl (7).
.SH SEE ALSO
.BR getgid (2),
.BR setgid (2),
diff --git a/man2/gethostname.2 b/man2/gethostname.2
index 2ce03436d..26b8df3fd 100644
--- a/man2/gethostname.2
+++ b/man2/gethostname.2
@@ -9,7 +9,7 @@
.\" Modified 2004-06-17 by mtk
.\" Modified 2008-11-27 by mtk
.\"
-.TH gethostname 2 2023-02-05 "Linux man-pages 6.03"
+.TH gethostname 2 2023-03-30 "Linux man-pages 6.05.01"
.SH NAME
gethostname, sethostname \- get/set hostname
.SH LIBRARY
@@ -109,13 +109,7 @@ the caller did not have the
.B CAP_SYS_ADMIN
capability in the user namespace associated with its UTS namespace (see
.BR namespaces (7)).
-.SH STANDARDS
-SVr4, 4.4BSD (these interfaces first appeared in 4.2BSD).
-POSIX.1-2001 and POSIX.1-2008 specify
-.BR gethostname ()
-but not
-.BR sethostname ().
-.SH NOTES
+.SH VERSIONS
SUSv2 guarantees that "Host names are limited to 255 bytes".
POSIX.1 guarantees that "Host names (not including
the terminating null byte) are limited to
@@ -148,6 +142,19 @@ set to
.BR ENAMETOOLONG ;
in this case, a terminating null byte is not included in the returned
.IR name .
+.SH STANDARDS
+.TP
+.BR gethostname ()
+POSIX.1-2008.
+.TP
+.BR sethostname ()
+None.
+.SH HISTORY
+SVr4, 4.4BSD (these interfaces first appeared in 4.2BSD).
+POSIX.1-2001 and POSIX.1-2008 specify
+.BR gethostname ()
+but not
+.BR sethostname ().
.PP
Versions of glibc before glibc 2.2
.\" At least glibc 2.0 and glibc 2.1, older versions not checked
diff --git a/man2/getitimer.2 b/man2/getitimer.2
index c207254f3..422a04e38 100644
--- a/man2/getitimer.2
+++ b/man2/getitimer.2
@@ -10,7 +10,7 @@
.\" 2005-04-06 mtk, Matthias Lang <matthias@corelatus.se>
.\" Noted MAX_SEC_IN_JIFFIES ceiling
.\"
-.TH getitimer 2 2023-02-12 "Linux man-pages 6.03"
+.TH getitimer 2 2023-05-03 "Linux man-pages 6.05.01"
.SH NAME
getitimer, setitimer \- get or set value of an interval timer
.SH LIBRARY
@@ -74,7 +74,7 @@ struct itimerval {
struct timeval it_interval; /* Interval for periodic timer */
struct timeval it_value; /* Time until next expiration */
};
-
+\&
struct timeval {
time_t tv_sec; /* seconds */
suseconds_t tv_usec; /* microseconds */
@@ -159,7 +159,32 @@ or (since Linux 2.6.22) one of the
fields in the structure pointed to by
.I new_value
contains a value outside the range [0, 999999].
+.SH VERSIONS
+The standards are silent on the meaning of the call:
+.PP
+.in +4n
+.EX
+setitimer(which, NULL, &old_value);
+.EE
+.in
+.PP
+Many systems (Solaris, the BSDs, and perhaps others)
+treat this as equivalent to:
+.PP
+.in +4n
+.EX
+getitimer(which, &old_value);
+.EE
+.in
+.PP
+In Linux, this is treated as being equivalent to a call in which the
+.I new_value
+fields are zero; that is, the timer is disabled.
+.IR "Don't use this Linux misfeature" :
+it is nonportable and unnecessary.
.SH STANDARDS
+POSIX.1-2008.
+.SH HISTORY
POSIX.1-2001, SVr4, 4.4BSD (this call first appeared in 4.2BSD).
POSIX.1-2008 marks
.BR getitimer ()
@@ -194,29 +219,6 @@ and the three interfaces
and
.BR usleep (3)
unspecified.
-.PP
-The standards are silent on the meaning of the call:
-.PP
-.in +4n
-.EX
-setitimer(which, NULL, &old_value);
-.EE
-.in
-.PP
-Many systems (Solaris, the BSDs, and perhaps others)
-treat this as equivalent to:
-.PP
-.in +4n
-.EX
-getitimer(which, &old_value);
-.EE
-.in
-.PP
-In Linux, this is treated as being equivalent to a call in which the
-.I new_value
-fields are zero; that is, the timer is disabled.
-.IR "Don't use this Linux misfeature" :
-it is nonportable and unnecessary.
.SH BUGS
The generation and delivery of a signal are distinct, and
only one instance of each of the signals listed above may be pending
diff --git a/man2/getpagesize.2 b/man2/getpagesize.2
index cc1bfed23..6f3b54b99 100644
--- a/man2/getpagesize.2
+++ b/man2/getpagesize.2
@@ -2,7 +2,7 @@
.\"
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
-.TH getpagesize 2 2023-02-05 "Linux man-pages 6.03"
+.TH getpagesize 2 2023-03-30 "Linux man-pages 6.05.01"
.SH NAME
getpagesize \- get memory page size
.SH LIBRARY
@@ -37,9 +37,10 @@ returns the number of bytes in a memory page,
where "page" is a fixed-length block,
the unit for memory allocation and file mapping performed by
.BR mmap (2).
-.\" .SH HISTORY
-.\" This call first appeared in 4.2BSD.
.SH STANDARDS
+None.
+.SH HISTORY
+This call first appeared in 4.2BSD.
SVr4, 4.4BSD, SUSv2.
In SUSv2 the
.BR getpagesize ()
diff --git a/man2/getpeername.2 b/man2/getpeername.2
index 54a00fe4d..d150617d3 100644
--- a/man2/getpeername.2
+++ b/man2/getpeername.2
@@ -11,7 +11,7 @@
.\" Modified 17 Jul 2002, Michael Kerrisk <mtk.manpages@gmail.com>
.\" Added 'socket' to NAME, so that "man -k socket" will show this page.
.\"
-.TH getpeername 2 2022-10-30 "Linux man-pages 6.03"
+.TH getpeername 2 2023-04-03 "Linux man-pages 6.05.01"
.SH NAME
getpeername \- get name of connected peer socket
.SH LIBRARY
@@ -76,15 +76,11 @@ The file descriptor
.I sockfd
does not refer to a socket.
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, SVr4, 4.4BSD
-.RB ( getpeername ()
-first appeared in 4.2BSD).
+POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001, SVr4, 4.4BSD
+(first appeared in 4.2BSD).
.SH NOTES
-For background on the
-.I socklen_t
-type, see
-.BR accept (2).
-.PP
For stream sockets, once a
.BR connect (2)
has been performed, either socket can call
diff --git a/man2/getpid.2 b/man2/getpid.2
index 7ce6ddf37..3b7882336 100644
--- a/man2/getpid.2
+++ b/man2/getpid.2
@@ -2,7 +2,7 @@
.\"
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
-.TH getpid 2 2023-01-22 "Linux man-pages 6.03"
+.TH getpid 2 2023-03-30 "Linux man-pages 6.05.01"
.SH NAME
getpid, getppid \- get process identification
.SH LIBRARY
@@ -34,26 +34,26 @@ or a "subreaper" process defined via the
operation).
.SH ERRORS
These functions are always successful.
-.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, 4.3BSD, SVr4.
-.SH NOTES
-If the caller's parent is in a different PID namespace (see
-.BR pid_namespaces (7)),
+.SH VERSIONS
+On Alpha, instead of a pair of
+.BR getpid ()
+and
.BR getppid ()
-returns 0.
-.PP
-From a kernel perspective,
-the PID (which is shared by all of the threads in a multithreaded process)
-is sometimes also known as the thread group ID (TGID).
-This contrasts with the kernel thread ID (TID),
-which is unique for each thread.
-For further details, see
-.BR gettid (2)
-and the discussion of the
-.B CLONE_THREAD
-flag in
-.BR clone (2).
-.\"
+system calls, a single
+.BR getxpid ()
+system call is provided, which returns a pair of PID and parent PID.
+The glibc
+.BR getpid ()
+and
+.BR getppid ()
+wrapper functions transparently deal with this.
+See
+.BR syscall (2)
+for details regarding register mapping.
+.SH STANDARDS
+POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001, 4.3BSD, SVr4.
.SS C library/kernel differences
From glibc 2.3.4 up to and including glibc 2.24,
the glibc wrapper function for
@@ -119,22 +119,23 @@ calls to
always invoke the actual system call, rather than returning a cached value.
.\" FIXME .
.\" Review progress of https://bugzilla.redhat.com/show_bug.cgi?id=1469757
-.PP
-On Alpha, instead of a pair of
-.BR getpid ()
-and
-.BR getppid ()
-system calls, a single
-.BR getxpid ()
-system call is provided, which returns a pair of PID and parent PID.
-The glibc
-.BR getpid ()
-and
+.SH NOTES
+If the caller's parent is in a different PID namespace (see
+.BR pid_namespaces (7)),
.BR getppid ()
-wrapper functions transparently deal with this.
-See
-.BR syscall (2)
-for details regarding register mapping.
+returns 0.
+.PP
+From a kernel perspective,
+the PID (which is shared by all of the threads in a multithreaded process)
+is sometimes also known as the thread group ID (TGID).
+This contrasts with the kernel thread ID (TID),
+which is unique for each thread.
+For further details, see
+.BR gettid (2)
+and the discussion of the
+.B CLONE_THREAD
+flag in
+.BR clone (2).
.SH SEE ALSO
.BR clone (2),
.BR fork (2),
diff --git a/man2/getpriority.2 b/man2/getpriority.2
index 625514332..723d3d49d 100644
--- a/man2/getpriority.2
+++ b/man2/getpriority.2
@@ -14,7 +14,7 @@
.\" Clarified meaning of 0 value for 'who' argument
.\" Modified 2004-05-27 by Michael Kerrisk <mtk.manpages@gmail.com>
.\"
-.TH getpriority 2 2022-12-04 "Linux man-pages 6.03"
+.TH getpriority 2 2023-03-30 "Linux man-pages 6.05.01"
.SH NAME
getpriority, setpriority \- get/set program scheduling priority
.SH LIBRARY
@@ -147,7 +147,9 @@ and
.I who
values specified.
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008,
+POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001,
SVr4, 4.4BSD (these interfaces first appeared in 4.2BSD).
.SH NOTES
For further details on the nice value, see
diff --git a/man2/getrandom.2 b/man2/getrandom.2
index 1ee4e38e5..565763b3e 100644
--- a/man2/getrandom.2
+++ b/man2/getrandom.2
@@ -4,7 +4,7 @@
.\"
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
-.TH getrandom 2 2023-02-08 "Linux man-pages 6.03"
+.TH getrandom 2 2023-03-30 "Linux man-pages 6.05.01"
.SH NAME
getrandom \- obtain a series of random bytes
.SH LIBRARY
@@ -155,12 +155,11 @@ An invalid flag was specified in
The glibc wrapper function for
.BR getrandom ()
determined that the underlying kernel does not implement this system call.
-.SH VERSIONS
-.BR getrandom ()
-was introduced in Linux 3.17.
-Support was added in glibc 2.25.
.SH STANDARDS
-This system call is Linux-specific.
+Linux.
+.SH HISTORY
+Linux 3.17,
+glibc 2.25.
.SH NOTES
For an overview and comparison of the various interfaces that
can be used to obtain randomness, see
diff --git a/man2/getresuid.2 b/man2/getresuid.2
index 832d32e50..d5cadd73c 100644
--- a/man2/getresuid.2
+++ b/man2/getresuid.2
@@ -5,7 +5,7 @@
.\"
.\" Modified, 2003-05-26, Michael Kerrisk, <mtk.manpages@gmail.com>
.\"
-.TH getresuid 2 2022-12-04 "Linux man-pages 6.03"
+.TH getresuid 2 2023-03-30 "Linux man-pages 6.05.01"
.SH NAME
getresuid, getresgid \- get real, effective, and saved user/group IDs
.SH LIBRARY
@@ -40,17 +40,13 @@ is set to indicate the error.
.B EFAULT
One of the arguments specified an address outside the calling program's
address space.
-.SH VERSIONS
-These system calls were added on Linux 2.1.44.
-.PP
-The prototypes are given since glibc 2.3.2,
-provided
-.B _GNU_SOURCE
-is defined.
.SH STANDARDS
-These calls are nonstandard;
-they also appear on HP-UX and some of the BSDs.
-.SH NOTES
+None.
+These calls also appear on HP-UX and some of the BSDs.
+.SH HISTORY
+Linux 2.1.44,
+glibc 2.3.2.
+.PP
The original Linux
.BR getresuid ()
and
diff --git a/man2/getrlimit.2 b/man2/getrlimit.2
index cb69a04fc..afc2c229c 100644
--- a/man2/getrlimit.2
+++ b/man2/getrlimit.2
@@ -42,7 +42,7 @@
.\" 2008-05-07, mtk / Peter Zijlstra, Added description of RLIMIT_RTTIME
.\" 2010-11-06, mtk: Added documentation of prlimit()
.\"
-.TH getrlimit 2 2023-02-05 "Linux man-pages 6.03"
+.TH getrlimit 2 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
getrlimit, setrlimit, prlimit \- get/set resource limits
.SH LIBRARY
@@ -540,37 +540,32 @@ for the process specified by
.B ESRCH
Could not find a process with the ID specified in
.IR pid .
-.SH VERSIONS
-The
-.BR prlimit ()
-system call is available since Linux 2.6.36.
-Library support is available since glibc 2.13.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR getrlimit (),
.BR setrlimit (),
.BR prlimit ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-.BR getrlimit (),
-.BR setrlimit ():
-POSIX.1-2001, POSIX.1-2008, SVr4, 4.3BSD.
-.PP
-.BR prlimit ():
-Linux-specific.
+.TP
+.BR getrlimit ()
+.TQ
+.BR setrlimit ()
+POSIX.1-2008.
+.TP
+.BR prlimit ()
+Linux.
.PP
.B RLIMIT_MEMLOCK
and
@@ -580,13 +575,23 @@ they are present on the BSDs and Linux, but on few other implementations.
.B RLIMIT_RSS
derives from BSD and is not specified in POSIX.1;
it is nevertheless present on most implementations.
-.BR RLIMIT_MSGQUEUE ,
+.BR \%RLIMIT_MSGQUEUE ,
.BR RLIMIT_NICE ,
.BR RLIMIT_RTPRIO ,
.BR RLIMIT_RTTIME ,
and
-.B RLIMIT_SIGPENDING
+.B \%RLIMIT_SIGPENDING
are Linux-specific.
+.SH HISTORY
+.TP
+.BR getrlimit ()
+.TQ
+.BR setrlimit ()
+POSIX.1-2001, SVr4, 4.3BSD.
+.TP
+.BR prlimit ()
+Linux 2.6.36,
+glibc 2.13.
.SH NOTES
A child process created via
.BR fork (2)
@@ -738,9 +743,9 @@ the kernel represents resource limits on 32-bit platforms as
.IR "unsigned long" .
However, a 32-bit data type is not wide enough.
.\" https://bugzilla.kernel.org/show_bug.cgi?id=5042
-.\" http://sources.redhat.com/bugzilla/show_bug.cgi?id=12201
+.\" https://www.sourceware.org/bugzilla/show_bug.cgi?id=12201
The most pertinent limit here is
-.BR RLIMIT_FSIZE ,
+.BR \%RLIMIT_FSIZE ,
which specifies the maximum size to which a file can grow:
to be useful, this limit must be represented using a type
that is as wide as the type used to
@@ -762,13 +767,13 @@ In other words, the requested resource limit setting was silently ignored.
Since glibc 2.13,
.\" https://www.sourceware.org/bugzilla/show_bug.cgi?id=12201
glibc works around the limitations of the
-.BR getrlimit ()
+.BR \%getrlimit ()
and
.BR setrlimit ()
system calls by implementing
.BR setrlimit ()
and
-.BR getrlimit ()
+.BR \%getrlimit ()
as wrapper functions that call
.BR prlimit ().
.SH EXAMPLES
@@ -785,44 +790,44 @@ The program below demonstrates the use of
#include <stdlib.h>
#include <sys/resource.h>
#include <time.h>
-
+\&
int
main(int argc, char *argv[])
{
pid_t pid;
struct rlimit old, new;
struct rlimit *newp;
-
+\&
if (!(argc == 2 || argc == 4)) {
fprintf(stderr, "Usage: %s <pid> [<new\-soft\-limit> "
"<new\-hard\-limit>]\en", argv[0]);
exit(EXIT_FAILURE);
}
-
+\&
pid = atoi(argv[1]); /* PID of target process */
-
+\&
newp = NULL;
if (argc == 4) {
new.rlim_cur = atoi(argv[2]);
new.rlim_max = atoi(argv[3]);
newp = &new;
}
-
+\&
/* Set CPU time limit of target process; retrieve and display
previous limit */
-
+\&
if (prlimit(pid, RLIMIT_CPU, newp, &old) == \-1)
err(EXIT_FAILURE, "prlimit\-1");
printf("Previous limits: soft=%jd; hard=%jd\en",
(intmax_t) old.rlim_cur, (intmax_t) old.rlim_max);
-
+\&
/* Retrieve and display new CPU time limit */
-
+\&
if (prlimit(pid, RLIMIT_CPU, NULL, &old) == \-1)
err(EXIT_FAILURE, "prlimit\-2");
printf("New limits: soft=%jd; hard=%jd\en",
(intmax_t) old.rlim_cur, (intmax_t) old.rlim_max);
-
+\&
exit(EXIT_SUCCESS);
}
.EE
diff --git a/man2/getrusage.2 b/man2/getrusage.2
index d1d927738..89662954f 100644
--- a/man2/getrusage.2
+++ b/man2/getrusage.2
@@ -17,7 +17,7 @@
.\" document ru_maxrss
.\" 2010-05-24, mtk, enhanced description of various fields
.\"
-.TH getrusage 2 2022-12-15 "Linux man-pages 6.03"
+.TH getrusage 2 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
getrusage \- get resource usage
.SH LIBRARY
@@ -184,22 +184,21 @@ is invalid.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR getrusage ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, SVr4, 4.3BSD.
+POSIX.1-2008.
+.PP
POSIX.1 specifies
.BR getrusage (),
but specifies only the fields
@@ -209,9 +208,8 @@ and
.PP
.B RUSAGE_THREAD
is Linux-specific.
-.SH NOTES
-Resource usage metrics are preserved across an
-.BR execve (2).
+.SH HISTORY
+POSIX.1-2001, SVr4, 4.3BSD.
.PP
Before Linux 2.6.9, if the disposition of
.B SIGCHLD
@@ -239,6 +237,9 @@ All new applications should be written using
(Since Linux 2.33, glibc no longer provides an
.BR vtimes ()
implementation.)
+.SH NOTES
+Resource usage metrics are preserved across an
+.BR execve (2).
.PP
See also the description of
.IR /proc/ pid /stat
diff --git a/man2/getsid.2 b/man2/getsid.2
index aad2cb45c..842c98027 100644
--- a/man2/getsid.2
+++ b/man2/getsid.2
@@ -5,7 +5,7 @@
.\"
.\" Modified Thu Oct 31 14:18:40 1996 by Eric S. Raymond <esr@y\thyrsus.com>
.\" Modified 2001-12-17, aeb
-.TH getsid 2 2022-12-04 "Linux man-pages 6.03"
+.TH getsid 2 2023-03-30 "Linux man-pages 6.05.01"
.SH NAME
getsid \- get session ID
.SH LIBRARY
@@ -56,15 +56,16 @@ No process with process ID
.I pid
was found.
.SH VERSIONS
-This system call is available since Linux 2.0.
+Linux does not return
+.BR EPERM .
+.SH STANDARDS
+POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001, SVr4.
+Linux 2.0.
.\" Linux has this system call since Linux 1.3.44.
.\" There is libc support since libc 5.2.19.
-.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, SVr4.
.SH NOTES
-Linux does not return
-.BR EPERM .
-.PP
See
.BR credentials (7)
for a description of sessions and session IDs.
diff --git a/man2/getsockname.2 b/man2/getsockname.2
index 338004172..e2cc11ef4 100644
--- a/man2/getsockname.2
+++ b/man2/getsockname.2
@@ -9,7 +9,7 @@
.\" Modified Tue Oct 22 00:22:35 EDT 1996 by Eric S. Raymond <esr@thyrsus.com>
.\" Modified Sun Mar 28 21:26:46 1999 by Andries Brouwer <aeb@cwi.nl>
.\"
-.TH getsockname 2 2022-10-30 "Linux man-pages 6.03"
+.TH getsockname 2 2023-04-03 "Linux man-pages 6.05.01"
.SH NAME
getsockname \- get socket name
.SH LIBRARY
@@ -70,16 +70,12 @@ The file descriptor
.I sockfd
does not refer to a socket.
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, SVr4, 4.4BSD
-.RB ( getsockname ()
-first appeared in 4.2BSD).
+POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001, SVr4, 4.4BSD
+(first appeared in 4.2BSD).
.\" SVr4 documents additional ENOMEM
.\" and ENOSR error codes.
-.SH NOTES
-For background on the
-.I socklen_t
-type, see
-.BR accept (2).
.SH SEE ALSO
.BR bind (2),
.BR socket (2),
diff --git a/man2/getsockopt.2 b/man2/getsockopt.2
index ec4ebbf7a..f80900a40 100644
--- a/man2/getsockopt.2
+++ b/man2/getsockopt.2
@@ -13,7 +13,7 @@
.\" Modified 1999 by Andi Kleen <ak@muc.de>.
.\" Removed most stuff because it is in socket.7 now.
.\"
-.TH getsockopt 2 2022-11-10 "Linux man-pages 6.03"
+.TH getsockopt 2 2023-04-03 "Linux man-pages 6.05.01"
.SH NAME
getsockopt, setsockopt \- get and set options on sockets
.SH LIBRARY
@@ -148,17 +148,14 @@ The file descriptor
.I sockfd
does not refer to a socket.
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008,
-SVr4, 4.4BSD (these system calls first appeared in 4.2BSD).
+POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001,
+SVr4, 4.4BSD (first appeared in 4.2BSD).
.\" SVr4 documents additional ENOMEM and ENOSR error codes, but does
.\" not document the
.\" .BR SO_SNDLOWAT ", " SO_RCVLOWAT ", " SO_SNDTIMEO ", " SO_RCVTIMEO
.\" options
-.SH NOTES
-For background on the
-.I socklen_t
-type, see
-.BR accept (2).
.SH BUGS
Several of the socket options should be handled at lower levels of the
system.
diff --git a/man2/gettid.2 b/man2/gettid.2
index 68168fd36..d4ca4d0c4 100644
--- a/man2/gettid.2
+++ b/man2/gettid.2
@@ -3,7 +3,7 @@
.\"
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
-.TH gettid 2 2022-12-04 "Linux man-pages 6.03"
+.TH gettid 2 2023-03-30 "Linux man-pages 6.05.01"
.SH NAME
gettid \- get thread identification
.SH LIBRARY
@@ -32,18 +32,11 @@ in
On success, returns the thread ID of the calling thread.
.SH ERRORS
This call is always successful.
-.SH VERSIONS
-The
-.BR gettid ()
-system call first appeared in Linux 2.4.11.
-Library support was added in glibc 2.30.
-(Earlier glibc versions did not provide a wrapper for this system call,
-necessitating the use of
-.BR syscall (2).)
.SH STANDARDS
-.BR gettid ()
-is Linux-specific and should not be used in programs that
-are intended to be portable.
+Linux.
+.SH HISTORY
+Linux 2.4.11,
+glibc 2.30.
.SH NOTES
The thread ID returned by this call is not the same thing as a
POSIX thread ID (i.e., the opaque value returned by
diff --git a/man2/gettimeofday.2 b/man2/gettimeofday.2
index f131aba44..8381cc055 100644
--- a/man2/gettimeofday.2
+++ b/man2/gettimeofday.2
@@ -17,7 +17,7 @@
.\" Modified, 2004-05-27 by Michael Kerrisk <mtk.manpages@gmail.com>
.\" Added notes on capability requirement.
.\"
-.TH gettimeofday 2 2023-02-12 "Linux man-pages 6.03"
+.TH gettimeofday 2 2023-07-28 "Linux man-pages 6.05.01"
.SH NAME
gettimeofday, settimeofday \- get / set time
.SH LIBRARY
@@ -169,7 +169,31 @@ The calling process has insufficient privilege to call
under Linux the
.B CAP_SYS_TIME
capability is required.
+.SH VERSIONS
+.SS C library/kernel differences
+On some architectures, an implementation of
+.BR gettimeofday ()
+is provided in the
+.BR vdso (7).
+.PP
+The kernel accepts NULL for both
+.I tv
+and
+.IR tz.
+The timezone argument is ignored by glibc and musl,
+and not passed to/from the kernel.
+Android's bionic passes the timezone argument to/from the kernel,
+but Android does not update the kernel timezone
+based on the device timezone in Settings,
+so the kernel's timezone is typically UTC.
.SH STANDARDS
+.TP
+.BR gettimeofday ()
+POSIX.1-2008 (obsolete).
+.TP
+.BR settimeofday ()
+None.
+.SH HISTORY
SVr4, 4.3BSD.
POSIX.1-2001 describes
.BR gettimeofday ()
@@ -180,31 +204,12 @@ POSIX.1-2008 marks
as obsolete, recommending the use of
.BR clock_gettime (2)
instead.
-.SH NOTES
-The time returned by
-.BR gettimeofday ()
-.I is
-affected by discontinuous jumps in the system time
-(e.g., if the system administrator manually changes the system time).
-If you need a monotonically increasing clock, see
-.BR clock_gettime (2).
-.PP
-Macros for operating on
-.I timeval
-structures are described in
-.BR timeradd (3).
.PP
Traditionally, the fields of
.I struct timeval
were of type
.IR long .
.\"
-.SS C library/kernel differences
-On some architectures, an implementation of
-.BR gettimeofday ()
-is provided in the
-.BR vdso (7).
-.\"
.SS The tz_dsttime field
On a non-Linux kernel, with glibc, the
.I tz_dsttime
@@ -264,6 +269,19 @@ this period is determined by unpredictable political
decisions.
So this method of representing timezones
has been abandoned.
+.SH NOTES
+The time returned by
+.BR gettimeofday ()
+.I is
+affected by discontinuous jumps in the system time
+(e.g., if the system administrator manually changes the system time).
+If you need a monotonically increasing clock, see
+.BR clock_gettime (2).
+.PP
+Macros for operating on
+.I timeval
+structures are described in
+.BR timeradd (3).
.SH SEE ALSO
.BR date (1),
.BR adjtimex (2),
diff --git a/man2/getuid.2 b/man2/getuid.2
index 829ddcb3e..1b94158a4 100644
--- a/man2/getuid.2
+++ b/man2/getuid.2
@@ -3,7 +3,7 @@
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
.\" Historical remark, aeb, 2004-06-05
-.TH getuid 2 2022-10-30 "Linux man-pages 6.03"
+.TH getuid 2 2023-03-30 "Linux man-pages 6.05.01"
.SH NAME
getuid, geteuid \- get user identity
.SH LIBRARY
@@ -29,9 +29,10 @@ and never modify
.\" 0000511: getuid and friends should not modify errno
.IR errno .
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, 4.3BSD.
-.SH NOTES
-.SS History
+POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001, 4.3BSD.
+.PP
In UNIX\ V6 the
.BR getuid ()
call returned
diff --git a/man2/getunwind.2 b/man2/getunwind.2
index 47afbaa5c..eaf7117ef 100644
--- a/man2/getunwind.2
+++ b/man2/getunwind.2
@@ -4,7 +4,7 @@
.\"
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
-.TH getunwind 2 2022-11-10 "Linux man-pages 6.03"
+.TH getunwind 2 2023-03-30 "Linux man-pages 6.05.01"
.SH NAME
getunwind \- copy the unwind data to caller's buffer
.SH LIBRARY
@@ -75,12 +75,11 @@ fails with the error
.B EFAULT
if the unwind info can't be stored in the space specified by
.IR buf .
-.SH VERSIONS
-This system call is available since Linux 2.4.
.SH STANDARDS
-This system call is Linux-specific,
-and is available only on the IA-64 architecture.
-.SH NOTES
+Linux on IA-64.
+.SH HISTORY
+Linux 2.4.
+.PP
This system call has been deprecated.
The modern way to obtain the kernel's unwind data is via the
.BR vdso (7).
diff --git a/man2/getxattr.2 b/man2/getxattr.2
index a9cd3ce06..21df6cae0 100644
--- a/man2/getxattr.2
+++ b/man2/getxattr.2
@@ -3,7 +3,7 @@
.\"
.\" SPDX-License-Identifier: GPL-2.0-or-later
.\"
-.TH getxattr 2 2022-12-04 "Linux man-pages 6.03"
+.TH getxattr 2 2023-07-28 "Linux man-pages 6.05.01"
.SH NAME
getxattr, lgetxattr, fgetxattr \- retrieve an extended attribute value
.SH LIBRARY
@@ -22,8 +22,7 @@ Standard C library
.fi
.SH DESCRIPTION
Extended attributes are
-.IR name :\c
-.I value
+.IR name : value
pairs associated with inodes (files, directories, symbolic links, etc.).
They are extensions to the normal attributes which are associated
with all inodes in the system (i.e., the
@@ -118,11 +117,11 @@ buffer is too small to hold the result.
In addition, the errors documented in
.BR stat (2)
can also occur.
-.SH VERSIONS
-These system calls have been available since Linux 2.4;
-glibc support is provided since glibc 2.3.
.SH STANDARDS
-These system calls are Linux-specific.
+Linux.
+.SH HISTORY
+Linux 2.4,
+glibc 2.3.
.\" .SH AUTHORS
.\" Andreas Gruenbacher,
.\" .RI < a.gruenbacher@computer.org >
diff --git a/man2/idle.2 b/man2/idle.2
index f4cdbc661..197f36667 100644
--- a/man2/idle.2
+++ b/man2/idle.2
@@ -9,14 +9,14 @@
.\" N.B. calling "idle" from user process used to hang process!
.\" Modified Thu Oct 31 14:41:15 1996 by Eric S. Raymond <esr@thyrsus.com>
.\" "
-.TH idle 2 2022-12-04 "Linux man-pages 6.03"
+.TH idle 2 2023-03-30 "Linux man-pages 6.05.01"
.SH NAME
idle \- make process 0 idle
.SH SYNOPSIS
.nf
.B #include <unistd.h>
.PP
-.B int idle(void);
+.B [[deprecated]] int idle(void);
.fi
.SH DESCRIPTION
.BR idle ()
@@ -38,8 +38,7 @@ never returns for process 0, and always returns \-1 for a user process.
.TP
.B EPERM
Always, for a user process.
-.SH VERSIONS
-Since Linux 2.3.13, this system call does not exist anymore.
.SH STANDARDS
-This function is Linux-specific, and should not be used in programs
-intended to be portable.
+Linux.
+.SH HISTORY
+Removed in Linux 2.3.13.
diff --git a/man2/init_module.2 b/man2/init_module.2
index 7a03afb7f..a5fed4dde 100644
--- a/man2/init_module.2
+++ b/man2/init_module.2
@@ -4,7 +4,7 @@
.\"
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
-.TH init_module 2 2022-12-04 "Linux man-pages 6.03"
+.TH init_module 2 2023-03-30 "Linux man-pages 6.05.01"
.SH NAME
init_module, finit_module \- load a kernel module
.SH LIBRARY
@@ -244,15 +244,13 @@ fails and
is set to the value returned by the
.I init
function.
-.SH VERSIONS
-.BR finit_module ()
-is available since Linux 3.8.
.SH STANDARDS
-.BR init_module ()
-and
+Linux.
+.SH HISTORY
+.TP
.BR finit_module ()
-are Linux-specific.
-.SH NOTES
+Linux 3.8.
+.PP
The
.BR init_module ()
system call is not supported by glibc.
@@ -263,15 +261,6 @@ it is (before glibc 2.23) sufficient to
manually declare the interface in your code;
alternatively, you can invoke the system call using
.BR syscall (2).
-.PP
-Information about currently loaded modules can be found in
-.I /proc/modules
-and in the file trees under the per-module subdirectories under
-.IR /sys/module .
-.PP
-See the Linux kernel source file
-.I include/linux/module.h
-for some useful background information.
.SS Linux 2.4 and earlier
In Linux 2.4 and earlier, the
.BR init_module ()
@@ -336,6 +325,15 @@ and
are expected to point within the module body and be
initialized as appropriate for kernel space, that is, relocated with
the rest of the module.
+.SH NOTES
+Information about currently loaded modules can be found in
+.I /proc/modules
+and in the file trees under the per-module subdirectories under
+.IR /sys/module .
+.PP
+See the Linux kernel source file
+.I include/linux/module.h
+for some useful background information.
.SH SEE ALSO
.BR create_module (2),
.BR delete_module (2),
diff --git a/man2/inotify_add_watch.2 b/man2/inotify_add_watch.2
index 4c4ca5720..26041153d 100644
--- a/man2/inotify_add_watch.2
+++ b/man2/inotify_add_watch.2
@@ -6,7 +6,7 @@
.\" 2005-07-19 Robert Love <rlove@rlove.org> - initial version
.\" 2006-02-07 mtk, various changes
.\"
-.TH inotify_add_watch 2 2022-10-30 "Linux man-pages 6.03"
+.TH inotify_add_watch 2 2023-03-30 "Linux man-pages 6.05.01"
.SH NAME
inotify_add_watch \- add a watch to an initialized inotify instance
.SH LIBRARY
@@ -122,10 +122,10 @@ contains
and
.I pathname
is not a directory.
-.SH VERSIONS
-Inotify was merged into the 2.6.13 Linux kernel.
.SH STANDARDS
-This system call is Linux-specific.
+Linux.
+.SH HISTORY
+Linux 2.6.13.
.SH EXAMPLES
See
.BR inotify (7).
diff --git a/man2/inotify_init.2 b/man2/inotify_init.2
index 58ba3ad1e..e6be9c388 100644
--- a/man2/inotify_init.2
+++ b/man2/inotify_init.2
@@ -7,7 +7,7 @@
.\" 2006-02-07 mtk, minor changes
.\" 2008-10-10 mtk: add description of inotify_init1()
.\"
-.TH inotify_init 2 2022-12-04 "Linux man-pages 6.03"
+.TH inotify_init 2 2023-03-30 "Linux man-pages 6.05.01"
.SH NAME
inotify_init, inotify_init1 \- initialize an inotify instance
.SH LIBRARY
@@ -80,15 +80,17 @@ The system-wide limit on the total number of open files has been reached.
.TP
.B ENOMEM
Insufficient kernel memory is available.
-.SH VERSIONS
+.SH STANDARDS
+Linux.
+.SH HISTORY
+.TP
.BR inotify_init ()
-first appeared in Linux 2.6.13;
-library support was added in glibc 2.4.
+Linux 2.6.13,
+glibc 2.4.
+.TP
.BR inotify_init1 ()
-was added in Linux 2.6.27;
-library support was added in glibc 2.9.
-.SH STANDARDS
-These system calls are Linux-specific.
+Linux 2.6.27,
+glibc 2.9.
.SH SEE ALSO
.BR inotify_add_watch (2),
.BR inotify_rm_watch (2),
diff --git a/man2/inotify_rm_watch.2 b/man2/inotify_rm_watch.2
index 8d89537b9..8e1b28395 100644
--- a/man2/inotify_rm_watch.2
+++ b/man2/inotify_rm_watch.2
@@ -5,7 +5,7 @@
.\" 2005-07-19 Robert Love <rlove@rlove.org> - initial version
.\" 2006-02-07 mtk, minor changes
.\"
-.TH inotify_rm_watch 2 2022-10-30 "Linux man-pages 6.03"
+.TH inotify_rm_watch 2 2023-03-30 "Linux man-pages 6.05.01"
.SH NAME
inotify_rm_watch \- remove an existing watch from an inotify instance
.SH LIBRARY
@@ -17,7 +17,7 @@ Standard C library
.PP
.BI "int inotify_rm_watch(int " fd ", int " wd );
.\" Before glibc 2.10, the second argument was types as uint32_t.
-.\" http://sources.redhat.com/bugzilla/show_bug.cgi?id=7040
+.\" https://www.sourceware.org/bugzilla/show_bug.cgi?id=7040
.fi
.SH DESCRIPTION
.BR inotify_rm_watch ()
@@ -50,10 +50,10 @@ The watch descriptor
is not valid; or
.I fd
is not an inotify file descriptor.
-.SH VERSIONS
-Inotify was merged into the 2.6.13 Linux kernel.
.SH STANDARDS
-This system call is Linux-specific.
+Linux.
+.SH HISTORY
+Linux 2.6.13.
.SH SEE ALSO
.BR inotify_add_watch (2),
.BR inotify_init (2),
diff --git a/man2/intro.2 b/man2/intro.2
index 4a7b2b2af..ef3d8cffa 100644
--- a/man2/intro.2
+++ b/man2/intro.2
@@ -6,7 +6,7 @@
.\" new _syscall(2) page, and substantially enhanced and rewrote
.\" the remaining material on this page.
.\"
-.TH intro 2 2023-02-05 "Linux man-pages 6.03"
+.TH intro 2 2023-02-05 "Linux man-pages 6.05.01"
.SH NAME
intro \- introduction to system calls
.SH DESCRIPTION
diff --git a/man2/io_cancel.2 b/man2/io_cancel.2
index 13b6688f0..1b413e22e 100644
--- a/man2/io_cancel.2
+++ b/man2/io_cancel.2
@@ -2,7 +2,7 @@
.\"
.\" SPDX-License-Identifier: GPL-1.0-or-later
.\"
-.TH io_cancel 2 2022-10-30 "Linux man-pages 6.03"
+.TH io_cancel 2 2023-03-30 "Linux man-pages 6.05.01"
.SH NAME
io_cancel \- cancel an outstanding asynchronous I/O operation
.SH LIBRARY
@@ -11,7 +11,7 @@ Standard C library
.PP
Alternatively, Asynchronous I/O library
.RI ( libaio ", " \-laio );
-see NOTES.
+see VERSIONS.
.SH SYNOPSIS
.nf
.BR "#include <linux/aio_abi.h>" " /* Definition of needed types */"
@@ -29,7 +29,7 @@ The wrapper function provided by
uses a different type for the
.I ctx_id
argument.
-See NOTES.
+See VERSIONS.
.PP
The
.BR io_cancel ()
@@ -50,7 +50,7 @@ completion queue.
On success,
.BR io_cancel ()
returns 0.
-For the failure return, see NOTES.
+For the failure return, see VERSIONS.
.SH ERRORS
.TP
.B EAGAIN
@@ -66,12 +66,6 @@ The AIO context specified by \fIctx_id\fP is invalid.
.BR io_cancel ()
is not implemented on this architecture.
.SH VERSIONS
-The asynchronous I/O system calls first appeared in Linux 2.5.
-.SH STANDARDS
-.BR io_cancel ()
-is Linux-specific and should not be used
-in programs that are intended to be portable.
-.SH NOTES
You probably want to use the
.BR io_cancel ()
wrapper function provided by
@@ -98,6 +92,10 @@ then the return value follows the usual conventions for
indicating an error: \-1, with
.I errno
set to a (positive) value that indicates the error.
+.SH STANDARDS
+Linux.
+.SH HISTORY
+Linux 2.5.
.SH SEE ALSO
.BR io_destroy (2),
.BR io_getevents (2),
diff --git a/man2/io_destroy.2 b/man2/io_destroy.2
index b917cda0d..4f513e595 100644
--- a/man2/io_destroy.2
+++ b/man2/io_destroy.2
@@ -2,7 +2,7 @@
.\"
.\" SPDX-License-Identifier: GPL-1.0-or-later
.\"
-.TH io_destroy 2 2022-10-30 "Linux man-pages 6.03"
+.TH io_destroy 2 2023-03-30 "Linux man-pages 6.05.01"
.SH NAME
io_destroy \- destroy an asynchronous I/O context
.SH LIBRARY
@@ -30,7 +30,7 @@ The wrapper function provided by
uses a different type for the
.I ctx_id
argument.
-See NOTES.
+See VERSIONS.
.PP
The
.BR io_destroy ()
@@ -44,7 +44,7 @@ that could not be canceled, and will destroy the
On success,
.BR io_destroy ()
returns 0.
-For the failure return, see NOTES.
+For the failure return, see VERSIONS.
.SH ERRORS
.TP
.B EFAULT
@@ -57,12 +57,6 @@ The AIO context specified by \fIctx_id\fP is invalid.
.BR io_destroy ()
is not implemented on this architecture.
.SH VERSIONS
-The asynchronous I/O system calls first appeared in Linux 2.5.
-.SH STANDARDS
-.BR io_destroy ()
-is Linux-specific and should not be used in programs
-that are intended to be portable.
-.SH NOTES
You probably want to use the
.BR io_destroy ()
wrapper function provided by
@@ -89,6 +83,10 @@ then the return value follows the usual conventions for
indicating an error: \-1, with
.I errno
set to a (positive) value that indicates the error.
+.SH STANDARDS
+Linux.
+.SH HISTORY
+Linux 2.5.
.SH SEE ALSO
.BR io_cancel (2),
.BR io_getevents (2),
diff --git a/man2/io_getevents.2 b/man2/io_getevents.2
index 4f504e05b..3cf506cbb 100644
--- a/man2/io_getevents.2
+++ b/man2/io_getevents.2
@@ -2,12 +2,16 @@
.\"
.\" SPDX-License-Identifier: GPL-1.0-or-later
.\"
-.TH io_getevents 2 2022-10-30 "Linux man-pages 6.03"
+.TH io_getevents 2 2023-03-30 "Linux man-pages 6.05.01"
.SH NAME
io_getevents \- read asynchronous I/O events from the completion queue
.SH LIBRARY
Standard C library
.RI ( libc ", " \-lc )
+.PP
+Alternatively, Asynchronous I/O library
+.RI ( libaio ", " \-laio );
+see VERSIONS.
.SH SYNOPSIS
.nf
.BR "#include <linux/aio_abi.h>" " /* Definition of " *io_* " types */"
@@ -32,7 +36,7 @@ The wrapper function provided by
uses a different type for the
.I ctx_id
argument.
-See NOTES.
+See VERSIONS.
.PP
The
.BR io_getevents ()
@@ -67,7 +71,7 @@ It may also be a nonzero value less than
.IR min_nr ,
if the call was interrupted by a signal handler.
.PP
-For the failure return, see NOTES.
+For the failure return, see VERSIONS.
.SH ERRORS
.TP
.B EFAULT
@@ -86,12 +90,6 @@ out of range.
.BR io_getevents ()
is not implemented on this architecture.
.SH VERSIONS
-The asynchronous I/O system calls first appeared in Linux 2.5.
-.SH STANDARDS
-.BR io_getevents ()
-is Linux-specific and should not be used in
-programs that are intended to be portable.
-.SH NOTES
You probably want to use the
.BR io_getevents ()
wrapper function provided by
@@ -118,6 +116,10 @@ then the return value follows the usual conventions for
indicating an error: \-1, with
.I errno
set to a (positive) value that indicates the error.
+.SH STANDARDS
+Linux.
+.SH HISTORY
+Linux 2.5.
.SH BUGS
An invalid
.I ctx_id
diff --git a/man2/io_setup.2 b/man2/io_setup.2
index cf591725d..074545651 100644
--- a/man2/io_setup.2
+++ b/man2/io_setup.2
@@ -2,7 +2,7 @@
.\"
.\" SPDX-License-Identifier: GPL-1.0-or-later
.\"
-.TH io_setup 2 2023-02-05 "Linux man-pages 6.03"
+.TH io_setup 2 2023-03-30 "Linux man-pages 6.05.01"
.SH NAME
io_setup \- create an asynchronous I/O context
.SH LIBRARY
@@ -11,7 +11,7 @@ Standard C library
.PP
Alternatively, Asynchronous I/O library
.RI ( libaio ", " \-laio );
-see NOTES.
+see VERSIONS.
.SH SYNOPSIS
.nf
.BR "#include <linux/aio_abi.h>" " /* Defines needed types */"
@@ -20,7 +20,7 @@ see NOTES.
.fi
.PP
.IR Note :
-There is no glibc wrapper for this system call; see NOTES.
+There is no glibc wrapper for this system call; see VERSIONS.
.SH DESCRIPTION
.IR Note :
this page describes the raw Linux system call interface.
@@ -29,7 +29,7 @@ The wrapper function provided by
uses a different type for the
.I ctx_idp
argument.
-See NOTES.
+See VERSIONS.
.PP
The
.BR io_setup ()
@@ -46,7 +46,7 @@ with the resulting handle.
On success,
.BR io_setup ()
returns 0.
-For the failure return, see NOTES.
+For the failure return, see VERSIONS.
.SH ERRORS
.TP
.B EAGAIN
@@ -71,12 +71,6 @@ Insufficient kernel resources are available.
.BR io_setup ()
is not implemented on this architecture.
.SH VERSIONS
-The asynchronous I/O system calls first appeared in Linux 2.5.
-.SH STANDARDS
-.BR io_setup ()
-is Linux-specific and should not be used in programs
-that are intended to be portable.
-.SH NOTES
glibc does not provide a wrapper for this system call.
You could invoke it using
.BR syscall (2).
@@ -106,6 +100,10 @@ then the return value follows the usual conventions for
indicating an error: \-1, with
.I errno
set to a (positive) value that indicates the error.
+.SH STANDARDS
+Linux.
+.SH HISTORY
+Linux 2.5.
.SH SEE ALSO
.BR io_cancel (2),
.BR io_destroy (2),
diff --git a/man2/io_submit.2 b/man2/io_submit.2
index 3f9c9afd6..51efb6b99 100644
--- a/man2/io_submit.2
+++ b/man2/io_submit.2
@@ -3,7 +3,7 @@
.\"
.\" SPDX-License-Identifier: GPL-1.0-or-later
.\"
-.TH io_submit 2 2023-02-05 "Linux man-pages 6.03"
+.TH io_submit 2 2023-05-03 "Linux man-pages 6.05.01"
.SH NAME
io_submit \- submit asynchronous I/O blocks for processing
.SH LIBRARY
@@ -12,7 +12,7 @@ Standard C library
.PP
Alternatively, Asynchronous I/O library
.RI ( libaio ", " \-laio );
-see NOTES.
+see VERSIONS.
.SH SYNOPSIS
.nf
.BR "#include <linux/aio_abi.h>" " /* Defines needed types */"
@@ -22,7 +22,7 @@ see NOTES.
.fi
.PP
.IR Note :
-There is no glibc wrapper for this system call; see NOTES.
+There is no glibc wrapper for this system call; see VERSIONS.
.SH DESCRIPTION
.IR Note :
this page describes the raw Linux system call interface.
@@ -31,7 +31,7 @@ The wrapper function provided by
uses a different type for the
.I ctx_id
argument.
-See NOTES.
+See VERSIONS.
.PP
The
.BR io_submit ()
@@ -52,7 +52,7 @@ defines the parameters that control the I/O operation.
.in +4n
.EX
#include <linux/aio_abi.h>
-
+\&
struct iocb {
__u64 aio_data;
__u32 PADDED(aio_key, aio_rw_flags);
@@ -211,7 +211,7 @@ On success,
.BR io_submit ()
returns the number of \fIiocb\fPs submitted (which may be
less than \fInr\fP, or 0 if \fInr\fP is zero).
-For the failure return, see NOTES.
+For the failure return, see VERSIONS.
.SH ERRORS
.TP
.B EAGAIN
@@ -246,12 +246,6 @@ but the submitting context does not have the
.B CAP_SYS_ADMIN
capability.
.SH VERSIONS
-The asynchronous I/O system calls first appeared in Linux 2.5.
-.SH STANDARDS
-.BR io_submit ()
-is Linux-specific and should not be used in
-programs that are intended to be portable.
-.SH NOTES
glibc does not provide a wrapper for this system call.
You could invoke it using
.BR syscall (2).
@@ -281,6 +275,10 @@ then the return value follows the usual conventions for
indicating an error: \-1, with
.I errno
set to a (positive) value that indicates the error.
+.SH STANDARDS
+Linux.
+.SH HISTORY
+Linux 2.5.
.SH SEE ALSO
.BR io_cancel (2),
.BR io_destroy (2),
diff --git a/man2/ioctl.2 b/man2/ioctl.2
index e436dd524..d6c070162 100644
--- a/man2/ioctl.2
+++ b/man2/ioctl.2
@@ -10,7 +10,7 @@
.\" Modified 1999-06-25 by Rachael Munns <vashti@dream.org.uk>
.\" Modified 2000-09-21 by Andries Brouwer <aeb@cwi.nl>
.\"
-.TH ioctl 2 2023-02-05 "Linux man-pages 6.03"
+.TH ioctl 2 2023-03-30 "Linux man-pages 6.05.01"
.SH NAME
ioctl \- control device
.SH LIBRARY
@@ -94,17 +94,16 @@ The specified request does not apply to the kind of object that the
file descriptor
.I fd
references.
-.SH STANDARDS
-No single standard.
+.SH VERSIONS
Arguments, returns, and semantics of
.BR ioctl ()
vary according to the device driver in question (the call is used as a
catch-all for operations that don't cleanly fit the UNIX stream I/O
model).
-.PP
-The
-.BR ioctl ()
-system call appeared in Version 7 AT&T UNIX.
+.SH STANDARDS
+None.
+.SH HISTORY
+Version\~7 AT&T UNIX.
.SH NOTES
In order to use this call, one needs an open file descriptor.
Often the
diff --git a/man2/ioctl_console.2 b/man2/ioctl_console.2
index 5731d605c..455be750e 100644
--- a/man2/ioctl_console.2
+++ b/man2/ioctl_console.2
@@ -19,7 +19,7 @@
.\" VT_UNLOCKSWITCH (since Linux 1.3.47, needs CAP_SYS_TTY_CONFIG)
.\" VT_GETHIFONTMASK (since Linux 2.6.18)
.\"
-.TH ioctl_console 2 2023-01-22 "Linux man-pages 6.03"
+.TH ioctl_console 2 2023-01-22 "Linux man-pages 6.05.01"
.SH NAME
ioctl_console \- ioctls for console terminal and virtual consoles
.SH DESCRIPTION
diff --git a/man2/ioctl_fat.2 b/man2/ioctl_fat.2
index 72393555f..67b5a2c04 100644
--- a/man2/ioctl_fat.2
+++ b/man2/ioctl_fat.2
@@ -1,7 +1,7 @@
.\" Copyright (C) 2014, Heinrich Schuchardt <xypron.glpk@gmx.de>
.\"
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
-.TH ioctl_fat 2 2023-02-10 "Linux man-pages 6.03"
+.TH ioctl_fat 2 2023-05-03 "Linux man-pages 6.05.01"
.SH NAME
ioctl_fat \- manipulating the FAT filesystem
.SH LIBRARY
@@ -208,25 +208,24 @@ does not refer to an object in a FAT filesystem.
.PP
For further error values, see
.BR ioctl (2).
-.SH VERSIONS
+.SH STANDARDS
+Linux.
+.SH HISTORY
+.TP
.B VFAT_IOCTL_READDIR_BOTH
-and
+.TQ
.B VFAT_IOCTL_READDIR_SHORT
-first appeared in Linux 2.0.
-.PP
+Linux 2.0.
+.TP
.B FAT_IOCTL_GET_ATTRIBUTES
-and
+.TQ
.B FAT_IOCTL_SET_ATTRIBUTES
-first appeared
.\" just before we got Git history
-in Linux 2.6.12.
-.PP
+Linux 2.6.12.
+.TP
.B FAT_IOCTL_GET_VOLUME_ID
-was introduced in version 3.11
+Linux 3.11.
.\" commit 6e5b93ee55d401f1619092fb675b57c28c9ed7ec
-of the Linux kernel.
-.SH STANDARDS
-This API is Linux-specific.
.SH EXAMPLES
.SS Toggling the archive flag
The following program demonstrates the usage of
@@ -258,7 +257,7 @@ Archive flag is not set
#include <stdlib.h>
#include <sys/ioctl.h>
#include <unistd.h>
-
+\&
/*
* Read file attributes of a file on a FAT filesystem.
* Output the state of the archive flag.
@@ -268,50 +267,50 @@ readattr(int fd)
{
int ret;
uint32_t attr;
-
+\&
ret = ioctl(fd, FAT_IOCTL_GET_ATTRIBUTES, &attr);
if (ret == \-1) {
perror("ioctl");
exit(EXIT_FAILURE);
}
-
+\&
if (attr & ATTR_ARCH)
printf("Archive flag is set\en");
else
printf("Archive flag is not set\en");
-
+\&
return attr;
}
-
+\&
int
main(int argc, char *argv[])
{
int fd;
int ret;
uint32_t attr;
-
+\&
if (argc != 2) {
printf("Usage: %s FILENAME\en", argv[0]);
exit(EXIT_FAILURE);
}
-
+\&
fd = open(argv[1], O_RDONLY);
if (fd == \-1) {
perror("open");
exit(EXIT_FAILURE);
}
-
+\&
/*
* Read and display the FAT file attributes.
*/
attr = readattr(fd);
-
+\&
/*
* Invert archive attribute.
*/
printf("Toggling archive flag\en");
attr \[ha]= ATTR_ARCH;
-
+\&
/*
* Write the changed FAT file attributes.
*/
@@ -320,14 +319,14 @@ main(int argc, char *argv[])
perror("ioctl");
exit(EXIT_FAILURE);
}
-
+\&
/*
* Read and display the FAT file attributes.
*/
readattr(fd);
-
+\&
close(fd);
-
+\&
exit(EXIT_SUCCESS);
}
.EE
@@ -358,25 +357,25 @@ Volume ID 6443\-6241
#include <stdlib.h>
#include <sys/ioctl.h>
#include <unistd.h>
-
+\&
int
main(int argc, char *argv[])
{
int fd;
int ret;
uint32_t id;
-
+\&
if (argc != 2) {
printf("Usage: %s FILENAME\en", argv[0]);
exit(EXIT_FAILURE);
}
-
+\&
fd = open(argv[1], O_RDONLY);
if (fd == \-1) {
perror("open");
exit(EXIT_FAILURE);
}
-
+\&
/*
* Read volume ID.
*/
@@ -385,14 +384,14 @@ main(int argc, char *argv[])
perror("ioctl");
exit(EXIT_FAILURE);
}
-
+\&
/*
* Format the output as two groups of 16 bits each.
*/
printf("Volume ID %04x\-%04x\en", id >> 16, id & 0xFFFF);
-
+\&
close(fd);
-
+\&
exit(EXIT_SUCCESS);
}
.EE
@@ -426,19 +425,19 @@ LOWER.TXT \-> \[aq]lower.txt\[aq]
#include <stdlib.h>
#include <sys/ioctl.h>
#include <unistd.h>
-
+\&
int
main(int argc, char *argv[])
{
int fd;
int ret;
struct __fat_dirent entry[2];
-
+\&
if (argc != 2) {
printf("Usage: %s DIRECTORY\en", argv[0]);
exit(EXIT_FAILURE);
}
-
+\&
/*
* Open file descriptor for the directory.
*/
@@ -447,14 +446,14 @@ main(int argc, char *argv[])
perror("open");
exit(EXIT_FAILURE);
}
-
+\&
for (;;) {
-
+\&
/*
* Read next directory entry.
*/
ret = ioctl(fd, VFAT_IOCTL_READDIR_BOTH, entry);
-
+\&
/*
* If an error occurs, the return value is \-1.
* If the end of the directory list has been reached,
@@ -464,23 +463,23 @@ main(int argc, char *argv[])
*/
if (ret < 1)
break;
-
+\&
/*
* Write both the short name and the long name.
*/
printf("%s \-> \[aq]%s\[aq]\en", entry[0].d_name, entry[1].d_name);
}
-
+\&
if (ret == \-1) {
perror("VFAT_IOCTL_READDIR_BOTH");
exit(EXIT_FAILURE);
}
-
+\&
/*
* Close the file descriptor.
*/
close(fd);
-
+\&
exit(EXIT_SUCCESS);
}
.EE
diff --git a/man2/ioctl_ficlonerange.2 b/man2/ioctl_ficlonerange.2
index 3797d362a..68cfc67a4 100644
--- a/man2/ioctl_ficlonerange.2
+++ b/man2/ioctl_ficlonerange.2
@@ -1,7 +1,7 @@
.\" Copyright (c) 2016, Oracle. All rights reserved.
.\"
.\" SPDX-License-Identifier: GPL-2.0-or-later
-.TH ioctl_ficlonerange 2 2022-10-30 "Linux man-pages 6.03"
+.TH ioctl_ficlonerange 2 2023-03-30 "Linux man-pages 6.05.01"
.SH NAME
ioctl_ficlonerange, ioctl_ficlone \-
share some the data of one file with another file
@@ -110,15 +110,16 @@ Swap files cannot share storage.
.B EXDEV
.IR dest_fd " and " src_fd
are not on the same mounted filesystem.
-.SH VERSIONS
-These ioctl operations first appeared in Linux 4.5.
+.SH STANDARDS
+Linux.
+.SH HISTORY
+Linux 4.5.
+.PP
They were previously known as
.B BTRFS_IOC_CLONE
and
.BR BTRFS_IOC_CLONE_RANGE ,
and were private to Btrfs.
-.SH STANDARDS
-This API is Linux-specific.
.SH NOTES
Because a copy-on-write operation requires the allocation of new storage, the
.BR fallocate (2)
diff --git a/man2/ioctl_fideduperange.2 b/man2/ioctl_fideduperange.2
index dec914759..5388c5d6e 100644
--- a/man2/ioctl_fideduperange.2
+++ b/man2/ioctl_fideduperange.2
@@ -1,7 +1,7 @@
.\" Copyright (c) 2016, Oracle. All rights reserved.
.\"
.\" SPDX-License-Identifier: GPL-2.0-or-later
-.TH ioctl_fideduperange 2 2022-10-30 "Linux man-pages 6.03"
+.TH ioctl_fideduperange 2 2023-03-30 "Linux man-pages 6.05.01"
.SH NAME
ioctl_fideduperange \- share some the data of one file with another file
.SH LIBRARY
@@ -181,19 +181,20 @@ and
.I src_fd
are not on the same mounted filesystem.
.SH VERSIONS
-This ioctl operation first appeared in Linux 4.5.
+Some filesystems may limit the amount of data that can be deduplicated in a
+single call.
+.SH STANDARDS
+Linux.
+.SH HISTORY
+Linux 4.5.
+.PP
It was previously known as
.B BTRFS_IOC_FILE_EXTENT_SAME
and was private to Btrfs.
-.SH STANDARDS
-This API is Linux-specific.
.SH NOTES
Because a copy-on-write operation requires the allocation of new storage, the
.BR fallocate (2)
operation may unshare shared blocks to guarantee that subsequent writes will
not fail because of lack of disk space.
-.PP
-Some filesystems may limit the amount of data that can be deduplicated in a
-single call.
.SH SEE ALSO
.BR ioctl (2)
diff --git a/man2/ioctl_fslabel.2 b/man2/ioctl_fslabel.2
index 67be8d018..885a43c94 100644
--- a/man2/ioctl_fslabel.2
+++ b/man2/ioctl_fslabel.2
@@ -1,7 +1,7 @@
.\" Copyright (c) 2018, Red Hat, Inc. All rights reserved.
.\"
.\" SPDX-License-Identifier: GPL-2.0-or-later
-.TH ioctl_fslabel 2 2023-02-05 "Linux man-pages 6.03"
+.TH ioctl_fslabel 2 2023-03-30 "Linux man-pages 6.05.01"
.SH NAME
ioctl_fslabel \- get or set a filesystem label
.SH LIBRARY
@@ -46,17 +46,16 @@ This can appear if the filesystem does not support online label manipulation.
.TP
.B EPERM
The calling process does not have sufficient permissions to set the label.
-.SH VERSIONS
-These
-.BR ioctl (2)
-operations first appeared in Linux 4.18.
+.SH STANDARDS
+Linux.
+.SH HISTORY
+Linux 4.18.
+.PP
They were previously known as
.B BTRFS_IOC_GET_FSLABEL
and
.B BTRFS_IOC_SET_FSLABEL
and were private to Btrfs.
-.SH STANDARDS
-This API is Linux-specific.
.SH NOTES
The maximum string length for this interface is
.BR FSLABEL_MAX ,
diff --git a/man2/ioctl_getfsmap.2 b/man2/ioctl_getfsmap.2
index 3f63f0841..e80c1d9a4 100644
--- a/man2/ioctl_getfsmap.2
+++ b/man2/ioctl_getfsmap.2
@@ -1,7 +1,7 @@
.\" Copyright (c) 2017, Oracle. All rights reserved.
.\"
.\" SPDX-License-Identifier: GPL-2.0-or-later
-.TH ioctl_getfsmap 2 2022-10-30 "Linux man-pages 6.03"
+.TH ioctl_getfsmap 2 2023-05-03 "Linux man-pages 6.05.01"
.SH NAME
ioctl_getfsmap \- retrieve the physical layout of the filesystem
.SH LIBRARY
@@ -36,14 +36,14 @@ struct fsmap {
__u64 fmr_length; /* Length of segment */
__u64 fmr_reserved[3]; /* Must be zero */
};
-
+\&
struct fsmap_head {
__u32 fmh_iflags; /* Control flags */
__u32 fmh_oflags; /* Output flags */
__u32 fmh_count; /* # of entries in array incl. input */
__u32 fmh_entries; /* # of entries filled in (output) */
__u64 fmh_reserved[6]; /* Must be zero */
-
+\&
struct fsmap fmh_keys[2]; /* Low and high keys for
the mapping search */
struct fsmap fmh_recs[]; /* Returned records */
@@ -335,13 +335,12 @@ The filesystem does not support this command.
.TP
.B EUCLEAN
The filesystem metadata is corrupt and needs repair.
-.SH VERSIONS
-The
-.B FS_IOC_GETFSMAP
-operation first appeared in Linux 4.12.
.SH STANDARDS
-This API is Linux-specific.
+Linux.
+.PP
Not all filesystems support it.
+.SH HISTORY
+Linux 4.12.
.SH EXAMPLES
See
.I io/fsmap.c
diff --git a/man2/ioctl_iflags.2 b/man2/ioctl_iflags.2
index e3d8b0ab8..d2c33005d 100644
--- a/man2/ioctl_iflags.2
+++ b/man2/ioctl_iflags.2
@@ -3,7 +3,7 @@
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
.\"
-.TH ioctl_iflags 2 2023-02-05 "Linux man-pages 6.03"
+.TH ioctl_iflags 2 2023-05-03 "Linux man-pages 6.05.01"
.SH NAME
ioctl_iflags \- ioctl() operations for inode flags
.SH DESCRIPTION
@@ -18,7 +18,7 @@ operations:
.EX
int attr;
fd = open("pathname", ...);
-
+\&
ioctl(fd, FS_IOC_GETFLAGS, &attr); /* Place current flags
in \[aq]attr\[aq] */
attr |= FS_NOATIME_FL; /* Tweak returned bit mask */
@@ -171,7 +171,7 @@ which is not inheritable, and
.BR FS_DIRSYNC_FL ,
which is inherited only by subdirectories.
.SH STANDARDS
-Inode flags are a nonstandard Linux extension.
+Linux.
.SH NOTES
In order to change the inode flags of a file using the
.B FS_IOC_SETFLAGS
diff --git a/man2/ioctl_ns.2 b/man2/ioctl_ns.2
index 124e17e89..a11e54b9b 100644
--- a/man2/ioctl_ns.2
+++ b/man2/ioctl_ns.2
@@ -3,7 +3,7 @@
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
.\"
-.TH ioctl_ns 2 2023-02-05 "Linux man-pages 6.03"
+.TH ioctl_ns 2 2023-05-03 "Linux man-pages 6.05.01"
.SH NAME
ioctl_ns \- ioctl() operations for Linux namespaces
.SH DESCRIPTION
@@ -162,10 +162,10 @@ operations can return the following errors:
.B ENOTTY
.I fd
does not refer to a
-.I /proc/[pid]/ns/*
+.IR /proc/ pid /ns/ *
file.
.SH STANDARDS
-Namespaces and the operations described on this page are a Linux-specific.
+Linux.
.SH EXAMPLES
The example shown below uses the
.BR ioctl (2)
@@ -232,7 +232,7 @@ The owning user namespace is outside your namespace scope
.\" SRC BEGIN (ns_show.c)
.EX
/* ns_show.c
-
+\&
Licensed under the GNU General Public License v2 or later.
*/
#include <errno.h>
@@ -246,13 +246,13 @@ The owning user namespace is outside your namespace scope
#include <sys/stat.h>
#include <sys/sysmacros.h>
#include <unistd.h>
-
+\&
int
main(int argc, char *argv[])
{
int fd, userns_fd, parent_fd;
struct stat sb;
-
+\&
if (argc < 2) {
fprintf(stderr, "Usage: %s /proc/[pid]/ns/[file] [p|u]\en",
argv[0]);
@@ -263,22 +263,22 @@ main(int argc, char *argv[])
"NS_GET_USERNS is the default.\en");
exit(EXIT_FAILURE);
}
-
+\&
/* Obtain a file descriptor for the \[aq]ns\[aq] file specified
in argv[1]. */
-
+\&
fd = open(argv[1], O_RDONLY);
if (fd == \-1) {
perror("open");
exit(EXIT_FAILURE);
}
-
+\&
/* Obtain a file descriptor for the owning user namespace and
then obtain and display the inode number of that namespace. */
-
+\&
if (argc < 3 || strchr(argv[2], \[aq]u\[aq])) {
userns_fd = ioctl(fd, NS_GET_USERNS);
-
+\&
if (userns_fd == \-1) {
if (errno == EPERM)
printf("The owning user namespace is outside "
@@ -287,7 +287,7 @@ main(int argc, char *argv[])
perror("ioctl\-NS_GET_USERNS");
exit(EXIT_FAILURE);
}
-
+\&
if (fstat(userns_fd, &sb) == \-1) {
perror("fstat\-userns");
exit(EXIT_FAILURE);
@@ -297,16 +297,16 @@ main(int argc, char *argv[])
major(sb.st_dev),
minor(sb.st_dev),
(uintmax_t) sb.st_ino);
-
+\&
close(userns_fd);
}
-
+\&
/* Obtain a file descriptor for the parent namespace and
then obtain and display the inode number of that namespace. */
-
+\&
if (argc > 2 && strchr(argv[2], \[aq]p\[aq])) {
parent_fd = ioctl(fd, NS_GET_PARENT);
-
+\&
if (parent_fd == \-1) {
if (errno == EINVAL)
printf("Can\[aq] get parent namespace of a "
@@ -318,7 +318,7 @@ main(int argc, char *argv[])
perror("ioctl\-NS_GET_PARENT");
exit(EXIT_FAILURE);
}
-
+\&
if (fstat(parent_fd, &sb) == \-1) {
perror("fstat\-parentns");
exit(EXIT_FAILURE);
@@ -327,10 +327,10 @@ main(int argc, char *argv[])
major(sb.st_dev),
minor(sb.st_dev),
(uintmax_t) sb.st_ino);
-
+\&
close(parent_fd);
}
-
+\&
exit(EXIT_SUCCESS);
}
.EE
diff --git a/man2/ioctl_pipe.2 b/man2/ioctl_pipe.2
new file mode 100644
index 000000000..31e02bb7f
--- /dev/null
+++ b/man2/ioctl_pipe.2
@@ -0,0 +1,64 @@
+.\" Copyright (c) 2022 by Cyril Hrubis <chrubi@suse.cz>
+.\"
+.\" SPDX-License-Identifier: Linux-man-pages-copyleft
+.\"
+.TH ioctl_pipe 2 2023-05-03 "Linux man-pages 6.05.01"
+.SH NAME
+ioctl_pipe \- ioctl() operations for General notification mechanism
+.SH SYNOPSIS
+.nf
+.BR "#include <linux/watch_queue.h>" " /* Definition of " IOC_WATCH_QUEUE_ "* */"
+.B #include <sys/ioctl.h>
+.PP
+.BI "int ioctl(int " pipefd "[1], IOC_WATCH_QUEUE_SET_SIZE, int " size );
+.BI "int ioctl(int " pipefd "[1], IOC_WATCH_QUEUE_SET_FILTER,"
+.BI " struct watch_notification_filter *" filter );
+.fi
+.SH DESCRIPTION
+The following
+.BR ioctl (2)
+operations are provided to set up general notification queue parameters.
+The notification queue is built on the top of a
+.BR pipe (2)
+opened with the
+.B O_NOTIFICATION_PIPE
+flag.
+.TP
+.BR IOC_WATCH_QUEUE_SET_SIZE " (since Linux 5.8)"
+.\" commit c73be61cede5882f9605a852414db559c0ebedfd
+Preallocates the pipe buffer memory so that
+it can fit
+.I size
+notification messages.
+Currently,
+.I size
+must be between 1 and 512.
+.TP
+.BR IOC_WATCH_QUEUE_SET_FILTER " (since Linux 5.8)"
+.\" commit c73be61cede5882f9605a852414db559c0ebedfd
+Watch queue filter can limit events that are received.
+Filters are passed in a
+.I struct watch_notification_filter
+and each filter is described by a
+.I struct watch_notification_type_filter
+structure.
+.IP
+.in +4n
+.EX
+struct watch_notification_filter {
+ __u32 nr_filters;
+ __u32 __reserved;
+ struct watch_notification_type_filter filters[];
+};
+\&
+struct watch_notification_type_filter {
+ __u32 type;
+ __u32 info_filter;
+ __u32 info_mask;
+ __u32 subtype_filter[8];
+};
+.EE
+.in
+.SH SEE ALSO
+.BR pipe (2),
+.BR ioctl (2)
diff --git a/man2/ioctl_tty.2 b/man2/ioctl_tty.2
index 352b92482..dfbd9a871 100644
--- a/man2/ioctl_tty.2
+++ b/man2/ioctl_tty.2
@@ -4,7 +4,7 @@
.\"
.\" SPDX-License-Identifier: GPL-1.0-or-later
.\"
-.TH ioctl_tty 2 2023-02-05 "Linux man-pages 6.03"
+.TH ioctl_tty 2 2023-05-03 "Linux man-pages 6.05.01"
.SH NAME
ioctl_tty \- ioctls for terminals and serial lines
.SH LIBRARY
@@ -775,12 +775,12 @@ Check the condition of DTR on the serial port.
#include <stdio.h>
#include <sys/ioctl.h>
#include <unistd.h>
-
+\&
int
main(void)
{
int fd, serial;
-
+\&
fd = open("/dev/ttyS0", O_RDONLY);
ioctl(fd, TIOCMGET, &serial);
if (serial & TIOCM_DTR)
@@ -797,14 +797,14 @@ Get or set arbitrary baudrate on the serial port.
.\" SRC BEGIN (tcgets.c)
.EX
/* SPDX-License-Identifier: GPL-2.0-or-later */
-
+\&
#include <asm/termbits.h>
#include <fcntl.h>
#include <stdio.h>
#include <stdlib.h>
#include <sys/ioctl.h>
#include <unistd.h>
-
+\&
int
main(int argc, char *argv[])
{
@@ -820,18 +820,18 @@ main(int argc, char *argv[])
struct termios tio;
# endif
int fd, rc;
-
+\&
if (argc != 2 && argc != 3 && argc != 4) {
fprintf(stderr, "Usage: %s device [output [input] ]\en", argv[0]);
exit(EXIT_FAILURE);
}
-
+\&
fd = open(argv[1], O_RDWR | O_NONBLOCK | O_NOCTTY);
if (fd < 0) {
perror("open");
exit(EXIT_FAILURE);
}
-
+\&
/* Get the current serial port settings via supported ioctl */
# if defined TCGETS2
rc = ioctl(fd, TCGETS2, &tio);
@@ -843,20 +843,20 @@ main(int argc, char *argv[])
close(fd);
exit(EXIT_FAILURE);
}
-
+\&
/* Change baud rate when more arguments were provided */
if (argc == 3 || argc == 4) {
/* Clear the current output baud rate and fill a new value */
tio.c_cflag &= \[ti]CBAUD;
tio.c_cflag |= BOTHER;
tio.c_ospeed = atoi(argv[2]);
-
+\&
/* Clear the current input baud rate and fill a new value */
tio.c_cflag &= \[ti](CBAUD << IBSHIFT);
tio.c_cflag |= BOTHER << IBSHIFT;
/* When 4th argument is not provided reuse output baud rate */
tio.c_ispeed = (argc == 4) ? atoi(argv[3]) : atoi(argv[2]);
-
+\&
/* Set new serial port settings via supported ioctl */
# if defined TCSETS2
rc = ioctl(fd, TCSETS2, &tio);
@@ -868,7 +868,7 @@ main(int argc, char *argv[])
close(fd);
exit(EXIT_FAILURE);
}
-
+\&
/* And get new values which were really configured */
# if defined TCGETS2
rc = ioctl(fd, TCGETS2, &tio);
@@ -881,12 +881,12 @@ main(int argc, char *argv[])
exit(EXIT_FAILURE);
}
}
-
+\&
close(fd);
-
+\&
printf("output baud rate: %u\en", tio.c_ospeed);
printf("input baud rate: %u\en", tio.c_ispeed);
-
+\&
exit(EXIT_SUCCESS);
#endif
}
diff --git a/man2/ioctl_userfaultfd.2 b/man2/ioctl_userfaultfd.2
index 6bbef2503..6ab9c116b 100644
--- a/man2/ioctl_userfaultfd.2
+++ b/man2/ioctl_userfaultfd.2
@@ -5,7 +5,7 @@
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
.\"
-.TH ioctl_userfaultfd 2 2022-12-15 "Linux man-pages 6.03"
+.TH ioctl_userfaultfd 2 2023-05-03 "Linux man-pages 6.05.01"
.SH NAME
ioctl_userfaultfd \- create a file descriptor for handling page faults in user
space
@@ -207,6 +207,14 @@ in minor mode on hugetlbfs-backed memory areas.
If this feature bit is set,
the kernel supports registering userfaultfd ranges
in minor mode on shmem-backed memory areas.
+.TP
+.BR UFFD_FEATURE_EXACT_ADDRESS " (since Linux 5.18)"
+If this feature bit is set,
+.I uffd_msg.pagefault.address
+will be set to the exact page-fault address that was reported by the hardware,
+and will not mask the offset within the page.
+Note that old Linux versions might indicate the exact address as well,
+even though the feature bit is not set.
.PP
The returned
.I ioctls
@@ -281,7 +289,7 @@ struct uffdio_range {
__u64 start; /* Start of range */
__u64 len; /* Length of range (bytes) */
};
-
+\&
struct uffdio_register {
struct uffdio_range range;
__u64 mode; /* Desired mode of operation (input) */
@@ -876,9 +884,7 @@ The userfaultfd object has not yet been enabled (via the
.B UFFDIO_API
operation).
.SH STANDARDS
-These
-.BR ioctl (2)
-operations are Linux-specific.
+Linux.
.SH BUGS
In order to detect available userfault features and
enable some subset of those features
diff --git a/man2/ioperm.2 b/man2/ioperm.2
index 078f6c172..dcbad6ca5 100644
--- a/man2/ioperm.2
+++ b/man2/ioperm.2
@@ -12,7 +12,7 @@
.\" Modified, 27 May 2004, Michael Kerrisk <mtk.manpages@gmail.com>
.\" Added notes on capability requirements
.\"
-.TH ioperm 2 2023-02-05 "Linux man-pages 6.03"
+.TH ioperm 2 2023-03-30 "Linux man-pages 6.05.01"
.SH NAME
ioperm \- set port input/output permissions
.SH LIBRARY
@@ -81,19 +81,7 @@ Out of memory.
.TP
.B EPERM
The calling thread has insufficient privilege.
-.SH STANDARDS
-.BR ioperm ()
-is Linux-specific and should not be used in programs
-intended to be portable.
-.SH NOTES
-The
-.I /proc/ioports
-file shows the I/O ports that are currently allocated on the system.
-.PP
-Before Linux 2.4,
-permissions were not inherited by a child created by
-.BR fork (2).
-.PP
+.SH VERSIONS
glibc has an
.BR ioperm ()
prototype both in
@@ -101,6 +89,16 @@ prototype both in
and in
.IR <sys/perm.h> .
Avoid the latter, it is available on i386 only.
+.SH STANDARDS
+Linux.
+.SH HISTORY
+Before Linux 2.4,
+permissions were not inherited by a child created by
+.BR fork (2).
+.SH NOTES
+The
+.I /proc/ioports
+file shows the I/O ports that are currently allocated on the system.
.SH SEE ALSO
.BR iopl (2),
.BR outb (2),
diff --git a/man2/iopl.2 b/man2/iopl.2
index 01c7dd96b..239d20647 100644
--- a/man2/iopl.2
+++ b/man2/iopl.2
@@ -10,7 +10,7 @@
.\" Modified, 27 May 2004, Michael Kerrisk <mtk.manpages@gmail.com>
.\" Added notes on capability requirements
.\"
-.TH iopl 2 2023-02-05 "Linux man-pages 6.03"
+.TH iopl 2 2023-03-30 "Linux man-pages 6.05.01"
.SH NAME
iopl \- change I/O privilege level
.SH LIBRARY
@@ -59,11 +59,7 @@ the
.B CAP_SYS_RAWIO
capability is required to raise the I/O privilege level
above its current value.
-.SH STANDARDS
-.BR iopl ()
-is Linux-specific and should not be used in programs that are
-intended to be portable.
-.SH NOTES
+.SH VERSIONS
.\" Libc5 treats it as a system call and has a prototype in
.\" .IR <unistd.h> .
.\" glibc1 does not have a prototype.
@@ -72,7 +68,9 @@ glibc2 has a prototype both in
and in
.IR <sys/perm.h> .
Avoid the latter, it is available on i386 only.
-.PP
+.SH STANDARDS
+Linux.
+.SH HISTORY
Prior to Linux 5.5
.BR iopl ()
allowed the thread to disable interrupts while running
diff --git a/man2/ioprio_set.2 b/man2/ioprio_set.2
index cbb76f353..7770cbcb1 100644
--- a/man2/ioprio_set.2
+++ b/man2/ioprio_set.2
@@ -7,7 +7,7 @@
.\" with various additions by Michael Kerrisk <mtk.manpages@gmail.com>
.\"
.\"
-.TH ioprio_set 2 2023-02-05 "Linux man-pages 6.03"
+.TH ioprio_set 2 2023-04-03 "Linux man-pages 6.05.01"
.SH NAME
ioprio_get, ioprio_set \- get/set I/O scheduling class and priority
.SH LIBRARY
@@ -188,11 +188,10 @@ No process(es) could be found that matched the specification in
.I which
and
.IR who .
-.SH VERSIONS
-These system calls have been available on Linux since
-kernel 2.6.13.
.SH STANDARDS
-These system calls are Linux-specific.
+Linux.
+.SH HISTORY
+Linux 2.6.13.
.SH NOTES
Two or more processes or threads can share an I/O context.
This will be the case when
@@ -233,7 +232,7 @@ as 0 can be used to reset to the default I/O scheduling behavior.
.SS Selecting an I/O scheduler
I/O schedulers are selected on a per-device basis via the special
file
-.IR /sys/block/<device>/queue/scheduler .
+.IR /sys/block/ device /queue/scheduler .
.PP
One can view the current I/O scheduler via the
.I /sys
@@ -345,7 +344,7 @@ must follow both rules, or the call will fail with the error
.BR EPERM .
.SH BUGS
.\" 6 May 07: Bug report raised:
-.\" http://sources.redhat.com/bugzilla/show_bug.cgi?id=4464
+.\" https://www.sourceware.org/bugzilla/show_bug.cgi?id=4464
.\" Ulrich Drepper replied that he wasn't going to add these
.\" to glibc.
glibc does not yet provide a suitable header file defining
diff --git a/man2/ipc.2 b/man2/ipc.2
index ec074ff44..0b8a91188 100644
--- a/man2/ipc.2
+++ b/man2/ipc.2
@@ -3,7 +3,7 @@
.\" SPDX-License-Identifier: GPL-2.0-or-later
.\"
.\" Modified Tue Oct 22 08:11:14 EDT 1996 by Eric S. Raymond <esr@thyrsus.com>
-.TH ipc 2 2023-02-05 "Linux man-pages 6.03"
+.TH ipc 2 2023-03-30 "Linux man-pages 6.05.01"
.SH NAME
ipc \- System V IPC system calls
.SH LIBRARY
@@ -37,11 +37,7 @@ the other arguments are passed through to the appropriate call.
User-space programs should call the appropriate functions by their usual names.
Only standard library implementors and kernel hackers need to know about
.BR ipc ().
-.SH STANDARDS
-.BR ipc ()
-is Linux-specific, and should not be used in programs
-intended to be portable.
-.SH NOTES
+.SH VERSIONS
On some architectures\[em]for example x86-64 and ARM\[em]there is no
.BR ipc ()
system call; instead,
@@ -49,6 +45,8 @@ system call; instead,
.BR semctl (2),
.BR shmctl (2),
and so on really are implemented as separate system calls.
+.SH STANDARDS
+Linux.
.SH SEE ALSO
.BR msgctl (2),
.BR msgget (2),
diff --git a/man2/kcmp.2 b/man2/kcmp.2
index e70280a7b..98a29f108 100644
--- a/man2/kcmp.2
+++ b/man2/kcmp.2
@@ -5,7 +5,7 @@
.\"
.\" Kernel commit d97b46a64674a267bc41c9e16132ee2a98c3347d
.\"
-.TH kcmp 2 2022-10-30 "Linux man-pages 6.03"
+.TH kcmp 2 2023-05-03 "Linux man-pages 6.05.01"
.SH NAME
kcmp \- compare two processes to determine if they share a kernel resource
.SH LIBRARY
@@ -287,14 +287,11 @@ Process
or
.I pid2
does not exist.
-.SH VERSIONS
-The
-.BR kcmp ()
-system call first appeared in Linux 3.5.
.SH STANDARDS
-.BR kcmp ()
-is Linux-specific and should not be used in programs intended to be portable.
-.SH NOTES
+Linux.
+.SH HISTORY
+Linux 3.5.
+.PP
Before Linux 5.12,
this system call is available only if the kernel is configured with
.BR CONFIG_CHECKPOINT_RESTORE ,
@@ -307,7 +304,7 @@ filesystem; this was deemed to be unsuitable for security reasons.)
Since Linux 5.12,
this system call is also available if the kernel is configured with
.BR CONFIG_KCMP .
-.PP
+.SH NOTES
See
.BR clone (2)
for some background information on the shared resources
@@ -326,7 +323,7 @@ An example run of the program is as follows:
$ \fB./a.out\fP
Parent PID is 1144
Parent opened file on FD 3
-
+\&
PID of child of fork() is 1145
Compare duplicate FDs from different processes:
kcmp(1145, 1144, KCMP_FILE, 3, 3) ==> same
@@ -352,14 +349,14 @@ Child duplicated FD 3 to create FD 5
#include <sys/syscall.h>
#include <sys/wait.h>
#include <unistd.h>
-
+\&
static int
kcmp(pid_t pid1, pid_t pid2, int type,
unsigned long idx1, unsigned long idx2)
{
return syscall(SYS_kcmp, pid1, pid2, type, idx1, idx2);
}
-
+\&
static void
test_kcmp(char *msg, pid_t pid1, pid_t pid2, int fd_a, int fd_b)
{
@@ -369,51 +366,51 @@ test_kcmp(char *msg, pid_t pid1, pid_t pid2, int fd_a, int fd_b)
(kcmp(pid1, pid2, KCMP_FILE, fd_a, fd_b) == 0) ?
"same" : "different");
}
-
+\&
int
main(void)
{
int fd1, fd2, fd3;
static const char pathname[] = "/tmp/kcmp.test";
-
+\&
fd1 = open(pathname, O_CREAT | O_RDWR, 0600);
if (fd1 == \-1)
err(EXIT_FAILURE, "open");
-
+\&
printf("Parent PID is %jd\en", (intmax_t) getpid());
printf("Parent opened file on FD %d\en\en", fd1);
-
+\&
switch (fork()) {
case \-1:
err(EXIT_FAILURE, "fork");
-
+\&
case 0:
printf("PID of child of fork() is %jd\en", (intmax_t) getpid());
-
+\&
test_kcmp("Compare duplicate FDs from different processes:",
getpid(), getppid(), fd1, fd1);
-
+\&
fd2 = open(pathname, O_CREAT | O_RDWR, 0600);
if (fd2 == \-1)
err(EXIT_FAILURE, "open");
printf("Child opened file on FD %d\en", fd2);
-
+\&
test_kcmp("Compare FDs from distinct open()s in same process:",
getpid(), getpid(), fd1, fd2);
-
+\&
fd3 = dup(fd1);
if (fd3 == \-1)
err(EXIT_FAILURE, "dup");
printf("Child duplicated FD %d to create FD %d\en", fd1, fd3);
-
+\&
test_kcmp("Compare duplicated FDs in same process:",
getpid(), getpid(), fd1, fd3);
break;
-
+\&
default:
wait(NULL);
}
-
+\&
exit(EXIT_SUCCESS);
}
.EE
diff --git a/man2/kexec_load.2 b/man2/kexec_load.2
index 33f0a7d4a..604fa1cf6 100644
--- a/man2/kexec_load.2
+++ b/man2/kexec_load.2
@@ -4,7 +4,7 @@
.\"
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
-.TH kexec_load 2 2023-02-05 "Linux man-pages 6.03"
+.TH kexec_load 2 2023-03-30 "Linux man-pages 6.05.01"
.SH NAME
kexec_load, kexec_file_load \- load a new kernel for later execution
.SH LIBRARY
@@ -311,15 +311,15 @@ Could not allocate memory.
The caller does not have the
.B CAP_SYS_BOOT
capability.
-.SH VERSIONS
-The
+.SH STANDARDS
+Linux.
+.SH HISTORY
+.TP
.BR kexec_load ()
-system call first appeared in Linux 2.6.13.
-The
+Linux 2.6.13.
+.TP
.BR kexec_file_load ()
-system call first appeared in Linux 3.17.
-.SH STANDARDS
-These system calls are Linux-specific.
+Linux 3.17.
.SH SEE ALSO
.BR reboot (2),
.BR syscall (2),
diff --git a/man2/keyctl.2 b/man2/keyctl.2
index d7c06d560..d7bd83d18 100644
--- a/man2/keyctl.2
+++ b/man2/keyctl.2
@@ -5,7 +5,7 @@
.\"
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
-.TH keyctl 2 2023-02-05 "Linux man-pages 6.03"
+.TH keyctl 2 2023-05-03 "Linux man-pages 6.05.01"
.SH NAME
keyctl \- manipulate the kernel's key management facility
.SH LIBRARY
@@ -14,7 +14,7 @@ Standard C library
.PP
Alternatively, Linux Key Management Utilities
.RI ( libkeyutils ", " \-lkeyutils );
-see NOTES.
+see VERSIONS.
.SH SYNOPSIS
.nf
.BR "#include <linux/keyctl.h>" " /* Definition of " KEY* " constants */"
@@ -1947,10 +1947,6 @@ was
.B KEYCTL_DH_COMPUTE
and the initialization of crypto modules has timed out.
.SH VERSIONS
-This system call first appeared in Linux 2.6.10.
-.SH STANDARDS
-This system call is a nonstandard Linux extension.
-.SH NOTES
A wrapper is provided in the
.I libkeyutils
library.
@@ -1960,6 +1956,10 @@ header file.)
However, rather than using this system call directly,
you probably want to use the various library functions
mentioned in the descriptions of individual operations above.
+.SH STANDARDS
+Linux.
+.SH HISTORY
+Linux 2.6.10.
.SH EXAMPLES
The program below provide subset of the functionality of the
.BR request\-key (8)
@@ -2010,7 +2010,7 @@ we can see the command-line arguments supplied to our example program:
.EX
$ \fBcat /tmp/key_instantiate.log\fP
Time: Mon Nov 7 13:06:47 2016
-
+\&
Command line arguments:
argv[0]: /sbin/request\-key
operation: create
@@ -2020,7 +2020,7 @@ Command line arguments:
thread_keyring: 0
process_keyring: 0
session_keyring: 256e6a6
-
+\&
Key description: user;1000;1000;3f010000;mykey
Auth key payload: somepayloaddata
Destination keyring: 256e6a6
@@ -2075,7 +2075,7 @@ $ \fBcat /proc/keys | egrep \[aq]mykey|256e6a6\[aq]\fP
.\" SRC BEGIN (key_instantiate.c)
.EX
/* key_instantiate.c */
-
+\&
#include <errno.h>
#include <keyutils.h>
#include <stdint.h>
@@ -2084,11 +2084,11 @@ $ \fBcat /proc/keys | egrep \[aq]mykey|256e6a6\[aq]\fP
#include <string.h>
#include <sys/types.h>
#include <time.h>
-
+\&
#ifndef KEY_SPEC_REQUESTOR_KEYRING
#define KEY_SPEC_REQUESTOR_KEYRING (\-8)
#endif
-
+\&
int
main(int argc, char *argv[])
{
@@ -2103,22 +2103,22 @@ main(int argc, char *argv[])
time_t t;
key_serial_t key_to_instantiate, dest_keyring;
key_serial_t thread_keyring, process_keyring, session_keyring;
-
+\&
if (argc != 8) {
fprintf(stderr, "Usage: %s op key uid gid thread_keyring "
"process_keyring session_keyring\en", argv[0]);
exit(EXIT_FAILURE);
}
-
+\&
fp = fopen("/tmp/key_instantiate.log", "w");
if (fp == NULL)
exit(EXIT_FAILURE);
-
+\&
setbuf(fp, NULL);
-
+\&
t = time(NULL);
fprintf(fp, "Time: %s\en", ctime(&t));
-
+\&
/*
* The kernel passes a fixed set of arguments to the program
* that it execs; fetch them.
@@ -2130,7 +2130,7 @@ main(int argc, char *argv[])
thread_keyring = atoi(argv[5]);
process_keyring = atoi(argv[6]);
session_keyring = atoi(argv[7]);
-
+\&
fprintf(fp, "Command line arguments:\en");
fprintf(fp, " argv[0]: %s\en", argv[0]);
fprintf(fp, " operation: %s\en", operation);
@@ -2145,7 +2145,7 @@ main(int argc, char *argv[])
fprintf(fp, " session_keyring: %jx\en",
(uintmax_t) session_keyring);
fprintf(fp, "\en");
-
+\&
/*
* Assume the authority to instantiate the key named in argv[2].
*/
@@ -2154,7 +2154,7 @@ main(int argc, char *argv[])
strerror(errno));
exit(EXIT_FAILURE);
}
-
+\&
/*
* Fetch the description of the key that is to be instantiated.
*/
@@ -2163,9 +2163,9 @@ main(int argc, char *argv[])
fprintf(fp, "KEYCTL_DESCRIBE failed: %s\en", strerror(errno));
exit(EXIT_FAILURE);
}
-
+\&
fprintf(fp, "Key description: %s\en", dbuf);
-
+\&
/*
* Fetch the payload of the authorization key, which is
* actually the callout data given to request_key().
@@ -2176,10 +2176,10 @@ main(int argc, char *argv[])
fprintf(fp, "KEYCTL_READ failed: %s\en", strerror(errno));
exit(EXIT_FAILURE);
}
-
+\&
auth_key_payload[akp_size] = \[aq]\e0\[aq];
fprintf(fp, "Auth key payload: %s\en", auth_key_payload);
-
+\&
/*
* For interest, get the ID of the authorization key and
* display it.
@@ -2191,9 +2191,9 @@ main(int argc, char *argv[])
strerror(errno));
exit(EXIT_FAILURE);
}
-
+\&
fprintf(fp, "Auth key ID: %jx\en", (uintmax_t) auth_key);
-
+\&
/*
* Fetch key ID for the request_key(2) destination keyring.
*/
@@ -2204,9 +2204,9 @@ main(int argc, char *argv[])
strerror(errno));
exit(EXIT_FAILURE);
}
-
+\&
fprintf(fp, "Destination keyring: %jx\en", (uintmax_t) dest_keyring);
-
+\&
/*
* Fetch the description of the authorization key. This
* allows us to see the key type, UID, GID, permissions,
@@ -2220,9 +2220,9 @@ main(int argc, char *argv[])
fprintf(fp, "KEYCTL_DESCRIBE failed: %s\en", strerror(errno));
exit(EXIT_FAILURE);
}
-
+\&
fprintf(fp, "Auth key description: %s\en", dbuf);
-
+\&
/*
* Instantiate the key using the callout data that was supplied
* in the payload of the authorization key.
@@ -2234,7 +2234,7 @@ main(int argc, char *argv[])
strerror(errno));
exit(EXIT_FAILURE);
}
-
+\&
exit(EXIT_SUCCESS);
}
.EE
diff --git a/man2/kill.2 b/man2/kill.2
index 3486dde4a..d0a2e6fcc 100644
--- a/man2/kill.2
+++ b/man2/kill.2
@@ -21,7 +21,7 @@
.\" Modified 2004-06-24 by aeb
.\" Modified, 2004-11-30, after idea from emmanuel.colbus@ensimag.imag.fr
.\"
-.TH kill 2 2022-12-04 "Linux man-pages 6.03"
+.TH kill 2 2023-03-30 "Linux man-pages 6.05.01"
.SH NAME
kill \- send signal to a process
.SH LIBRARY
@@ -100,7 +100,23 @@ has not yet been
.BR wait (2)ed
for.
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, SVr4, 4.3BSD.
+POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001, SVr4, 4.3BSD.
+.SS Linux notes
+Across different kernel versions, Linux has enforced different rules
+for the permissions required for an unprivileged process
+to send a signal to another process.
+.\" In the 0.* kernels things chopped and changed quite
+.\" a bit - MTK, 24 Jul 02
+In Linux 1.0 to 1.2.2, a signal could be sent if the
+effective user ID of the sender matched effective user ID of the target,
+or the real user ID of the sender matched the real user ID of the target.
+From Linux 1.2.3 until 1.3.77, a signal could be sent if the
+effective user ID of the sender matched either the real or effective
+user ID of the target.
+The current rules, which conform to POSIX.1, were adopted
+in Linux 1.3.78.
.SH NOTES
The only signals that can be sent to process ID 1, the
.I init
@@ -125,20 +141,6 @@ at least one
unblocked signal must be delivered to the sending thread before the
.BR kill ()
returns.
-.SS Linux notes
-Across different kernel versions, Linux has enforced different rules
-for the permissions required for an unprivileged process
-to send a signal to another process.
-.\" In the 0.* kernels things chopped and changed quite
-.\" a bit - MTK, 24 Jul 02
-In Linux 1.0 to 1.2.2, a signal could be sent if the
-effective user ID of the sender matched effective user ID of the target,
-or the real user ID of the sender matched the real user ID of the target.
-From Linux 1.2.3 until 1.3.77, a signal could be sent if the
-effective user ID of the sender matched either the real or effective
-user ID of the target.
-The current rules, which conform to POSIX.1, were adopted
-in Linux 1.3.78.
.SH BUGS
In Linux 2.6 up to and including Linux 2.6.7,
there was a bug that meant that when sending signals to a process group,
diff --git a/man2/landlock_add_rule.2 b/man2/landlock_add_rule.2
index aab0a703e..28d54170b 100644
--- a/man2/landlock_add_rule.2
+++ b/man2/landlock_add_rule.2
@@ -4,7 +4,7 @@
.\"
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
-.TH landlock_add_rule 2 2023-02-10 "Linux man-pages 6.03"
+.TH landlock_add_rule 2 2023-07-08 "Linux man-pages 6.05.01"
.SH NAME
landlock_add_rule \- add a new Landlock rule to a ruleset
.SH LIBRARY
@@ -81,7 +81,7 @@ On success,
returns 0.
.SH ERRORS
.BR landlock_add_rule ()
-can failed for the following reasons:
+can fail for the following reasons:
.TP
.B EOPNOTSUPP
Landlock is supported by the kernel but disabled at boot time.
@@ -118,10 +118,10 @@ has no write access to the underlying ruleset.
.B EFAULT
.I rule_attr
was not a valid address.
-.SH VERSIONS
-Landlock was added in Linux 5.13.
.SH STANDARDS
-This system call is Linux-specific.
+Linux.
+.SH HISTORY
+Linux 5.13.
.SH EXAMPLES
See
.BR landlock (7).
diff --git a/man2/landlock_create_ruleset.2 b/man2/landlock_create_ruleset.2
index 615549156..faadb5777 100644
--- a/man2/landlock_create_ruleset.2
+++ b/man2/landlock_create_ruleset.2
@@ -4,7 +4,7 @@
.\"
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
-.TH landlock_create_ruleset 2 2023-02-10 "Linux man-pages 6.03"
+.TH landlock_create_ruleset 2 2023-03-30 "Linux man-pages 6.05.01"
.SH NAME
landlock_create_ruleset \- create a new Landlock ruleset
.SH LIBRARY
@@ -111,10 +111,10 @@ was not a valid address.
Empty accesses (i.e.,
.I attr\->handled_access_fs
is 0).
-.SH VERSIONS
-Landlock was added in Linux 5.13.
.SH STANDARDS
-This system call is Linux-specific.
+Linux.
+.SH HISTORY
+Linux 5.13.
.SH EXAMPLES
See
.BR landlock (7).
diff --git a/man2/landlock_restrict_self.2 b/man2/landlock_restrict_self.2
index 2eb3f0391..f02c3a163 100644
--- a/man2/landlock_restrict_self.2
+++ b/man2/landlock_restrict_self.2
@@ -4,7 +4,7 @@
.\"
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
-.TH landlock_restrict_self 2 2022-10-30 "Linux man-pages 6.03"
+.TH landlock_restrict_self 2 2023-03-30 "Linux man-pages 6.05.01"
.SH NAME
landlock_restrict_self \- enforce a Landlock ruleset
.SH LIBRARY
@@ -103,10 +103,10 @@ in its user namespace.
.B E2BIG
The maximum number of composed rulesets is reached for the calling thread.
This limit is currently 64.
-.SH VERSIONS
-Landlock was added in Linux 5.13.
.SH STANDARDS
-This system call is Linux-specific.
+Linux.
+.SH HISTORY
+Linux 5.13.
.SH EXAMPLES
See
.BR landlock (7).
diff --git a/man2/link.2 b/man2/link.2
index ef4979878..1533409b9 100644
--- a/man2/link.2
+++ b/man2/link.2
@@ -9,7 +9,7 @@
.\" Modified 2004-06-23 by Michael Kerrisk <mtk.manpages@gmail.com>
.\" Modified 2005-04-04, as per suggestion by Michael Hardt for rename.2
.\"
-.TH link 2 2023-02-05 "Linux man-pages 6.03"
+.TH link 2 2023-03-30 "Linux man-pages 6.05.01"
.SH NAME
link, linkat \- make a new name for a file
.SH LIBRARY
@@ -335,26 +335,6 @@ is an empty string, and
.I olddirfd
refers to a directory.
.SH VERSIONS
-.BR linkat ()
-was added in Linux 2.6.16;
-library support was added in glibc 2.4.
-.SH STANDARDS
-.BR link ():
-SVr4, 4.3BSD, POSIX.1-2001 (but see NOTES), POSIX.1-2008.
-.\" SVr4 documents additional ENOLINK and
-.\" EMULTIHOP error conditions; POSIX.1 does not document ELOOP.
-.\" X/OPEN does not document EFAULT, ENOMEM or EIO.
-.PP
-.BR linkat ():
-POSIX.1-2008.
-.SH NOTES
-Hard links, as created by
-.BR link (),
-cannot span filesystems.
-Use
-.BR symlink (2)
-if this is required.
-.PP
POSIX.1-2001 says that
.BR link ()
should dereference
@@ -385,7 +365,7 @@ is dereferenced if it is a symbolic link.
For precise control over the treatment of symbolic links when
creating a link, use
.BR linkat ().
-.SS glibc notes
+.SS glibc
On older kernels where
.BR linkat ()
is unavailable, the glibc wrapper function falls back to the use of
@@ -405,6 +385,29 @@ that correspond to the
and
.I newdirfd
arguments.
+.SH STANDARDS
+.TP
+.BR link ()
+POSIX.1-2008.
+.SH HISTORY
+.TP
+.BR link ()
+SVr4, 4.3BSD, POSIX.1-2001 (but see VERSIONS).
+.\" SVr4 documents additional ENOLINK and
+.\" EMULTIHOP error conditions; POSIX.1 does not document ELOOP.
+.\" X/OPEN does not document EFAULT, ENOMEM or EIO.
+.TP
+.BR linkat ()
+POSIX.1-2008.
+Linux 2.6.16,
+glibc 2.4.
+.SH NOTES
+Hard links, as created by
+.BR link (),
+cannot span filesystems.
+Use
+.BR symlink (2)
+if this is required.
.SH BUGS
On NFS filesystems, the return code may be wrong in case the NFS server
performs the link creation and dies before it can say so.
diff --git a/man2/listen.2 b/man2/listen.2
index 370d8ae41..951236637 100644
--- a/man2/listen.2
+++ b/man2/listen.2
@@ -14,7 +14,7 @@
.\" Modified 11 May 2001 by Sam Varshavchik <mrsam@courier-mta.com>
.\"
.\"
-.TH listen 2 2022-12-04 "Linux man-pages 6.03"
+.TH listen 2 2023-03-30 "Linux man-pages 6.05.01"
.SH NAME
listen \- listen for connections on a socket
.SH LIBRARY
@@ -90,9 +90,10 @@ The socket is not of a type that supports the
.BR listen ()
operation.
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, 4.4BSD
-.RB ( listen ()
-first appeared in 4.2BSD).
+POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001, 4.4BSD
+(first appeared in 4.2BSD).
.SH NOTES
To accept connections, the following steps are performed:
.RS 4
diff --git a/man2/listxattr.2 b/man2/listxattr.2
index af3b42234..58f5ce0ec 100644
--- a/man2/listxattr.2
+++ b/man2/listxattr.2
@@ -4,7 +4,7 @@
.\"
.\" SPDX-License-Identifier: GPL-2.0-or-later
.\"
-.TH listxattr 2 2023-02-05 "Linux man-pages 6.03"
+.TH listxattr 2 2023-05-03 "Linux man-pages 6.05.01"
.SH NAME
listxattr, llistxattr, flistxattr \- list extended attribute names
.SH LIBRARY
@@ -85,8 +85,9 @@ from the second call.)
.SS Example
The
.I list
-of names is returned as an unordered array of null-terminated character
-strings (attribute names are separated by null bytes (\[aq]\e0\[aq])), like this:
+of names is returned as an unordered array of null-terminated character strings
+(attribute names are separated by null bytes (\[aq]\e0\[aq])),
+like this:
.PP
.in +4n
.EX
@@ -132,11 +133,11 @@ buffer is too small to hold the result.
In addition, the errors documented in
.BR stat (2)
can also occur.
-.SH VERSIONS
-These system calls have been available since Linux 2.4;
-glibc support is provided since glibc 2.3.
.SH STANDARDS
-These system calls are Linux-specific.
+Linux.
+.SH HISTORY
+Linux 2.4,
+glibc 2.3.
.\" .SH AUTHORS
.\" Andreas Gruenbacher,
.\" .RI < a.gruenbacher@computer.org >
@@ -200,18 +201,18 @@ user.empty: <no value>
#include <stdlib.h>
#include <string.h>
#include <sys/xattr.h>
-
+\&
int
main(int argc, char *argv[])
{
char *buf, *key, *val;
ssize_t buflen, keylen, vallen;
-
+\&
if (argc != 2) {
fprintf(stderr, "Usage: %s path\en", argv[0]);
exit(EXIT_FAILURE);
}
-
+\&
/*
* Determine the length of the buffer needed.
*/
@@ -224,7 +225,7 @@ main(int argc, char *argv[])
printf("%s has no attributes.\en", argv[1]);
exit(EXIT_SUCCESS);
}
-
+\&
/*
* Allocate the buffer.
*/
@@ -233,7 +234,7 @@ main(int argc, char *argv[])
perror("malloc");
exit(EXIT_FAILURE);
}
-
+\&
/*
* Copy the list of attribute keys to the buffer.
*/
@@ -242,7 +243,7 @@ main(int argc, char *argv[])
perror("listxattr");
exit(EXIT_FAILURE);
}
-
+\&
/*
* Loop over the list of zero terminated strings with the
* attribute keys. Use the remaining buffer length to determine
@@ -250,21 +251,21 @@ main(int argc, char *argv[])
*/
key = buf;
while (buflen > 0) {
-
+\&
/*
* Output attribute key.
*/
printf("%s: ", key);
-
+\&
/*
* Determine length of the value.
*/
vallen = getxattr(argv[1], key, NULL, 0);
if (vallen == \-1)
perror("getxattr");
-
+\&
if (vallen > 0) {
-
+\&
/*
* Allocate value buffer.
* One extra byte is needed to append 0x00.
@@ -274,7 +275,7 @@ main(int argc, char *argv[])
perror("malloc");
exit(EXIT_FAILURE);
}
-
+\&
/*
* Copy value to buffer.
*/
@@ -288,14 +289,14 @@ main(int argc, char *argv[])
val[vallen] = 0;
printf("%s", val);
}
-
+\&
free(val);
} else if (vallen == 0) {
printf("<no value>");
}
-
+\&
printf("\en");
-
+\&
/*
* Forward to next attribute key.
*/
@@ -303,7 +304,7 @@ main(int argc, char *argv[])
buflen \-= keylen;
key += keylen;
}
-
+\&
free(buf);
exit(EXIT_SUCCESS);
}
diff --git a/man2/llseek.2 b/man2/llseek.2
index c8d873a8d..64de50438 100644
--- a/man2/llseek.2
+++ b/man2/llseek.2
@@ -6,7 +6,7 @@
.\"
.\" Modified Thu Oct 31 15:16:23 1996 by Eric S. Raymond <esr@thyrsus.com>
.\"
-.TH _llseek 2 2023-01-07 "Linux man-pages 6.03"
+.TH _llseek 2 2023-03-30 "Linux man-pages 6.05.01"
.SH NAME
_llseek \- reposition read/write file offset
.SH LIBRARY
@@ -80,13 +80,12 @@ Problem with copying results to user space.
.B EINVAL
.I whence
is invalid.
-.SH STANDARDS
-This function is Linux-specific, and should not be used in programs
-intended to be portable.
-.SH NOTES
+.SH VERSIONS
You probably want to use the
.BR lseek (2)
wrapper function instead.
+.SH STANDARDS
+Linux.
.SH SEE ALSO
.BR lseek (2),
.BR open (2),
diff --git a/man2/lookup_dcookie.2 b/man2/lookup_dcookie.2
index bed1567b2..4543e450c 100644
--- a/man2/lookup_dcookie.2
+++ b/man2/lookup_dcookie.2
@@ -4,7 +4,7 @@
.\"
.\" Modified 2004-06-17 Michael Kerrisk <mtk.manpages@gmail.com>
.\"
-.TH lookup_dcookie 2 2022-12-04 "Linux man-pages 6.03"
+.TH lookup_dcookie 2 2023-03-30 "Linux man-pages 6.05.01"
.SH NAME
lookup_dcookie \- return a directory entry's path
.SH LIBRARY
@@ -65,14 +65,14 @@ required to look up cookie values.
.TP
.B ERANGE
The buffer was not large enough to hold the path of the directory entry.
-.SH VERSIONS
-Available since Linux 2.5.43.
+.SH STANDARDS
+Linux.
+.SH HISTORY
+Linux 2.5.43.
+.PP
The
.B ENAMETOOLONG
-error return was added in Linux 2.5.70.
-.SH STANDARDS
-.BR lookup_dcookie ()
-is Linux-specific.
+error was added in Linux 2.5.70.
.SH NOTES
.BR lookup_dcookie ()
is a special-purpose system call, currently used only by the
diff --git a/man2/lseek.2 b/man2/lseek.2
index 65f2abd46..7ef793007 100644
--- a/man2/lseek.2
+++ b/man2/lseek.2
@@ -15,7 +15,7 @@
.\" Modified 2003-08-21 by Andries Brouwer <aeb@cwi.nl>
.\" 2011-09-18, mtk, Added SEEK_DATA + SEEK_HOLE
.\"
-.TH lseek 2 2023-02-05 "Linux man-pages 6.03"
+.TH lseek 2 2023-03-30 "Linux man-pages 6.05.01"
.SH NAME
lseek \- reposition read/write file offset
.SH LIBRARY
@@ -205,8 +205,17 @@ The resulting file offset cannot be represented in an
.B ESPIPE
.I fd
is associated with a pipe, socket, or FIFO.
+.SH VERSIONS
+On Linux, using
+.BR lseek ()
+on a terminal device fails with the error
+.BR ESPIPE .
+.\" Other systems return the number of written characters,
+.\" using SEEK_SET to set the counter. (Of written characters.)
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, SVr4, 4.3BSD.
+POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001, SVr4, 4.3BSD.
.PP
.B SEEK_DATA
and
@@ -230,20 +239,9 @@ then a
moves the file offset to the end of the file, regardless of the use of
.BR lseek ().
.PP
-The
-.I off_t
-data type is a signed integer data type specified by POSIX.1.
-.PP
Some devices are incapable of seeking and POSIX does not specify which
devices must support
.BR lseek ().
-.PP
-On Linux, using
-.BR lseek ()
-on a terminal device fails with the error
-\fBESPIPE\fP.
-.\" Other systems return the number of written characters,
-.\" using SEEK_SET to set the counter. (Of written characters.)
.SH SEE ALSO
.BR dup (2),
.BR fallocate (2),
diff --git a/man2/madvise.2 b/man2/madvise.2
index 5b2895739..5782574ee 100644
--- a/man2/madvise.2
+++ b/man2/madvise.2
@@ -12,7 +12,7 @@
.\" 2011-09-18, Doug Goldstein <cardoe@cardoe.com>
.\" Document MADV_HUGEPAGE and MADV_NOHUGEPAGE
.\"
-.TH madvise 2 2023-02-05 "Linux man-pages 6.03"
+.TH madvise 2 2023-04-03 "Linux man-pages 6.05.01"
.SH NAME
madvise \- give advice about use of memory
.SH LIBRARY
@@ -490,7 +490,7 @@ that are known not to be useful in a core dump.
The effect of
.B MADV_DONTDUMP
takes precedence over the bit mask that is set via the
-.I /proc/[pid]/coredump_filter
+.IR /proc/ pid /coredump_filter
file (see
.BR core (5)).
.TP
@@ -838,15 +838,6 @@ be created using the
flag described elsewhere in this page)
was encountered.
.SH VERSIONS
-Since Linux 3.18,
-.\" commit d3ac21cacc24790eb45d735769f35753f5b56ceb
-support for this system call is optional,
-depending on the setting of the
-.B CONFIG_ADVISE_SYSCALLS
-configuration option.
-.SH STANDARDS
-.BR madvise ()
-is not specified by any standards.
Versions of this system call, implementing a wide variety of
.I advice
values, exist on many other implementations.
@@ -865,8 +856,7 @@ with constants
and
.BR POSIX_MADV_DONTNEED ,
and so on, with behavior close to the similarly named flags listed above.
-.SH NOTES
-.SS Linux notes
+.SS Linux
The Linux implementation requires that the address
.I addr
be page-aligned, and allows
@@ -883,10 +873,17 @@ from the system call, as it should).
will return zero iff
.I advice
is supported by the kernel and can be relied on to probe for support.
-.\" .SH HISTORY
-.\" The
-.\" .BR madvise ()
-.\" function first appeared in 4.4BSD.
+.SH STANDARDS
+None.
+.SH HISTORY
+First appeared in 4.4BSD.
+.PP
+Since Linux 3.18,
+.\" commit d3ac21cacc24790eb45d735769f35753f5b56ceb
+support for this system call is optional,
+depending on the setting of the
+.B CONFIG_ADVISE_SYSCALLS
+configuration option.
.SH SEE ALSO
.BR getrlimit (2),
.BR memfd_secret (2),
diff --git a/man2/mbind.2 b/man2/mbind.2
index d2eb581a5..064b8a1f9 100644
--- a/man2/mbind.2
+++ b/man2/mbind.2
@@ -1,25 +1,8 @@
+.\" SPDX-License-Identifier: Linux-man-pages-copyleft-var
+.\"
.\" Copyright 2003,2004 Andi Kleen, SuSE Labs.
.\" and Copyright 2007 Lee Schermerhorn, Hewlett Packard
.\"
-.\" %%%LICENSE_START(VERBATIM_PROF)
-.\" Permission is granted to make and distribute verbatim copies of this
-.\" manual provided the copyright notice and this permission notice are
-.\" preserved on all copies.
-.\"
-.\" Permission is granted to copy and distribute modified versions of this
-.\" manual under the conditions for verbatim copying, provided that the
-.\" entire resulting derived work is distributed under the terms of a
-.\" permission notice identical to this one.
-.\"
-.\" Since the Linux kernel and libraries are constantly changing, this
-.\" manual page may be incorrect or out-of-date. The author(s) assume no
-.\" responsibility for errors or omissions, or for damages resulting from
-.\" the use of the information contained herein.
-.\"
-.\" Formatted or processed versions of this manual, if unaccompanied by
-.\" the source, must acknowledge the copyright and authors of this work.
-.\" %%%LICENSE_END
-.\"
.\" 2006-02-03, mtk, substantial wording changes and other improvements
.\" 2007-08-27, Lee Schermerhorn <Lee.Schermerhorn@hp.com>
.\" more precise specification of behavior.
@@ -32,7 +15,7 @@
.\" Author: Lee Schermerhorn <lee.schermerhorn@hp.com>
.\" Date: Thu Oct 25 14:16:32 2012 +0200
.\"
-.TH mbind 2 2023-02-05 "Linux man-pages 6.03"
+.TH mbind 2 2023-07-16 "Linux man-pages 6.05.01"
.SH NAME
mbind \- set memory policy for a memory range
.SH LIBRARY
@@ -311,6 +294,11 @@ If
is also specified, then the call fails with the error
.B EIO
if some pages could not be moved.
+If the
+.B MPOL_INTERLEAVE
+policy was specified,
+pages already residing on the specified nodes
+will not be moved such that they are interleaved.
.PP
If
.B MPOL_MF_MOVE_ALL
@@ -326,6 +314,11 @@ If
is also specified, then the call fails with the error
.B EIO
if some pages could not be moved.
+If the
+.B MPOL_INTERLEAVE
+policy was specified,
+pages already residing on the specified nodes
+will not be moved such that they are interleaved.
.\" ---------------------------------------------------------------
.SH RETURN VALUE
On success,
@@ -420,12 +413,24 @@ flag and the caller does not have the
.B CAP_SYS_NICE
privilege.
.\" ---------------------------------------------------------------
-.SH VERSIONS
-The
-.BR mbind ()
-system call was added in Linux 2.6.7.
.SH STANDARDS
-This system call is Linux-specific.
+Linux.
+.SH HISTORY
+Linux 2.6.7.
+.PP
+Support for huge page policy was added with Linux 2.6.16.
+For interleave policy to be effective on huge page mappings the
+policied memory needs to be tens of megabytes or larger.
+.PP
+Before Linux 5.7.
+.\" commit dcf1763546d76c372f3136c8d6b2b6e77f140cf0
+.B MPOL_MF_STRICT
+was ignored on huge page mappings.
+.PP
+.B MPOL_MF_MOVE
+and
+.B MPOL_MF_MOVE_ALL
+are available only on Linux 2.6.16 and later.
.SH NOTES
For information on library support, see
.BR numa (7).
@@ -468,20 +473,6 @@ with an empty set of nodes.
This method will work for
.BR set_mempolicy (2),
as well.
-.PP
-Support for huge page policy was added with Linux 2.6.16.
-For interleave policy to be effective on huge page mappings the
-policied memory needs to be tens of megabytes or larger.
-.PP
-Before Linux 5.7.
-.\" commit dcf1763546d76c372f3136c8d6b2b6e77f140cf0
-.B MPOL_MF_STRICT
-was ignored on huge page mappings.
-.PP
-.B MPOL_MF_MOVE
-and
-.B MPOL_MF_MOVE_ALL
-are available only on Linux 2.6.16 and later.
.SH SEE ALSO
.BR get_mempolicy (2),
.BR getcpu (2),
diff --git a/man2/membarrier.2 b/man2/membarrier.2
index a530c662a..f118fd014 100644
--- a/man2/membarrier.2
+++ b/man2/membarrier.2
@@ -3,7 +3,7 @@
.\"
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
-.TH membarrier 2 2022-12-15 "Linux man-pages 6.03"
+.TH membarrier 2 2023-05-03 "Linux man-pages 6.05.01"
.SH NAME
membarrier \- issue memory barriers on a set of threads
.SH LIBRARY
@@ -280,27 +280,18 @@ system call is not implemented by this kernel.
.B EPERM
The current process was not registered prior to using private expedited
commands.
-.SH VERSIONS
-The
-.BR membarrier ()
-system call was added in Linux 4.3.
+.SH STANDARDS
+Linux.
+.SH HISTORY
+Linux 4.3.
.PP
-Before Linux 5.10, the prototype for
-.BR membarrier ()
-was:
+Before Linux 5.10, the prototype was:
.PP
.in +4n
.EX
.BI "int membarrier(int " cmd ", int " flags );
.EE
.in
-.SH STANDARDS
-.BR membarrier ()
-is Linux-specific.
-.\" .SH SEE ALSO
-.\" FIXME See if the following syscalls make it into Linux 4.15 or later
-.\" .BR cpu_opv (2),
-.\" .BR rseq (2)
.SH NOTES
A memory barrier instruction is part of the instruction set of
architectures with weakly ordered memory models.
@@ -328,9 +319,9 @@ following code (x86) can be transformed using
.\" SRC BEGIN (membarrier.c)
.EX
#include <stdlib.h>
-
+\&
static volatile int a, b;
-
+\&
static void
fast_path(int *read_b)
{
@@ -338,7 +329,7 @@ fast_path(int *read_b)
asm volatile ("mfence" : : : "memory");
*read_b = b;
}
-
+\&
static void
slow_path(int *read_a)
{
@@ -346,29 +337,29 @@ slow_path(int *read_a)
asm volatile ("mfence" : : : "memory");
*read_a = a;
}
-
+\&
int
main(void)
{
int read_a, read_b;
-
+\&
/*
* Real applications would call fast_path() and slow_path()
* from different threads. Call those from main() to keep
* this example short.
*/
-
+\&
slow_path(&read_a);
fast_path(&read_b);
-
+\&
/*
* read_b == 0 implies read_a == 1 and
* read_a == 0 implies read_b == 1.
*/
-
+\&
if (read_b == 0 && read_a == 0)
abort();
-
+\&
exit(EXIT_SUCCESS);
}
.EE
@@ -387,37 +378,37 @@ becomes:
#include <unistd.h>
#include <sys/syscall.h>
#include <linux/membarrier.h>
-
+\&
static volatile int a, b;
-
+\&
static int
membarrier(int cmd, unsigned int flags, int cpu_id)
{
return syscall(__NR_membarrier, cmd, flags, cpu_id);
}
-
+\&
static int
init_membarrier(void)
{
int ret;
-
+\&
/* Check that membarrier() is supported. */
-
+\&
ret = membarrier(MEMBARRIER_CMD_QUERY, 0, 0);
if (ret < 0) {
perror("membarrier");
return \-1;
}
-
+\&
if (!(ret & MEMBARRIER_CMD_GLOBAL)) {
fprintf(stderr,
"membarrier does not support MEMBARRIER_CMD_GLOBAL\en");
return \-1;
}
-
+\&
return 0;
}
-
+\&
static void
fast_path(int *read_b)
{
@@ -425,7 +416,7 @@ fast_path(int *read_b)
asm volatile ("" : : : "memory");
*read_b = b;
}
-
+\&
static void
slow_path(int *read_a)
{
@@ -433,33 +424,37 @@ slow_path(int *read_a)
membarrier(MEMBARRIER_CMD_GLOBAL, 0, 0);
*read_a = a;
}
-
+\&
int
main(int argc, char *argv[])
{
int read_a, read_b;
-
+\&
if (init_membarrier())
exit(EXIT_FAILURE);
-
+\&
/*
* Real applications would call fast_path() and slow_path()
* from different threads. Call those from main() to keep
* this example short.
*/
-
+\&
slow_path(&read_a);
fast_path(&read_b);
-
+\&
/*
* read_b == 0 implies read_a == 1 and
* read_a == 0 implies read_b == 1.
*/
-
+\&
if (read_b == 0 && read_a == 0)
abort();
-
+\&
exit(EXIT_SUCCESS);
}
.EE
.in
+.\" .SH SEE ALSO
+.\" FIXME See if the following syscalls make it into Linux 4.15 or later
+.\" .BR cpu_opv (2),
+.\" .BR rseq (2)
diff --git a/man2/memfd_create.2 b/man2/memfd_create.2
index 5e7ebd3d6..fb18abc30 100644
--- a/man2/memfd_create.2
+++ b/man2/memfd_create.2
@@ -3,7 +3,7 @@
.\"
.\" SPDX-License-Identifier: GPL-2.0-or-later
.\"
-.TH memfd_create 2 2023-02-05 "Linux man-pages 6.03"
+.TH memfd_create 2 2023-05-03 "Linux man-pages 6.05.01"
.SH NAME
memfd_create \- create an anonymous file
.SH LIBRARY
@@ -184,11 +184,6 @@ The system-wide limit on the total number of open files has been reached.
.TP
.B ENOMEM
There was insufficient memory to create a new anonymous file.
-.SH VERSIONS
-The
-.BR memfd_create ()
-system call first appeared in Linux 3.17;
-glibc support was added in glibc 2.27.
.TP
.B EPERM
The
@@ -203,9 +198,10 @@ group; see the description of
in
.BR proc (5).
.SH STANDARDS
-The
-.BR memfd_create ()
-system call is Linux-specific.
+Linux.
+.SH HISTORY
+Linux 3.17,
+glibc 2.27.
.SH NOTES
.\" See also http://lwn.net/Articles/593918/
.\" and http://lwn.net/Articles/594919/ and http://lwn.net/Articles/591108/
@@ -317,7 +313,7 @@ since they are running under the same user ID.
Therefore, file sealing would not normally be necessary.)
.IP \[bu]
The second process opens the file
-.IR /proc/<pid>/fd/<fd> ,
+.IR /proc/ pid /fd/ fd,
where
.I <pid>
is the PID of the first process (the one that called
@@ -418,7 +414,7 @@ Existing seals: WRITE SHRINK
#include <string.h>
#include <sys/mman.h>
#include <unistd.h>
-
+\&
int
main(int argc, char *argv[])
{
@@ -426,7 +422,7 @@ main(int argc, char *argv[])
char *name, *seals_arg;
ssize_t len;
unsigned int seals;
-
+\&
if (argc < 3) {
fprintf(stderr, "%s name size [seals]\en", argv[0]);
fprintf(stderr, "\et\[aq]seals\[aq] can contain any of the "
@@ -438,35 +434,35 @@ main(int argc, char *argv[])
fprintf(stderr, "\et\etS \- F_SEAL_SEAL\en");
exit(EXIT_FAILURE);
}
-
+\&
name = argv[1];
len = atoi(argv[2]);
seals_arg = argv[3];
-
+\&
/* Create an anonymous file in tmpfs; allow seals to be
placed on the file. */
-
+\&
fd = memfd_create(name, MFD_ALLOW_SEALING);
if (fd == \-1)
err(EXIT_FAILURE, "memfd_create");
-
+\&
/* Size the file as specified on the command line. */
-
+\&
if (ftruncate(fd, len) == \-1)
err(EXIT_FAILURE, "truncate");
-
+\&
printf("PID: %jd; fd: %d; /proc/%jd/fd/%d\en",
(intmax_t) getpid(), fd, (intmax_t) getpid(), fd);
-
+\&
/* Code to map the file and populate the mapping with data
omitted. */
-
+\&
/* If a \[aq]seals\[aq] command\-line argument was supplied, set some
seals on the file. */
-
+\&
if (seals_arg != NULL) {
seals = 0;
-
+\&
if (strchr(seals_arg, \[aq]g\[aq]) != NULL)
seals |= F_SEAL_GROW;
if (strchr(seals_arg, \[aq]s\[aq]) != NULL)
@@ -477,16 +473,16 @@ main(int argc, char *argv[])
seals |= F_SEAL_FUTURE_WRITE;
if (strchr(seals_arg, \[aq]S\[aq]) != NULL)
seals |= F_SEAL_SEAL;
-
+\&
if (fcntl(fd, F_ADD_SEALS, seals) == \-1)
err(EXIT_FAILURE, "fcntl");
}
-
+\&
/* Keep running, so that the file created by memfd_create()
continues to exist. */
-
+\&
pause();
-
+\&
exit(EXIT_SUCCESS);
}
.EE
@@ -500,26 +496,26 @@ main(int argc, char *argv[])
#include <fcntl.h>
#include <stdio.h>
#include <stdlib.h>
-
+\&
int
main(int argc, char *argv[])
{
int fd;
unsigned int seals;
-
+\&
if (argc != 2) {
fprintf(stderr, "%s /proc/PID/fd/FD\en", argv[0]);
exit(EXIT_FAILURE);
}
-
+\&
fd = open(argv[1], O_RDWR);
if (fd == \-1)
err(EXIT_FAILURE, "open");
-
+\&
seals = fcntl(fd, F_GET_SEALS);
if (seals == \-1)
err(EXIT_FAILURE, "fcntl");
-
+\&
printf("Existing seals:");
if (seals & F_SEAL_SEAL)
printf(" SEAL");
@@ -532,10 +528,10 @@ main(int argc, char *argv[])
if (seals & F_SEAL_SHRINK)
printf(" SHRINK");
printf("\en");
-
+\&
/* Code to map the file and access the contents of the
resulting mapping omitted. */
-
+\&
exit(EXIT_SUCCESS);
}
.EE
diff --git a/man2/memfd_secret.2 b/man2/memfd_secret.2
index 5b2c87d37..fcc39f640 100644
--- a/man2/memfd_secret.2
+++ b/man2/memfd_secret.2
@@ -7,7 +7,7 @@
.\"
.\" SPDX-License-Identifier: GPL-2.0-or-later
.\"
-.TH memfd_secret 2 2023-02-05 "Linux man-pages 6.03"
+.TH memfd_secret 2 2023-03-30 "Linux man-pages 6.05.01"
.SH NAME
memfd_secret \- create an anonymous RAM-based file
to access secret memory regions
@@ -132,14 +132,10 @@ There was insufficient memory to create a new anonymous file.
is not implemented on this architecture,
or has not been enabled on the kernel command-line with
.BR secretmem_enable =1.
-.SH VERSIONS
-The
-.BR memfd_secret ()
-system call first appeared in Linux 5.14.
.SH STANDARDS
-The
-.BR memfd_secret ()
-system call is Linux-specific.
+Linux.
+.SH HISTORY
+Linux 5.14.
.SH NOTES
The
.BR memfd_secret ()
diff --git a/man2/migrate_pages.2 b/man2/migrate_pages.2
index c2f29f59f..177f463c1 100644
--- a/man2/migrate_pages.2
+++ b/man2/migrate_pages.2
@@ -1,21 +1,12 @@
+.\" SPDX-License-Identifier: Linux-man-pages-copyleft-2-para
+.\"
.\" Copyright 2009 Intel Corporation
.\" Author: Andi Kleen
.\" Based on the move_pages manpage which was
.\" This manpage is Copyright (C) 2006 Silicon Graphics, Inc.
.\" Christoph Lameter
.\"
-.\" %%%LICENSE_START(VERBATIM_TWO_PARA)
-.\" Permission is granted to make and distribute verbatim copies of this
-.\" manual provided the copyright notice and this permission notice are
-.\" preserved on all copies.
-.\"
-.\" Permission is granted to copy and distribute modified versions of this
-.\" manual under the conditions for verbatim copying, provided that the
-.\" entire resulting derived work is distributed under the terms of a
-.\" permission notice identical to this one.
-.\" %%%LICENSE_END
-.\"
-.TH migrate_pages 2 2022-12-04 "Linux man-pages 6.03"
+.TH migrate_pages 2 2023-07-15 "Linux man-pages 6.05.01"
.SH NAME
migrate_pages \- move all pages in a process to another set of nodes
.SH LIBRARY
@@ -134,12 +125,10 @@ No process matching
.I pid
could be found.
.\" FIXME Document the other errors that can occur for migrate_pages()
-.SH VERSIONS
-The
-.BR migrate_pages ()
-system call first appeared in Linux 2.6.16.
.SH STANDARDS
-This system call is Linux-specific.
+Linux.
+.SH HISTORY
+Linux 2.6.16.
.SH NOTES
For information on library support, see
.BR numa (7).
diff --git a/man2/mincore.2 b/man2/mincore.2
index 8ac2bdf6a..9ffca56d0 100644
--- a/man2/mincore.2
+++ b/man2/mincore.2
@@ -11,7 +11,7 @@
.\" after message from <gordon.jin@intel.com>
.\" 2007-01-08 mtk, rewrote various parts
.\"
-.TH mincore 2 2023-02-05 "Linux man-pages 6.03"
+.TH mincore 2 2023-03-30 "Linux man-pages 6.05.01"
.SH NAME
mincore \- determine whether pages are resident in memory
.SH LIBRARY
@@ -117,18 +117,16 @@ to
+
.I length
contained unmapped memory.
-.SH VERSIONS
-Available since Linux 2.3.99pre1 and glibc 2.2.
.SH STANDARDS
-.BR mincore ()
-is not specified in POSIX.1,
-and it is not available on all UNIX implementations.
-.\" It is on at least NetBSD, FreeBSD, OpenBSD, Solaris 8,
-.\" AIX 5.1, SunOS 4.1
-.\" .SH HISTORY
-.\" The
-.\" .BR mincore ()
-.\" function first appeared in 4.4BSD.
+None.
+.SH HISTORY
+Linux 2.3.99pre1,
+glibc 2.2.
+.PP
+First appeared in 4.4BSD.
+.PP
+NetBSD, FreeBSD, OpenBSD, Solaris 8,
+AIX 5.1, SunOS 4.1.
.SH BUGS
Before Linux 2.6.21,
.BR mincore ()
diff --git a/man2/mkdir.2 b/man2/mkdir.2
index 0e0f9f8a8..c3342bdba 100644
--- a/man2/mkdir.2
+++ b/man2/mkdir.2
@@ -5,7 +5,7 @@
.\"
.\" SPDX-License-Identifier: GPL-1.0-or-later
.\"
-.TH mkdir 2 2023-02-05 "Linux man-pages 6.03"
+.TH mkdir 2 2023-03-30 "Linux man-pages 6.05.01"
.SH NAME
mkdir, mkdirat \- create a directory
.SH LIBRARY
@@ -204,25 +204,10 @@ does not support the creation of directories.
.I pathname
refers to a file on a read-only filesystem.
.SH VERSIONS
-.BR mkdirat ()
-was added in Linux 2.6.16;
-library support was added in glibc 2.4.
-.SH STANDARDS
-.BR mkdir ():
-SVr4, BSD, POSIX.1-2001, POSIX.1-2008.
-.\" SVr4 documents additional EIO, EMULTIHOP
-.PP
-.BR mkdirat ():
-POSIX.1-2008.
-.SH NOTES
Under Linux, apart from the permission bits, the
.B S_ISVTX
.I mode
bit is also honored.
-.PP
-There are many infelicities in the protocol underlying NFS.
-Some of these affect
-.BR mkdir ().
.SS glibc notes
On older kernels where
.BR mkdirat ()
@@ -236,6 +221,21 @@ glibc constructs a pathname based on the symbolic link in
that corresponds to the
.I dirfd
argument.
+.SH STANDARDS
+POSIX.1-2008.
+.SH HISTORY
+.TP
+.BR mkdir ()
+SVr4, BSD, POSIX.1-2001.
+.\" SVr4 documents additional EIO, EMULTIHOP
+.TP
+.BR mkdirat ()
+Linux 2.6.16,
+glibc 2.4.
+.SH NOTES
+There are many infelicities in the protocol underlying NFS.
+Some of these affect
+.BR mkdir ().
.SH SEE ALSO
.BR mkdir (1),
.BR chmod (2),
diff --git a/man2/mknod.2 b/man2/mknod.2
index 2fd730469..0925aea6b 100644
--- a/man2/mknod.2
+++ b/man2/mknod.2
@@ -9,7 +9,7 @@
.\" Modified 2003-04-23 by Michael Kerrisk
.\" Modified 2004-06-23 by Michael Kerrisk <mtk.manpages@gmail.com>
.\"
-.TH mknod 2 2023-02-05 "Linux man-pages 6.03"
+.TH mknod 2 2023-03-31 "Linux man-pages 6.05.01"
.SH NAME
mknod, mknodat \- create a special or ordinary file
.SH LIBRARY
@@ -164,7 +164,7 @@ did not allow search permission.
.BR path_resolution (7).)
.TP
.B EBADF
-.BR ( mknodat ())
+.RB ( mknodat ())
.I pathname
is relative but
.I dirfd
@@ -217,7 +217,7 @@ A component used as a directory in
is not, in fact, a directory.
.TP
.B ENOTDIR
-.BR ( mknodat ())
+.RB ( mknodat ())
.I pathname
is relative and
.I dirfd
@@ -241,19 +241,6 @@ does not support the type of node requested.
.I pathname
refers to a file on a read-only filesystem.
.SH VERSIONS
-.BR mknodat ()
-was added in Linux 2.6.16;
-library support was added in glibc 2.4.
-.SH STANDARDS
-.BR mknod ():
-SVr4, 4.4BSD, POSIX.1-2001 (but see below), POSIX.1-2008.
-.\" The Linux version differs from the SVr4 version in that it
-.\" does not require root permission to create pipes, also in that no
-.\" EMULTIHOP, ENOLINK, or EINTR error is documented.
-.PP
-.BR mknodat ():
-POSIX.1-2008.
-.SH NOTES
POSIX.1-2001 says: "The only portable use of
.BR mknod ()
is to create a FIFO-special file.
@@ -278,7 +265,21 @@ cannot be used to create directories.
One should make directories with
.BR mkdir (2).
.\" and one should make UNIX domain sockets with socket(2) and bind(2).
-.PP
+.SH STANDARDS
+POSIX.1-2008.
+.SH HISTORY
+.TP
+.BR mknod ()
+SVr4, 4.4BSD, POSIX.1-2001 (but see VERSIONS).
+.\" The Linux version differs from the SVr4 version in that it
+.\" does not require root permission to create pipes, also in that no
+.\" EMULTIHOP, ENOLINK, or EINTR error is documented.
+.TP
+.BR mknodat ()
+Linux 2.6.16,
+glibc 2.4.
+POSIX.1-2008.
+.SH NOTES
There are many infelicities in the protocol underlying NFS.
Some of these affect
.BR mknod ()
diff --git a/man2/mlock.2 b/man2/mlock.2
index ff0f20352..1efe3dd71 100644
--- a/man2/mlock.2
+++ b/man2/mlock.2
@@ -4,7 +4,7 @@
.\"
.\" SPDX-License-Identifier: GPL-2.0-or-later
.\"
-.TH mlock 2 2023-02-05 "Linux man-pages 6.03"
+.TH mlock 2 2023-04-08 "Linux man-pages 6.05.01"
.SH NAME
mlock, mlock2, munlock, mlockall, munlockall \- lock and unlock memory
.SH LIBRARY
@@ -35,9 +35,9 @@ swap area.
and
.BR munlockall ()
perform the converse operation,
-unlocking part or all of the calling process's virtual
-address space, so that pages in the specified virtual address range may
-once more be swapped out if required by the kernel memory manager.
+unlocking part or all of the calling process's virtual address space,
+so that pages in the specified virtual address range
+can be swapped out again if required by the kernel memory manager.
.PP
Memory locking and unlocking are performed in units of whole pages.
.SS mlock(), mlock2(), and munlock()
@@ -256,19 +256,49 @@ to perform the requested operation.
(Linux 2.6.8 and earlier) The caller was not privileged
.RB ( CAP_IPC_LOCK ).
.SH VERSIONS
-.BR mlock2 ()
-is available since Linux 4.4;
-glibc support was added in glibc 2.27.
-.SH STANDARDS
+.SS Linux
+Under Linux,
.BR mlock (),
-.BR munlock (),
-.BR mlockall (),
+.BR mlock2 (),
and
-.BR munlockall ():
-POSIX.1-2001, POSIX.1-2008, SVr4.
+.BR munlock ()
+automatically round
+.I addr
+down to the nearest page boundary.
+However, the POSIX.1 specification of
+.BR mlock ()
+and
+.BR munlock ()
+allows an implementation to require that
+.I addr
+is page aligned, so portable applications should ensure this.
.PP
+The
+.I VmLck
+field of the Linux-specific
+.IR /proc/ pid /status
+file shows how many kilobytes of memory the process with ID
+.I PID
+has locked using
+.BR mlock (),
+.BR mlock2 (),
+.BR mlockall (),
+and
+.BR mmap (2)
+.BR MAP_LOCKED .
+.SH STANDARDS
+.TP
+.BR mlock ()
+.TQ
+.BR munlock ()
+.TQ
+.BR mlockall ()
+.TQ
+.BR munlockall ()
+POSIX.1-2008.
+.TP
.BR mlock2 ()
-is Linux specific.
+Linux.
.PP
On POSIX systems on which
.BR mlock ()
@@ -294,6 +324,20 @@ is defined in \fI<unistd.h>\fP to a value greater than 0.
.\" POSIX.1-2001: It shall be defined to -1 or 0 or 200112L.
.\" -1: unavailable, 0: ask using sysconf().
.\" glibc defines it to 1.
+.SH HISTORY
+.TP
+.BR mlock ()
+.TQ
+.BR munlock ()
+.TQ
+.BR mlockall ()
+.TQ
+.BR munlockall ()
+POSIX.1-2001, POSIX.1-2008, SVr4.
+.TP
+.BR mlock2 ()
+Linux 4.4,
+glibc 2.27.
.SH NOTES
Memory locking has two main applications: real-time algorithms and
high-security data processing.
@@ -392,36 +436,6 @@ flag allow efficient memory locking for applications that deal with
large mappings where only a (small) portion of pages in the mapping are touched.
In such cases, locking all of the pages in a mapping would incur
a significant penalty for memory locking.
-.SS Linux notes
-Under Linux,
-.BR mlock (),
-.BR mlock2 (),
-and
-.BR munlock ()
-automatically round
-.I addr
-down to the nearest page boundary.
-However, the POSIX.1 specification of
-.BR mlock ()
-and
-.BR munlock ()
-allows an implementation to require that
-.I addr
-is page aligned, so portable applications should ensure this.
-.PP
-The
-.I VmLck
-field of the Linux-specific
-.I /proc/[pid]/status
-file shows how many kilobytes of memory the process with ID
-.I PID
-has locked using
-.BR mlock (),
-.BR mlock2 (),
-.BR mlockall (),
-and
-.BR mmap (2)
-.BR MAP_LOCKED .
.SS Limits and permissions
In Linux 2.6.8 and earlier,
a process must be privileged
diff --git a/man2/mmap.2 b/man2/mmap.2
index c847a77ac..3d9a887e2 100644
--- a/man2/mmap.2
+++ b/man2/mmap.2
@@ -18,7 +18,7 @@
.\" 2007-07-10, mtk, Added an example program.
.\" 2008-11-18, mtk, document MAP_STACK
.\"
-.TH mmap 2 2023-02-05 "Linux man-pages 6.03"
+.TH mmap 2 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
mmap, munmap \- map or unmap files or devices into memory
.SH LIBRARY
@@ -650,56 +650,20 @@ of the page size, see NOTES.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR mmap (),
.BR munmap ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
-.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, SVr4, 4.4BSD.
-.\" SVr4 documents additional error codes ENXIO and ENODEV.
-.\" SUSv2 documents additional error codes EMFILE and EOVERFLOW.
-.PP
-On POSIX systems on which
-.BR mmap (),
-.BR msync (2),
-and
-.BR munmap ()
-are available,
-.B _POSIX_MAPPED_FILES
-is defined in \fI<unistd.h>\fP to a value greater than 0.
-(See also
-.BR sysconf (3).)
-.\" POSIX.1-2001: It shall be defined to -1 or 0 or 200112L.
-.\" -1: unavailable, 0: ask using sysconf().
-.\" glibc defines it to 1.
-.SH NOTES
-Memory mapped by
-.BR mmap ()
-is preserved across
-.BR fork (2),
-with the same attributes.
-.PP
-A file is mapped in multiples of the page size.
-For a file that is not
-a multiple of the page size,
-the remaining bytes in the partial page at the end of the mapping
-are zeroed when mapped,
-and modifications to that region are not written out to the file.
-The effect of
-changing the size of the underlying file of a mapping on the pages that
-correspond to added or removed regions of the file is unspecified.
-.PP
+.SH VERSIONS
On some hardware architectures (e.g., i386),
.B PROT_WRITE
implies
@@ -760,6 +724,57 @@ The relevant flags are:
.BR MAP_POPULATE ,
and
.BR MAP_STACK .
+.SS C library/kernel differences
+This page describes the interface provided by the glibc
+.BR mmap ()
+wrapper function.
+Originally, this function invoked a system call of the same name.
+Since Linux 2.4, that system call has been superseded by
+.BR mmap2 (2),
+and nowadays
+.\" Since around glibc 2.1/2.2, depending on the platform.
+the glibc
+.BR mmap ()
+wrapper function invokes
+.BR mmap2 (2)
+with a suitably adjusted value for
+.IR offset .
+.SH STANDARDS
+POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001, SVr4, 4.4BSD.
+.\" SVr4 documents additional error codes ENXIO and ENODEV.
+.\" SUSv2 documents additional error codes EMFILE and EOVERFLOW.
+.PP
+On POSIX systems on which
+.BR mmap (),
+.BR msync (2),
+and
+.BR munmap ()
+are available,
+.B _POSIX_MAPPED_FILES
+is defined in \fI<unistd.h>\fP to a value greater than 0.
+(See also
+.BR sysconf (3).)
+.\" POSIX.1-2001: It shall be defined to -1 or 0 or 200112L.
+.\" -1: unavailable, 0: ask using sysconf().
+.\" glibc defines it to 1.
+.SH NOTES
+Memory mapped by
+.BR mmap ()
+is preserved across
+.BR fork (2),
+with the same attributes.
+.PP
+A file is mapped in multiples of the page size.
+For a file that is not
+a multiple of the page size,
+the remaining bytes in the partial page at the end of the mapping
+are zeroed when mapped,
+and modifications to that region are not written out to the file.
+The effect of
+changing the size of the underlying file of a mapping on the pages that
+correspond to added or removed regions of the file is unspecified.
.PP
An application can determine which pages of a mapping are
currently resident in the buffer/page cache using
@@ -779,7 +794,7 @@ is hazardous because it forcibly removes preexisting mappings,
making it easy for a multithreaded process to corrupt its own address space.
.PP
For example, suppose that thread A looks through
-.I /proc/<pid>/maps
+.IR /proc/ pid /maps
in order to locate an unused address range that it can map using
.BR MAP_FIXED ,
while thread B simultaneously acquires part or all of that same
@@ -860,21 +875,6 @@ and
.I length
must both be a multiple of the underlying huge page size.
.\"
-.SS C library/kernel differences
-This page describes the interface provided by the glibc
-.BR mmap ()
-wrapper function.
-Originally, this function invoked a system call of the same name.
-Since Linux 2.4, that system call has been superseded by
-.BR mmap2 (2),
-and nowadays
-.\" Since around glibc 2.1/2.2, depending on the platform.
-the glibc
-.BR mmap ()
-wrapper function invokes
-.BR mmap2 (2)
-with a suitably adjusted value for
-.IR offset .
.SH BUGS
On Linux, there are no guarantees like those suggested above under
.BR MAP_NORESERVE .
@@ -939,10 +939,10 @@ to output the desired bytes.
#include <sys/mman.h>
#include <sys/stat.h>
#include <unistd.h>
-
+\&
#define handle_error(msg) \e
do { perror(msg); exit(EXIT_FAILURE); } while (0)
-
+\&
int
main(int argc, char *argv[])
{
@@ -952,55 +952,55 @@ main(int argc, char *argv[])
size_t length;
ssize_t s;
struct stat sb;
-
+\&
if (argc < 3 || argc > 4) {
fprintf(stderr, "%s file offset [length]\en", argv[0]);
exit(EXIT_FAILURE);
}
-
+\&
fd = open(argv[1], O_RDONLY);
if (fd == \-1)
handle_error("open");
-
+\&
if (fstat(fd, &sb) == \-1) /* To obtain file size */
handle_error("fstat");
-
+\&
offset = atoi(argv[2]);
pa_offset = offset & \[ti](sysconf(_SC_PAGE_SIZE) \- 1);
/* offset for mmap() must be page aligned */
-
+\&
if (offset >= sb.st_size) {
fprintf(stderr, "offset is past end of file\en");
exit(EXIT_FAILURE);
}
-
+\&
if (argc == 4) {
length = atoi(argv[3]);
if (offset + length > sb.st_size)
length = sb.st_size \- offset;
/* Can\[aq]t display bytes past end of file */
-
+\&
} else { /* No length arg ==> display to end of file */
length = sb.st_size \- offset;
}
-
+\&
addr = mmap(NULL, length + offset \- pa_offset, PROT_READ,
MAP_PRIVATE, fd, pa_offset);
if (addr == MAP_FAILED)
handle_error("mmap");
-
+\&
s = write(STDOUT_FILENO, addr + offset \- pa_offset, length);
if (s != length) {
if (s == \-1)
handle_error("write");
-
+\&
fprintf(stderr, "partial write");
exit(EXIT_FAILURE);
}
-
+\&
munmap(addr, length + offset \- pa_offset);
close(fd);
-
+\&
exit(EXIT_SUCCESS);
}
.EE
@@ -1024,10 +1024,10 @@ main(int argc, char *argv[])
.PP
The descriptions of the following files in
.BR proc (5):
-.IR /proc/[pid]/maps ,
-.IR /proc/[pid]/map_files ,
+.IR /proc/ pid /maps ,
+.IR /proc/ pid /map_files ,
and
-.IR /proc/[pid]/smaps .
+.IR /proc/ pid /smaps .
.PP
B.O. Gallmeister, POSIX.4, O'Reilly, pp. 128\[en]129 and 389\[en]391.
.\"
diff --git a/man2/mmap2.2 b/man2/mmap2.2
index 99ce33d66..e1704e39d 100644
--- a/man2/mmap2.2
+++ b/man2/mmap2.2
@@ -6,7 +6,7 @@
.\" Added description of mmap2
.\" Modified, 2004-11-25, mtk -- removed stray #endif in prototype
.\"
-.TH mmap2 2 2023-02-10 "Linux man-pages 6.03"
+.TH mmap2 2 2023-03-30 "Linux man-pages 6.05.01"
.SH NAME
mmap2 \- map files or devices into memory
.SH LIBRARY
@@ -58,11 +58,6 @@ is not a multiple of the system page size.
can also return any of the errors described in
.BR mmap (2).
.SH VERSIONS
-.BR mmap2 ()
-is available since Linux 2.3.31.
-.SH STANDARDS
-This system call is Linux-specific.
-.SH NOTES
On architectures where this system call is present,
the glibc
.BR mmap ()
@@ -78,6 +73,10 @@ is actually the system page size, rather than 4096 bytes.
.\" ia64 can have page sizes ranging from 4 kB to 64 kB.
.\" On cris, it looks like the unit might also be the page size,
.\" which is 8192 bytes. -- mtk, June 2007
+.SH STANDARDS
+Linux.
+.SH HISTORY
+Linux 2.3.31.
.SH SEE ALSO
.BR getpagesize (2),
.BR mmap (2),
diff --git a/man2/modify_ldt.2 b/man2/modify_ldt.2
index 69a02387a..0364289ae 100644
--- a/man2/modify_ldt.2
+++ b/man2/modify_ldt.2
@@ -3,7 +3,7 @@
.\"
.\" SPDX-License-Identifier: GPL-2.0-or-later
.\"
-.TH modify_ldt 2 2022-11-10 "Linux man-pages 6.03"
+.TH modify_ldt 2 2023-03-30 "Linux man-pages 6.05.01"
.SH NAME
modify_ldt \- get or set a per-process LDT entry
.SH LIBRARY
@@ -157,8 +157,7 @@ is 1 or 0x11 and the new LDT entry has invalid values.
.I func
is neither 0, 1, 2, nor 0x11.
.SH STANDARDS
-This call is Linux-specific and should not be used in programs intended
-to be portable.
+Linux.
.SH NOTES
.BR modify_ldt ()
should not be used for thread-local storage, as it slows down context
diff --git a/man2/mount.2 b/man2/mount.2
index 7084c0cee..916b68ce9 100644
--- a/man2/mount.2
+++ b/man2/mount.2
@@ -17,7 +17,7 @@
.\" 2008-10-06, mtk: move umount*() material into separate umount.2 page.
.\" 2008-10-06, mtk: Add discussion of namespaces.
.\"
-.TH mount 2 2023-02-05 "Linux man-pages 6.03"
+.TH mount 2 2023-04-03 "Linux man-pages 6.05.01"
.SH NAME
mount \- mount filesystem
.SH LIBRARY
@@ -718,7 +718,7 @@ A bind operation
was requested where
.I source
referred a mount namespace magic link (i.e., a
-.I /proc/[pid]/ns/mnt
+.IR /proc/ pid /ns/mnt
magic link or a bind mount to such a link)
and the propagation type of the parent mount of
.I target
@@ -831,7 +831,10 @@ flag.
See
.BR EACCES ,
above.
-.SH VERSIONS
+.\"
+.SH STANDARDS
+Linux.
+.SH HISTORY
The definitions of
.BR MS_DIRSYNC ,
.BR MS_MOVE ,
@@ -844,11 +847,7 @@ The definitions of
and
.B MS_UNBINDABLE
were added to glibc headers in glibc 2.12.
-.\"
-.SH STANDARDS
-This function is Linux-specific and should not be used in
-programs intended to be portable.
-.SH NOTES
+.PP
Since Linux 2.4 a single filesystem can be mounted at
multiple mount points, and multiple mounts can be stacked
on the same mount point.
@@ -884,6 +883,7 @@ Since Linux 2.4 the set-user-ID and set-group-ID bits are
just silently ignored in this case.
.\" The change is in patch-2.4.0-prerelease.
.\"
+.SH NOTES
.SS Mount namespaces
Starting with Linux 2.4.19, Linux provides mount namespaces.
A mount namespace is the set of filesystem mounts that
@@ -938,16 +938,16 @@ the parent of the new mount is the previous mount that was stacked
at that location.
.PP
The parental relationship between mounts can be discovered via the
-.I /proc/[pid]/mountinfo
+.IR /proc/ pid /mountinfo
file (see below).
.\"
-.SS /proc/[pid]/mounts and /proc/[pid]/mountinfo
+.SS \fI/proc/\fPpid\fI/mounts\fP and \fI/proc/\fPpid\fI/mountinfo\fP
The Linux-specific
-.I /proc/[pid]/mounts
+.IR /proc/ pid /mounts
file exposes the list of mounts in the mount
namespace of the process with the specified ID.
The
-.I /proc/[pid]/mountinfo
+.IR /proc/ pid /mountinfo
file exposes even more information about mounts,
including the propagation type and mount ID information that makes it
possible to discover the parental relationship between mounts.
diff --git a/man2/mount_setattr.2 b/man2/mount_setattr.2
index 7eee0c77f..fafaba2b3 100644
--- a/man2/mount_setattr.2
+++ b/man2/mount_setattr.2
@@ -2,7 +2,7 @@
.\"
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
-.TH mount_setattr 2 2023-02-10 "Linux man-pages 6.03"
+.TH mount_setattr 2 2023-05-03 "Linux man-pages 6.05.01"
.SH NAME
mount_setattr \- change properties of a mount or mount tree
.SH LIBRARY
@@ -10,8 +10,6 @@ Standard C library
.RI ( libc ", " \-lc )
.SH SYNOPSIS
.nf
-
-.PP
.BR "#include <linux/fcntl.h>" " /* Definition of " AT_* " constants */"
.BR "#include <linux/mount.h>" " /* Definition of " MOUNT_ATTR_* " constants */"
.BR "#include <sys/syscall.h>" " /* Definition of " SYS_* " constants */"
@@ -175,19 +173,19 @@ are equivalent to the following steps:
.in +4n
.EX
unsigned int current_mnt_flags = mnt\->mnt_flags;
-
+\&
/*
* Clear all flags set in .attr_clr,
* clearing MOUNT_ATTR_NOEXEC and MOUNT_ATTR_NODEV.
*/
current_mnt_flags &= \(tiattr\->attr_clr;
-
+\&
/*
* Now set all flags set in .attr_set,
* applying MOUNT_ATTR_RDONLY and MOUNT_ATTR_NOSUID.
*/
current_mnt_flags |= attr\->attr_set;
-
+\&
mnt\->mnt_flags = current_mnt_flags;
.EE
.in
@@ -581,15 +579,13 @@ An attempt was made to add an ID mapping to a mount that is already ID mapped.
The caller does not have
.B CAP_SYS_ADMIN
in the initial user namespace.
-.SH VERSIONS
-.BR mount_setattr ()
-first appeared in Linux 5.12.
+.SH STANDARDS
+Linux.
+.SH HISTORY
+Linux 5.12.
.\" commit 7d6beb71da3cc033649d641e1e608713b8220290
.\" commit 2a1867219c7b27f928e2545782b86daaf9ad50bd
.\" commit 9caccd41541a6f7d6279928d9f971f6642c361af
-.SH STANDARDS
-.BR mount_setattr ()
-is Linux-specific.
.SH NOTES
.SS ID-mapped mounts
Creating an ID-mapped mount makes it possible to
@@ -641,10 +637,9 @@ capability in the user namespace the filesystem was mounted in.
The underlying filesystem must support ID-mapped mounts.
Currently, the following filesystems support ID-mapped mounts:
.\" fs_flags = FS_ALLOW_IDMAP in kernel sources
-.IP
.RS
-.PD 0
.IP \[bu] 3
+.PD 0
.BR xfs (5)
(since Linux 5.12)
.IP \[bu]
@@ -674,16 +669,16 @@ Currently, the following filesystems support ID-mapped mounts:
(ID-mapped lower and upper layers supported since Linux 5.19)
.PD
.RE
-.IP \[bu] 3
+.IP \[bu]
The mount must not already be ID-mapped.
This also implies that the ID mapping of a mount cannot be altered.
.IP \[bu]
+The mount must not have any writers.
+.\" commit 1bbcd277a53e08d619ffeec56c5c9287f2bf42f
+.IP \[bu]
The mount must be a detached mount;
that is,
it must have been created by calling
-.IP \[bu]
-The mount must not have any writers.
-.\" commit 1bbcd277a53e08d619ffeec56c5c9287f2bf42f
.BR open_tree (2)
with the
.B OPEN_TREE_CLONE
@@ -865,7 +860,7 @@ may change in the future
user-space applications should zero-fill
.I struct mount_attr
to ensure that recompiling the program with new headers will not result in
-spurious errors at runtime.
+spurious errors at run time.
The simplest way is to use a designated initializer:
.PP
.in +4n
@@ -915,7 +910,7 @@ with a structure which has every byte nonzero
#include <string.h>
#include <sys/syscall.h>
#include <unistd.h>
-
+\&
static inline int
mount_setattr(int dirfd, const char *pathname, unsigned int flags,
struct mount_attr *attr, size_t size)
@@ -923,13 +918,13 @@ mount_setattr(int dirfd, const char *pathname, unsigned int flags,
return syscall(SYS_mount_setattr, dirfd, pathname, flags,
attr, size);
}
-
+\&
static inline int
open_tree(int dirfd, const char *filename, unsigned int flags)
{
return syscall(SYS_open_tree, dirfd, filename, flags);
}
-
+\&
static inline int
move_mount(int from_dirfd, const char *from_pathname,
int to_dirfd, const char *to_pathname, unsigned int flags)
@@ -937,7 +932,7 @@ move_mount(int from_dirfd, const char *from_pathname,
return syscall(SYS_move_mount, from_dirfd, from_pathname,
to_dirfd, to_pathname, flags);
}
-
+\&
static const struct option longopts[] = {
{"map\-mount", required_argument, NULL, \[aq]a\[aq]},
{"recursive", no_argument, NULL, \[aq]b\[aq]},
@@ -948,7 +943,7 @@ static const struct option longopts[] = {
{"no\-access\-time", no_argument, NULL, \[aq]g\[aq]},
{ NULL, 0, NULL, 0 },
};
-
+\&
int
main(int argc, char *argv[])
{
@@ -960,7 +955,7 @@ main(int argc, char *argv[])
const char *source;
const char *target;
struct mount_attr *attr = &(struct mount_attr){};
-
+\&
while ((ret = getopt_long_only(argc, argv, "",
longopts, &index)) != \-1) {
switch (ret) {
@@ -992,13 +987,13 @@ main(int argc, char *argv[])
errx(EXIT_FAILURE, "Invalid argument specified");
}
}
-
+\&
if ((argc \- optind) < 2)
errx(EXIT_FAILURE, "Missing source or target mount point");
-
+\&
source = argv[optind];
target = argv[optind + 1];
-
+\&
/* In the following, \-1 as the \[aq]dirfd\[aq] argument ensures that
open_tree() fails if \[aq]source\[aq] is not an absolute pathname. */
.\" Christian Brauner
@@ -1013,36 +1008,36 @@ main(int argc, char *argv[])
.\" resolve-flag space have made this **chef's kiss**.
.\" If I can't operate based on a well-known dirfd I use absolute paths
.\" with a -EBADF dirfd passed to *at() functions.
-
+\&
fd_tree = open_tree(\-1, source,
OPEN_TREE_CLONE | OPEN_TREE_CLOEXEC |
AT_EMPTY_PATH | (recursive ? AT_RECURSIVE : 0));
if (fd_tree == \-1)
err(EXIT_FAILURE, "open(%s)", source);
-
+\&
if (fd_userns >= 0) {
attr\->attr_set |= MOUNT_ATTR_IDMAP;
attr\->userns_fd = fd_userns;
}
-
+\&
ret = mount_setattr(fd_tree, "",
AT_EMPTY_PATH | (recursive ? AT_RECURSIVE : 0),
attr, sizeof(struct mount_attr));
if (ret == \-1)
err(EXIT_FAILURE, "mount_setattr");
-
+\&
close(fd_userns);
-
+\&
/* In the following, \-1 as the \[aq]to_dirfd\[aq] argument ensures that
open_tree() fails if \[aq]target\[aq] is not an absolute pathname. */
-
+\&
ret = move_mount(fd_tree, "", \-1, target,
MOVE_MOUNT_F_EMPTY_PATH);
if (ret == \-1)
err(EXIT_FAILURE, "move_mount() to %s", target);
-
+\&
close(fd_tree);
-
+\&
exit(EXIT_SUCCESS);
}
.EE
diff --git a/man2/move_pages.2 b/man2/move_pages.2
index 644129ddf..c2be4bb17 100644
--- a/man2/move_pages.2
+++ b/man2/move_pages.2
@@ -1,23 +1,14 @@
+.\" SPDX-License-Identifier: Linux-man-pages-copyleft-2-para
+.\"
.\" This manpage is Copyright (C) 2006 Silicon Graphics, Inc.
.\" Christoph Lameter
.\"
-.\" %%%LICENSE_START(VERBATIM_TWO_PARA)
-.\" Permission is granted to make and distribute verbatim copies of this
-.\" manual provided the copyright notice and this permission notice are
-.\" preserved on all copies.
-.\"
-.\" Permission is granted to copy and distribute modified versions of this
-.\" manual under the conditions for verbatim copying, provided that the
-.\" entire resulting derived work is distributed under the terms of a
-.\" permission notice identical to this one.
-.\" %%%LICENSE_END
-.\"
.\" FIXME Should programs normally be using move_pages() directly, or should
.\" they rather be using interfaces in the numactl package?
.\" (e.g., compare with recommendation in mbind(2)).
.\" Does this page need to give advice on this topic?
.\"
-.TH move_pages 2 2023-02-05 "Linux man-pages 6.03"
+.TH move_pages 2 2023-07-15 "Linux man-pages 6.05.01"
.SH NAME
move_pages \- move individual pages of a process to another node
.SH LIBRARY
@@ -216,11 +207,10 @@ to another user but did not have privilege to do so
.TP
.B ESRCH
Process does not exist.
-.SH VERSIONS
-.BR move_pages ()
-first appeared in Linux 2.6.18.
.SH STANDARDS
-This system call is Linux-specific.
+Linux.
+.SH HISTORY
+Linux 2.6.18.
.SH NOTES
For information on library support, see
.BR numa (7).
diff --git a/man2/mprotect.2 b/man2/mprotect.2
index 87576aadc..22aa42b48 100644
--- a/man2/mprotect.2
+++ b/man2/mprotect.2
@@ -10,7 +10,7 @@
.\" 2007-06-02, mtk: Fairly substantial rewrites and additions, and
.\" a much improved example program.
.\"
-.TH mprotect 2 2023-02-05 "Linux man-pages 6.03"
+.TH mprotect 2 2023-05-03 "Linux man-pages 6.05.01"
.SH NAME
mprotect, pkey_mprotect \- set protection on a region of memory
.SH LIBRARY
@@ -43,7 +43,7 @@ signal for the process.
.I prot
is a combination of the following access flags:
.B PROT_NONE
-or a bitwise-or of the other values in the following list:
+or a bitwise OR of the other values in the following list:
.TP
.B PROT_NONE
The memory cannot be accessed at all.
@@ -192,12 +192,6 @@ in the middle of a region currently protected as
would result in three mappings:
two read/write mappings at each end and a read-only mapping in the middle.)
.SH VERSIONS
-.BR pkey_mprotect ()
-first appeared in Linux 4.9;
-library support was added in glibc 2.27.
-.SH STANDARDS
-.BR mprotect ():
-POSIX.1-2001, POSIX.1-2008, SVr4.
.\" SVr4 defines an additional error
.\" code EAGAIN. The SVr4 error conditions don't map neatly onto Linux's.
POSIX says that the behavior of
@@ -206,9 +200,6 @@ is unspecified if it is applied to a region of memory that
was not obtained via
.BR mmap (2).
.PP
-.BR pkey_mprotect ()
-is a nonportable Linux extension.
-.SH NOTES
On Linux, it is always permissible to call
.BR mprotect ()
on any address in a process's address space (except for the
@@ -266,6 +257,22 @@ When called this way, the operation of
.BR pkey_mprotect ()
is equivalent to
.BR mprotect ().
+.SH STANDARDS
+.TP
+.BR mprotect ()
+POSIX.1-2008.
+.TP
+.BR pkey_mprotect ()
+Linux.
+.SH HISTORY
+.TP
+.BR mprotect ()
+POSIX.1-2001, SVr4.
+.TP
+.BR pkey_mprotect ()
+Linux 4.9,
+glibc 2.27.
+.SH NOTES
.SH EXAMPLES
.\" sigaction.2 refers to this example
The program below demonstrates the use of
@@ -294,12 +301,12 @@ Got SIGSEGV at address: 0x804e000
#include <stdlib.h>
#include <sys/mman.h>
#include <unistd.h>
-
+\&
#define handle_error(msg) \e
do { perror(msg); exit(EXIT_FAILURE); } while (0)
-
+\&
static char *buffer;
-
+\&
static void
handler(int sig, siginfo_t *si, void *unused)
{
@@ -308,43 +315,43 @@ handler(int sig, siginfo_t *si, void *unused)
printf() is not async\-signal\-safe; see signal\-safety(7).
Nevertheless, we use printf() here as a simple way of
showing that the handler was called. */
-
+\&
printf("Got SIGSEGV at address: %p\en", si\->si_addr);
exit(EXIT_FAILURE);
}
-
+\&
int
main(void)
{
int pagesize;
struct sigaction sa;
-
+\&
sa.sa_flags = SA_SIGINFO;
sigemptyset(&sa.sa_mask);
sa.sa_sigaction = handler;
if (sigaction(SIGSEGV, &sa, NULL) == \-1)
handle_error("sigaction");
-
+\&
pagesize = sysconf(_SC_PAGE_SIZE);
if (pagesize == \-1)
handle_error("sysconf");
-
+\&
/* Allocate a buffer aligned on a page boundary;
initial protection is PROT_READ | PROT_WRITE. */
-
+\&
buffer = memalign(pagesize, 4 * pagesize);
if (buffer == NULL)
handle_error("memalign");
-
+\&
printf("Start of region: %p\en", buffer);
-
+\&
if (mprotect(buffer + pagesize * 2, pagesize,
PROT_READ) == \-1)
handle_error("mprotect");
-
+\&
for (char *p = buffer ; ; )
*(p++) = \[aq]a\[aq];
-
+\&
printf("Loop completed\en"); /* Should never happen */
exit(EXIT_SUCCESS);
}
diff --git a/man2/mq_getsetattr.2 b/man2/mq_getsetattr.2
index ef3320818..b47e264a4 100644
--- a/man2/mq_getsetattr.2
+++ b/man2/mq_getsetattr.2
@@ -2,7 +2,7 @@
.\"
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
-.TH mq_getsetattr 2 2022-10-30 "Linux man-pages 6.03"
+.TH mq_getsetattr 2 2023-03-30 "Linux man-pages 6.05.01"
.SH NAME
mq_getsetattr \- get/set message queue attributes
.SH SYNOPSIS
@@ -25,7 +25,7 @@ For an explanation of how this system call operates,
see the description of
.BR mq_setattr (3).
.SH STANDARDS
-This interface is nonstandard; avoid its use.
+None.
.SH NOTES
Never call it unless you are writing a C library!
.SH SEE ALSO
diff --git a/man2/mremap.2 b/man2/mremap.2
index 09e03fc28..f2b2b9802 100644
--- a/man2/mremap.2
+++ b/man2/mremap.2
@@ -8,7 +8,7 @@
.\" Update for Linux 1.3.87 and later
.\" 2005-10-11 mtk: Added NOTES for MREMAP_FIXED; revised EINVAL text.
.\"
-.TH mremap 2 2023-02-05 "Linux man-pages 6.03"
+.TH mremap 2 2023-03-30 "Linux man-pages 6.05.01"
.SH NAME
mremap \- remap a virtual memory address
.SH LIBRARY
@@ -243,11 +243,19 @@ was used causing a new mapping to be created that would exceed the
Or, it would exceed the maximum number of allowed mappings.
.RE
.SH STANDARDS
-This call is Linux-specific, and should not be used in programs
-intended to be portable.
+Linux.
+.SH HISTORY
.\" 4.2BSD had a (never actually implemented)
.\" .BR mremap (2)
.\" call with completely different semantics.
+.\" .PP
+Prior to glibc 2.4, glibc did not expose the definition of
+.BR MREMAP_FIXED ,
+and the prototype for
+.BR mremap ()
+did not allow for the
+.I new_address
+argument.
.SH NOTES
.BR mremap ()
changes the
@@ -279,14 +287,6 @@ call will make a best effort to populate the new area but will not fail
with
.B ENOMEM
if the area cannot be populated.
-.PP
-Prior to glibc 2.4, glibc did not expose the definition of
-.BR MREMAP_FIXED ,
-and the prototype for
-.BR mremap ()
-did not allow for the
-.I new_address
-argument.
.\"
.SS MREMAP_DONTUNMAP use cases
Possible applications for
diff --git a/man2/msgctl.2 b/man2/msgctl.2
index 9c42282b1..b905b0f5e 100644
--- a/man2/msgctl.2
+++ b/man2/msgctl.2
@@ -16,7 +16,7 @@
.\" 2005-08-02, mtk: Added IPC_INFO, MSG_INFO, MSG_STAT descriptions
.\" 2018-03-20, dbueso: Added MSG_STAT_ANY description.
.\"
-.TH msgctl 2 2022-12-15 "Linux man-pages 6.03"
+.TH msgctl 2 2023-03-30 "Linux man-pages 6.05.01"
.SH NAME
msgctl \- System V message control operations
.SH LIBRARY
@@ -385,20 +385,10 @@ but the caller is not privileged (Linux: does not have the
.B CAP_SYS_RESOURCE
capability).
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, SVr4.
+POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001, SVr4.
.\" SVID does not document the EIDRM error condition.
-.SH NOTES
-The
-.BR IPC_INFO ,
-.BR MSG_STAT ,
-and
-.B MSG_INFO
-operations are used by the
-.BR ipcs (1)
-program to provide information on allocated resources.
-In the future these may modified or moved to a
-.I /proc
-filesystem interface.
.PP
Various fields in the \fIstruct msqid_ds\fP were
typed as
@@ -413,6 +403,18 @@ a recompilation under glibc-2.1.91 or later should suffice.
.B IPC_64
flag in
.IR cmd .)
+.SH NOTES
+The
+.BR IPC_INFO ,
+.BR MSG_STAT ,
+and
+.B MSG_INFO
+operations are used by the
+.BR ipcs (1)
+program to provide information on allocated resources.
+In the future these may modified or moved to a
+.I /proc
+filesystem interface.
.SH SEE ALSO
.BR msgget (2),
.BR msgrcv (2),
diff --git a/man2/msgget.2 b/man2/msgget.2
index 80bfeef23..0774f49a0 100644
--- a/man2/msgget.2
+++ b/man2/msgget.2
@@ -12,7 +12,7 @@
.\" Language and formatting clean-ups
.\" Added notes on /proc files
.\"
-.TH msgget 2 2023-02-05 "Linux man-pages 6.03"
+.TH msgget 2 2023-03-30 "Linux man-pages 6.05.01"
.SH NAME
msgget \- get a System V message queue identifier
.SH LIBRARY
@@ -168,7 +168,15 @@ number of message queues
.RB ( MSGMNI )
would be exceeded.
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, SVr4.
+POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001, SVr4.
+.SS Linux
+Until Linux 2.3.20, Linux would return
+.B EIDRM
+for a
+.BR msgget ()
+on a message queue scheduled for deletion.
.SH NOTES
.B IPC_PRIVATE
isn't a flag field but a
@@ -193,12 +201,6 @@ based on available system memory.
Since Linux 3.19, the default value is 32,000.
On Linux, this limit can be read and modified via
.IR /proc/sys/kernel/msgmni .
-.SS Linux notes
-Until Linux 2.3.20, Linux would return
-.B EIDRM
-for a
-.BR msgget ()
-on a message queue scheduled for deletion.
.SH BUGS
The name choice
.B IPC_PRIVATE
diff --git a/man2/msgop.2 b/man2/msgop.2
index 3d4eafe8c..381875e03 100644
--- a/man2/msgop.2
+++ b/man2/msgop.2
@@ -17,7 +17,7 @@
.\" Language and formatting clean-ups
.\" Added notes on /proc files
.\"
-.TH MSGOP 2 2023-02-05 "Linux man-pages 6.03"
+.TH MSGOP 2 2023-05-03 "Linux man-pages 6.05.01"
.SH NAME
msgrcv, msgsnd \- System V message queue operations
.SH LIBRARY
@@ -450,7 +450,7 @@ were specified in
and this kernel was configured without
.BR CONFIG_CHECKPOINT_RESTORE .
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, SVr4.
+POSIX.1-2008.
.PP
The
.B MSG_EXCEPT
@@ -461,14 +461,16 @@ their definitions can be obtained by defining the
.B _GNU_SOURCE
.\" MSG_COPY since glibc 2.18
feature test macro.
-.SH NOTES
+.SH HISTORY
+POSIX.1-2001, SVr4.
+.PP
The
.I msgp
argument is declared as \fIstruct msgbuf\ *\fP in
glibc 2.0 and 2.1.
It is declared as \fIvoid\ *\fP
in glibc 2.2 and later, as required by SUSv2 and SUSv3.
-.PP
+.SH NOTES
The following limits on message queue resources affect the
.BR msgsnd ()
call:
@@ -551,7 +553,7 @@ The following shell session shows a sample run of the program:
.EX
.RB "$" " ./a.out \-s"
sent: a message at Wed Mar 4 16:25:45 2015
-
+.PP
.RB "$" " ./a.out \-r"
message received: a message at Wed Mar 4 16:25:45 2015
.EE
@@ -567,18 +569,18 @@ message received: a message at Wed Mar 4 16:25:45 2015
#include <sys/msg.h>
#include <time.h>
#include <unistd.h>
-
+\&
struct msgbuf {
long mtype;
char mtext[80];
};
-
+\&
static void
usage(char *prog_name, char *msg)
{
if (msg != NULL)
fputs(msg, stderr);
-
+\&
fprintf(stderr, "Usage: %s [options]\en", prog_name);
fprintf(stderr, "Options are:\en");
fprintf(stderr, "\-s send message using msgsnd()\en");
@@ -587,19 +589,19 @@ usage(char *prog_name, char *msg)
fprintf(stderr, "\-k message queue key (default is 1234)\en");
exit(EXIT_FAILURE);
}
-
+\&
static void
send_msg(int qid, int msgtype)
{
time_t t;
struct msgbuf msg;
-
+\&
msg.mtype = msgtype;
-
+\&
time(&t);
snprintf(msg.mtext, sizeof(msg.mtext), "a message at %s",
ctime(&t));
-
+\&
if (msgsnd(qid, &msg, sizeof(msg.mtext),
IPC_NOWAIT) == \-1)
{
@@ -608,12 +610,12 @@ send_msg(int qid, int msgtype)
}
printf("sent: %s\en", msg.mtext);
}
-
+\&
static void
get_msg(int qid, int msgtype)
{
struct msgbuf msg;
-
+\&
if (msgrcv(qid, &msg, sizeof(msg.mtext), msgtype,
MSG_NOERROR | IPC_NOWAIT) == \-1) {
if (errno != ENOMSG) {
@@ -625,7 +627,7 @@ get_msg(int qid, int msgtype)
printf("message received: %s\en", msg.mtext);
}
}
-
+\&
int
main(int argc, char *argv[])
{
@@ -633,7 +635,7 @@ main(int argc, char *argv[])
int mode = 0; /* 1 = send, 2 = receive */
int msgtype = 1;
int msgkey = 1234;
-
+\&
while ((opt = getopt(argc, argv, "srt:k:")) != \-1) {
switch (opt) {
case \[aq]s\[aq]:
@@ -654,22 +656,22 @@ main(int argc, char *argv[])
usage(argv[0], "Unrecognized option\en");
}
}
-
+\&
if (mode == 0)
usage(argv[0], "must use either \-s or \-r option\en");
-
+\&
qid = msgget(msgkey, IPC_CREAT | 0666);
-
+\&
if (qid == \-1) {
perror("msgget");
exit(EXIT_FAILURE);
}
-
+\&
if (mode == 2)
get_msg(qid, msgtype);
else
send_msg(qid, msgtype);
-
+\&
exit(EXIT_SUCCESS);
}
.EE
diff --git a/man2/msync.2 b/man2/msync.2
index 270f4c40f..baa328db1 100644
--- a/man2/msync.2
+++ b/man2/msync.2
@@ -2,7 +2,7 @@
.\"
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
-.TH msync 2 2023-02-05 "Linux man-pages 6.03"
+.TH msync 2 2023-03-30 "Linux man-pages 6.05.01"
.SH NAME
msync \- synchronize a file with a memory map
.SH LIBRARY
@@ -81,31 +81,7 @@ are set in
.TP
.B ENOMEM
The indicated memory (or part of it) was not mapped.
-.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008.
-.PP
-This call was introduced in Linux 1.3.21, and then used
-.B EFAULT
-instead of
-.BR ENOMEM .
-In Linux 2.4.19, this was changed to the POSIX value
-.BR ENOMEM .
-.PP
-On POSIX systems on which
-.BR msync ()
-is available, both
-.B _POSIX_MAPPED_FILES
-and
-.B _POSIX_SYNCHRONIZED_IO
-are defined in
-.I <unistd.h>
-to a value greater than 0.
-(See also
-.BR sysconf (3).)
-.\" POSIX.1-2001: It shall be defined to -1 or 0 or 200112L.
-.\" -1: unavailable, 0: ask using sysconf().
-.\" glibc defines them to 1.
-.SH NOTES
+.SH VERSIONS
According to POSIX, either
.B MS_SYNC
or
@@ -132,6 +108,32 @@ or
.B MS_ASYNC
in
.IR flags .
+.SH STANDARDS
+POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001.
+.PP
+This call was introduced in Linux 1.3.21, and then used
+.B EFAULT
+instead of
+.BR ENOMEM .
+In Linux 2.4.19, this was changed to the POSIX value
+.BR ENOMEM .
+.PP
+On POSIX systems on which
+.BR msync ()
+is available, both
+.B _POSIX_MAPPED_FILES
+and
+.B _POSIX_SYNCHRONIZED_IO
+are defined in
+.I <unistd.h>
+to a value greater than 0.
+(See also
+.BR sysconf (3).)
+.\" POSIX.1-2001: It shall be defined to -1 or 0 or 200112L.
+.\" -1: unavailable, 0: ask using sysconf().
+.\" glibc defines them to 1.
.SH SEE ALSO
.BR mmap (2)
.PP
diff --git a/man2/nanosleep.2 b/man2/nanosleep.2
index 0bd03d0de..4693dc80a 100644
--- a/man2/nanosleep.2
+++ b/man2/nanosleep.2
@@ -12,7 +12,7 @@
.\" NOTES: describe case where clock_nanosleep() can be preferable.
.\" NOTES: describe CLOCK_REALTIME versus CLOCK_NANOSLEEP
.\" Replace crufty discussion of HZ with a pointer to time(7).
-.TH nanosleep 2 2023-02-12 "Linux man-pages 6.03"
+.TH nanosleep 2 2023-03-30 "Linux man-pages 6.05.01"
.SH NAME
nanosleep \- high-resolution sleep
.SH LIBRARY
@@ -109,27 +109,7 @@ The value in the
field was not in the range [0, 999999999] or
.I tv_sec
was negative.
-.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008.
-.SH NOTES
-If the interval specified in
-.I req
-is not an exact multiple of the granularity underlying clock (see
-.BR time (7)),
-then the interval will be rounded up to the next multiple.
-Furthermore, after the sleep completes, there may still be a delay before
-the CPU becomes free to once again execute the calling thread.
-.PP
-The fact that
-.BR nanosleep ()
-sleeps for a relative interval can be problematic if the call
-is repeatedly restarted after being interrupted by signals,
-since the time between the interruptions and restarts of the call
-will lead to drift in the time when the sleep finally completes.
-This problem can be avoided by using
-.BR clock_nanosleep (2)
-with an absolute time value.
-.PP
+.SH VERSIONS
POSIX.1 specifies that
.BR nanosleep ()
should measure time against the
@@ -161,7 +141,11 @@ function; ...
Consequently, these time services shall expire when the requested relative
interval elapses, independently of the new or old value of the clock.
.RE
-.SS Old behavior
+.SH STANDARDS
+POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001.
+.PP
In order to support applications requiring much more precise pauses
(e.g., in order to control some time-critical hardware),
.BR nanosleep ()
@@ -173,6 +157,24 @@ or
.BR SCHED_RR .
This special extension was removed in Linux 2.5.39,
and is thus not available in Linux 2.6.0 and later kernels.
+.SH NOTES
+If the interval specified in
+.I req
+is not an exact multiple of the granularity underlying clock (see
+.BR time (7)),
+then the interval will be rounded up to the next multiple.
+Furthermore, after the sleep completes, there may still be a delay before
+the CPU becomes free to once again execute the calling thread.
+.PP
+The fact that
+.BR nanosleep ()
+sleeps for a relative interval can be problematic if the call
+is repeatedly restarted after being interrupted by signals,
+since the time between the interruptions and restarts of the call
+will lead to drift in the time when the sleep finally completes.
+This problem can be avoided by using
+.BR clock_nanosleep (2)
+with an absolute time value.
.SH BUGS
If a program that catches signals and uses
.BR nanosleep ()
diff --git a/man2/nfsservctl.2 b/man2/nfsservctl.2
index f237dde23..5267f819e 100644
--- a/man2/nfsservctl.2
+++ b/man2/nfsservctl.2
@@ -2,7 +2,7 @@
.\" This text is in the public domain.
.\" %%%LICENSE_END
.\"
-.TH nfsservctl 2 2023-02-05 "Linux man-pages 6.03"
+.TH nfsservctl 2 2023-05-03 "Linux man-pages 6.05.01"
.SH NAME
nfsservctl \- syscall interface to kernel nfs daemon
.SH LIBRARY
@@ -37,7 +37,7 @@ filesystem; see
(only in Linux 2.4.x and earlier). */
#define NFSCTL_GETFH 6 /* Get a file handle (used by mountd(8))
(only in Linux 2.4.x and earlier). */
-
+\&
struct nfsctl_arg {
int ca_version; /* safeguard */
union {
@@ -49,7 +49,7 @@ struct nfsctl_arg {
unsigned int u_debug;
} u;
}
-
+\&
union nfsctl_res {
struct knfs_fh cr_getfh;
unsigned int cr_debug;
@@ -61,10 +61,10 @@ On success, zero is returned.
On error, \-1 is returned, and
.I errno
is set to indicate the error.
-.SH VERSIONS
-This system call was removed in Linux 3.1.
-Library support was removed in glibc 2.28.
.SH STANDARDS
-This call is Linux-specific.
+Linux.
+.SH HISTORY
+Removed in Linux 3.1.
+Removed in glibc 2.28.
.SH SEE ALSO
.BR nfsd (7)
diff --git a/man2/nice.2 b/man2/nice.2
index 958bfeab7..d26a1be11 100644
--- a/man2/nice.2
+++ b/man2/nice.2
@@ -8,7 +8,7 @@
.\" Modified 2001-06-04 by aeb
.\" Modified 2004-05-27 by Michael Kerrisk <mtk.manpages@gmail.com>
.\"
-.TH nice 2 2023-02-05 "Linux man-pages 6.03"
+.TH nice 2 2023-03-30 "Linux man-pages 6.05.01"
.SH NAME
nice \- change process priority
.SH LIBRARY
@@ -76,23 +76,7 @@ capability is required.
.B RLIMIT_NICE
resource limit in
.BR setrlimit (2).)
-.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, SVr4, 4.3BSD.
-However, the raw system call and (g)libc
-(earlier than glibc 2.2.4) return value is nonstandard, see below.
-.\" SVr4 documents an additional
-.\" .B EINVAL
-.\" error code.
-.SH NOTES
-For further details on the nice value, see
-.BR sched (7).
-.PP
-.IR Note :
-the addition of the "autogroup" feature in Linux 2.6.38 means that
-the nice value no longer has its traditional effect in many circumstances.
-For details, see
-.BR sched (7).
-.\"
+.SH VERSIONS
.SS C library/kernel differences
POSIX.1 specifies that
.BR nice ()
@@ -107,6 +91,22 @@ Since glibc 2.2.4, the
wrapper function provided by glibc provides conformance to POSIX.1 by calling
.BR getpriority (2)
to obtain the new nice value, which is then returned to the caller.
+.SH STANDARDS
+POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001, SVr4, 4.3BSD.
+.\" SVr4 documents an additional
+.\" .B EINVAL
+.\" error code.
+.SH NOTES
+For further details on the nice value, see
+.BR sched (7).
+.PP
+.IR Note :
+the addition of the "autogroup" feature in Linux 2.6.38 means that
+the nice value no longer has its traditional effect in many circumstances.
+For details, see
+.BR sched (7).
.SH SEE ALSO
.BR nice (1),
.BR renice (1),
diff --git a/man2/open.2 b/man2/open.2
index 19115a372..52286f634 100644
--- a/man2/open.2
+++ b/man2/open.2
@@ -28,7 +28,7 @@
.\" FIXME . Apr 08: The next POSIX revision has O_EXEC, O_SEARCH, and
.\" O_TTYINIT. Eventually these may need to be documented. --mtk
.\"
-.TH open 2 2023-02-05 "Linux man-pages 6.03"
+.TH open 2 2023-05-20 "Linux man-pages 6.05.01"
.SH NAME
open, openat, creat \- open and possibly create a file
.SH LIBRARY
@@ -38,18 +38,17 @@ Standard C library
.nf
.B #include <fcntl.h>
.PP
-.BI "int open(const char *" pathname ", int " flags );
-.BI "int open(const char *" pathname ", int " flags ", mode_t " mode );
+.BI "int open(const char *" pathname ", int " flags ", ..."
+.BI " \fR/*\fP mode_t " mode " \fR*/\fP );"
.PP
.BI "int creat(const char *" pathname ", mode_t " mode );
.PP
-.BI "int openat(int " dirfd ", const char *" pathname ", int " flags );
-.BI "int openat(int " dirfd ", const char *" pathname ", int " flags \
-", mode_t " mode );
+.BI "int openat(int " dirfd ", const char *" pathname ", int " flags ", ..."
+.BI " \fR/*\fP mode_t " mode " \fR*/\fP );"
.PP
/* Documented separately, in \fBopenat2\fP(2): */
.BI "int openat2(int " dirfd ", const char *" pathname ,
-.BI " const struct open_how *" how ", size_t " size ");"
+.BI " const struct open_how *" how ", size_t " size );
.fi
.PP
.RS -4
@@ -123,7 +122,7 @@ respectively.
.PP
In addition, zero or more file creation flags and file status flags
can be
-.RI bitwise- or 'd
+bitwise ORed
in
.IR flags .
The
@@ -803,16 +802,16 @@ permanent, using code like the following:
char path[PATH_MAX];
fd = open("/path/to/dir", O_TMPFILE | O_RDWR,
S_IRUSR | S_IWUSR);
-
+\&
/* File I/O on \[aq]fd\[aq]... */
-
+\&
linkat(fd, "", AT_FDCWD, "/path/for/file", AT_EMPTY_PATH);
-
+\&
/* If the caller doesn\[aq]t have the CAP_DAC_READ_SEARCH
capability (needed to use AT_EMPTY_PATH with linkat(2)),
and there is a proc(5) filesystem mounted, then the
linkat(2) call above can be replaced with:
-
+\&
snprintf(path, PATH_MAX, "/proc/self/fd/%d", fd);
linkat(AT_FDCWD, path, AT_FDCWD, "/path/for/file",
AT_SYMLINK_FOLLOW);
@@ -1285,19 +1284,133 @@ flag was specified, and an incompatible lease was held on the file
(see
.BR fcntl (2)).
.SH VERSIONS
+The (undefined) effect of
+.B O_RDONLY | O_TRUNC
+varies among implementations.
+On many systems the file is actually truncated.
+.\" Linux 2.0, 2.5: truncate
+.\" Solaris 5.7, 5.8: truncate
+.\" Irix 6.5: truncate
+.\" Tru64 5.1B: truncate
+.\" HP-UX 11.22: truncate
+.\" FreeBSD 4.7: truncate
+.SS Synchronized I/O
+The POSIX.1-2008 "synchronized I/O" option
+specifies different variants of synchronized I/O,
+and specifies the
+.BR open ()
+flags
+.BR O_SYNC ,
+.BR O_DSYNC ,
+and
+.B O_RSYNC
+for controlling the behavior.
+Regardless of whether an implementation supports this option,
+it must at least support the use of
+.B O_SYNC
+for regular files.
+.PP
+Linux implements
+.B O_SYNC
+and
+.BR O_DSYNC ,
+but not
+.BR O_RSYNC .
+Somewhat incorrectly, glibc defines
+.B O_RSYNC
+to have the same value as
+.BR O_SYNC .
+.RB ( O_RSYNC
+is defined in the Linux header file
+.I <asm/fcntl.h>
+on HP PA-RISC, but it is not used.)
+.PP
+.B O_SYNC
+provides synchronized I/O
+.I file
+integrity completion,
+meaning write operations will flush data and all associated metadata
+to the underlying hardware.
+.B O_DSYNC
+provides synchronized I/O
+.I data
+integrity completion,
+meaning write operations will flush data
+to the underlying hardware,
+but will only flush metadata updates that are required
+to allow a subsequent read operation to complete successfully.
+Data integrity completion can reduce the number of disk operations
+that are required for applications that don't need the guarantees
+of file integrity completion.
+.PP
+To understand the difference between the two types of completion,
+consider two pieces of file metadata:
+the file last modification timestamp
+.RI ( st_mtime )
+and the file length.
+All write operations will update the last file modification timestamp,
+but only writes that add data to the end of the
+file will change the file length.
+The last modification timestamp is not needed to ensure that
+a read completes successfully, but the file length is.
+Thus,
+.B O_DSYNC
+would only guarantee to flush updates to the file length metadata
+(whereas
+.B O_SYNC
+would also always flush the last modification timestamp metadata).
+.PP
+Before Linux 2.6.33, Linux implemented only the
+.B O_SYNC
+flag for
+.BR open ().
+However, when that flag was specified,
+most filesystems actually provided the equivalent of synchronized I/O
+.I data
+integrity completion (i.e.,
+.B O_SYNC
+was actually implemented as the equivalent of
+.BR O_DSYNC ).
+.PP
+Since Linux 2.6.33, proper
+.B O_SYNC
+support is provided.
+However, to ensure backward binary compatibility,
+.B O_DSYNC
+was defined with the same value as the historical
+.BR O_SYNC ,
+and
+.B O_SYNC
+was defined as a new (two-bit) flag value that includes the
+.B O_DSYNC
+flag value.
+This ensures that applications compiled against
+new headers get at least
+.B O_DSYNC
+semantics before Linux 2.6.33.
+.\"
+.SS C library/kernel differences
+Since glibc 2.26,
+the glibc wrapper function for
+.BR open ()
+employs the
.BR openat ()
-was added in Linux 2.6.16;
-library support was added in glibc 2.4.
+system call, rather than the kernel's
+.BR open ()
+system call.
+For certain architectures, this is also true before glibc 2.26.
+.\"
.SH STANDARDS
-.BR open (),
+.TP
+.BR open ()
+.TQ
.BR creat ()
-SVr4, 4.3BSD, POSIX.1-2001, POSIX.1-2008.
-.PP
-.BR openat ():
+.TQ
+.BR openat ()
POSIX.1-2008.
.PP
.BR openat2 (2)
-is Linux-specific.
+Linux.
.PP
The
.BR O_DIRECT ,
@@ -1324,17 +1437,17 @@ with a value greater than or equal to 200809L or
with a value greater than or equal to 700.
In glibc 2.11 and earlier, one obtains the definitions by defining
.BR _GNU_SOURCE .
-.PP
-As noted in
-.BR feature_test_macros (7),
-feature test macros such as
-.BR _POSIX_C_SOURCE ,
-.BR _XOPEN_SOURCE ,
-and
-.B _GNU_SOURCE
-must be defined before including
-.I any
-header files.
+.SH HISTORY
+.TP
+.BR open ()
+.TQ
+.BR creat ()
+SVr4, 4.3BSD, POSIX.1-2001.
+.TP
+.BR openat ()
+POSIX.1-2008.
+Linux 2.6.16,
+glibc 2.4.
.SH NOTES
Under Linux, the
.B O_NONBLOCK
@@ -1345,17 +1458,6 @@ this may be used to open a device in order to get a file descriptor
for use with
.BR ioctl (2).
.PP
-The (undefined) effect of
-.B O_RDONLY | O_TRUNC
-varies among implementations.
-On many systems the file is actually truncated.
-.\" Linux 2.0, 2.5: truncate
-.\" Solaris 5.7, 5.8: truncate
-.\" Irix 6.5: truncate
-.\" Tru64 5.1B: truncate
-.\" HP-UX 11.22: truncate
-.\" FreeBSD 4.7: truncate
-.PP
Note that
.BR open ()
can open device special files, but
@@ -1388,11 +1490,11 @@ and
fields are set to the current time.
.PP
The files in the
-.I /proc/[pid]/fd
+.IR /proc/ pid /fd
directory show the open file descriptors of the process with the PID
.IR pid .
The files in the
-.I /proc/[pid]/fdinfo
+.IR /proc/ pid /fdinfo
directory show even more information about these file descriptors.
See
.BR proc (5)
@@ -1442,113 +1544,6 @@ operation to test whether two file descriptors
(in the same process or in two different processes)
refer to the same open file description.
.\"
-.\"
-.SS Synchronized I/O
-The POSIX.1-2008 "synchronized I/O" option
-specifies different variants of synchronized I/O,
-and specifies the
-.BR open ()
-flags
-.BR O_SYNC ,
-.BR O_DSYNC ,
-and
-.B O_RSYNC
-for controlling the behavior.
-Regardless of whether an implementation supports this option,
-it must at least support the use of
-.B O_SYNC
-for regular files.
-.PP
-Linux implements
-.B O_SYNC
-and
-.BR O_DSYNC ,
-but not
-.BR O_RSYNC .
-Somewhat incorrectly, glibc defines
-.B O_RSYNC
-to have the same value as
-.BR O_SYNC .
-.RB ( O_RSYNC
-is defined in the Linux header file
-.I <asm/fcntl.h>
-on HP PA-RISC, but it is not used.)
-.PP
-.B O_SYNC
-provides synchronized I/O
-.I file
-integrity completion,
-meaning write operations will flush data and all associated metadata
-to the underlying hardware.
-.B O_DSYNC
-provides synchronized I/O
-.I data
-integrity completion,
-meaning write operations will flush data
-to the underlying hardware,
-but will only flush metadata updates that are required
-to allow a subsequent read operation to complete successfully.
-Data integrity completion can reduce the number of disk operations
-that are required for applications that don't need the guarantees
-of file integrity completion.
-.PP
-To understand the difference between the two types of completion,
-consider two pieces of file metadata:
-the file last modification timestamp
-.RI ( st_mtime )
-and the file length.
-All write operations will update the last file modification timestamp,
-but only writes that add data to the end of the
-file will change the file length.
-The last modification timestamp is not needed to ensure that
-a read completes successfully, but the file length is.
-Thus,
-.B O_DSYNC
-would only guarantee to flush updates to the file length metadata
-(whereas
-.B O_SYNC
-would also always flush the last modification timestamp metadata).
-.PP
-Before Linux 2.6.33, Linux implemented only the
-.B O_SYNC
-flag for
-.BR open ().
-However, when that flag was specified,
-most filesystems actually provided the equivalent of synchronized I/O
-.I data
-integrity completion (i.e.,
-.B O_SYNC
-was actually implemented as the equivalent of
-.BR O_DSYNC ).
-.PP
-Since Linux 2.6.33, proper
-.B O_SYNC
-support is provided.
-However, to ensure backward binary compatibility,
-.B O_DSYNC
-was defined with the same value as the historical
-.BR O_SYNC ,
-and
-.B O_SYNC
-was defined as a new (two-bit) flag value that includes the
-.B O_DSYNC
-flag value.
-This ensures that applications compiled against
-new headers get at least
-.B O_DSYNC
-semantics before Linux 2.6.33.
-.\"
-.SS C library/kernel differences
-Since glibc 2.26,
-the glibc wrapper function for
-.BR open ()
-employs the
-.BR openat ()
-system call, rather than the kernel's
-.BR open ()
-system call.
-For certain architectures, this is also true before glibc 2.26.
-.\"
.SS NFS
There are many infelicities in the protocol underlying NFS, affecting
amongst others
diff --git a/man2/open_by_handle_at.2 b/man2/open_by_handle_at.2
index 59ddc9b49..b5e3d75f6 100644
--- a/man2/open_by_handle_at.2
+++ b/man2/open_by_handle_at.2
@@ -2,7 +2,7 @@
.\"
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
-.TH open_by_handle_at 2 2023-02-05 "Linux man-pages 6.03"
+.TH open_by_handle_at 2 2023-05-03 "Linux man-pages 6.05.01"
.SH NAME
name_to_handle_at, open_by_handle_at \- obtain handle
for a pathname and open file via a handle
@@ -366,15 +366,15 @@ The specified
is not valid.
This error will occur if, for example, the file has been deleted.
.SH VERSIONS
-These system calls first appeared in Linux 2.6.39.
-Library support is provided since glibc 2.14.
-.SH STANDARDS
-These system calls are nonstandard Linux extensions.
-.PP
FreeBSD has a broadly similar pair of system calls in the form of
.BR getfh ()
and
.BR openfh ().
+.SH STANDARDS
+Linux.
+.SH HISTORY
+Linux 2.6.39,
+glibc 2.14.
.SH NOTES
A file handle can be generated in one process using
.BR name_to_handle_at ()
@@ -533,31 +533,31 @@ open_by_handle_at: Stale NFS file handle
#include <fcntl.h>
#include <stdio.h>
#include <stdlib.h>
-
+\&
int
main(int argc, char *argv[])
{
int mount_id, fhsize, flags, dirfd;
char *pathname;
struct file_handle *fhp;
-
+\&
if (argc != 2) {
fprintf(stderr, "Usage: %s pathname\en", argv[0]);
exit(EXIT_FAILURE);
}
-
+\&
pathname = argv[1];
-
+\&
/* Allocate file_handle structure. */
-
+\&
fhsize = sizeof(*fhp);
fhp = malloc(fhsize);
if (fhp == NULL)
err(EXIT_FAILURE, "malloc");
-
+\&
/* Make an initial call to name_to_handle_at() to discover
the size required for file handle. */
-
+\&
dirfd = AT_FDCWD; /* For name_to_handle_at() calls */
flags = 0; /* For name_to_handle_at() calls */
fhp\->handle_bytes = 0;
@@ -568,28 +568,28 @@ main(int argc, char *argv[])
fprintf(stderr, "Unexpected result from name_to_handle_at()\en");
exit(EXIT_FAILURE);
}
-
+\&
/* Reallocate file_handle structure with correct size. */
-
+\&
fhsize = sizeof(*fhp) + fhp\->handle_bytes;
fhp = realloc(fhp, fhsize); /* Copies fhp\->handle_bytes */
if (fhp == NULL)
err(EXIT_FAILURE, "realloc");
-
+\&
/* Get file handle from pathname supplied on command line. */
-
+\&
if (name_to_handle_at(dirfd, pathname, fhp, &mount_id, flags) == \-1)
err(EXIT_FAILURE, "name_to_handle_at");
-
+\&
/* Write mount ID, file handle size, and file handle to stdout,
for later reuse by t_open_by_handle_at.c. */
-
+\&
printf("%d\en", mount_id);
printf("%u %d ", fhp\->handle_bytes, fhp\->handle_type);
for (size_t j = 0; j < fhp\->handle_bytes; j++)
printf(" %02x", fhp\->f_handle[j]);
printf("\en");
-
+\&
exit(EXIT_SUCCESS);
}
.EE
@@ -606,13 +606,13 @@ main(int argc, char *argv[])
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
-
+\&
/* Scan /proc/self/mountinfo to find the line whose mount ID matches
\[aq]mount_id\[aq]. (An easier way to do this is to install and use the
\[aq]libmount\[aq] library provided by the \[aq]util\-linux\[aq] project.)
Open the corresponding mount path and return the resulting file
descriptor. */
-
+\&
static int
open_mount_path_by_id(int mount_id)
{
@@ -622,40 +622,40 @@ open_mount_path_by_id(int mount_id)
FILE *fp;
size_t lsize;
ssize_t nread;
-
+\&
fp = fopen("/proc/self/mountinfo", "r");
if (fp == NULL)
err(EXIT_FAILURE, "fopen");
-
+\&
found = 0;
linep = NULL;
while (!found) {
nread = getline(&linep, &lsize, fp);
if (nread == \-1)
break;
-
+\&
nread = sscanf(linep, "%d %*d %*s %*s %s",
&mi_mount_id, mount_path);
if (nread != 2) {
fprintf(stderr, "Bad sscanf()\en");
exit(EXIT_FAILURE);
}
-
+\&
if (mi_mount_id == mount_id)
found = 1;
}
free(linep);
-
+\&
fclose(fp);
-
+\&
if (!found) {
fprintf(stderr, "Could not find mount point\en");
exit(EXIT_FAILURE);
}
-
+\&
return open(mount_path, O_RDONLY);
}
-
+\&
int
main(int argc, char *argv[])
{
@@ -666,69 +666,69 @@ main(int argc, char *argv[])
char *nextp;
ssize_t nread;
struct file_handle *fhp;
-
+\&
if ((argc > 1 && strcmp(argv[1], "\-\-help") == 0) || argc > 2) {
fprintf(stderr, "Usage: %s [mount\-path]\en", argv[0]);
exit(EXIT_FAILURE);
}
-
+\&
/* Standard input contains mount ID and file handle information:
-
+\&
Line 1: <mount_id>
Line 2: <handle_bytes> <handle_type> <bytes of handle in hex>
*/
-
+\&
if (fgets(line1, sizeof(line1), stdin) == NULL ||
fgets(line2, sizeof(line2), stdin) == NULL)
{
fprintf(stderr, "Missing mount_id / file handle\en");
exit(EXIT_FAILURE);
}
-
+\&
mount_id = atoi(line1);
-
+\&
handle_bytes = strtoul(line2, &nextp, 0);
-
+\&
/* Given handle_bytes, we can now allocate file_handle structure. */
-
+\&
fhp = malloc(sizeof(*fhp) + handle_bytes);
if (fhp == NULL)
err(EXIT_FAILURE, "malloc");
-
+\&
fhp\->handle_bytes = handle_bytes;
-
+\&
fhp\->handle_type = strtoul(nextp, &nextp, 0);
-
+\&
for (size_t j = 0; j < fhp\->handle_bytes; j++)
fhp\->f_handle[j] = strtoul(nextp, &nextp, 16);
-
+\&
/* Obtain file descriptor for mount point, either by opening
the pathname specified on the command line, or by scanning
/proc/self/mounts to find a mount that matches the \[aq]mount_id\[aq]
that we received from stdin. */
-
+\&
if (argc > 1)
mount_fd = open(argv[1], O_RDONLY);
else
mount_fd = open_mount_path_by_id(mount_id);
-
+\&
if (mount_fd == \-1)
err(EXIT_FAILURE, "opening mount fd");
-
+\&
/* Open file using handle and mount point. */
-
+\&
fd = open_by_handle_at(mount_fd, fhp, O_RDONLY);
if (fd == \-1)
err(EXIT_FAILURE, "open_by_handle_at");
-
+\&
/* Try reading a few bytes from the file. */
-
+\&
nread = read(fd, buf, sizeof(buf));
if (nread == \-1)
err(EXIT_FAILURE, "read");
-
+\&
printf("Read %zd bytes\en", nread);
-
+\&
exit(EXIT_SUCCESS);
}
.EE
diff --git a/man2/openat2.2 b/man2/openat2.2
index a24a3d0cc..b98bbaf8b 100644
--- a/man2/openat2.2
+++ b/man2/openat2.2
@@ -1,7 +1,7 @@
.\" Copyright (C) 2019 Aleksa Sarai <cyphar@cyphar.com>
.\"
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
-.TH openat2 2 2023-02-05 "Linux man-pages 6.03"
+.TH openat2 2 2023-04-23 "Linux man-pages 6.05.01"
.SH NAME
openat2 \- open and possibly create a file (extended)
.SH LIBRARY
@@ -466,12 +466,11 @@ and an escape from the root during path resolution was detected.
contains
.BR RESOLVE_NO_XDEV ,
and a path component crosses a mount point.
-.SH VERSIONS
-.BR openat2 ()
-first appeared in Linux 5.6.
-.\" commit fddb5d430ad9fa91b49b1d34d0202ffe2fa0e179
.SH STANDARDS
-This system call is Linux-specific.
+Linux.
+.SH HISTORY
+Linux 5.6.
+.\" commit fddb5d430ad9fa91b49b1d34d0202ffe2fa0e179
.PP
The semantics of
.B RESOLVE_BENEATH
@@ -546,7 +545,7 @@ may change in the future (with new fields being added when system headers are
updated), user-space applications should zero-fill
.I struct open_how
to ensure that recompiling the program with new headers will not result in
-spurious errors at runtime.
+spurious errors at run time.
The simplest way is to use a designated
initializer:
.PP
diff --git a/man2/outb.2 b/man2/outb.2
index c9419e062..4a3f8779f 100644
--- a/man2/outb.2
+++ b/man2/outb.2
@@ -4,7 +4,7 @@
.\"
.\" SPDX-License-Identifier: GPL-2.0-or-later
.\"
-.TH outb 2 2022-11-10 "Linux man-pages 6.03"
+.TH outb 2 2023-03-30 "Linux man-pages 6.05.01"
.SH NAME
outb, outw, outl, outsb, outsw, outsl,
inb, inw, inl, insb, insw, insl,
@@ -68,7 +68,7 @@ to tell the kernel to allow the user space application to access the
I/O ports in question.
Failure to do this will cause the application
to receive a segmentation fault.
-.SH STANDARDS
+.SH VERSIONS
.BR outb ()
and friends are hardware-specific.
The
@@ -77,6 +77,8 @@ argument is passed first and the
.I port
argument is passed second,
which is the opposite order from most DOS implementations.
+.SH STANDARDS
+None.
.SH SEE ALSO
.BR ioperm (2),
.BR iopl (2)
diff --git a/man2/pause.2 b/man2/pause.2
index a8f548a1e..0e7bbcd5e 100644
--- a/man2/pause.2
+++ b/man2/pause.2
@@ -7,7 +7,7 @@
.\" Modified 1995 by Mike Battersby (mib@deakin.edu.au)
.\" Modified 2000 by aeb, following Michael Kerrisk
.\"
-.TH pause 2 2022-10-30 "Linux man-pages 6.03"
+.TH pause 2 2023-03-30 "Linux man-pages 6.05.01"
.SH NAME
pause \- wait for signal
.SH LIBRARY
@@ -40,7 +40,9 @@ is set to
.B EINTR
a signal was caught and the signal-catching function returned.
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, SVr4, 4.3BSD.
+POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001, SVr4, 4.3BSD.
.SH SEE ALSO
.BR kill (2),
.BR select (2),
diff --git a/man2/pciconfig_read.2 b/man2/pciconfig_read.2
index a83742266..7913ba0e8 100644
--- a/man2/pciconfig_read.2
+++ b/man2/pciconfig_read.2
@@ -5,7 +5,7 @@
.\" May be freely distributed and modified.
.\" %%%LICENSE_END
.\"
-.TH pciconfig_read 2 2022-10-30 "Linux man-pages 6.03"
+.TH pciconfig_read 2 2023-03-30 "Linux man-pages 6.05.01"
.SH NAME
pciconfig_read, pciconfig_write, pciconfig_iobase \-
pci device information handling
@@ -115,6 +115,8 @@ capability.
This does not apply to
.BR pciconfig_iobase ().
.SH STANDARDS
-These calls are Linux-specific, available since Linux 2.0.26/2.1.11.
+Linux.
+.SH HISTORY
+Linux 2.0.26/2.1.11.
.SH SEE ALSO
.BR capabilities (7)
diff --git a/man2/perf_event_open.2 b/man2/perf_event_open.2
index f0f81d7d5..d9e7877cf 100644
--- a/man2/perf_event_open.2
+++ b/man2/perf_event_open.2
@@ -5,7 +5,7 @@
.\" This document is based on the perf_event.h header file, the
.\" tools/perf/design.txt file, and a lot of bitter experience.
.\"
-.TH perf_event_open 2 2023-02-10 "Linux man-pages 6.03"
+.TH perf_event_open 2 2023-05-03 "Linux man-pages 6.05.01"
.SH NAME
perf_event_open \- set up performance monitoring
.SH LIBRARY
@@ -120,13 +120,13 @@ being set to the file descriptor of the group leader.
(A single event on its own is created with
.IR group_fd " = \-1"
and is considered to be a group with only 1 member.)
-An event group is scheduled onto the CPU as a unit: it will
-be put onto the CPU only if all of the events in the group can be put onto
-the CPU.
-This means that the values of the member events can be
-meaningfully compared\[em]added, divided (to get ratios), and so on\[em]with each
-other, since they have counted events for the same set of executed
-instructions.
+An event group is scheduled onto the CPU as a unit:
+it will be put onto the CPU
+only if all of the events in the group can be put onto the CPU.
+This means that the values of the member events can be meaningfully compared
+\[em]added, divided (to get ratios), and so on\[em]
+with each other,
+since they have counted events for the same set of executed instructions.
.PP
The
.I flags
@@ -198,15 +198,15 @@ struct perf_event_attr {
__u32 type; /* Type of event */
__u32 size; /* Size of attribute structure */
__u64 config; /* Type\-specific configuration */
-
+\&
union {
__u64 sample_period; /* Period of sampling */
__u64 sample_freq; /* Frequency of sampling */
};
-
+\&
__u64 sample_type; /* Specifies values included in sample */
__u64 read_format; /* Specifies values returned in read */
-
+\&
__u64 disabled : 1, /* off by default */
inherit : 1, /* children inherit it */
pinned : 1, /* must always be on PMU */
@@ -252,23 +252,23 @@ struct perf_event_attr {
on exec */
sigtrap : 1, /* send synchronous SIGTRAP
on event */
-
+\&
__reserved_1 : 26;
-
+\&
union {
__u32 wakeup_events; /* wakeup every n events */
__u32 wakeup_watermark; /* bytes before wakeup */
};
-
+\&
__u32 bp_type; /* breakpoint type */
-
+\&
union {
__u64 bp_addr; /* breakpoint address */
__u64 kprobe_func; /* for perf_kprobe */
__u64 uprobe_path; /* for perf_uprobe */
__u64 config1; /* extension of config */
};
-
+\&
union {
__u64 bp_len; /* breakpoint length */
__u64 kprobe_addr; /* with kprobe_func == NULL */
@@ -287,7 +287,7 @@ struct perf_event_attr {
__u32 aux_sample_size; /* max aux sample size */
__u32 __reserved_3; /* align to u64 */
__u64 sig_data; /* user data for sigtrap */
-
+\&
};
.EE
.in
@@ -1725,7 +1725,7 @@ struct perf_event_mmap_page {
__u64 aux_tail;
__u64 aux_offset;
__u64 aux_size;
-
+\&
}
.EE
.in
@@ -1807,28 +1807,28 @@ the following code can be used to do a read:
u32 seq, time_mult, time_shift, idx, width;
u64 count, enabled, running;
u64 cyc, time_offset;
-
+\&
do {
seq = pc\->lock;
barrier();
enabled = pc\->time_enabled;
running = pc\->time_running;
-
+\&
if (pc\->cap_usr_time && enabled != running) {
cyc = rdtsc();
time_offset = pc\->time_offset;
time_mult = pc\->time_mult;
time_shift = pc\->time_shift;
}
-
+\&
idx = pc\->index;
count = pc\->offset;
-
+\&
if (pc\->cap_usr_rdpmc && idx) {
width = pc\->pmc_width;
count += rdpmc(idx \- 1);
}
-
+\&
barrier();
} while (pc\->lock != seq);
.EE
@@ -1874,7 +1874,7 @@ delta since
.EX
u64 quot, rem;
u64 delta;
-
+\&
quot = cyc >> time_shift;
rem = cyc & (((u64)1 << time_shift) \- 1);
delta = time_offset + quot * time_mult +
@@ -2145,7 +2145,7 @@ This indicates there is extended data available (currently not used).
.\" commit 930e6fcd2bcce9bcd9d4aa7e755678d33f3fe6f4
This bit is not set by the kernel.
It is reserved for the user-space perf utility to indicate that
-.I /proc/i[pid]/maps
+.IR /proc/ pid /maps
parsing was taking too long and was stopped, and thus the mmap
records may be truncated.
.RE
@@ -3816,18 +3816,15 @@ and (since Linux 3.13) setting a kernel function-trace tracepoint.
.TP
.B ESRCH
Returned if attempting to attach to a process that does not exist.
-.SH VERSION
+.SH STANDARDS
+Linux.
+.SH HISTORY
.BR perf_event_open ()
was introduced in Linux 2.6.31 but was called
.\" commit 0793a61d4df8daeac6492dbf8d2f3e5713caae5e
.BR perf_counter_open ().
It was renamed in Linux 2.6.32.
.\" commit cdd6c482c9ff9c55475ee7392ec8f672eddb7be6
-.SH STANDARDS
-This
-.BR perf_event_open ()
-system call Linux-specific
-and should not be used in programs intended to be portable.
.SH NOTES
The official way of knowing if
.BR perf_event_open ()
@@ -3933,25 +3930,25 @@ instruction count of a call to
#include <sys/ioctl.h>
#include <sys/syscall.h>
#include <unistd.h>
-
+\&
static long
perf_event_open(struct perf_event_attr *hw_event, pid_t pid,
int cpu, int group_fd, unsigned long flags)
{
int ret;
-
+\&
ret = syscall(SYS_perf_event_open, hw_event, pid, cpu,
group_fd, flags);
return ret;
}
-
+\&
int
main(void)
{
int fd;
long long count;
struct perf_event_attr pe;
-
+\&
memset(&pe, 0, sizeof(pe));
pe.type = PERF_TYPE_HARDWARE;
pe.size = sizeof(pe);
@@ -3959,23 +3956,23 @@ main(void)
pe.disabled = 1;
pe.exclude_kernel = 1;
pe.exclude_hv = 1;
-
+\&
fd = perf_event_open(&pe, 0, \-1, \-1, 0);
if (fd == \-1) {
fprintf(stderr, "Error opening leader %llx\en", pe.config);
exit(EXIT_FAILURE);
}
-
+\&
ioctl(fd, PERF_EVENT_IOC_RESET, 0);
ioctl(fd, PERF_EVENT_IOC_ENABLE, 0);
-
+\&
printf("Measuring instruction count for this printf\en");
-
+\&
ioctl(fd, PERF_EVENT_IOC_DISABLE, 0);
read(fd, &count, sizeof(count));
-
+\&
printf("Used %lld instructions\en", count);
-
+\&
close(fd);
}
.EE
diff --git a/man2/perfmonctl.2 b/man2/perfmonctl.2
index fa7a69d61..2155bb45a 100644
--- a/man2/perfmonctl.2
+++ b/man2/perfmonctl.2
@@ -4,7 +4,7 @@
.\"
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
-.TH perfmonctl 2 2023-02-10 "Linux man-pages 6.03"
+.TH perfmonctl 2 2023-03-30 "Linux man-pages 6.05.01"
.SH NAME
perfmonctl \- interface to IA-64 performance monitoring unit
.SH SYNOPSIS
@@ -16,7 +16,7 @@ perfmonctl \- interface to IA-64 performance monitoring unit
.fi
.PP
.IR Note :
-There is no glibc wrapper for this system call; see NOTES.
+There is no glibc wrapper for this system call; see HISTORY.
.SH DESCRIPTION
The IA-64-specific
.BR perfmonctl ()
@@ -174,15 +174,13 @@ returns zero when the operation is successful.
On error, \-1 is returned and
.I errno
is set to indicate the error.
-.SH VERSIONS
-.BR perfmonctl ()
-was added in Linux 2.4;
-.\" commit ecf5b72d5f66af843f189dfe9ce31598c3e48ad7
-it was removed in Linux 5.10.
.SH STANDARDS
-.BR perfmonctl ()
-is Linux-specific and is available only on the IA-64 architecture.
-.SH NOTES
+Linux on IA-64.
+.SH HISTORY
+Added in Linux 2.4;
+.\" commit ecf5b72d5f66af843f189dfe9ce31598c3e48ad7
+removed in Linux 5.10.
+.PP
This system call was broken for many years,
and ultimately removed in Linux 5.10.
.PP
diff --git a/man2/personality.2 b/man2/personality.2
index 09a510862..e76af7910 100644
--- a/man2/personality.2
+++ b/man2/personality.2
@@ -10,7 +10,7 @@
.\" changed prototype, documented 0xffffffff, aeb, 030101
.\" Modified 2004-11-03 patch from Martin Schulze <joey@infodrom.org>
.\"
-.TH personality 2 2022-12-04 "Linux man-pages 6.03"
+.TH personality 2 2023-04-29 "Linux man-pages 6.05.01"
.SH NAME
personality \- set the process execution domain
.SH LIBRARY
@@ -67,10 +67,12 @@ With this flag set, use 0xc0000000 as the offset at which to search
a virtual memory chunk on
.BR mmap (2);
otherwise use 0xffffe000.
+Applies to 32-bit x86 processes only.
.TP
.BR FDPIC_FUNCPTRS " (since Linux 2.6.11)"
User-space function pointers to signal handlers point
-(on certain architectures) to descriptors.
+to descriptors.
+Applies only to ARM if BINFMT_ELF_FDPIC and SuperH.
.TP
.BR MMAP_PAGE_ZERO " (since Linux 2.4.0)"
Map page 0 as read-only
@@ -85,7 +87,7 @@ for
.BR mmap (2).
.TP
.BR SHORT_INODE " (since Linux 2.4.0)"
-No effects(?).
+No effect.
.TP
.BR STICKY_TIMEOUTS " (since Linux 1.2.0)"
With this flag set,
@@ -99,7 +101,7 @@ interrupted by a signal handler.
.BR UNAME26 " (since Linux 3.1)"
Have
.BR uname (2)
-report a 2.6.40+ version number rather than a 3.x version number.
+report a 2.6.(40+x) version number rather than a MAJOR.x version number.
Added as a stopgap measure to support broken applications that
could not handle the
kernel version-numbering switch from Linux 2.6.x to Linux 3.x.
@@ -127,111 +129,150 @@ Implies
IRIX 6 64-bit.
Implies
.BR STICKY_TIMEOUTS ;
-otherwise no effects.
+otherwise no effect.
.TP
.BR PER_IRIXN32 " (since Linux 2.2)"
IRIX 6 new 32-bit.
Implies
.BR STICKY_TIMEOUTS ;
-otherwise no effects.
+otherwise no effect.
.TP
.BR PER_ISCR4 " (since Linux 1.2.0)"
Implies
.BR STICKY_TIMEOUTS ;
-otherwise no effects.
+otherwise no effect.
.TP
.BR PER_LINUX " (since Linux 1.2.0)"
Linux.
.TP
.BR PER_LINUX32 " (since Linux 2.2)"
-[To be documented.]
+.BR uname (2)
+returns the name of the 32-bit architecture in the
+.I machine
+field ("i686" instead of "x86_64", &c.).
+.IP
+Under ia64 (Itanium), processes with this personality don't have the
+O_LARGEFILE
+.BR open (2)
+flag forced.
+.IP
+Under 64-bit ARM, setting this personality is forbidden if
+.BR execve (2)ing
+a 32-bit process would also be forbidden
+(cf. the allow_mismatched_32bit_el0 kernel parameter and
+.IR Documentation/arm64/asymmetric-32bit.rst ).
.TP
.BR PER_LINUX32_3GB " (since Linux 2.4)"
-Implies
+Same as
+.BR PER_LINUX32 ,
+but implies
.BR ADDR_LIMIT_3GB .
.TP
.BR PER_LINUX_32BIT " (since Linux 2.0)"
-Implies
+Same as
+.BR PER_LINUX ,
+but implies
.BR ADDR_LIMIT_32BIT .
.TP
.BR PER_LINUX_FDPIC " (since Linux 2.6.11)"
-Implies
+Same as
+.BR PER_LINUX ,
+but implies
.BR FDPIC_FUNCPTRS .
.TP
.BR PER_OSF4 " (since Linux 2.4)"
OSF/1 v4.
-On alpha,
+.\" commit 987f20a9dcce3989e48d87cff3952c095c994445
+No effect since Linux 6.1, which removed a.out binary support.
+Before, on alpha,
.\" Following is from a comment in arch/alpha/kernel/osf_sys.c
-clear top 32 bits of iov_len in the user's buffer for
+would clear top 32 bits of iov_len in the user's buffer for
compatibility with old versions of OSF/1 where iov_len
was defined as.
.IR int .
.TP
.BR PER_OSR5 " (since Linux 2.4)"
+SCO OpenServer 5.
Implies
.B STICKY_TIMEOUTS
and
.BR WHOLE_SECONDS ;
-otherwise no effects.
+otherwise no effect.
.TP
-.BR PER_RISCOS " (since Linux 2.2)"
-[To be documented.]
+.BR PER_RISCOS " (since Linux 2.3.7; macro since Linux 2.3.13)"
+Acorn RISC OS/Arthur (MIPS).
+No effect.
+.\" commit 125ec7b4e90cbae4eed5a7ff1ee479cc331dcf3c
+Up to Linux v4.0, would set the emulation altroot to
+.I /usr/gnemul/riscos
+(cf.\&
+.BR PER_SUNOS ,
+below).
+Before then, up to Linux 2.6.3, just Arthur emulation.
.TP
.BR PER_SCOSVR3 " (since Linux 1.2.0)"
-Implies
-.BR STICKY_TIMEOUTS ,
-.BR WHOLE_SECONDS ,
-and
-.BR SHORT_INODE ;
-otherwise no effects.
+SCO UNIX System V Release 3.
+Same as
+.BR PER_OSR5 ,
+but also implies
+.BR SHORT_INODE .
.TP
.BR PER_SOLARIS " (since Linux 2.4)"
+Solaris.
Implies
.BR STICKY_TIMEOUTS ;
-otherwise no effects.
+otherwise no effect.
.TP
.BR PER_SUNOS " (since Linux 2.4.0)"
-Implies
+Sun OS.
+Same as
+.BR PER_BSD ,
+but implies
.BR STICKY_TIMEOUTS .
-Divert library and dynamic linker searches to
+Prior to Linux 2.6.26,
+diverted library and dynamic linker searches to
.IR /usr/gnemul .
-Buggy, largely unmaintained, and almost entirely unused;
-support was removed in Linux 2.6.26.
+Buggy, largely unmaintained, and almost entirely unused.
.TP
.BR PER_SVR3 " (since Linux 1.2.0)"
+AT&T UNIX System V Release 3.
Implies
.B STICKY_TIMEOUTS
and
.BR SHORT_INODE ;
-otherwise no effects.
+otherwise no effect.
.TP
.BR PER_SVR4 " (since Linux 1.2.0)"
+AT&T UNIX System V Release 4.
Implies
.B STICKY_TIMEOUTS
and
.BR MMAP_PAGE_ZERO ;
-otherwise no effects.
+otherwise no effect.
.TP
.BR PER_UW7 " (since Linux 2.4)"
+UnixWare 7.
Implies
.B STICKY_TIMEOUTS
and
.BR MMAP_PAGE_ZERO ;
-otherwise no effects.
+otherwise no effect.
.TP
.BR PER_WYSEV386 " (since Linux 1.2.0)"
+WYSE UNIX System V/386.
Implies
.B STICKY_TIMEOUTS
and
.BR SHORT_INODE ;
-otherwise no effects.
+otherwise no effect.
.TP
.BR PER_XENIX " (since Linux 1.2.0)"
+XENIX.
Implies
.B STICKY_TIMEOUTS
and
.BR SHORT_INODE ;
-otherwise no effects.
+otherwise no effect.
.SH RETURN VALUE
On success, the previous
.I persona
@@ -243,15 +284,13 @@ is set to indicate the error.
.TP
.B EINVAL
The kernel was unable to change the personality.
-.SH VERSIONS
-This system call first appeared in Linux 1.1.20
-(and thus first in a stable kernel release with Linux 1.2.0);
-library support was added in glibc 2.3.
+.SH STANDARDS
+Linux.
+.SH HISTORY
+Linux 1.1.20,
+.\" (and thus first in a stable kernel release with Linux 1.2.0)
+glibc 2.3.
.\" personality wrapper first appeared in glibc 1.90,
.\" <sys/personality.h> was added later in glibc 2.2.91.
-.SH STANDARDS
-.BR personality ()
-is Linux-specific and should not be used in programs intended to
-be portable.
.SH SEE ALSO
.BR setarch (8)
diff --git a/man2/pidfd_getfd.2 b/man2/pidfd_getfd.2
index f4abbbafa..9e3af2ac2 100644
--- a/man2/pidfd_getfd.2
+++ b/man2/pidfd_getfd.2
@@ -2,7 +2,7 @@
.\"
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
-.TH pidfd_getfd 2 2023-02-05 "Linux man-pages 6.03"
+.TH pidfd_getfd 2 2023-03-30 "Linux man-pages 6.05.01"
.SH NAME
pidfd_getfd \- obtain a duplicate of another process's file descriptor
.SH LIBRARY
@@ -103,13 +103,11 @@ The process referred to by
.I pidfd
does not exist
(i.e., it has terminated and been waited on).
-.SH VERSIONS
-.BR pidfd_getfd ()
-first appeared in Linux 5.6.
-.\" commit 8649c322f75c96e7ced2fec201e123b2b073bf09
.SH STANDARDS
-.BR pidfd_getfd ()
-is Linux specific.
+Linux.
+.SH HISTORY
+Linux 5.6.
+.\" commit 8649c322f75c96e7ced2fec201e123b2b073bf09
.SH NOTES
For a description of PID file descriptors, see
.BR pidfd_open (2).
diff --git a/man2/pidfd_open.2 b/man2/pidfd_open.2
index ac8541c55..8321e8298 100644
--- a/man2/pidfd_open.2
+++ b/man2/pidfd_open.2
@@ -2,7 +2,7 @@
.\"
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
-.TH pidfd_open 2 2023-02-05 "Linux man-pages 6.03"
+.TH pidfd_open 2 2023-05-03 "Linux man-pages 6.05.01"
.SH NAME
pidfd_open \- obtain a file descriptor that refers to a process
.SH LIBRARY
@@ -80,12 +80,10 @@ Insufficient kernel memory was available.
The process specified by
.I pid
does not exist.
-.SH VERSIONS
-.BR pidfd_open ()
-first appeared in Linux 5.3.
.SH STANDARDS
-.BR pidfd_open ()
-is Linux specific.
+Linux.
+.SH HISTORY
+Linux 5.3.
.SH NOTES
The following code sequence can be used to obtain a file descriptor
for the child of
@@ -189,7 +187,7 @@ The
system call is the preferred way of obtaining a PID file descriptor
for an already existing process.
The alternative is to obtain a file descriptor by opening a
-.I /proc/[pid]
+.IR /proc/ pid
directory.
However, the latter technique is possible only if the
.BR proc (5)
@@ -217,42 +215,42 @@ event.
#include <stdlib.h>
#include <sys/syscall.h>
#include <unistd.h>
-
+\&
static int
pidfd_open(pid_t pid, unsigned int flags)
{
return syscall(SYS_pidfd_open, pid, flags);
}
-
+\&
int
main(int argc, char *argv[])
{
int pidfd, ready;
struct pollfd pollfd;
-
+\&
if (argc != 2) {
fprintf(stderr, "Usage: %s <pid>\en", argv[0]);
exit(EXIT_SUCCESS);
}
-
+\&
pidfd = pidfd_open(atoi(argv[1]), 0);
if (pidfd == \-1) {
perror("pidfd_open");
exit(EXIT_FAILURE);
}
-
+\&
pollfd.fd = pidfd;
pollfd.events = POLLIN;
-
+\&
ready = poll(&pollfd, 1, \-1);
if (ready == \-1) {
perror("poll");
exit(EXIT_FAILURE);
}
-
+\&
printf("Events (%#x): POLLIN is %sset\en", pollfd.revents,
(pollfd.revents & POLLIN) ? "" : "not ");
-
+\&
close(pidfd);
exit(EXIT_SUCCESS);
}
diff --git a/man2/pidfd_send_signal.2 b/man2/pidfd_send_signal.2
index bd886a8df..670ea71a2 100644
--- a/man2/pidfd_send_signal.2
+++ b/man2/pidfd_send_signal.2
@@ -2,7 +2,7 @@
.\"
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
-.TH pidfd_send_signal 2 2023-02-05 "Linux man-pages 6.03"
+.TH pidfd_send_signal 2 2023-05-03 "Linux man-pages 6.05.01"
.SH NAME
pidfd_send_signal \- send a signal to a process specified by a file descriptor
.SH LIBRARY
@@ -118,12 +118,10 @@ is invalid (see
.B ESRCH
The target process does not exist
(i.e., it has terminated and been waited on).
-.SH VERSIONS
-.BR pidfd_send_signal ()
-first appeared in Linux 5.1.
.SH STANDARDS
-.BR pidfd_send_signal ()
-is Linux specific.
+Linux.
+.SH HISTORY
+Linux 5.1.
.SH NOTES
.SS PID file descriptors
The
@@ -177,42 +175,42 @@ fails with the error
#include <string.h>
#include <sys/syscall.h>
#include <unistd.h>
-
+\&
static int
pidfd_send_signal(int pidfd, int sig, siginfo_t *info,
unsigned int flags)
{
return syscall(SYS_pidfd_send_signal, pidfd, sig, info, flags);
}
-
+\&
int
main(int argc, char *argv[])
{
int pidfd, sig;
char path[PATH_MAX];
siginfo_t info;
-
+\&
if (argc != 3) {
fprintf(stderr, "Usage: %s <pid> <signal>\en", argv[0]);
exit(EXIT_FAILURE);
}
-
+\&
sig = atoi(argv[2]);
-
+\&
/* Obtain a PID file descriptor by opening the /proc/PID directory
of the target process. */
-
+\&
snprintf(path, sizeof(path), "/proc/%s", argv[1]);
-
+\&
pidfd = open(path, O_RDONLY);
if (pidfd == \-1) {
perror("open");
exit(EXIT_FAILURE);
}
-
+\&
/* Populate a \[aq]siginfo_t\[aq] structure for use with
pidfd_send_signal(). */
-
+\&
memset(&info, 0, sizeof(info));
info.si_code = SI_QUEUE;
info.si_signo = sig;
@@ -220,14 +218,14 @@ main(int argc, char *argv[])
info.si_uid = getuid();
info.si_pid = getpid();
info.si_value.sival_int = 1234;
-
+\&
/* Send the signal. */
-
+\&
if (pidfd_send_signal(pidfd, sig, &info, 0) == \-1) {
perror("pidfd_send_signal");
exit(EXIT_FAILURE);
}
-
+\&
exit(EXIT_SUCCESS);
}
.EE
diff --git a/man2/pipe.2 b/man2/pipe.2
index 400406b41..d8142f926 100644
--- a/man2/pipe.2
+++ b/man2/pipe.2
@@ -13,7 +13,7 @@
.\" to EXAMPLE text.
.\" 2008-10-10, mtk: add description of pipe2()
.\"
-.TH pipe 2 2023-02-05 "Linux man-pages 6.03"
+.TH pipe 2 2023-07-30 "Linux man-pages 6.05.01"
.SH NAME
pipe, pipe2 \- create pipe
.SH LIBRARY
@@ -32,7 +32,7 @@ Standard C library
.BI "int pipe2(int " pipefd "[2], int " flags );
.PP
/* On Alpha, IA-64, MIPS, SuperH, and SPARC/SPARC64, pipe() has the
- following prototype; see NOTES */
+ following prototype; see VERSIONS */
.PP
.B #include <unistd.h>
.PP
@@ -193,16 +193,6 @@ and support for notifications
.RB ( CONFIG_WATCH_QUEUE )
is not compiled into the kernel.
.SH VERSIONS
-.BR pipe2 ()
-was added in Linux 2.6.27;
-glibc support is available starting with glibc 2.9.
-.SH STANDARDS
-.BR pipe ():
-POSIX.1-2001, POSIX.1-2008.
-.PP
-.BR pipe2 ()
-is Linux-specific.
-.SH NOTES
.\" See http://math-atlas.sourceforge.net/devel/assembly/64.psabi.1.33.ps.Z
.\" for example, section 3.2.1 "Registers and the Stack Frame".
The System V ABI on some architectures allows the use of more than one register
@@ -219,6 +209,21 @@ wrapper function transparently deals with this.
See
.BR syscall (2)
for information regarding registers used for storing second file descriptor.
+.SH STANDARDS
+.TP
+.BR pipe ()
+POSIX.1-2008.
+.TP
+.BR pipe2 ()
+Linux.
+.SH HISTORY
+.TP
+.BR pipe ()
+POSIX.1-2001.
+.TP
+.BR pipe2 ()
+Linux 2.6.27,
+glibc 2.9.
.SH EXAMPLES
.\" fork.2 refers to this example program.
The following program creates a pipe, and then
@@ -243,40 +248,40 @@ and echoes it on standard output.
#include <string.h>
#include <sys/wait.h>
#include <unistd.h>
-
+\&
int
main(int argc, char *argv[])
{
int pipefd[2];
char buf;
pid_t cpid;
-
+\&
if (argc != 2) {
fprintf(stderr, "Usage: %s <string>\en", argv[0]);
exit(EXIT_FAILURE);
}
-
+\&
if (pipe(pipefd) == \-1) {
perror("pipe");
exit(EXIT_FAILURE);
}
-
+\&
cpid = fork();
if (cpid == \-1) {
perror("fork");
exit(EXIT_FAILURE);
}
-
+\&
if (cpid == 0) { /* Child reads from pipe */
close(pipefd[1]); /* Close unused write end */
-
+\&
while (read(pipefd[0], &buf, 1) > 0)
write(STDOUT_FILENO, &buf, 1);
-
+\&
write(STDOUT_FILENO, "\en", 1);
close(pipefd[0]);
_exit(EXIT_SUCCESS);
-
+\&
} else { /* Parent writes argv[1] to pipe */
close(pipefd[0]); /* Close unused read end */
write(pipefd[1], argv[1], strlen(argv[1]));
diff --git a/man2/pivot_root.2 b/man2/pivot_root.2
index d56ad996c..a4077ef73 100644
--- a/man2/pivot_root.2
+++ b/man2/pivot_root.2
@@ -4,7 +4,7 @@
.\"
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
-.TH pivot_root 2 2023-02-05 "Linux man-pages 6.03"
+.TH pivot_root 2 2023-05-03 "Linux man-pages 6.05.01"
.SH NAME
pivot_root \- change the root mount
.SH LIBRARY
@@ -151,12 +151,10 @@ is a mount point and has the propagation type
The calling process does not have the
.B CAP_SYS_ADMIN
capability.
-.SH VERSIONS
-.BR pivot_root ()
-was introduced in Linux 2.3.41.
.SH STANDARDS
-.BR pivot_root ()
-is Linux-specific and hence is not portable.
+Linux.
+.SH HISTORY
+Linux 2.3.41.
.SH NOTES
A command-line interface for this system call is provided by
.BR pivot_root (8).
@@ -302,7 +300,7 @@ hello world
.\" SRC BEGIN (pivot_root.c)
.EX
/* pivot_root_demo.c */
-
+\&
#define _GNU_SOURCE
#include <err.h>
#include <limits.h>
@@ -316,15 +314,15 @@ hello world
#include <sys/syscall.h>
#include <sys/wait.h>
#include <unistd.h>
-
+\&
static int
pivot_root(const char *new_root, const char *put_old)
{
return syscall(SYS_pivot_root, new_root, put_old);
}
-
+\&
#define STACK_SIZE (1024 * 1024)
-
+\&
static int /* Startup function for cloned child */
child(void *arg)
{
@@ -332,70 +330,70 @@ child(void *arg)
char **args = arg;
char *new_root = args[0];
const char *put_old = "/oldrootfs";
-
+\&
/* Ensure that \[aq]new_root\[aq] and its parent mount don\[aq]t have
shared propagation (which would cause pivot_root() to
return an error), and prevent propagation of mount
events to the initial mount namespace. */
-
+\&
if (mount(NULL, "/", NULL, MS_REC | MS_PRIVATE, NULL) == \-1)
err(EXIT_FAILURE, "mount\-MS_PRIVATE");
-
+\&
/* Ensure that \[aq]new_root\[aq] is a mount point. */
-
+\&
if (mount(new_root, new_root, NULL, MS_BIND, NULL) == \-1)
err(EXIT_FAILURE, "mount\-MS_BIND");
-
+\&
/* Create directory to which old root will be pivoted. */
-
+\&
snprintf(path, sizeof(path), "%s/%s", new_root, put_old);
if (mkdir(path, 0777) == \-1)
err(EXIT_FAILURE, "mkdir");
-
+\&
/* And pivot the root filesystem. */
-
+\&
if (pivot_root(new_root, path) == \-1)
err(EXIT_FAILURE, "pivot_root");
-
+\&
/* Switch the current working directory to "/". */
-
+\&
if (chdir("/") == \-1)
err(EXIT_FAILURE, "chdir");
-
+\&
/* Unmount old root and remove mount point. */
-
+\&
if (umount2(put_old, MNT_DETACH) == \-1)
perror("umount2");
if (rmdir(put_old) == \-1)
perror("rmdir");
-
+\&
/* Execute the command specified in argv[1]... */
-
+\&
execv(args[1], &args[1]);
err(EXIT_FAILURE, "execv");
}
-
+\&
int
main(int argc, char *argv[])
{
char *stack;
-
+\&
/* Create a child process in a new mount namespace. */
-
+\&
stack = mmap(NULL, STACK_SIZE, PROT_READ | PROT_WRITE,
MAP_PRIVATE | MAP_ANONYMOUS | MAP_STACK, \-1, 0);
if (stack == MAP_FAILED)
err(EXIT_FAILURE, "mmap");
-
+\&
if (clone(child, stack + STACK_SIZE,
CLONE_NEWNS | SIGCHLD, &argv[1]) == \-1)
err(EXIT_FAILURE, "clone");
-
+\&
/* Parent falls through to here; wait for child. */
-
+\&
if (wait(NULL) == \-1)
err(EXIT_FAILURE, "wait");
-
+\&
exit(EXIT_SUCCESS);
}
.EE
diff --git a/man2/pkey_alloc.2 b/man2/pkey_alloc.2
index 26e8cb8c7..53d8f2ac5 100644
--- a/man2/pkey_alloc.2
+++ b/man2/pkey_alloc.2
@@ -2,7 +2,7 @@
.\"
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
-.TH pkey_alloc 2 2022-12-04 "Linux man-pages 6.03"
+.TH pkey_alloc 2 2023-03-30 "Linux man-pages 6.05.01"
.SH NAME
pkey_alloc, pkey_free \- allocate or free a protection key
.SH LIBRARY
@@ -83,18 +83,11 @@ does not support protection keys.
Applications should always be prepared to handle this error, since
factors outside of the application's control can reduce the number
of available pkeys.
-.SH VERSIONS
-.BR pkey_alloc ()
-and
-.BR pkey_free ()
-were added in Linux 4.9;
-library support was added in glibc 2.27.
.SH STANDARDS
-The
-.BR pkey_alloc ()
-and
-.BR pkey_free ()
-system calls are Linux-specific.
+Linux.
+.SH HISTORY
+Linux 4.9,
+glibc 2.27.
.SH NOTES
.BR pkey_alloc ()
is always safe to call regardless of whether or not the operating system
diff --git a/man2/poll.2 b/man2/poll.2
index 7aecf02b4..2b024d3f0 100644
--- a/man2/poll.2
+++ b/man2/poll.2
@@ -7,7 +7,7 @@
.\" 2006-07-01, mtk, Added POLLRDHUP + various other wording and
.\" formatting changes.
.\"
-.TH poll 2 2023-02-05 "Linux man-pages 6.03"
+.TH poll 2 2023-07-08 "Linux man-pages 6.05.01"
.SH NAME
poll, ppoll \- wait for some event on a file descriptor
.SH LIBRARY
@@ -123,6 +123,14 @@ the call is interrupted by a signal handler; or
.IP \[bu]
the timeout expires.
.PP
+Being "ready" means that the requested operation will not block; thus,
+.BR poll ()ing
+regular files,
+block devices,
+and other files with no reasonable polling semantic
+.I always
+returns instantly as ready to read and write.
+.PP
Note that the
.I timeout
interval will be rounded up to the system clock granularity,
@@ -264,7 +272,7 @@ executing the following calls:
.EX
sigset_t origmask;
int timeout;
-
+\&
timeout = (tmo_p == NULL) ? \-1 :
(tmo_p\->tv_sec * 1000 + tmo_p\->tv_nsec / 1000000);
pthread_sigmask(SIG_SETMASK, &sigmask, &origmask);
@@ -358,39 +366,6 @@ is invalid (negative).
.B ENOMEM
Unable to allocate memory for kernel data structures.
.SH VERSIONS
-The
-.BR poll ()
-system call was introduced in Linux 2.1.23.
-On older kernels that lack this system call,
-the glibc
-.BR poll ()
-wrapper function provides emulation using
-.BR select (2).
-.PP
-The
-.BR ppoll ()
-system call was added in Linux 2.6.16.
-The
-.BR ppoll ()
-library call was added in glibc 2.4.
-.SH STANDARDS
-.BR poll ()
-conforms to POSIX.1-2001 and POSIX.1-2008.
-.BR ppoll ()
-is Linux-specific.
-.\" FIXME .
-.\" ppoll() is proposed for inclusion in POSIX:
-.\" https://www.austingroupbugs.net/view.php?id=1263
-.\" NetBSD 3.0 has a pollts() which is like Linux ppoll().
-.SH NOTES
-The operation of
-.BR poll ()
-and
-.BR ppoll ()
-is not affected by the
-.B O_NONBLOCK
-flag.
-.PP
On some other UNIX systems,
.\" Darwin, according to a report by Jeremy Sequoia, relayed by Josh Triplett
.BR poll ()
@@ -412,11 +387,6 @@ with the value \-1 for use as a
for
.BR poll ().
This constant is not provided in glibc.
-.PP
-For a discussion of what may happen if a file descriptor being monitored by
-.BR poll ()
-is closed in another thread, see
-.BR select (2).
.SS C library/kernel differences
The Linux
.BR ppoll ()
@@ -448,6 +418,45 @@ See
.BR sigprocmask (2)
for a discussion on the differences between the kernel and the libc
notion of the sigset.
+.SH STANDARDS
+.TP
+.BR poll ()
+POSIX.1-2008.
+.TP
+.BR ppoll ()
+Linux.
+.\" FIXME .
+.\" ppoll() is proposed for inclusion in POSIX:
+.\" https://www.austingroupbugs.net/view.php?id=1263
+.\" NetBSD 3.0 has a pollts() which is like Linux ppoll().
+.SH HISTORY
+.TP
+.BR poll ()
+POSIX.1-2001.
+Linux 2.1.23.
+.IP
+On older kernels that lack this system call,
+the glibc
+.BR poll ()
+wrapper function provides emulation using
+.BR select (2).
+.TP
+.BR ppoll ()
+Linux 2.6.16,
+glibc 2.4.
+.SH NOTES
+The operation of
+.BR poll ()
+and
+.BR ppoll ()
+is not affected by the
+.B O_NONBLOCK
+flag.
+.PP
+For a discussion of what may happen if a file descriptor being monitored by
+.BR poll ()
+is closed in another thread, see
+.BR select (2).
.SH BUGS
See the discussion of spurious readiness notifications under the
BUGS section of
@@ -505,7 +514,7 @@ About to poll()
Ready: 1
fd=3; events: POLLIN POLLHUP
read 6 bytes: ccccc
-
+\&
About to poll()
Ready: 1
fd=3; events: POLLHUP
@@ -547,7 +556,7 @@ at which point the file descriptor was closed and the program terminated.
.\" SRC BEGIN (poll_input.c)
.EX
/* poll_input.c
-
+\&
Licensed under GNU General Public License v2 or later.
*/
#include <fcntl.h>
@@ -555,10 +564,10 @@ at which point the file descriptor was closed and the program terminated.
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
-
+\&
#define errExit(msg) do { perror(msg); exit(EXIT_FAILURE); \e
} while (0)
-
+\&
int
main(int argc, char *argv[])
{
@@ -567,49 +576,49 @@ main(int argc, char *argv[])
nfds_t num_open_fds, nfds;
ssize_t s;
struct pollfd *pfds;
-
+\&
if (argc < 2) {
fprintf(stderr, "Usage: %s file...\en", argv[0]);
exit(EXIT_FAILURE);
}
-
+\&
num_open_fds = nfds = argc \- 1;
pfds = calloc(nfds, sizeof(struct pollfd));
if (pfds == NULL)
errExit("malloc");
-
+\&
/* Open each file on command line, and add it to \[aq]pfds\[aq] array. */
-
+\&
for (nfds_t j = 0; j < nfds; j++) {
pfds[j].fd = open(argv[j + 1], O_RDONLY);
if (pfds[j].fd == \-1)
errExit("open");
-
+\&
printf("Opened \e"%s\e" on fd %d\en", argv[j + 1], pfds[j].fd);
-
+\&
pfds[j].events = POLLIN;
}
-
+\&
/* Keep calling poll() as long as at least one file descriptor is
open. */
-
+\&
while (num_open_fds > 0) {
printf("About to poll()\en");
ready = poll(pfds, nfds, \-1);
if (ready == \-1)
errExit("poll");
-
+\&
printf("Ready: %d\en", ready);
-
+\&
/* Deal with array returned by poll(). */
-
+\&
for (nfds_t j = 0; j < nfds; j++) {
if (pfds[j].revents != 0) {
printf(" fd=%d; events: %s%s%s\en", pfds[j].fd,
(pfds[j].revents & POLLIN) ? "POLLIN " : "",
(pfds[j].revents & POLLHUP) ? "POLLHUP " : "",
(pfds[j].revents & POLLERR) ? "POLLERR " : "");
-
+\&
if (pfds[j].revents & POLLIN) {
s = read(pfds[j].fd, buf, sizeof(buf));
if (s == \-1)
@@ -625,7 +634,7 @@ main(int argc, char *argv[])
}
}
}
-
+\&
printf("All file descriptors closed; bye\en");
exit(EXIT_SUCCESS);
}
diff --git a/man2/posix_fadvise.2 b/man2/posix_fadvise.2
index daf031cef..38e9745e0 100644
--- a/man2/posix_fadvise.2
+++ b/man2/posix_fadvise.2
@@ -6,7 +6,7 @@
.\" 2005-04-08 mtk, noted kernel version and added BUGS
.\" 2010-10-09, mtk, document arm_fadvise64_64()
.\"
-.TH posix_fadvise 2 2022-12-04 "Linux man-pages 6.03"
+.TH posix_fadvise 2 2023-03-30 "Linux man-pages 6.05.01"
.SH NAME
posix_fadvise \- predeclare an access pattern for file data
.SH LIBRARY
@@ -127,47 +127,11 @@ Linux returned
.B EINVAL
in this case.)
.SH VERSIONS
-Kernel support first appeared in Linux 2.5.60;
-the underlying system call is called
-.BR fadvise64 ().
-.\" of fadvise64_64()
-Library support has been provided since glibc 2.2,
-via the wrapper function
-.BR posix_fadvise ().
-.PP
-Since Linux 3.18,
-.\" commit d3ac21cacc24790eb45d735769f35753f5b56ceb
-support for the underlying system call is optional,
-depending on the setting of the
-.B CONFIG_ADVISE_SYSCALLS
-configuration option.
-.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008.
-Note that the type of the
-.I len
-argument was changed from
-.I size_t
-to
-.I off_t
-in POSIX.1-2001 TC1.
-.SH NOTES
Under Linux, \fBPOSIX_FADV_NORMAL\fP sets the readahead window to the
default size for the backing device; \fBPOSIX_FADV_SEQUENTIAL\fP doubles
this size, and \fBPOSIX_FADV_RANDOM\fP disables file readahead entirely.
These changes affect the entire file, not just the specified region
(but other open file handles to the same file are unaffected).
-.PP
-The contents of the kernel buffer cache can be cleared via the
-.I /proc/sys/vm/drop_caches
-interface described in
-.BR proc (5).
-.PP
-One can obtain a snapshot of which pages of a file are resident
-in the buffer cache by opening a file, mapping it with
-.BR mmap (2),
-and then applying
-.BR mincore (2)
-to the mapping.
.SS C library/kernel differences
The name of the wrapper function in the C library is
.BR posix_fadvise ().
@@ -210,6 +174,45 @@ hidden from applications by the glibc
.BR posix_fadvise ()
wrapper function,
which invokes the appropriate architecture-specific system call.
+.SH STANDARDS
+POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001.
+.PP
+Kernel support first appeared in Linux 2.5.60;
+the underlying system call is called
+.BR fadvise64 ().
+.\" of fadvise64_64()
+Library support has been provided since glibc 2.2,
+via the wrapper function
+.BR posix_fadvise ().
+.PP
+Since Linux 3.18,
+.\" commit d3ac21cacc24790eb45d735769f35753f5b56ceb
+support for the underlying system call is optional,
+depending on the setting of the
+.B CONFIG_ADVISE_SYSCALLS
+configuration option.
+.PP
+The type of the
+.I len
+argument was changed from
+.I size_t
+to
+.I off_t
+in POSIX.1-2001 TC1.
+.SH NOTES
+The contents of the kernel buffer cache can be cleared via the
+.I /proc/sys/vm/drop_caches
+interface described in
+.BR proc (5).
+.PP
+One can obtain a snapshot of which pages of a file are resident
+in the buffer cache by opening a file, mapping it with
+.BR mmap (2),
+and then applying
+.BR mincore (2)
+to the mapping.
.SH BUGS
Before Linux 2.6.6, if
.I len
diff --git a/man2/prctl.2 b/man2/prctl.2
index bfd94a477..a592bba70 100644
--- a/man2/prctl.2
+++ b/man2/prctl.2
@@ -36,7 +36,7 @@
.\" 2014-11-10 Dave Hansen, document PR_MPX_{EN,DIS}ABLE_MANAGEMENT
.\"
.\"
-.TH prctl 2 2023-02-10 "Linux man-pages 6.03"
+.TH prctl 2 2023-07-28 "Linux man-pages 6.05.01"
.SH NAME
prctl \- operations on a process or thread
.SH LIBRARY
@@ -46,8 +46,9 @@ Standard C library
.nf
.B #include <sys/prctl.h>
.PP
-.BI "int prctl(int " option ", unsigned long " arg2 ", unsigned long " arg3 ,
-.BI " unsigned long " arg4 ", unsigned long " arg5 );
+.BI "int prctl(int " option ", ..."
+.BI " \fR/*\fP unsigned long " arg2 ", unsigned long " arg3 ,
+.BI " unsigned long " arg4 ", unsigned long " arg5 " \fR*/\fP );"
.fi
.SH DESCRIPTION
.BR prctl ()
@@ -1049,9 +1050,12 @@ before Linux 5.3).
.BR PR_SET_PDEATHSIG " (since Linux 2.1.57)"
Set the parent-death signal
of the calling process to \fIarg2\fP (either a signal value
-in the range 1..\c
-.BR NSIG "\-1" ,
-or 0 to clear).
+in the range
+.RB [ 1 ,
+.IR NSIG\~\-\~1 ],
+or
+.B 0
+to clear).
This is the signal that the calling process will get when its
parent dies.
.IP
@@ -1652,7 +1656,7 @@ or
.IP
For more information,
see the kernel source file
-.I Documentation/admin-guide/syscall\-user\-dispatch.rst
+.I Documentation/admin\-guide/syscall\-user\-dispatch.rst
.\" prctl PR_SET_TAGGED_ADDR_CTRL
.\" commit 63f0c60379650d82250f22e4cf4137ef3dc4f43d
.TP
@@ -2026,6 +2030,17 @@ system call on Tru64).
for information on versions and architectures.)
Return unaligned access control bits, in the location pointed to by
.IR "(unsigned int\~*) arg2" .
+.\" prctl PR_GET_AUXV
+.TP
+.BR PR_GET_AUXV " (since Linux 6.4)"
+Get the auxiliary vector (auxv) into the buffer pointed to by
+.IR "(void\~*) arg2" ,
+whose length is given by \fIarg3\fP.
+If the buffer is not long enough for the full auxiliary vector,
+the copy will be truncated.
+Return (as the function result)
+the full length of the auxiliary vector.
+\fIarg4\fP and \fIarg5\fP must be 0.
.SH RETURN VALUE
On success,
.BR PR_CAP_AMBIENT + PR_CAP_AMBIENT_IS_SET ,
@@ -2044,6 +2059,7 @@ On success,
.BR PR_GET_THP_DISABLE ,
.BR PR_GET_TIMING ,
.BR PR_GET_TIMERSLACK ,
+.BR PR_GET_AUXV ,
and (if it returns)
.B PR_GET_SECCOMP
return the nonnegative values described above.
@@ -2502,12 +2518,6 @@ is not
nor
.BR PR_SPEC_DISABLE_NOEXEC .
.SH VERSIONS
-The
-.BR prctl ()
-system call was introduced in Linux 2.1.57.
-.\" The library interface was added in glibc 2.0.6
-.SH STANDARDS
-This call is Linux-specific.
IRIX has a
.BR prctl ()
system call (also introduced in Linux 2.1.44
@@ -2524,6 +2534,11 @@ and options to get the maximum number of processes per user,
get the maximum number of processors the calling process can use,
find out whether a specified process is currently blocked,
get or set the maximum stack size, and so on.
+.SH STANDARDS
+Linux.
+.SH HISTORY
+Linux 2.1.57,
+glibc 2.0.6
.SH SEE ALSO
.BR signal (2),
.BR core (5)
diff --git a/man2/pread.2 b/man2/pread.2
index bdea3023c..9764e53c6 100644
--- a/man2/pread.2
+++ b/man2/pread.2
@@ -2,7 +2,7 @@
.\"
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
-.TH pread 2 2022-12-04 "Linux man-pages 6.03"
+.TH pread 2 2023-03-30 "Linux man-pages 6.05.01"
.SH NAME
pread, pwrite \- read from or write to a file descriptor at a given offset
.SH LIBRARY
@@ -88,27 +88,16 @@ to any error specified for
.BR write (2)
or
.BR lseek (2).
-.SH VERSIONS
-The
-.BR pread ()
-and
-.BR pwrite ()
-system calls were added in Linux 2.1.60;
+.SH STANDARDS
+POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001.
+.PP
+Added in Linux 2.1.60;
the entries in the i386 system call table were added in Linux 2.1.69.
C library support (including emulation using
.BR lseek (2)
on older kernels without the system calls) was added in glibc 2.1.
-.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008.
-.SH NOTES
-The
-.BR pread ()
-and
-.BR pwrite ()
-system calls are especially useful in multithreaded applications.
-They allow multiple threads to perform I/O on the same file descriptor
-without being affected by changes to the file offset by other threads.
-.\"
.SS C library/kernel differences
On Linux, the underlying system calls were renamed
in Linux 2.6:
@@ -130,6 +119,14 @@ On some 32-bit architectures,
the calling signature for these system calls differ,
for the reasons described in
.BR syscall (2).
+.SH NOTES
+The
+.BR pread ()
+and
+.BR pwrite ()
+system calls are especially useful in multithreaded applications.
+They allow multiple threads to perform I/O on the same file descriptor
+without being affected by changes to the file offset by other threads.
.SH BUGS
POSIX requires that opening a file with the
.B O_APPEND
diff --git a/man2/process_madvise.2 b/man2/process_madvise.2
index e6eb017b4..b95f4e34f 100644
--- a/man2/process_madvise.2
+++ b/man2/process_madvise.2
@@ -5,7 +5,7 @@
.\"
.\" Commit ecb8ac8b1f146915aa6b96449b66dd48984caacc
.\"
-.TH process_madvise 2 2022-11-01 "Linux man-pages 6.03"
+.TH process_madvise 2 2023-03-30 "Linux man-pages 6.05.01"
.SH NAME
process_madvise \- give advice about use of memory to a process
.SH LIBRARY
@@ -183,18 +183,17 @@ See
for
.IR advice -specific
errors.
-.SH VERSIONS
-This system call first appeared in Linux 5.10.
+.SH STANDARDS
+Linux.
+.SH HISTORY
+Linux 5.10.
.\" commit ecb8ac8b1f146915aa6b96449b66dd48984caacc
+.PP
Support for this system call is optional,
depending on the setting of the
.B CONFIG_ADVISE_SYSCALLS
configuration option.
-.SH STANDARDS
-The
-.BR process_madvise ()
-system call is Linux-specific.
-.SH NOTES
+.PP
When this system call first appeared in Linux 5.10,
permission to apply advice to another process was entirely governed by
ptrace access mode
diff --git a/man2/process_vm_readv.2 b/man2/process_vm_readv.2
index d8329106a..86da35c3d 100644
--- a/man2/process_vm_readv.2
+++ b/man2/process_vm_readv.2
@@ -6,7 +6,7 @@
.\"
.\" Commit fcf634098c00dd9cd247447368495f0b79be12d1
.\"
-.TH process_vm_readv 2 2023-02-05 "Linux man-pages 6.03"
+.TH process_vm_readv 2 2023-05-03 "Linux man-pages 6.05.01"
.SH NAME
process_vm_readv, process_vm_writev \-
transfer data between process address spaces
@@ -249,11 +249,11 @@ The caller does not have permission to access the address space of the process
No process with ID
.I pid
exists.
-.SH VERSIONS
-These system calls were added in Linux 3.2.
-Support is provided since glibc 2.15.
.SH STANDARDS
-These system calls are nonstandard Linux extensions.
+Linux.
+.SH HISTORY
+Linux 3.2,
+glibc 2.15.
.SH NOTES
The data transfers performed by
.BR process_vm_readv ()
@@ -283,7 +283,7 @@ and the second 10 bytes into
#include <stdlib.h>
#include <sys/types.h>
#include <sys/uio.h>
-
+\&
int
main(void)
{
@@ -293,18 +293,18 @@ main(void)
ssize_t nread;
struct iovec local[2];
struct iovec remote[1];
-
+\&
local[0].iov_base = buf1;
local[0].iov_len = 10;
local[1].iov_base = buf2;
local[1].iov_len = 10;
remote[0].iov_base = (void *) 0x10000;
remote[0].iov_len = 20;
-
+\&
nread = process_vm_readv(pid, local, 2, remote, 1, 0);
if (nread != 20)
exit(EXIT_FAILURE);
-
+\&
exit(EXIT_SUCCESS);
}
.EE
diff --git a/man2/ptrace.2 b/man2/ptrace.2
index 5aefc6c08..4149a32f4 100644
--- a/man2/ptrace.2
+++ b/man2/ptrace.2
@@ -83,7 +83,7 @@
.\"
.\" and others that can be found in the arch/*/include/uapi/asm/ptrace files
.\"
-.TH ptrace 2 2023-02-05 "Linux man-pages 6.03"
+.TH ptrace 2 2023-03-30 "Linux man-pages 6.05.01"
.SH NAME
ptrace \- process trace
.SH LIBRARY
@@ -1111,6 +1111,15 @@ stop.
.B PTRACE_SYSCALL_INFO_NONE
No component of the union contains relevant information.
.RE
+.IP
+In case of system call entry or exit stops,
+the data returned by
+.B PTRACE_GET_SYSCALL_INFO
+is limited to type
+.B PTRACE_SYSCALL_INFO_NONE
+unless
+.B PTRACE_O_TRACESYSGOOD
+option is set before the corresponding system call stop has occurred.
.\"
.SS Death under ptrace
When a (possibly multithreaded) process receives a killing signal
@@ -2426,7 +2435,14 @@ The specified process does not exist, or is not currently being traced
by the caller, or is not stopped
(for requests that require a stopped tracee).
.SH STANDARDS
+None.
+.SH HISTORY
SVr4, 4.3BSD.
+.PP
+Before Linux 2.6.26,
+.\" See commit 00cd5c37afd5f431ac186dd131705048c0a11fdb
+.BR init (1),
+the process with PID 1, may not be traced.
.SH NOTES
Although arguments to
.BR ptrace ()
@@ -2443,11 +2459,6 @@ setting unused/ignored arguments to
or
.IR "(void\ *)\ 0".
.PP
-Before Linux 2.6.26,
-.\" See commit 00cd5c37afd5f431ac186dd131705048c0a11fdb
-.BR init (1),
-the process with PID 1, may not be traced.
-.PP
A tracees parent continues to be the tracer even if that tracer calls
.BR execve (2).
.PP
diff --git a/man2/query_module.2 b/man2/query_module.2
index 228987715..519650a14 100644
--- a/man2/query_module.2
+++ b/man2/query_module.2
@@ -5,7 +5,7 @@
.\" 2006-02-09, some reformatting by Luc Van Oostenryck; some
.\" reformatting and rewordings by mtk
.\"
-.TH query_module 2 2022-12-04 "Linux man-pages 6.03"
+.TH query_module 2 2023-03-30 "Linux man-pages 6.05.01"
.SH NAME
query_module \- query the kernel for various bits pertaining to modules
.SH SYNOPSIS
@@ -162,14 +162,12 @@ is set to the minimum size needed.
.BR query_module ()
is not supported in this version of the kernel
(e.g., Linux 2.6 or later).
+.SH STANDARDS
+Linux.
.SH VERSIONS
-This system call is present only up until Linux 2.4;
-it was removed in Linux 2.6.
+Removed in Linux 2.6.
.\" Removed in Linux 2.5.48
-.SH STANDARDS
-.BR query_module ()
-is Linux-specific.
-.SH NOTES
+.PP
Some of the information that was formerly available via
.BR query_module ()
can be obtained from
diff --git a/man2/quotactl.2 b/man2/quotactl.2
index e29c405b7..716f9346b 100644
--- a/man2/quotactl.2
+++ b/man2/quotactl.2
@@ -4,7 +4,7 @@
.\"
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
-.TH quotactl 2 2023-02-10 "Linux man-pages 6.03"
+.TH quotactl 2 2023-05-03 "Linux man-pages 6.05.01"
.SH NAME
quotactl \- manipulate disk quotas
.SH LIBRARY
@@ -148,7 +148,7 @@ as follows:
.EX
/* uint64_t is an unsigned 64\-bit integer;
uint32_t is an unsigned 32\-bit integer */
-
+\&
struct dqblk { /* Definition since Linux 2.4.22 */
uint64_t dqb_bhardlimit; /* Absolute limit on disk
quota blocks alloc */
@@ -168,10 +168,10 @@ struct dqblk { /* Definition since Linux 2.4.22 */
uint32_t dqb_valid; /* Bit mask of QIF_*
constants */
};
-
+\&
/* Flags in dqb_valid that indicate which fields in
dqblk structure are valid. */
-
+\&
#define QIF_BLIMITS 1
#define QIF_SPACE 2
#define QIF_ILIMITS 4
@@ -271,7 +271,7 @@ as follows:
.EX
/* uint64_t is an unsigned 64\-bit integer;
uint32_t is an unsigned 32\-bit integer */
-
+\&
struct dqinfo { /* Defined since Linux 2.4.22 */
uint64_t dqi_bgrace; /* Time before block soft limit
becomes hard limit */
@@ -281,23 +281,23 @@ struct dqinfo { /* Defined since Linux 2.4.22 */
(DQF_*) */
uint32_t dqi_valid;
};
-
+\&
/* Bits for dqi_flags */
-
+\&
/* Quota format QFMT_VFS_OLD */
-
+\&
#define DQF_ROOT_SQUASH (1 << 0) /* Root squash enabled */
/* Before Linux v4.0, this had been defined
privately as V1_DQF_RSQUASH */
-
+\&
/* Quota format QFMT_VFS_V0 / QFMT_VFS_V1 */
-
+\&
#define DQF_SYS_FILE (1 << 16) /* Quota stored in
a system file */
-
+\&
/* Flags in dqi_valid that indicate which fields in
dqinfo structure are valid. */
-
+\&
#define IIF_BGRACE 1
#define IIF_IGRACE 2
#define IIF_FLAGS 4
@@ -443,13 +443,13 @@ as follows:
.EX
/* All the blk units are in BBs (Basic Blocks) of
512 bytes. */
-
+\&
#define FS_DQUOT_VERSION 1 /* fs_disk_quota.d_version */
-
+\&
#define XFS_USER_QUOTA (1<<0) /* User quota type */
#define XFS_PROJ_QUOTA (1<<1) /* Project quota type */
#define XFS_GROUP_QUOTA (1<<2) /* Group quota type */
-
+\&
struct fs_disk_quota {
int8_t d_version; /* Version of this structure */
int8_t d_flags; /* XFS_{USER,PROJ,GROUP}_QUOTA */
@@ -541,14 +541,14 @@ structure itself is defined as follows:
.in +4n
.EX
#define FS_QSTAT_VERSION 1 /* fs_quota_stat.qs_version */
-
+\&
struct fs_qfilestat {
uint64_t qfs_ino; /* Inode number */
uint64_t qfs_nblks; /* Number of BBs
512\-byte\-blocks */
uint32_t qfs_nextents; /* Number of extents */
};
-
+\&
struct fs_quota_stat {
int8_t qs_version; /* Version number for
future changes */
@@ -590,7 +590,7 @@ structure itself is defined as follows:
.in +4n
.EX
#define FS_QSTATV_VERSION1 1 /* fs_quota_statv.qs_version */
-
+\&
struct fs_qfilestatv {
uint64_t qfs_ino; /* Inode number */
uint64_t qfs_nblks; /* Number of BBs
@@ -598,7 +598,7 @@ struct fs_qfilestatv {
uint32_t qfs_nextents; /* Number of extents */
uint32_t qfs_pad; /* Pad for 8\-byte alignment */
};
-
+\&
struct fs_quota_statv {
int8_t qs_version; /* Version for future
changes */
diff --git a/man2/read.2 b/man2/read.2
index 73a632282..955efa46f 100644
--- a/man2/read.2
+++ b/man2/read.2
@@ -13,7 +13,7 @@
.\" Modified Sat Jul 12 20:45:39 1997 by Michael Haardt
.\" <michael@cantor.informatik.rwth-aachen.de>
.\"
-.TH read 2 2022-12-04 "Linux man-pages 6.03"
+.TH read 2 2023-04-03 "Linux man-pages 6.05.01"
.SH NAME
read \- read from a file descriptor
.SH LIBRARY
@@ -164,15 +164,10 @@ refers to a directory.
Other errors may occur, depending on the object connected to
.IR fd .
.SH STANDARDS
+POSIX.1-2008.
+.SH HISTORY
SVr4, 4.3BSD, POSIX.1-2001.
.SH NOTES
-The types
-.I size_t
-and
-.I ssize_t
-are, respectively,
-unsigned and signed integer data types specified by POSIX.1.
-.PP
On Linux,
.BR read ()
(and similar system calls) will transfer at most
diff --git a/man2/readahead.2 b/man2/readahead.2
index 5022c8494..b97f08542 100644
--- a/man2/readahead.2
+++ b/man2/readahead.2
@@ -5,7 +5,7 @@
.\" 2004-05-40 Created by Michael Kerrisk <mtk.manpages@gmail.com>
.\" 2004-10-05 aeb, minor correction
.\"
-.TH readahead 2 2022-12-04 "Linux man-pages 6.03"
+.TH readahead 2 2023-07-15 "Linux man-pages 6.05.01"
.SH NAME
readahead \- initiate file readahead into page cache
.SH LIBRARY
@@ -14,9 +14,10 @@ Standard C library
.SH SYNOPSIS
.nf
.BR "#define _GNU_SOURCE" " /* See feature_test_macros(7) */"
+.B #define _FILE_OFFSET_BITS 64
.B #include <fcntl.h>
.PP
-.BI "ssize_t readahead(int " fd ", off64_t " offset ", size_t " count );
+.BI "ssize_t readahead(int " fd ", off_t " offset ", size_t " count );
.fi
.SH DESCRIPTION
.BR readahead ()
@@ -64,20 +65,23 @@ does not refer to a file type to which
.BR readahead ()
can be applied.
.SH VERSIONS
-The
-.BR readahead ()
-system call appeared in Linux 2.4.13;
-glibc support has been provided since glibc 2.3.
-.SH STANDARDS
-The
-.BR readahead ()
-system call is Linux-specific, and its use should be avoided
-in portable applications.
-.SH NOTES
On some 32-bit architectures,
the calling signature for this system call differs,
for the reasons described in
.BR syscall (2).
+.SH STANDARDS
+Linux.
+.SH HISTORY
+Linux 2.4.13,
+glibc 2.3.
+.SH NOTES
+.B _FILE_OFFSET_BITS
+should be defined to be 64 in code that uses a pointer to
+.BR readahead ,
+if the code is intended to be portable
+to traditional 32-bit x86 and ARM platforms where
+.BR off_t 's
+width defaults to 32 bits.
.SH BUGS
.BR readahead ()
attempts to schedule the reads in the background and return immediately.
diff --git a/man2/readdir.2 b/man2/readdir.2
index 3faff8aca..6b06ff435 100644
--- a/man2/readdir.2
+++ b/man2/readdir.2
@@ -7,7 +7,7 @@
.\" In 1.3.X, returns only one entry each time; return value is different.
.\" Modified 2004-12-01, mtk, fixed headers listed in SYNOPSIS
.\"
-.TH readdir 2 2023-02-05 "Linux man-pages 6.03"
+.TH readdir 2 2023-03-30 "Linux man-pages 6.05.01"
.SH NAME
readdir \- read directory entry
.SH LIBRARY
@@ -100,9 +100,7 @@ No such directory.
.TP
.B ENOTDIR
File descriptor does not refer to a directory.
-.SH STANDARDS
-This system call is Linux-specific.
-.SH NOTES
+.SH VERSIONS
You will need to define the
.I old_linux_dirent
structure yourself.
@@ -111,6 +109,8 @@ However, probably you should use
instead.
.PP
This system call does not exist on x86-64.
+.SH STANDARDS
+Linux.
.SH SEE ALSO
.BR getdents (2),
.BR readdir (3)
diff --git a/man2/readlink.2 b/man2/readlink.2
index fa11e8317..fe2369d26 100644
--- a/man2/readlink.2
+++ b/man2/readlink.2
@@ -13,7 +13,7 @@
.\" 2011-09-20, Guillem Jover <guillem@hadrons.org>:
.\" Added text on dynamically allocating buffer + example program
.\"
-.TH readlink 2 2023-02-05 "Linux man-pages 6.03"
+.TH readlink 2 2023-05-03 "Linux man-pages 6.05.01"
.SH NAME
readlink, readlinkat \- read value of a symbolic link
.SH LIBRARY
@@ -186,20 +186,20 @@ A component of the path prefix is not a directory.
is relative and
.I dirfd
is a file descriptor referring to a file other than a directory.
-.SH VERSIONS
-.BR readlinkat ()
-was added in Linux 2.6.16;
-library support was added in glibc 2.4.
.SH STANDARDS
-.BR readlink ():
+POSIX.1-2008.
+.SH HISTORY
+.TP
+.BR readlink ()
4.4BSD
-.RB ( readlink ()
-first appeared in 4.2BSD),
+(first appeared in 4.2BSD),
POSIX.1-2001, POSIX.1-2008.
-.PP
-.BR readlinkat ():
+.TP
+.BR readlinkat ()
POSIX.1-2008.
-.SH NOTES
+Linux 2.6.16,
+glibc 2.4.
+.PP
Up to and including glibc 2.4, the return type of
.BR readlink ()
was declared as
@@ -207,7 +207,20 @@ was declared as
Nowadays, the return type is declared as
.IR ssize_t ,
as (newly) required in POSIX.1-2001.
-.PP
+.SS glibc
+On older kernels where
+.BR readlinkat ()
+is unavailable, the glibc wrapper function falls back to the use of
+.BR readlink ().
+When
+.I pathname
+is a relative pathname,
+glibc constructs a pathname based on the symbolic link in
+.I /proc/self/fd
+that corresponds to the
+.I dirfd
+argument.
+.SH NOTES
Using a statically sized buffer might not provide enough room for the
symbolic link contents.
The required size for the buffer can be obtained from the
@@ -230,19 +243,6 @@ also addresses a common portability problem when using
for the buffer size,
as this constant is not guaranteed to be defined per POSIX
if the system does not have such limit.
-.SS glibc notes
-On older kernels where
-.BR readlinkat ()
-is unavailable, the glibc wrapper function falls back to the use of
-.BR readlink ().
-When
-.I pathname
-is a relative pathname,
-glibc constructs a pathname based on the symbolic link in
-.I /proc/self/fd
-that corresponds to the
-.I dirfd
-argument.
.SH EXAMPLES
The following program allocates the buffer needed by
.BR readlink ()
@@ -261,61 +261,61 @@ reports a size of zero.
#include <stdlib.h>
#include <sys/stat.h>
#include <unistd.h>
-
+\&
int
main(int argc, char *argv[])
{
char *buf;
ssize_t nbytes, bufsiz;
struct stat sb;
-
+\&
if (argc != 2) {
fprintf(stderr, "Usage: %s <pathname>\en", argv[0]);
exit(EXIT_FAILURE);
}
-
+\&
if (lstat(argv[1], &sb) == \-1) {
perror("lstat");
exit(EXIT_FAILURE);
}
-
+\&
/* Add one to the link size, so that we can determine whether
the buffer returned by readlink() was truncated. */
-
+\&
bufsiz = sb.st_size + 1;
-
+\&
/* Some magic symlinks under (for example) /proc and /sys
report \[aq]st_size\[aq] as zero. In that case, take PATH_MAX as
a "good enough" estimate. */
-
+\&
if (sb.st_size == 0)
bufsiz = PATH_MAX;
-
+\&
buf = malloc(bufsiz);
if (buf == NULL) {
perror("malloc");
exit(EXIT_FAILURE);
}
-
+\&
nbytes = readlink(argv[1], buf, bufsiz);
if (nbytes == \-1) {
perror("readlink");
exit(EXIT_FAILURE);
}
-
+\&
/* Print only \[aq]nbytes\[aq] of \[aq]buf\[aq], as it doesn't contain a terminating
null byte (\[aq]\e0\[aq]). */
printf("\[aq]%s\[aq] points to \[aq]%.*s\[aq]\en", argv[1], (int) nbytes, buf);
-
+\&
/* If the return value was equal to the buffer size, then the
the link target was larger than expected (perhaps because the
target was changed between the call to lstat() and the call to
readlink()). Warn the user that the returned target may have
been truncated. */
-
+\&
if (nbytes == bufsiz)
printf("(Returned buffer may have been truncated)\en");
-
+\&
free(buf);
exit(EXIT_SUCCESS);
}
diff --git a/man2/readv.2 b/man2/readv.2
index 0f2aca8d8..db6abbca2 100644
--- a/man2/readv.2
+++ b/man2/readv.2
@@ -9,7 +9,7 @@
.\" add more details.
.\" 2010-11-16, mtk, Added documentation of preadv() and pwritev()
.\"
-.TH readv 2 2023-02-05 "Linux man-pages 6.03"
+.TH readv 2 2023-05-03 "Linux man-pages 6.05.01"
.SH NAME
readv, writev, preadv, pwritev, preadv2, pwritev2 \-
read or write data into multiple buffers
@@ -287,21 +287,44 @@ is less than zero or greater than the permitted maximum.
.B EOPNOTSUPP
An unknown flag is specified in \fIflags\fP.
.SH VERSIONS
+.SS C library/kernel differences
+The raw
.BR preadv ()
and
.BR pwritev ()
-first appeared in Linux 2.6.30; library support was added in glibc 2.10.
+system calls have call signatures that differ slightly from that of the
+corresponding GNU C library wrapper functions shown in the SYNOPSIS.
+The final argument,
+.IR offset ,
+is unpacked by the wrapper functions into two arguments in the system calls:
+.PP
+.BI " unsigned long " pos_l ", unsigned long " pos
.PP
+These arguments contain, respectively, the low order and high order 32 bits of
+.IR offset .
+.SH STANDARDS
+.TP
+.BR readv ()
+.TQ
+.BR writev ()
+POSIX.1-2008.
+.TP
+.BR preadv ()
+.TQ
+.BR pwritev ()
+BSD.
+.TP
.BR preadv2 ()
-and
+.TQ
.BR pwritev2 ()
-first appeared in Linux 4.6.
-Library support was added in glibc 2.26.
-.SH STANDARDS
-.BR readv (),
-.BR writev ():
-POSIX.1-2001, POSIX.1-2008,
-4.4BSD (these system calls first appeared in 4.2BSD).
+Linux.
+.SH HISTORY
+.TP
+.BR readv ()
+.TQ
+.BR writev ()
+POSIX.1-2001,
+4.4BSD (first appeared in 4.2BSD).
.\" Linux libc5 used \fIsize_t\fP as the type of the \fIiovcnt\fP argument,
.\" and \fIint\fP as the return type.
.\" The readv/writev system calls were buggy before Linux 1.3.40.
@@ -309,40 +332,13 @@ POSIX.1-2001, POSIX.1-2008,
.PP
.BR preadv (),
.BR pwritev ():
-nonstandard, but present also on the modern BSDs.
+Linux 2.6.30,
+glibc 2.10.
.PP
.BR preadv2 (),
.BR pwritev2 ():
-nonstandard Linux extension.
-.SH NOTES
-POSIX.1 allows an implementation to place a limit on
-the number of items that can be passed in
-.IR iov .
-An implementation can advertise its limit by defining
-.B IOV_MAX
-in
-.I <limits.h>
-or at run time via the return value from
-.IR sysconf(_SC_IOV_MAX) .
-On modern Linux systems, the limit is 1024.
-Back in Linux 2.0 days, this limit was 16.
-.\"
-.\"
-.SS C library/kernel differences
-The raw
-.BR preadv ()
-and
-.BR pwritev ()
-system calls have call signatures that differ slightly from that of the
-corresponding GNU C library wrapper functions shown in the SYNOPSIS.
-The final argument,
-.IR offset ,
-is unpacked by the wrapper functions into two arguments in the system calls:
-.PP
-.BI " unsigned long " pos_l ", unsigned long " pos
-.PP
-These arguments contain, respectively, the low order and high order 32 bits of
-.IR offset .
+Linux 4.6,
+glibc 2.26.
.SS Historical C library/kernel differences
To deal with the fact that
.B IOV_MAX
@@ -380,6 +376,20 @@ that the system is running a Linux kernel older than Linux 2.6.18
And since glibc 2.20
(which requires a minimum of Linux 2.6.32),
the glibc wrapper functions always just directly invoke the system calls.
+.SH NOTES
+POSIX.1 allows an implementation to place a limit on
+the number of items that can be passed in
+.IR iov .
+An implementation can advertise its limit by defining
+.B IOV_MAX
+in
+.I <limits.h>
+or at run time via the return value from
+.IR sysconf(_SC_IOV_MAX) .
+On modern Linux systems, the limit is 1024.
+Back in Linux 2.0 days, this limit was 16.
+.\"
+.\"
.SH BUGS
Linux 5.9 and Linux 5.10 have a bug where
.BR preadv2 ()
@@ -402,12 +412,12 @@ char *str0 = "hello ";
char *str1 = "world\en";
ssize_t nwritten;
struct iovec iov[2];
-
+\&
iov[0].iov_base = str0;
iov[0].iov_len = strlen(str0);
iov[1].iov_base = str1;
iov[1].iov_len = strlen(str1);
-
+\&
nwritten = writev(STDOUT_FILENO, iov, 2);
.EE
.in
diff --git a/man2/reboot.2 b/man2/reboot.2
index cbc0c331b..681087f86 100644
--- a/man2/reboot.2
+++ b/man2/reboot.2
@@ -5,7 +5,7 @@
.\" Modified, 27 May 2004, Michael Kerrisk <mtk.manpages@gmail.com>
.\" Added notes on capability requirements
.\"
-.TH reboot 2 2023-02-08 "Linux man-pages 6.03"
+.TH reboot 2 2023-03-30 "Linux man-pages 6.05.01"
.SH NAME
reboot \- reboot or enable/disable Ctrl-Alt-Del
.SH LIBRARY
@@ -223,9 +223,7 @@ the caller must have the
.B CAP_SYS_BOOT
inside its user namespace.
.SH STANDARDS
-.BR reboot ()
-is Linux-specific,
-and should not be used in programs intended to be portable.
+Linux.
.SH SEE ALSO
.BR systemctl (1),
.BR systemd (1),
diff --git a/man2/recv.2 b/man2/recv.2
index db3af8e48..395236d07 100644
--- a/man2/recv.2
+++ b/man2/recv.2
@@ -10,7 +10,7 @@
.\" Modified 1998,1999 by Andi Kleen
.\" 2001-06-19 corrected SO_EE_OFFENDER, bug report by James Hawtin
.\"
-.TH recv 2 2022-12-03 "Linux man-pages 6.03"
+.TH recv 2 2023-07-18 "Linux man-pages 6.05.01"
.SH NAME
recv, recvfrom, recvmsg \- receive a message from a socket
.SH LIBRARY
@@ -155,7 +155,7 @@ structure:
#define SO_EE_ORIGIN_LOCAL 1
#define SO_EE_ORIGIN_ICMP 2
#define SO_EE_ORIGIN_ICMP6 3
-
+\&
struct sock_extended_err
{
uint32_t ee_errno; /* Error number */
@@ -167,7 +167,7 @@ struct sock_extended_err
uint32_t ee_data; /* Other data */
/* More data may follow */
};
-
+\&
struct sockaddr *SO_EE_OFFENDER(struct sock_extended_err *);
.EE
.in
@@ -226,7 +226,8 @@ subsequent receive call will return the same data.
For raw
.RB ( AF_PACKET ),
Internet datagram (since Linux 2.4.27/2.6.8),
-netlink (since Linux 2.6.22), and UNIX datagram
+netlink (since Linux 2.6.22),
+and UNIX datagram as well as sequenced-packet
.\" commit 9f6f9af7694ede6314bed281eec74d588ba9474f
(since Linux 3.4) sockets:
return the real length of the packet or datagram,
@@ -411,6 +412,15 @@ is returned to indicate that expedited or out-of-band data was received.
.B MSG_ERRQUEUE
indicates that no data was received but an extended error from the socket
error queue.
+.TP
+.BR MSG_CMSG_CLOEXEC " (since Linux 2.6.23)"
+.\" commit 4a19542e5f694cd408a32c3d9dc593ba9366e2d7
+indicates that
+.B MSG_CMSG_CLOEXEC
+was specified in the
+.I flags
+argument of
+.BR recvmsg ().
.SH RETURN VALUE
These calls return the number of bytes received, or \-1
if an error occurred.
@@ -479,9 +489,32 @@ and
The file descriptor
.I sockfd
does not refer to a socket.
+.SH VERSIONS
+According to POSIX.1,
+.\" POSIX.1-2001, POSIX.1-2008
+the
+.I msg_controllen
+field of the
+.I msghdr
+structure should be typed as
+.IR socklen_t ,
+and the
+.I msg_iovlen
+field should be typed as
+.IR int ,
+but glibc currently types both as
+.IR size_t .
+.\" glibc bug for msg_controllen raised 12 Mar 2006
+.\" http://sourceware.org/bugzilla/show_bug.cgi?id=2448
+.\" The problem is an underlying kernel issue: the size of the
+.\" __kernel_size_t type used to type these fields varies
+.\" across architectures, but socklen_t is always 32 bits,
+.\" as (at least with GCC) is int.
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008,
-4.4BSD (these interfaces first appeared in 4.2BSD).
+POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001,
+4.4BSD (first appeared in 4.2BSD).
.PP
POSIX.1 describes only the
.BR MSG_OOB ,
@@ -503,33 +536,6 @@ has no effect (the datagram remains pending), while
.BR recv ()
consumes the pending datagram.
.PP
-The
-.I socklen_t
-type was invented by POSIX.
-See also
-.BR accept (2).
-.PP
-According to POSIX.1,
-.\" POSIX.1-2001, POSIX.1-2008
-the
-.I msg_controllen
-field of the
-.I msghdr
-structure should be typed as
-.IR socklen_t ,
-and the
-.I msg_iovlen
-field should be typed as
-.IR int ,
-but glibc currently types both as
-.IR size_t .
-.\" glibc bug for msg_controllen raised 12 Mar 2006
-.\" http://sourceware.org/bugzilla/show_bug.cgi?id=2448
-.\" The problem is an underlying kernel issue: the size of the
-.\" __kernel_size_t type used to type these fields varies
-.\" across architectures, but socklen_t is always 32 bits,
-.\" as (at least with GCC) is int.
-.PP
See
.BR recvmmsg (2)
for information about a Linux-specific system call
diff --git a/man2/recvmmsg.2 b/man2/recvmmsg.2
index 41853a5b9..d5b0f5a14 100644
--- a/man2/recvmmsg.2
+++ b/man2/recvmmsg.2
@@ -8,7 +8,7 @@
.\" Author: Arnaldo Carvalho de Melo <acme@redhat.com>
.\" Date: Mon Oct 12 23:40:10 2009 -0700
.\"
-.TH recvmmsg 2 2022-12-04 "Linux man-pages 6.03"
+.TH recvmmsg 2 2023-05-03 "Linux man-pages 6.05.01"
.SH NAME
recvmmsg \- receive multiple messages on a socket
.SH LIBRARY
@@ -145,14 +145,11 @@ In addition, the following error can occur:
is invalid.
.PP
See also BUGS.
-.SH VERSIONS
-The
-.BR recvmmsg ()
-system call was added in Linux 2.6.33.
-Support in glibc was added in glibc 2.12.
.SH STANDARDS
-.BR recvmmsg ()
-is Linux-specific.
+Linux.
+.SH HISTORY
+Linux 2.6.33,
+glibc 2.12.
.SH BUGS
The
.I timeout
@@ -216,7 +213,7 @@ can give the following output:
#include <string.h>
#include <sys/socket.h>
#include <time.h>
-
+\&
int
main(void)
{
@@ -229,13 +226,13 @@ main(void)
struct mmsghdr msgs[VLEN];
struct timespec timeout;
struct sockaddr_in addr;
-
+\&
sockfd = socket(AF_INET, SOCK_DGRAM, 0);
if (sockfd == \-1) {
perror("socket()");
exit(EXIT_FAILURE);
}
-
+\&
addr.sin_family = AF_INET;
addr.sin_addr.s_addr = htonl(INADDR_LOOPBACK);
addr.sin_port = htons(1234);
@@ -243,7 +240,7 @@ main(void)
perror("bind()");
exit(EXIT_FAILURE);
}
-
+\&
memset(msgs, 0, sizeof(msgs));
for (size_t i = 0; i < VLEN; i++) {
iovecs[i].iov_base = bufs[i];
@@ -251,16 +248,16 @@ main(void)
msgs[i].msg_hdr.msg_iov = &iovecs[i];
msgs[i].msg_hdr.msg_iovlen = 1;
}
-
+\&
timeout.tv_sec = TIMEOUT;
timeout.tv_nsec = 0;
-
+\&
retval = recvmmsg(sockfd, msgs, VLEN, 0, &timeout);
if (retval == \-1) {
perror("recvmmsg()");
exit(EXIT_FAILURE);
}
-
+\&
printf("%d messages received\en", retval);
for (size_t i = 0; i < retval; i++) {
bufs[i][msgs[i].msg_len] = 0;
diff --git a/man2/remap_file_pages.2 b/man2/remap_file_pages.2
index 090b59431..ab4ee5115 100644
--- a/man2/remap_file_pages.2
+++ b/man2/remap_file_pages.2
@@ -5,7 +5,7 @@
.\" 2003-12-10 Initial creation, Michael Kerrisk <mtk.manpages@gmail.com>
.\" 2004-10-28 aeb, corrected prototype, prot must be 0
.\"
-.TH remap_file_pages 2 2022-12-04 "Linux man-pages 6.03"
+.TH remap_file_pages 2 2023-03-30 "Linux man-pages 6.05.01"
.SH NAME
remap_file_pages \- create a nonlinear file mapping
.SH LIBRARY
@@ -143,15 +143,11 @@ or
.I pgoff
is invalid.
.\" And possibly others from vma->vm_ops->populate()
-.SH VERSIONS
-The
-.BR remap_file_pages ()
-system call appeared in Linux 2.5.46;
-glibc support was added in glibc 2.3.3.
.SH STANDARDS
-The
-.BR remap_file_pages ()
-system call is Linux-specific.
+Linux.
+.SH HISTORY
+Linux 2.5.46,
+glibc 2.3.3.
.SH NOTES
Since Linux 2.6.23,
.\" commit 3ee6dafc677a68e461a7ddafc94a580ebab80735
diff --git a/man2/removexattr.2 b/man2/removexattr.2
index 36ee6a178..1a9f53f31 100644
--- a/man2/removexattr.2
+++ b/man2/removexattr.2
@@ -3,7 +3,7 @@
.\"
.\" SPDX-License-Identifier: GPL-2.0-or-later
.\"
-.TH removexattr 2 2022-12-04 "Linux man-pages 6.03"
+.TH removexattr 2 2023-04-08 "Linux man-pages 6.05.01"
.SH NAME
removexattr, lremovexattr, fremovexattr \- remove an extended attribute
.SH LIBRARY
@@ -13,9 +13,9 @@ Standard C library
.nf
.B #include <sys/xattr.h>
.PP
-.BI "int removexattr(const char\ *" path ", const char\ *" name );
-.BI "int lremovexattr(const char\ *" path ", const char\ *" name );
-.BI "int fremovexattr(int " fd ", const char\ *" name );
+.BI "int removexattr(const char *" path ", const char *" name );
+.BI "int lremovexattr(const char *" path ", const char *" name );
+.BI "int fremovexattr(int " fd ", const char *" name );
.fi
.SH DESCRIPTION
Extended attributes are
@@ -77,11 +77,11 @@ Extended attributes are not supported by the filesystem, or are disabled.
In addition, the errors documented in
.BR stat (2)
can also occur.
-.SH VERSIONS
-These system calls have been available since Linux 2.4;
-glibc support is provided since glibc 2.3.
.SH STANDARDS
-These system calls are Linux-specific.
+Linux.
+.SH HISTORY
+Linux 2.4,
+glibc 2.3.
.\" .SH AUTHORS
.\" Andreas Gruenbacher,
.\" .RI < a.gruenbacher@computer.org >
diff --git a/man2/rename.2 b/man2/rename.2
index 2c03d4e94..9963af668 100644
--- a/man2/rename.2
+++ b/man2/rename.2
@@ -10,7 +10,7 @@
.\" Modified Thu Mar 3 09:49:35 2005 by Michael Haardt <michael@moria.de>
.\" 2007-03-25, mtk, added various text to DESCRIPTION.
.\"
-.TH rename 2 2023-02-05 "Linux man-pages 6.03"
+.TH rename 2 2023-03-30 "Linux man-pages 6.05.01"
.SH NAME
rename, renameat, renameat2 \- change the name or location of a file
.SH LIBRARY
@@ -488,24 +488,28 @@ was specified in
but the caller does not have the
.B CAP_MKNOD
capability.
-.SH VERSIONS
-.BR renameat ()
-was added in Linux 2.6.16;
-library support was added in glibc 2.4.
-.PP
-.BR renameat2 ()
-was added in Linux 3.15; library support was added in glibc 2.28.
.SH STANDARDS
-.BR rename ():
-4.3BSD, C99, POSIX.1-2001, POSIX.1-2008.
-.PP
-.BR renameat ():
+.TP
+.BR rename ()
+C11, POSIX.1-2008.
+.TP
+.BR renameat ()
POSIX.1-2008.
-.PP
+.TP
.BR renameat2 ()
-is Linux-specific.
-.SH NOTES
-.\"
+Linux.
+.SH HISTORY
+.TP
+.BR rename ()
+4.3BSD, C89, POSIX.1-2001.
+.TP
+.BR renameat ()
+Linux 2.6.16,
+glibc 2.4.
+.TP
+.BR renameat2 ()
+Linux 3.15,
+glibc 2.28.
.SS glibc notes
On older kernels where
.BR renameat ()
diff --git a/man2/request_key.2 b/man2/request_key.2
index c71ae710f..80187d1d4 100644
--- a/man2/request_key.2
+++ b/man2/request_key.2
@@ -4,7 +4,7 @@
.\"
.\" SPDX-License-Identifier: GPL-2.0-or-later
.\"
-.TH request_key 2 2023-02-05 "Linux man-pages 6.03"
+.TH request_key 2 2023-05-03 "Linux man-pages 6.05.01"
.SH NAME
request_key \- request a key from the kernel's key management facility
.SH LIBRARY
@@ -425,13 +425,14 @@ Insufficient memory to create a key.
The
.I type
argument started with a period (\[aq].\[aq]).
-.SH VERSIONS
-This system call first appeared in Linux 2.6.10.
+.SH STANDARDS
+Linux.
+.SH HISTORY
+Linux 2.6.10.
+.PP
The ability to instantiate keys upon request was added
.\" commit 3e30148c3d524a9c1c63ca28261bc24c457eb07a
in Linux 2.6.13.
-.SH STANDARDS
-This system call is a nonstandard Linux extension.
.SH EXAMPLES
The program below demonstrates the use of
.BR request_key ().
@@ -501,32 +502,32 @@ For another example of the use of this program, see
.\" SRC BEGIN (t_request_key.c)
.EX
/* t_request_key.c */
-
+\&
#include <keyutils.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
-
+\&
int
main(int argc, char *argv[])
{
key_serial_t key;
-
+\&
if (argc != 4) {
fprintf(stderr, "Usage: %s type description callout\-data\en",
argv[0]);
exit(EXIT_FAILURE);
}
-
+\&
key = request_key(argv[1], argv[2], argv[3],
KEY_SPEC_SESSION_KEYRING);
if (key == \-1) {
perror("request_key");
exit(EXIT_FAILURE);
}
-
+\&
printf("Key ID is %jx\en", (uintmax_t) key);
-
+\&
exit(EXIT_SUCCESS);
}
.EE
diff --git a/man2/restart_syscall.2 b/man2/restart_syscall.2
index a87d85363..4b0e1014e 100644
--- a/man2/restart_syscall.2
+++ b/man2/restart_syscall.2
@@ -10,7 +10,7 @@
.\"
.\" See also Section 11.3.3 of Understanding the Linux Kernel, 3rd edition
.\"
-.TH restart_syscall 2 2023-02-05 "Linux man-pages 6.03"
+.TH restart_syscall 2 2023-03-30 "Linux man-pages 6.05.01"
.SH NAME
restart_syscall \- restart a system call after interruption by a stop signal
.SH SYNOPSIS
@@ -75,12 +75,10 @@ is the return value of whatever system call is being restarted.
.I errno
is set as per the errors for whatever system call is being restarted by
.BR restart_syscall ().
-.SH VERSIONS
-The
-.BR restart_syscall ()
-system call is present since Linux 2.6.
.SH STANDARDS
-This system call is Linux-specific.
+Linux.
+.SH HISTORY
+Linux 2.6.
.SH NOTES
There is no glibc wrapper for this system call,
because it is intended for use only by the kernel and
diff --git a/man2/rmdir.2 b/man2/rmdir.2
index 8b99df8b8..5bd737085 100644
--- a/man2/rmdir.2
+++ b/man2/rmdir.2
@@ -7,7 +7,7 @@
.\" Modified 1997-01-31 by Eric S. Raymond <esr@thyrsus.com>
.\" Modified 2004-06-23 by Michael Kerrisk <mtk.manpages@gmail.com>
.\"
-.TH rmdir 2 2022-10-30 "Linux man-pages 6.03"
+.TH rmdir 2 2023-03-30 "Linux man-pages 6.05.01"
.SH NAME
rmdir \- delete a directory
.SH LIBRARY
@@ -111,7 +111,9 @@ does not support the removal of directories.
.I pathname
refers to a directory on a read-only filesystem.
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, SVr4, 4.3BSD.
+POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001, SVr4, 4.3BSD.
.SH BUGS
Infelicities in the protocol underlying NFS can cause the unexpected
disappearance of directories which are still being used.
diff --git a/man2/rt_sigqueueinfo.2 b/man2/rt_sigqueueinfo.2
index fa712fa2f..b8b01570f 100644
--- a/man2/rt_sigqueueinfo.2
+++ b/man2/rt_sigqueueinfo.2
@@ -2,7 +2,7 @@
.\"
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
-.TH rt_sigqueueinfo 2 2023-02-05 "Linux man-pages 6.03"
+.TH rt_sigqueueinfo 2 2023-03-30 "Linux man-pages 6.05.01"
.SH NAME
rt_sigqueueinfo, rt_tgsigqueueinfo \- queue a signal and data
.SH LIBRARY
@@ -165,15 +165,15 @@ No thread matching
and
.I tid
was found.
-.SH VERSIONS
-The
+.SH STANDARDS
+Linux.
+.SH HISTORY
+.TP
.BR rt_sigqueueinfo ()
-system call was added in Linux 2.2.
-The
+Linux 2.2.
+.TP
.BR rt_tgsigqueueinfo ()
-system call was added in Linux 2.6.31.
-.SH STANDARDS
-These system calls are Linux-specific.
+Linux 2.6.31.
.SH NOTES
Since these system calls are not intended for application use,
there are no glibc wrapper functions; use
diff --git a/man2/s390_guarded_storage.2 b/man2/s390_guarded_storage.2
index b866ae7a6..63d5c83ea 100644
--- a/man2/s390_guarded_storage.2
+++ b/man2/s390_guarded_storage.2
@@ -2,7 +2,7 @@
.\"
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
-.TH s390_guarded_storage 2 2022-10-30 "Linux man-pages 6.03"
+.TH s390_guarded_storage 2 2023-03-30 "Linux man-pages 6.05.01"
.SH NAME
s390_guarded_storage \- operations with z/Architecture guarded storage facility
.SH LIBRARY
@@ -126,13 +126,12 @@ and the allocation of a new guarded storage control block has failed.
.TP
.B EOPNOTSUPP
The guarded storage facility is not supported by the hardware.
-.SH VERSIONS
-.\" 916cda1aa1b412d7cf2991c3af7479544942d121, v4.12-rc1~139^2~56^2
-This system call is available since Linux 4.12.
.SH STANDARDS
-This Linux-specific system call is available only on the s390 architecture.
-.PP
-The guarded storage facility is available beginning with System z14.
+Linux on s390.
+.SH HISTORY
+.\" 916cda1aa1b412d7cf2991c3af7479544942d121, v4.12-rc1~139^2~56^2
+Linux 4.12.
+System z14.
.SH NOTES
The description of the guarded storage facility along with related
instructions and Guarded Storage Control Block and
diff --git a/man2/s390_pci_mmio_write.2 b/man2/s390_pci_mmio_write.2
index ef631763f..07788e905 100644
--- a/man2/s390_pci_mmio_write.2
+++ b/man2/s390_pci_mmio_write.2
@@ -3,7 +3,7 @@
.\"
.\" SPDX-License-Identifier: GPL-2.0-or-later
.\"
-.TH s390_pci_mmio_write 2 2022-11-10 "Linux man-pages 6.03"
+.TH s390_pci_mmio_write 2 2023-03-30 "Linux man-pages 6.05.01"
.SH NAME
s390_pci_mmio_write, s390_pci_mmio_read \- transfer data to/from PCI
MMIO memory page
@@ -85,10 +85,10 @@ PCI support is not enabled.
.TP
.B ENOMEM
Insufficient memory.
-.SH VERSIONS
-These system calls are available since Linux 3.19.
.SH STANDARDS
-This Linux-specific system call is available only on the s390 architecture.
-The required PCI support is available beginning with System z EC12.
+Linux on s390.
+.SH HISTORY
+Linux 3.19.
+System z EC12.
.SH SEE ALSO
.BR syscall (2)
diff --git a/man2/s390_runtime_instr.2 b/man2/s390_runtime_instr.2
index 4b648aeda..fb1be1345 100644
--- a/man2/s390_runtime_instr.2
+++ b/man2/s390_runtime_instr.2
@@ -3,7 +3,7 @@
.\"
.\" SPDX-License-Identifier: GPL-2.0-or-later
.\"
-.TH s390_runtime_instr 2 2022-10-30 "Linux man-pages 6.03"
+.TH s390_runtime_instr 2 2023-03-30 "Linux man-pages 6.05.01"
.SH NAME
s390_runtime_instr \- enable/disable s390 CPU run-time instrumentation
.SH LIBRARY
@@ -79,12 +79,11 @@ Allocating memory for the run-time instrumentation control block failed.
.TP
.B EOPNOTSUPP
The run-time instrumentation facility is not available.
-.SH VERSIONS
-This system call is available since Linux 3.7.
.SH STANDARDS
-This Linux-specific system call is available only on the s390 architecture.
-The run-time instrumentation facility is available
-beginning with System z EC12.
+Linux on s390.
+.SH HISTORY
+Linux 3.7.
+System z EC12.
.SH NOTES
The
.I asm/runtime_instr.h
diff --git a/man2/s390_sthyi.2 b/man2/s390_sthyi.2
index e99950afb..9c6af82d7 100644
--- a/man2/s390_sthyi.2
+++ b/man2/s390_sthyi.2
@@ -3,7 +3,7 @@
.\"
.\" SPDX-License-Identifier: GPL-2.0-or-later
.\"
-.TH s390_sthyi 2 2022-10-30 "Linux man-pages 6.03"
+.TH s390_sthyi 2 2023-03-30 "Linux man-pages 6.05.01"
.SH NAME
s390_sthyi \- emulate STHYI instruction
.SH LIBRARY
@@ -113,10 +113,10 @@ Allocating memory for handling the CPU capacity information failed.
The value specified in
.I function_code
is not valid.
-.SH VERSIONS
-This system call is available since Linux 4.15.
.SH STANDARDS
-This Linux-specific system call is available only on the s390 architecture.
+Linux on s390.
+.SH HISTORY
+Linux 4.15.
.SH NOTES
For details of the STHYI instruction, see
.UR https://www.ibm.com\:/support\:/knowledgecenter\:/SSB27U_6.3.0\:/com.ibm.zvm.v630.hcpb4\:/hcpb4sth.htm
diff --git a/man2/sched_get_priority_max.2 b/man2/sched_get_priority_max.2
index 2e3620fdf..491e1345a 100644
--- a/man2/sched_get_priority_max.2
+++ b/man2/sched_get_priority_max.2
@@ -7,7 +7,7 @@
.\" 1996-04-10 Markus Kuhn <mskuhn@cip.informatik.uni-erlangen.de>
.\" revision
.\"
-.TH sched_get_priority_max 2 2022-10-30 "Linux man-pages 6.03"
+.TH sched_get_priority_max 2 2023-03-30 "Linux man-pages 6.05.01"
.SH NAME
sched_get_priority_max, sched_get_priority_min \- get static priority range
.SH LIBRARY
@@ -97,7 +97,9 @@ The argument
.I policy
does not identify a defined scheduling policy.
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008.
+POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001.
.SH SEE ALSO
.ad l
.nh
diff --git a/man2/sched_rr_get_interval.2 b/man2/sched_rr_get_interval.2
index aff03bd9a..cbd62477b 100644
--- a/man2/sched_rr_get_interval.2
+++ b/man2/sched_rr_get_interval.2
@@ -7,7 +7,7 @@
.\" 1996-04-10 Markus Kuhn <mskuhn@cip.informatik.uni-erlangen.de>
.\" revision
.\"
-.TH sched_rr_get_interval 2 2022-10-30 "Linux man-pages 6.03"
+.TH sched_rr_get_interval 2 2023-03-30 "Linux man-pages 6.05.01"
.SH NAME
sched_rr_get_interval \- get the SCHED_RR interval for the named process
.SH LIBRARY
@@ -64,16 +64,21 @@ The system call is not yet implemented (only on rather old kernels).
.B ESRCH
Could not find a process with the ID
.IR pid .
+.SH VERSIONS
+.SS Linux
+Linux 3.9 added
+.\" commit ce0dbbbb30aee6a835511d5be446462388ba9eee
+a new mechanism for adjusting (and viewing) the
+.B SCHED_RR
+quantum: the
+.I /proc/sys/kernel/sched_rr_timeslice_ms
+file exposes the quantum as a millisecond value, whose default is 100.
+Writing 0 to this file resets the quantum to the default value.
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008.
-.SH NOTES
-POSIX systems on which
-.BR sched_rr_get_interval ()
-is available define
-.B _POSIX_PRIORITY_SCHEDULING
-in
-.IR <unistd.h> .
-.SS Linux notes
+POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001.
+.SS Linux
POSIX does not specify any mechanism for controlling the size of the
round-robin time quantum.
Older Linux kernels provide a (nonportable) method of doing this.
@@ -87,15 +92,13 @@ quantum has varied somewhat across kernel versions.
This method of adjusting the quantum was removed
.\" commit a4ec24b48ddef1e93f7578be53270f0b95ad666c
starting with Linux 2.6.24.
-.PP
-Linux 3.9 added
-.\" commit ce0dbbbb30aee6a835511d5be446462388ba9eee
-a new mechanism for adjusting (and viewing) the
-.B SCHED_RR
-quantum: the
-.I /proc/sys/kernel/sched_rr_timeslice_ms
-file exposes the quantum as a millisecond value, whose default is 100.
-Writing 0 to this file resets the quantum to the default value.
+.SH NOTES
+POSIX systems on which
+.BR sched_rr_get_interval ()
+is available define
+.B _POSIX_PRIORITY_SCHEDULING
+in
+.IR <unistd.h> .
.\" .SH BUGS
.\" As of Linux 1.3.81
.\" .BR sched_rr_get_interval ()
diff --git a/man2/sched_setaffinity.2 b/man2/sched_setaffinity.2
index 6538b44ec..9389e099d 100644
--- a/man2/sched_setaffinity.2
+++ b/man2/sched_setaffinity.2
@@ -12,7 +12,7 @@
.\" 2008-11-12, mtk, removed CPU_*() macro descriptions to a
.\" separate CPU_SET(3) page.
.\"
-.TH sched_setaffinity 2 2023-02-05 "Linux man-pages 6.03"
+.TH sched_setaffinity 2 2023-05-03 "Linux man-pages 6.05.01"
.SH NAME
sched_setaffinity, sched_getaffinity \- \
set and get a thread's CPU affinity mask
@@ -134,9 +134,12 @@ capability in the user namespace of the thread
.TP
.B ESRCH
The thread whose ID is \fIpid\fP could not be found.
-.SH VERSIONS
-The CPU affinity system calls were introduced in Linux kernel 2.5.8.
-The system call wrappers were introduced in glibc 2.3.
+.SH STANDARDS
+Linux.
+.SH HISTORY
+Linux 2.5.8,
+glibc 2.3.
+.PP
Initially, the glibc interfaces included a
.I cpusetsize
argument, typed as
@@ -145,8 +148,6 @@ In glibc 2.3.3, the
.I cpusetsize
argument was removed, but was then restored in glibc 2.3.4, with type
.IR size_t .
-.SH STANDARDS
-These system calls are Linux-specific.
.SH NOTES
After a call to
.BR sched_setaffinity (),
@@ -350,50 +351,50 @@ sys 12.07
#include <stdlib.h>
#include <sys/wait.h>
#include <unistd.h>
-
+\&
int
main(int argc, char *argv[])
{
int parentCPU, childCPU;
cpu_set_t set;
unsigned int nloops;
-
+\&
if (argc != 4) {
fprintf(stderr, "Usage: %s parent\-cpu child\-cpu num\-loops\en",
argv[0]);
exit(EXIT_FAILURE);
}
-
+\&
parentCPU = atoi(argv[1]);
childCPU = atoi(argv[2]);
nloops = atoi(argv[3]);
-
+\&
CPU_ZERO(&set);
-
+\&
switch (fork()) {
case \-1: /* Error */
err(EXIT_FAILURE, "fork");
-
+\&
case 0: /* Child */
CPU_SET(childCPU, &set);
-
+\&
if (sched_setaffinity(getpid(), sizeof(set), &set) == \-1)
err(EXIT_FAILURE, "sched_setaffinity");
-
+\&
for (unsigned int j = 0; j < nloops; j++)
getppid();
-
+\&
exit(EXIT_SUCCESS);
-
+\&
default: /* Parent */
CPU_SET(parentCPU, &set);
-
+\&
if (sched_setaffinity(getpid(), sizeof(set), &set) == \-1)
err(EXIT_FAILURE, "sched_setaffinity");
-
+\&
for (unsigned int j = 0; j < nloops; j++)
getppid();
-
+\&
wait(NULL); /* Wait for child to terminate */
exit(EXIT_SUCCESS);
}
diff --git a/man2/sched_setattr.2 b/man2/sched_setattr.2
index bc64a4aa4..b4975c6c7 100644
--- a/man2/sched_setattr.2
+++ b/man2/sched_setattr.2
@@ -3,7 +3,7 @@
.\"
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
-.TH sched_setattr 2 2023-02-05 "Linux man-pages 6.03"
+.TH sched_setattr 2 2023-03-30 "Linux man-pages 6.05.01"
.SH NAME
sched_setattr, sched_getattr \-
set and get scheduling policy and attributes
@@ -372,11 +372,11 @@ The CPU affinity mask of the thread specified by
does not include all CPUs in the system
(see
.BR sched_setaffinity (2)).
-.SH VERSIONS
-These system calls first appeared in Linux 3.14.
-.\" FIXME . Add glibc version
.SH STANDARDS
-These system calls are nonstandard Linux extensions.
+Linux.
+.SH HISTORY
+Linux 3.14.
+.\" FIXME . Add glibc version
.SH NOTES
glibc does not provide wrappers for these system calls; call them using
.BR syscall (2).
diff --git a/man2/sched_setparam.2 b/man2/sched_setparam.2
index 0076804dc..f054f5d20 100644
--- a/man2/sched_setparam.2
+++ b/man2/sched_setparam.2
@@ -8,7 +8,7 @@
.\" revision
.\" Modified 2004-05-27 by Michael Kerrisk <mtk.manpages@gmail.com>
.\"
-.TH sched_setparam 2 2022-10-30 "Linux man-pages 6.03"
+.TH sched_setparam 2 2023-03-30 "Linux man-pages 6.05.01"
.SH NAME
sched_setparam, sched_getparam \- set and get scheduling parameters
.SH LIBRARY
@@ -100,7 +100,9 @@ capability).
.B ESRCH
The thread whose ID is \fIpid\fP could not be found.
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008.
+POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001.
.SH SEE ALSO
.ad l
.nh
diff --git a/man2/sched_setscheduler.2 b/man2/sched_setscheduler.2
index be8071277..20ad5c241 100644
--- a/man2/sched_setscheduler.2
+++ b/man2/sched_setscheduler.2
@@ -3,7 +3,7 @@
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
.\"
-.TH sched_setscheduler 2 2022-10-30 "Linux man-pages 6.03"
+.TH sched_setscheduler 2 2023-03-30 "Linux man-pages 6.05.01"
.SH NAME
sched_setscheduler, sched_getscheduler \-
set and get scheduling policy/parameters
@@ -147,27 +147,7 @@ The calling thread does not have appropriate privileges.
.TP
.B ESRCH
The thread whose ID is \fIpid\fP could not be found.
-.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008 (but see BUGS below).
-The \fBSCHED_BATCH\fP and \fBSCHED_IDLE\fP policies are Linux-specific.
-.SH NOTES
-Further details of the semantics of all of the above "normal"
-and "real-time" scheduling policies can be found in the
-.BR sched (7)
-manual page.
-That page also describes an additional policy,
-.BR SCHED_DEADLINE ,
-which is settable only via
-.BR sched_setattr (2).
-.PP
-POSIX systems on which
-.BR sched_setscheduler ()
-and
-.BR sched_getscheduler ()
-are available define
-.B _POSIX_PRIORITY_SCHEDULING
-in \fI<unistd.h>\fP.
-.PP
+.SH VERSIONS
POSIX.1 does not detail the permissions that an unprivileged
thread requires in order to call
.BR sched_setscheduler (),
@@ -196,6 +176,32 @@ and
instead of the
.BR sched_* (2)
system calls.)
+.SH STANDARDS
+POSIX.1-2008 (but see BUGS below).
+.PP
+.B SCHED_BATCH
+and
+.B SCHED_IDLE
+are Linux-specific.
+.SH HISTORY
+POSIX.1-2001.
+.SH NOTES
+Further details of the semantics of all of the above "normal"
+and "real-time" scheduling policies can be found in the
+.BR sched (7)
+manual page.
+That page also describes an additional policy,
+.BR SCHED_DEADLINE ,
+which is settable only via
+.BR sched_setattr (2).
+.PP
+POSIX systems on which
+.BR sched_setscheduler ()
+and
+.BR sched_getscheduler ()
+are available define
+.B _POSIX_PRIORITY_SCHEDULING
+in \fI<unistd.h>\fP.
.SH BUGS
POSIX.1 says that on success,
.BR sched_setscheduler ()
diff --git a/man2/sched_yield.2 b/man2/sched_yield.2
index 6c2ebd89b..154fd4f85 100644
--- a/man2/sched_yield.2
+++ b/man2/sched_yield.2
@@ -7,7 +7,7 @@
.\" 1996-04-10 Markus Kuhn <mskuhn@cip.informatik.uni-erlangen.de>
.\" revision
.\"
-.TH sched_yield 2 2022-10-30 "Linux man-pages 6.03"
+.TH sched_yield 2 2023-05-03 "Linux man-pages 6.05.01"
.SH NAME
sched_yield \- yield the processor
.SH LIBRARY
@@ -36,33 +36,19 @@ In the Linux implementation,
.BR sched_yield ()
always succeeds.
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008.
-.SH NOTES
-If the calling thread is the only thread in the highest
-priority list at that time,
-it will continue to run after a call to
-.BR sched_yield ().
+POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001 (but optional).
+POSIX.1-2008.
.PP
-POSIX systems on which
+Before POSIX.1-2008,
+systems on which
.BR sched_yield ()
-is available define
+is available defined
.B _POSIX_PRIORITY_SCHEDULING
in
.IR <unistd.h> .
-.PP
-Strategic calls to
-.BR sched_yield ()
-can improve performance by giving other threads or processes
-a chance to run when (heavily) contended resources (e.g., mutexes)
-have been released by the caller.
-Avoid calling
-.BR sched_yield ()
-unnecessarily or inappropriately
-(e.g., when resources needed by other
-schedulable threads are still held by the caller),
-since doing so will result in unnecessary context switches,
-which will degrade system performance.
-.PP
+.SH CAVEATS
.BR sched_yield ()
is intended for use with real-time scheduling policies (i.e.,
.B SCHED_FIFO
@@ -73,5 +59,18 @@ Use of
with nondeterministic scheduling policies such as
.B SCHED_OTHER
is unspecified and very likely means your application design is broken.
+.PP
+If the calling thread is the only thread in the highest
+priority list at that time,
+it will continue to run after a call to
+.BR sched_yield ().
+.PP
+Avoid calling
+.BR sched_yield ()
+unnecessarily or inappropriately
+(e.g., when resources needed by other
+schedulable threads are still held by the caller),
+since doing so will result in unnecessary context switches,
+which will degrade system performance.
.SH SEE ALSO
.BR sched (7)
diff --git a/man2/seccomp.2 b/man2/seccomp.2
index 640b6c179..6b32eec03 100644
--- a/man2/seccomp.2
+++ b/man2/seccomp.2
@@ -6,7 +6,7 @@
.\"
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
-.TH seccomp 2 2023-02-05 "Linux man-pages 6.03"
+.TH seccomp 2 2023-05-03 "Linux man-pages 6.05.01"
.SH NAME
seccomp \- operate on Secure Computing state of the process
.SH LIBRARY
@@ -861,15 +861,11 @@ but the kernel does not support the filter return action specified by
.B ESRCH
Another thread caused a failure during thread sync, but its ID could not
be determined.
-.SH VERSIONS
-The
-.BR seccomp ()
-system call first appeared in Linux 3.17.
-.\" FIXME . Add glibc version
.SH STANDARDS
-The
-.BR seccomp ()
-system call is a nonstandard Linux extension.
+Linux.
+.SH HISTORY
+Linux 3.17.
+.\" FIXME . Add glibc version
.SH NOTES
Rather than hand-coding seccomp filters as shown in the example below,
you may prefer to employ the
@@ -1118,71 +1114,71 @@ cecilia
#include <sys/prctl.h>
#include <sys/syscall.h>
#include <unistd.h>
-
+\&
#define X32_SYSCALL_BIT 0x40000000
#define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]))
-
+\&
static int
install_filter(int syscall_nr, unsigned int t_arch, int f_errno)
{
unsigned int upper_nr_limit = 0xffffffff;
-
+\&
/* Assume that AUDIT_ARCH_X86_64 means the normal x86\-64 ABI
(in the x32 ABI, all system calls have bit 30 set in the
\[aq]nr\[aq] field, meaning the numbers are >= X32_SYSCALL_BIT). */
if (t_arch == AUDIT_ARCH_X86_64)
upper_nr_limit = X32_SYSCALL_BIT \- 1;
-
+\&
struct sock_filter filter[] = {
/* [0] Load architecture from \[aq]seccomp_data\[aq] buffer into
accumulator. */
BPF_STMT(BPF_LD | BPF_W | BPF_ABS,
(offsetof(struct seccomp_data, arch))),
-
+\&
/* [1] Jump forward 5 instructions if architecture does not
match \[aq]t_arch\[aq]. */
BPF_JUMP(BPF_JMP | BPF_JEQ | BPF_K, t_arch, 0, 5),
-
+\&
/* [2] Load system call number from \[aq]seccomp_data\[aq] buffer into
accumulator. */
BPF_STMT(BPF_LD | BPF_W | BPF_ABS,
(offsetof(struct seccomp_data, nr))),
-
+\&
/* [3] Check ABI \- only needed for x86\-64 in deny\-list use
cases. Use BPF_JGT instead of checking against the bit
mask to avoid having to reload the syscall number. */
BPF_JUMP(BPF_JMP | BPF_JGT | BPF_K, upper_nr_limit, 3, 0),
-
+\&
/* [4] Jump forward 1 instruction if system call number
does not match \[aq]syscall_nr\[aq]. */
BPF_JUMP(BPF_JMP | BPF_JEQ | BPF_K, syscall_nr, 0, 1),
-
+\&
/* [5] Matching architecture and system call: don\[aq]t execute
the system call, and return \[aq]f_errno\[aq] in \[aq]errno\[aq]. */
BPF_STMT(BPF_RET | BPF_K,
SECCOMP_RET_ERRNO | (f_errno & SECCOMP_RET_DATA)),
-
+\&
/* [6] Destination of system call number mismatch: allow other
system calls. */
BPF_STMT(BPF_RET | BPF_K, SECCOMP_RET_ALLOW),
-
+\&
/* [7] Destination of architecture mismatch: kill process. */
BPF_STMT(BPF_RET | BPF_K, SECCOMP_RET_KILL_PROCESS),
};
-
+\&
struct sock_fprog prog = {
.len = ARRAY_SIZE(filter),
.filter = filter,
};
-
+\&
if (syscall(SYS_seccomp, SECCOMP_SET_MODE_FILTER, 0, &prog)) {
perror("seccomp");
return 1;
}
-
+\&
return 0;
}
-
+\&
int
main(int argc, char *argv[])
{
@@ -1194,17 +1190,17 @@ main(int argc, char *argv[])
"\en", argv[0], AUDIT_ARCH_I386, AUDIT_ARCH_X86_64);
exit(EXIT_FAILURE);
}
-
+\&
if (prctl(PR_SET_NO_NEW_PRIVS, 1, 0, 0, 0)) {
perror("prctl");
exit(EXIT_FAILURE);
}
-
+\&
if (install_filter(strtol(argv[1], NULL, 0),
strtoul(argv[2], NULL, 0),
strtol(argv[3], NULL, 0)))
exit(EXIT_FAILURE);
-
+\&
execv(argv[4], &argv[4]);
perror("execv");
exit(EXIT_FAILURE);
diff --git a/man2/seccomp_unotify.2 b/man2/seccomp_unotify.2
index 6b4376cd2..156fbcee8 100644
--- a/man2/seccomp_unotify.2
+++ b/man2/seccomp_unotify.2
@@ -2,7 +2,7 @@
.\"
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
-.TH seccomp_unotify 2 2023-02-10 "Linux man-pages 6.03"
+.TH seccomp_unotify 2 2023-05-03 "Linux man-pages 6.05.01"
.SH NAME
seccomp_unotify \- Seccomp user-space notification mechanism
.SH LIBRARY
@@ -847,21 +847,21 @@ operation (here, to emulate a call to
.EX
.in +4n
int fd, removeFd;
-
+\&
fd = openat(req\->data.args[0], path, req\->data.args[2],
req\->data.args[3]);
-
+\&
struct seccomp_notif_addfd addfd;
addfd.id = req\->id; /* Cookie from SECCOMP_IOCTL_NOTIF_RECV */
addfd.srcfd = fd;
addfd.newfd = 0;
addfd.flags = 0;
addfd.newfd_flags = O_CLOEXEC;
-
+\&
targetFd = ioctl(notifyFd, SECCOMP_IOCTL_NOTIF_ADDFD, &addfd);
-
+\&
close(fd); /* No longer needed in supervisor */
-
+\&
struct seccomp_notif_resp *resp;
/* Code to allocate 'resp' omitted */
resp\->id = req\->id;
@@ -980,7 +980,7 @@ in order to continue a system call, the supervisor should be sure that
another security mechanism or the kernel itself will sufficiently block
the system call if its arguments are rewritten to something unsafe.
.\"
-.SS Caveats regarding the use of /proc/[tid]/mem
+.SS Caveats regarding the use of \fI/proc/\fPtid\fI/mem\fP
The discussion above noted the need to use the
.B SECCOMP_IOCTL_NOTIF_ID_VALID
.BR ioctl (2)
@@ -1252,14 +1252,14 @@ call.
.EX
$ \fB./seccomp_unotify /tmp/x\fP
T: PID = 23168
-
+\&
T: about to mkdir("/tmp/x")
S: got notification (ID 0x17445c4a0f4e0e3c) for PID 23168
S: executing: mkdir("/tmp/x", 0700)
S: success! spoofed return = 6
S: sending response (flags = 0; val = 6; error = 0)
T: SUCCESS: mkdir(2) returned 6
-
+\&
T: terminating
S: target has terminated; bye
.EE
@@ -1287,13 +1287,13 @@ call.
.EX
$ \fB./seccomp_unotify ./sub\fP
T: PID = 23204
-
+\&
T: about to mkdir("./sub")
S: got notification (ID 0xddb16abe25b4c12) for PID 23204
S: target can execute system call
S: sending response (flags = 0x1; val = 0; error = 0)
T: SUCCESS: mkdir(2) returned 0
-
+\&
T: terminating
S: target has terminated; bye
.EE
@@ -1312,13 +1312,13 @@ call (which is not executed):
.EX
$ \fB./seccomp_unotify /xxx\fP
T: PID = 23178
-
+\&
T: about to mkdir("/xxx")
S: got notification (ID 0xe7dc095d1c524e80) for PID 23178
S: spoofing error response (Operation not supported)
S: sending response (flags = 0; val = 0; error = \-95)
T: ERROR: mkdir(2): Operation not supported
-
+\&
T: terminating
S: target has terminated; bye
.EE
@@ -1342,14 +1342,14 @@ call.
.EX
$ \fB./seccomp_unotify /tmp/nosuchdir/b\fP
T: PID = 23199
-
+\&
T: about to mkdir("/tmp/nosuchdir/b")
S: got notification (ID 0x8744454293506046) for PID 23199
S: executing: mkdir("/tmp/nosuchdir/b", 0700)
S: failure! (errno = 2; No such file or directory)
S: sending response (flags = 0; val = 0; error = \-2)
T: ERROR: mkdir(2): No such file or directory
-
+\&
T: terminating
S: target has terminated; bye
.EE
@@ -1375,17 +1375,17 @@ This is demonstrated by the following example:
.EX
$ \fB./seccomp_unotify /bye /tmp/y\fP
T: PID = 23185
-
+\&
T: about to mkdir("/bye")
S: got notification (ID 0xa81236b1d2f7b0f4) for PID 23185
S: spoofing error response (Operation not supported)
S: sending response (flags = 0; val = 0; error = \-95)
S: terminating **********
T: ERROR: mkdir(2): Operation not supported
-
+\&
T: about to mkdir("/tmp/y")
T: ERROR: mkdir(2): Function not implemented
-
+\&
T: terminating
.EE
.in
@@ -1416,12 +1416,12 @@ T: terminating
#include <sys/types.h>
#include <sys/un.h>
#include <unistd.h>
-
+\&
#define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]))
-
+\&
/* Send the file descriptor \[aq]fd\[aq] over the connected UNIX domain socket
\[aq]sockfd\[aq]. Returns 0 on success, or \-1 on error. */
-
+\&
static int
sendfd(int sockfd, int fd)
{
@@ -1429,7 +1429,7 @@ sendfd(int sockfd, int fd)
struct iovec iov;
struct msghdr msgh;
struct cmsghdr *cmsgp;
-
+\&
/* Allocate a char array of suitable size to hold the ancillary data.
However, since this buffer is in reality a \[aq]struct cmsghdr\[aq], use a
union to ensure that it is suitably aligned. */
@@ -1438,48 +1438,48 @@ sendfd(int sockfd, int fd)
/* Space large enough to hold an \[aq]int\[aq] */
struct cmsghdr align;
} controlMsg;
-
+\&
/* The \[aq]msg_name\[aq] field can be used to specify the address of the
destination socket when sending a datagram. However, we do not
need to use this field because \[aq]sockfd\[aq] is a connected socket. */
-
+\&
msgh.msg_name = NULL;
msgh.msg_namelen = 0;
-
+\&
/* On Linux, we must transmit at least one byte of real data in
order to send ancillary data. We transmit an arbitrary integer
whose value is ignored by recvfd(). */
-
+\&
msgh.msg_iov = &iov;
msgh.msg_iovlen = 1;
iov.iov_base = &data;
iov.iov_len = sizeof(int);
data = 12345;
-
+\&
/* Set \[aq]msghdr\[aq] fields that describe ancillary data */
-
+\&
msgh.msg_control = controlMsg.buf;
msgh.msg_controllen = sizeof(controlMsg.buf);
-
+\&
/* Set up ancillary data describing file descriptor to send */
-
+\&
cmsgp = CMSG_FIRSTHDR(&msgh);
cmsgp\->cmsg_level = SOL_SOCKET;
cmsgp\->cmsg_type = SCM_RIGHTS;
cmsgp\->cmsg_len = CMSG_LEN(sizeof(int));
memcpy(CMSG_DATA(cmsgp), &fd, sizeof(int));
-
+\&
/* Send real plus ancillary data */
-
+\&
if (sendmsg(sockfd, &msgh, 0) == \-1)
return \-1;
-
+\&
return 0;
}
-
+\&
/* Receive a file descriptor on a connected UNIX domain socket. Returns
the received file descriptor on success, or \-1 on error. */
-
+\&
static int
recvfd(int sockfd)
{
@@ -1487,7 +1487,7 @@ recvfd(int sockfd)
ssize_t nr;
struct iovec iov;
struct msghdr msgh;
-
+\&
/* Allocate a char buffer for the ancillary data. See the comments
in sendfd() */
union {
@@ -1495,35 +1495,35 @@ recvfd(int sockfd)
struct cmsghdr align;
} controlMsg;
struct cmsghdr *cmsgp;
-
+\&
/* The \[aq]msg_name\[aq] field can be used to obtain the address of the
sending socket. However, we do not need this information. */
-
+\&
msgh.msg_name = NULL;
msgh.msg_namelen = 0;
-
+\&
/* Specify buffer for receiving real data */
-
+\&
msgh.msg_iov = &iov;
msgh.msg_iovlen = 1;
iov.iov_base = &data; /* Real data is an \[aq]int\[aq] */
iov.iov_len = sizeof(int);
-
+\&
/* Set \[aq]msghdr\[aq] fields that describe ancillary data */
-
+\&
msgh.msg_control = controlMsg.buf;
msgh.msg_controllen = sizeof(controlMsg.buf);
-
+\&
/* Receive real plus ancillary data; real data is ignored */
-
+\&
nr = recvmsg(sockfd, &msgh, 0);
if (nr == \-1)
return \-1;
-
+\&
cmsgp = CMSG_FIRSTHDR(&msgh);
-
+\&
/* Check the validity of the \[aq]cmsghdr\[aq] */
-
+\&
if (cmsgp == NULL
|| cmsgp\->cmsg_len != CMSG_LEN(sizeof(int))
|| cmsgp\->cmsg_level != SOL_SOCKET
@@ -1532,37 +1532,37 @@ recvfd(int sockfd)
errno = EINVAL;
return \-1;
}
-
+\&
/* Return the received file descriptor to our caller */
-
+\&
memcpy(&fd, CMSG_DATA(cmsgp), sizeof(int));
return fd;
}
-
+\&
static void
sigchldHandler(int sig)
{
char msg[] = "\etS: target has terminated; bye\en";
-
+\&
write(STDOUT_FILENO, msg, sizeof(msg) \- 1);
_exit(EXIT_SUCCESS);
}
-
+\&
static int
seccomp(unsigned int operation, unsigned int flags, void *args)
{
return syscall(SYS_seccomp, operation, flags, args);
}
-
+\&
/* The following is the x86\-64\-specific BPF boilerplate code for checking
that the BPF program is running on the right architecture + ABI. At
completion of these instructions, the accumulator contains the system
call number. */
-
+\&
/* For the x32 ABI, all system call numbers have bit 30 set */
-
+\&
#define X32_SYSCALL_BIT 0x40000000
-
+\&
#define X86_64_CHECK_ARCH_AND_LOAD_SYSCALL_NR \e
BPF_STMT(BPF_LD | BPF_W | BPF_ABS, \e
(offsetof(struct seccomp_data, arch))), \e
@@ -1571,50 +1571,50 @@ seccomp(unsigned int operation, unsigned int flags, void *args)
(offsetof(struct seccomp_data, nr))), \e
BPF_JUMP(BPF_JMP | BPF_JGE | BPF_K, X32_SYSCALL_BIT, 0, 1), \e
BPF_STMT(BPF_RET | BPF_K, SECCOMP_RET_KILL_PROCESS)
-
+\&
/* installNotifyFilter() installs a seccomp filter that generates
user\-space notifications (SECCOMP_RET_USER_NOTIF) when the process
calls mkdir(2); the filter allows all other system calls.
-
+\&
The function return value is a file descriptor from which the
user\-space notifications can be fetched. */
-
+\&
static int
installNotifyFilter(void)
{
int notifyFd;
-
+\&
struct sock_filter filter[] = {
X86_64_CHECK_ARCH_AND_LOAD_SYSCALL_NR,
-
+\&
/* mkdir() triggers notification to user\-space supervisor */
-
+\&
BPF_JUMP(BPF_JMP | BPF_JEQ | BPF_K, SYS_mkdir, 0, 1),
BPF_STMT(BPF_RET + BPF_K, SECCOMP_RET_USER_NOTIF),
-
+\&
/* Every other system call is allowed */
-
+\&
BPF_STMT(BPF_RET | BPF_K, SECCOMP_RET_ALLOW),
};
-
+\&
struct sock_fprog prog = {
.len = ARRAY_SIZE(filter),
.filter = filter,
};
-
+\&
/* Install the filter with the SECCOMP_FILTER_FLAG_NEW_LISTENER flag;
as a result, seccomp() returns a notification file descriptor. */
-
+\&
notifyFd = seccomp(SECCOMP_SET_MODE_FILTER,
SECCOMP_FILTER_FLAG_NEW_LISTENER, &prog);
if (notifyFd == \-1)
err(EXIT_FAILURE, "seccomp\-install\-notify\-filter");
-
+\&
return notifyFd;
}
-
+\&
/* Close a pair of sockets created by socketpair() */
-
+\&
static void
closeSocketPair(int sockPair[2])
{
@@ -1623,96 +1623,96 @@ closeSocketPair(int sockPair[2])
if (close(sockPair[1]) == \-1)
err(EXIT_FAILURE, "closeSocketPair\-close\-1");
}
-
+\&
/* Implementation of the target process; create a child process that:
-
+\&
(1) installs a seccomp filter with the
SECCOMP_FILTER_FLAG_NEW_LISTENER flag;
(2) writes the seccomp notification file descriptor returned from
the previous step onto the UNIX domain socket, \[aq]sockPair[0]\[aq];
(3) calls mkdir(2) for each element of \[aq]argv\[aq].
-
+\&
The function return value in the parent is the PID of the child
process; the child does not return from this function. */
-
+\&
static pid_t
targetProcess(int sockPair[2], char *argv[])
{
int notifyFd, s;
pid_t targetPid;
-
+\&
targetPid = fork();
-
+\&
if (targetPid == \-1)
err(EXIT_FAILURE, "fork");
-
+\&
if (targetPid > 0) /* In parent, return PID of child */
return targetPid;
-
+\&
/* Child falls through to here */
-
+\&
printf("T: PID = %ld\en", (long) getpid());
-
+\&
/* Install seccomp filter(s) */
-
+\&
if (prctl(PR_SET_NO_NEW_PRIVS, 1, 0, 0, 0))
err(EXIT_FAILURE, "prctl");
-
+\&
notifyFd = installNotifyFilter();
-
+\&
/* Pass the notification file descriptor to the tracing process over
a UNIX domain socket */
-
+\&
if (sendfd(sockPair[0], notifyFd) == \-1)
err(EXIT_FAILURE, "sendfd");
-
+\&
/* Notification and socket FDs are no longer needed in target */
-
+\&
if (close(notifyFd) == \-1)
err(EXIT_FAILURE, "close\-target\-notify\-fd");
-
+\&
closeSocketPair(sockPair);
-
+\&
/* Perform a mkdir() call for each of the command\-line arguments */
-
+\&
for (char **ap = argv; *ap != NULL; ap++) {
printf("\enT: about to mkdir(\e"%s\e")\en", *ap);
-
+\&
s = mkdir(*ap, 0700);
if (s == \-1)
perror("T: ERROR: mkdir(2)");
else
printf("T: SUCCESS: mkdir(2) returned %d\en", s);
}
-
+\&
printf("\enT: terminating\en");
exit(EXIT_SUCCESS);
}
-
+\&
/* Check that the notification ID provided by a SECCOMP_IOCTL_NOTIF_RECV
operation is still valid. It will no longer be valid if the target
process has terminated or is no longer blocked in the system call that
generated the notification (because it was interrupted by a signal).
-
+\&
This operation can be used when doing such things as accessing
/proc/PID files in the target process in order to avoid TOCTOU race
conditions where the PID that is returned by SECCOMP_IOCTL_NOTIF_RECV
terminates and is reused by another process. */
-
+\&
static bool
cookieIsValid(int notifyFd, uint64_t id)
{
return ioctl(notifyFd, SECCOMP_IOCTL_NOTIF_ID_VALID, &id) == 0;
}
-
+\&
/* Access the memory of the target process in order to fetch the
pathname referred to by the system call argument \[aq]argNum\[aq] in
\[aq]req\->data.args[]\[aq]. The pathname is returned in \[aq]path\[aq],
a buffer of \[aq]len\[aq] bytes allocated by the caller.
-
+\&
Returns true if the pathname is successfully fetched, and false
otherwise. For possible causes of failure, see the comments below. */
-
+\&
static bool
getTargetPathname(struct seccomp_notif *req, int notifyFd,
int argNum, char *path, size_t len)
@@ -1720,13 +1720,13 @@ getTargetPathname(struct seccomp_notif *req, int notifyFd,
int procMemFd;
char procMemPath[PATH_MAX];
ssize_t nread;
-
+\&
snprintf(procMemPath, sizeof(procMemPath), "/proc/%d/mem", req\->pid);
-
+\&
procMemFd = open(procMemPath, O_RDONLY | O_CLOEXEC);
if (procMemFd == \-1)
return false;
-
+\&
/* Check that the process whose info we are accessing is still alive
and blocked in the system call that caused the notification.
If the SECCOMP_IOCTL_NOTIF_ID_VALID operation (performed in
@@ -1734,21 +1734,21 @@ getTargetPathname(struct seccomp_notif *req, int notifyFd,
descriptor that we opened corresponded to the process for which we
received a notification. If that process subsequently terminates,
then read() on that file descriptor will return 0 (EOF). */
-
+\&
if (!cookieIsValid(notifyFd, req\->id)) {
close(procMemFd);
return false;
}
-
+\&
/* Read bytes at the location containing the pathname argument */
-
+\&
nread = pread(procMemFd, path, len, req\->data.args[argNum]);
-
+\&
close(procMemFd);
-
+\&
if (nread <= 0)
return false;
-
+\&
/* Once again check that the notification ID is still valid. The
case we are particularly concerned about here is that just
before we fetched the pathname, the target\[aq]s blocked system
@@ -1757,12 +1757,12 @@ getTargetPathname(struct seccomp_notif *req, int notifyFd,
system call). In that case, we have no guarantees about what we
are reading, since the target\[aq]s memory may have been arbitrarily
changed by subsequent operations. */
-
+\&
if (!cookieIsValid(notifyFd, req\->id)) {
perror("\etS: notification ID check failed!!!");
return false;
}
-
+\&
/* Even if the target\[aq]s system call was not interrupted by a signal,
we have no guarantees about what was in the memory of the target
process. (The memory may have been modified by another thread, or
@@ -1770,35 +1770,35 @@ getTargetPathname(struct seccomp_notif *req, int notifyFd,
buffer returned by pread() as untrusted input. The buffer should
contain a terminating null byte; if not, then we will trigger an
error for the target process. */
-
+\&
if (strnlen(path, nread) < nread)
return true;
-
+\&
return false;
}
-
+\&
/* Allocate buffers for the seccomp user\-space notification request and
response structures. It is the caller\[aq]s responsibility to free the
buffers returned via \[aq]req\[aq] and \[aq]resp\[aq]. */
-
+\&
static void
allocSeccompNotifBuffers(struct seccomp_notif **req,
struct seccomp_notif_resp **resp,
struct seccomp_notif_sizes *sizes)
{
size_t resp_size;
-
+\&
/* Discover the sizes of the structures that are used to receive
notifications and send notification responses, and allocate
buffers of those sizes. */
-
+\&
if (seccomp(SECCOMP_GET_NOTIF_SIZES, 0, sizes) == \-1)
err(EXIT_FAILURE, "seccomp\-SECCOMP_GET_NOTIF_SIZES");
-
+\&
*req = malloc(sizes\->seccomp_notif);
if (*req == NULL)
err(EXIT_FAILURE, "malloc\-seccomp_notif");
-
+\&
/* When allocating the response buffer, we must allow for the fact
that the user\-space binary may have been built with user\-space
headers where \[aq]struct seccomp_notif_resp\[aq] is bigger than the
@@ -1807,20 +1807,20 @@ allocSeccompNotifBuffers(struct seccomp_notif **req,
ensures that if the supervisor places bytes into the response
structure that are past the response size that the kernel expects,
then the supervisor is not touching an invalid memory location. */
-
+\&
resp_size = sizes\->seccomp_notif_resp;
if (sizeof(struct seccomp_notif_resp) > resp_size)
resp_size = sizeof(struct seccomp_notif_resp);
-
+\&
*resp = malloc(resp_size);
if (*resp == NULL)
err(EXIT_FAILURE, "malloc\-seccomp_notif_resp");
-
+\&
}
-
+\&
/* Handle notifications that arrive via the SECCOMP_RET_USER_NOTIF file
descriptor, \[aq]notifyFd\[aq]. */
-
+\&
static void
handleNotifications(int notifyFd)
{
@@ -1829,45 +1829,45 @@ handleNotifications(int notifyFd)
struct seccomp_notif *req;
struct seccomp_notif_resp *resp;
struct seccomp_notif_sizes sizes;
-
+\&
allocSeccompNotifBuffers(&req, &resp, &sizes);
-
+\&
/* Loop handling notifications */
-
+\&
for (;;) {
-
+\&
/* Wait for next notification, returning info in \[aq]*req\[aq] */
-
+\&
memset(req, 0, sizes.seccomp_notif);
if (ioctl(notifyFd, SECCOMP_IOCTL_NOTIF_RECV, req) == \-1) {
if (errno == EINTR)
continue;
err(EXIT_FAILURE, "\etS: ioctl\-SECCOMP_IOCTL_NOTIF_RECV");
}
-
+\&
printf("\etS: got notification (ID %#llx) for PID %d\en",
req\->id, req\->pid);
-
+\&
/* The only system call that can generate a notification event
is mkdir(2). Nevertheless, we check that the notified system
call is indeed mkdir() as kind of future\-proofing of this
code in case the seccomp filter is later modified to
generate notifications for other system calls. */
-
+\&
if (req\->data.nr != SYS_mkdir) {
printf("\etS: notification contained unexpected "
"system call number; bye!!!\en");
exit(EXIT_FAILURE);
}
-
+\&
pathOK = getTargetPathname(req, notifyFd, 0, path, sizeof(path));
-
+\&
/* Prepopulate some fields of the response */
-
+\&
resp\->id = req\->id; /* Response includes notification ID */
resp\->flags = 0;
resp\->val = 0;
-
+\&
/* If getTargetPathname() failed, trigger an EINVAL error
response (sending this response may yield an error if the
failure occurred because the notification ID was no longer
@@ -1876,7 +1876,7 @@ handleNotifications(int notifyFd)
kernel to let the target process execute the mkdir();
otherwise, give an error for a directory pathname in any other
location. */
-
+\&
if (!pathOK) {
resp\->error = \-EINVAL;
printf("\etS: spoofing error for invalid pathname (%s)\en",
@@ -1884,7 +1884,7 @@ handleNotifications(int notifyFd)
} else if (strncmp(path, "/tmp/", strlen("/tmp/")) == 0) {
printf("\etS: executing: mkdir(\e"%s\e", %#llo)\en",
path, req\->data.args[1]);
-
+\&
if (mkdir(path, req\->data.args[1]) == 0) {
resp\->error = 0; /* "Success" */
resp\->val = strlen(path); /* Used as return value of
@@ -1892,10 +1892,10 @@ handleNotifications(int notifyFd)
printf("\etS: success! spoofed return = %lld\en",
resp\->val);
} else {
-
+\&
/* If mkdir() failed in the supervisor, pass the error
back to the target */
-
+\&
resp\->error = \-errno;
printf("\etS: failure! (errno = %d; %s)\en", errno,
strerror(errno));
@@ -1909,13 +1909,13 @@ handleNotifications(int notifyFd)
printf("\etS: spoofing error response (%s)\en",
strerror(\-resp\->error));
}
-
+\&
/* Send a response to the notification */
-
+\&
printf("\etS: sending response "
"(flags = %#x; val = %lld; error = %d)\en",
resp\->flags, resp\->val, resp\->error);
-
+\&
if (ioctl(notifyFd, SECCOMP_IOCTL_NOTIF_SEND, resp) == \-1) {
if (errno == ENOENT)
printf("\etS: response failed with ENOENT; "
@@ -1924,79 +1924,79 @@ handleNotifications(int notifyFd)
else
perror("ioctl\-SECCOMP_IOCTL_NOTIF_SEND");
}
-
+\&
/* If the pathname is just "/bye", then the supervisor breaks out
of the loop and terminates. This allows us to see what happens
if the target process makes further calls to mkdir(2). */
-
+\&
if (strcmp(path, "/bye") == 0)
break;
}
-
+\&
free(req);
free(resp);
printf("\etS: terminating **********\en");
exit(EXIT_FAILURE);
}
-
+\&
/* Implementation of the supervisor process:
-
+\&
(1) obtains the notification file descriptor from \[aq]sockPair[1]\[aq]
(2) handles notifications that arrive on that file descriptor. */
-
+\&
static void
supervisor(int sockPair[2])
{
int notifyFd;
-
+\&
notifyFd = recvfd(sockPair[1]);
-
+\&
if (notifyFd == \-1)
err(EXIT_FAILURE, "recvfd");
-
+\&
closeSocketPair(sockPair); /* We no longer need the socket pair */
-
+\&
handleNotifications(notifyFd);
}
-
+\&
int
main(int argc, char *argv[])
{
int sockPair[2];
struct sigaction sa;
-
+\&
setbuf(stdout, NULL);
-
+\&
if (argc < 2) {
fprintf(stderr, "At least one pathname argument is required\en");
exit(EXIT_FAILURE);
}
-
+\&
/* Create a UNIX domain socket that is used to pass the seccomp
notification file descriptor from the target process to the
supervisor process. */
-
+\&
if (socketpair(AF_UNIX, SOCK_STREAM, 0, sockPair) == \-1)
err(EXIT_FAILURE, "socketpair");
-
+\&
/* Create a child process\-\-the "target"\-\-that installs seccomp
filtering. The target process writes the seccomp notification
file descriptor onto \[aq]sockPair[0]\[aq] and then calls mkdir(2) for
each directory in the command\-line arguments. */
-
+\&
(void) targetProcess(sockPair, &argv[optind]);
-
+\&
/* Catch SIGCHLD when the target terminates, so that the
supervisor can also terminate. */
-
+\&
sa.sa_handler = sigchldHandler;
sa.sa_flags = 0;
sigemptyset(&sa.sa_mask);
if (sigaction(SIGCHLD, &sa, NULL) == \-1)
err(EXIT_FAILURE, "sigaction");
-
+\&
supervisor(sockPair);
-
+\&
exit(EXIT_SUCCESS);
}
.EE
diff --git a/man2/select.2 b/man2/select.2
index bf6316c39..41cb7e60e 100644
--- a/man2/select.2
+++ b/man2/select.2
@@ -17,7 +17,7 @@
.\" 2005-03-11, mtk, modified pselect() text (it is now a system
.\" call in Linux 2.6.16.
.\"
-.TH select 2 2023-02-05 "Linux man-pages 6.03"
+.TH select 2 2023-05-03 "Linux man-pages 6.05.01"
.SH NAME
select, pselect, FD_CLR, FD_ISSET, FD_SET, FD_ZERO, fd_set \-
synchronous I/O multiplexing
@@ -304,7 +304,7 @@ executing the following calls:
.in +4n
.EX
sigset_t origmask;
-
+\&
pthread_sigmask(SIG_SETMASK, &sigmask, &origmask);
ready = select(nfds, &readfds, &writefds, &exceptfds, timeout);
pthread_sigmask(SIG_SETMASK, &origmask, NULL);
@@ -421,29 +421,44 @@ is invalid.
.B ENOMEM
Unable to allocate memory for internal tables.
.SH VERSIONS
-.BR pselect ()
-was added in Linux 2.6.16.
-Prior to this,
-.BR pselect ()
-was emulated in glibc (but see BUGS).
+On some other UNIX systems,
+.\" Darwin, according to a report by Jeremy Sequoia, relayed by Josh Triplett
+.BR select ()
+can fail with the error
+.B EAGAIN
+if the system fails to allocate kernel-internal resources, rather than
+.B ENOMEM
+as Linux does.
+POSIX specifies this error for
+.BR poll (2),
+but not for
+.BR select ().
+Portable programs may wish to check for
+.B EAGAIN
+and loop, just as with
+.BR EINTR .
.SH STANDARDS
+POSIX.1-2008.
+.SH HISTORY
+.TP
.BR select ()
-conforms to POSIX.1-2001, POSIX.1-2008, and
-4.4BSD
-.RB ( select ()
-first appeared in 4.2BSD).
+POSIX.1-2001, 4.4BSD (first appeared in 4.2BSD).
+.IP
Generally portable to/from
non-BSD systems supporting clones of the BSD socket layer (including
System\ V variants).
However, note that the System\ V variant typically
sets the timeout variable before returning, but the BSD variant does not.
-.PP
+.TP
.BR pselect ()
-is defined in POSIX.1g, and in
-POSIX.1-2001 and POSIX.1-2008.
-.PP
+Linux 2.6.16.
+POSIX.1g, POSIX.1-2001.
+.IP
+Prior to this,
+it was emulated in glibc (but see BUGS).
+.TP
.B fd_set
-is defined in POSIX.1-2001 and later.
+POSIX.1-2001.
.SH NOTES
The following header also provides the
.I fd_set
@@ -474,23 +489,6 @@ and
is not affected by the
.B O_NONBLOCK
flag.
-.PP
-On some other UNIX systems,
-.\" Darwin, according to a report by Jeremy Sequoia, relayed by Josh Triplett
-.BR select ()
-can fail with the error
-.B EAGAIN
-if the system fails to allocate kernel-internal resources, rather than
-.B ENOMEM
-as Linux does.
-POSIX specifies this error for
-.BR poll (2),
-but not for
-.BR select ().
-Portable programs may wish to check for
-.B EAGAIN
-and loop, just as with
-.BR EINTR .
.\"
.SS The self-pipe trick
On systems that lack
@@ -716,27 +714,27 @@ to a local variable and passing that variable to the system call.
#include <stdio.h>
#include <stdlib.h>
#include <sys/select.h>
-
+\&
int
main(void)
{
int retval;
fd_set rfds;
struct timeval tv;
-
+\&
/* Watch stdin (fd 0) to see when it has input. */
-
+\&
FD_ZERO(&rfds);
FD_SET(0, &rfds);
-
+\&
/* Wait up to five seconds. */
-
+\&
tv.tv_sec = 5;
tv.tv_usec = 0;
-
+\&
retval = select(1, &rfds, NULL, NULL, &tv);
/* Don\[aq]t rely on the value of tv now! */
-
+\&
if (retval == \-1)
perror("select()");
else if (retval)
@@ -744,7 +742,7 @@ main(void)
/* FD_ISSET(0, &rfds) will be true. */
else
printf("No data within five seconds.\en");
-
+\&
exit(EXIT_SUCCESS);
}
.EE
diff --git a/man2/select_tut.2 b/man2/select_tut.2
index 5d4a233df..e860de3cf 100644
--- a/man2/select_tut.2
+++ b/man2/select_tut.2
@@ -9,7 +9,7 @@
.\" various other changes
.\" 2008-01-26, mtk, substantial changes and rewrites
.\"
-.TH SELECT_TUT 2 2023-02-05 "Linux man-pages 6.03"
+.TH SELECT_TUT 2 2023-05-03 "Linux man-pages 6.05.01"
.SH NAME
select, pselect \- synchronous I/O multiplexing
.SH LIBRARY
@@ -85,13 +85,13 @@ Our program would look like:
.PP
.EX
static volatile sig_atomic_t got_SIGCHLD = 0;
-
+\&
static void
child_sig_handler(int sig)
{
got_SIGCHLD = 1;
}
-
+\&
int
main(int argc, char *argv[])
{
@@ -99,14 +99,14 @@ main(int argc, char *argv[])
struct sigaction sa;
fd_set readfds, writefds, exceptfds;
int r;
-
+\&
sigemptyset(&sigmask);
sigaddset(&sigmask, SIGCHLD);
if (sigprocmask(SIG_BLOCK, &sigmask, NULL) == \-1) {
perror("sigprocmask");
exit(EXIT_FAILURE);
}
-
+\&
sa.sa_flags = 0;
sa.sa_handler = child_sig_handler;
sigemptyset(&sa.sa_mask);
@@ -114,26 +114,26 @@ main(int argc, char *argv[])
perror("sigaction");
exit(EXIT_FAILURE);
}
-
+\&
sigemptyset(&empty_mask);
-
+\&
for (;;) { /* main loop */
/* Initialize readfds, writefds, and exceptfds
before the pselect() call. (Code omitted.) */
-
+\&
r = pselect(nfds, &readfds, &writefds, &exceptfds,
NULL, &empty_mask);
if (r == \-1 && errno != EINTR) {
/* Handle error */
}
-
+\&
if (got_SIGCHLD) {
got_SIGCHLD = 0;
-
+\&
/* Handle signalled event here; e.g., wait() for all
terminated children. (Code omitted.) */
}
-
+\&
/* main body of program */
}
}
@@ -345,25 +345,25 @@ from one TCP port to another.
#include <sys/select.h>
#include <sys/socket.h>
#include <unistd.h>
-
+\&
static int forward_port;
-
+\&
#undef max
#define max(x, y) ((x) > (y) ? (x) : (y))
-
+\&
static int
listen_socket(int listen_port)
{
int lfd;
int yes;
struct sockaddr_in addr;
-
+\&
lfd = socket(AF_INET, SOCK_STREAM, 0);
if (lfd == \-1) {
perror("socket");
return \-1;
}
-
+\&
yes = 1;
if (setsockopt(lfd, SOL_SOCKET, SO_REUSEADDR,
&yes, sizeof(yes)) == \-1)
@@ -372,7 +372,7 @@ listen_socket(int listen_port)
close(lfd);
return \-1;
}
-
+\&
memset(&addr, 0, sizeof(addr));
addr.sin_port = htons(listen_port);
addr.sin_family = AF_INET;
@@ -381,34 +381,34 @@ listen_socket(int listen_port)
close(lfd);
return \-1;
}
-
+\&
printf("accepting connections on port %d\en", listen_port);
listen(lfd, 10);
return lfd;
}
-
+\&
static int
connect_socket(int connect_port, char *address)
{
int cfd;
struct sockaddr_in addr;
-
+\&
cfd = socket(AF_INET, SOCK_STREAM, 0);
if (cfd == \-1) {
perror("socket");
return \-1;
}
-
+\&
memset(&addr, 0, sizeof(addr));
addr.sin_port = htons(connect_port);
addr.sin_family = AF_INET;
-
+\&
if (!inet_aton(address, (struct in_addr *) &addr.sin_addr.s_addr)) {
fprintf(stderr, "inet_aton(): bad IP address format\en");
close(cfd);
return \-1;
}
-
+\&
if (connect(cfd, (struct sockaddr *) &addr, sizeof(addr)) == \-1) {
perror("connect()");
shutdown(cfd, SHUT_RDWR);
@@ -417,7 +417,7 @@ connect_socket(int connect_port, char *address)
}
return cfd;
}
-
+\&
#define SHUT_FD1 do { \e
if (fd1 >= 0) { \e
shutdown(fd1, SHUT_RDWR); \e
@@ -425,7 +425,7 @@ connect_socket(int connect_port, char *address)
fd1 = \-1; \e
} \e
} while (0)
-
+\&
#define SHUT_FD2 do { \e
if (fd2 >= 0) { \e
shutdown(fd2, SHUT_RDWR); \e
@@ -433,9 +433,9 @@ connect_socket(int connect_port, char *address)
fd2 = \-1; \e
} \e
} while (0)
-
+\&
#define BUF_SIZE 1024
-
+\&
int
main(int argc, char *argv[])
{
@@ -447,42 +447,42 @@ main(int argc, char *argv[])
char buf1[BUF_SIZE], buf2[BUF_SIZE];
fd_set readfds, writefds, exceptfds;
ssize_t nbytes;
-
+\&
if (argc != 4) {
fprintf(stderr, "Usage\en\etfwd <listen\-port> "
"<forward\-to\-port> <forward\-to\-ip\-address>\en");
exit(EXIT_FAILURE);
}
-
+\&
signal(SIGPIPE, SIG_IGN);
-
+\&
forward_port = atoi(argv[2]);
-
+\&
h = listen_socket(atoi(argv[1]));
if (h == \-1)
exit(EXIT_FAILURE);
-
+\&
for (;;) {
nfds = 0;
-
+\&
FD_ZERO(&readfds);
FD_ZERO(&writefds);
FD_ZERO(&exceptfds);
FD_SET(h, &readfds);
nfds = max(nfds, h);
-
+\&
if (fd1 > 0 && buf1_avail < BUF_SIZE)
FD_SET(fd1, &readfds);
/* Note: nfds is updated below, when fd1 is added to
exceptfds. */
if (fd2 > 0 && buf2_avail < BUF_SIZE)
FD_SET(fd2, &readfds);
-
+\&
if (fd1 > 0 && buf2_avail \- buf2_written > 0)
FD_SET(fd1, &writefds);
if (fd2 > 0 && buf1_avail \- buf1_written > 0)
FD_SET(fd2, &writefds);
-
+\&
if (fd1 > 0) {
FD_SET(fd1, &exceptfds);
nfds = max(nfds, fd1);
@@ -491,22 +491,22 @@ main(int argc, char *argv[])
FD_SET(fd2, &exceptfds);
nfds = max(nfds, fd2);
}
-
+\&
ready = select(nfds + 1, &readfds, &writefds, &exceptfds, NULL);
-
+\&
if (ready == \-1 && errno == EINTR)
continue;
-
+\&
if (ready == \-1) {
perror("select()");
exit(EXIT_FAILURE);
}
-
+\&
if (FD_ISSET(h, &readfds)) {
socklen_t addrlen;
struct sockaddr_in client_addr;
int fd;
-
+\&
addrlen = sizeof(client_addr);
memset(&client_addr, 0, addrlen);
fd = accept(h, (struct sockaddr *) &client_addr, &addrlen);
@@ -524,19 +524,19 @@ main(int argc, char *argv[])
else
printf("connect from %s\en",
inet_ntoa(client_addr.sin_addr));
-
+\&
/* Skip any events on the old, closed file
descriptors. */
-
+\&
continue;
}
}
-
+\&
/* NB: read OOB data before normal reads. */
-
+\&
if (fd1 > 0 && FD_ISSET(fd1, &exceptfds)) {
char c;
-
+\&
nbytes = recv(fd1, &c, 1, MSG_OOB);
if (nbytes < 1)
SHUT_FD1;
@@ -545,7 +545,7 @@ main(int argc, char *argv[])
}
if (fd2 > 0 && FD_ISSET(fd2, &exceptfds)) {
char c;
-
+\&
nbytes = recv(fd2, &c, 1, MSG_OOB);
if (nbytes < 1)
SHUT_FD2;
@@ -584,17 +584,17 @@ main(int argc, char *argv[])
else
buf1_written += nbytes;
}
-
+\&
/* Check if write data has caught read data. */
-
+\&
if (buf1_written == buf1_avail)
buf1_written = buf1_avail = 0;
if (buf2_written == buf2_avail)
buf2_written = buf2_avail = 0;
-
+\&
/* One side has closed the connection, keep
writing to the other side until empty. */
-
+\&
if (fd1 < 0 && buf1_avail \- buf1_written == 0)
SHUT_FD2;
if (fd2 < 0 && buf2_avail \- buf2_written == 0)
diff --git a/man2/semctl.2 b/man2/semctl.2
index 8f616a34e..606916972 100644
--- a/man2/semctl.2
+++ b/man2/semctl.2
@@ -20,7 +20,7 @@
.\" 2005-08-02, mtk: Added IPC_INFO, SEM_INFO, SEM_STAT descriptions.
.\" 2018-03-20, dbueso: Added SEM_STAT_ANY description.
.\"
-.TH semctl 2 2022-12-15 "Linux man-pages 6.03"
+.TH semctl 2 2023-03-30 "Linux man-pages 6.05.01"
.SH NAME
semctl \- System V semaphore control operations
.SH LIBRARY
@@ -503,10 +503,7 @@ and the value to which
is to be set (for some semaphore of the set) is less than 0
or greater than the implementation limit
.BR SEMVMX .
-.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, SVr4.
-.\" SVr4 documents more error conditions EINVAL and EOVERFLOW.
-.PP
+.SH VERSIONS
POSIX.1 specifies the
.\" POSIX.1-2001, POSIX.1-2008
.I sem_nsems
@@ -518,54 +515,6 @@ and the field is so defined on most other systems.
It was also so defined on Linux 2.2 and earlier,
but, since Linux 2.4, the field has the type
.IR "unsigned\ long" .
-.SH NOTES
-The
-.BR IPC_INFO ,
-.BR SEM_STAT ,
-and
-.B SEM_INFO
-operations are used by the
-.BR ipcs (1)
-program to provide information on allocated resources.
-In the future these may modified or moved to a
-.I /proc
-filesystem interface.
-.PP
-Various fields in a \fIstruct semid_ds\fP were typed as
-.I short
-under Linux 2.2
-and have become
-.I long
-under Linux 2.4.
-To take advantage of this,
-a recompilation under glibc-2.1.91 or later should suffice.
-(The kernel distinguishes old and new calls by an
-.B IPC_64
-flag in
-.IR cmd .)
-.PP
-In some earlier versions of glibc, the
-.I semun
-union was defined in \fI<sys/sem.h>\fP, but POSIX.1 requires
-.\" POSIX.1-2001, POSIX.1-2008
-that the caller define this union.
-On versions of glibc where this union is \fInot\fP defined,
-the macro
-.B _SEM_SEMUN_UNDEFINED
-is defined in \fI<sys/sem.h>\fP.
-.PP
-The following system limit on semaphore sets affects a
-.BR semctl ()
-call:
-.TP
-.B SEMVMX
-Maximum value for
-.BR semval :
-implementation dependent (32767).
-.PP
-For greater portability, it is best to always call
-.BR semctl ()
-with four arguments.
.\"
.SS The sempid value
POSIX.1 defines
@@ -609,6 +558,59 @@ operations.
This was rectified
.\" commit a5f4db877177d2a3d7ae62a7bac3a5a27e083d7f
in Linux 4.6.
+.SH STANDARDS
+POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001, SVr4.
+.\" SVr4 documents more error conditions EINVAL and EOVERFLOW.
+.PP
+Various fields in a \fIstruct semid_ds\fP were typed as
+.I short
+under Linux 2.2
+and have become
+.I long
+under Linux 2.4.
+To take advantage of this,
+a recompilation under glibc-2.1.91 or later should suffice.
+(The kernel distinguishes old and new calls by an
+.B IPC_64
+flag in
+.IR cmd .)
+.PP
+In some earlier versions of glibc, the
+.I semun
+union was defined in \fI<sys/sem.h>\fP, but POSIX.1 requires
+.\" POSIX.1-2001, POSIX.1-2008
+that the caller define this union.
+On versions of glibc where this union is \fInot\fP defined,
+the macro
+.B _SEM_SEMUN_UNDEFINED
+is defined in \fI<sys/sem.h>\fP.
+.SH NOTES
+The
+.BR IPC_INFO ,
+.BR SEM_STAT ,
+and
+.B SEM_INFO
+operations are used by the
+.BR ipcs (1)
+program to provide information on allocated resources.
+In the future these may modified or moved to a
+.I /proc
+filesystem interface.
+.PP
+The following system limit on semaphore sets affects a
+.BR semctl ()
+call:
+.TP
+.B SEMVMX
+Maximum value for
+.BR semval :
+implementation dependent (32767).
+.PP
+For greater portability, it is best to always call
+.BR semctl ()
+with four arguments.
.SH EXAMPLES
See
.BR shmop (2).
diff --git a/man2/semget.2 b/man2/semget.2
index deb82a06b..bd2b69335 100644
--- a/man2/semget.2
+++ b/man2/semget.2
@@ -14,7 +14,7 @@
.\" Rewrote BUGS note about semget()'s failure to initialize
.\" semaphore values
.\"
-.TH semget 2 2023-02-05 "Linux man-pages 6.03"
+.TH semget 2 2023-05-03 "Linux man-pages 6.05.01"
.SH NAME
semget \- get a System V semaphore set identifier
.SH LIBRARY
@@ -197,6 +197,8 @@ or the system wide maximum number of semaphores
.RB ( SEMMNS ),
would be exceeded.
.SH STANDARDS
+POSIX.1-2008.
+.SH HISTORY
SVr4, POSIX.1-2001.
.\" SVr4 documents additional error conditions EFBIG, E2BIG, EAGAIN,
.\" ERANGE, EFAULT.
@@ -322,7 +324,7 @@ ID = 9
$ \fB./t_semget \-c mykey2 p 2\fP
ID = 10
$ \fBipcs \-s\fP
-
+\&
\-\-\-\-\-\- Semaphore Arrays \-\-\-\-\-\-\-\-
key semid owner perms nsems
0x7004136d 9 mtk 600 1
@@ -366,7 +368,7 @@ ID = 9
.\" SRC BEGIN (t_semget.c)
.EX
/* t_semget.c
-
+\&
Licensed under GNU General Public License v2 or later.
*/
#include <stdio.h>
@@ -374,7 +376,7 @@ ID = 9
#include <sys/ipc.h>
#include <sys/sem.h>
#include <unistd.h>
-
+\&
static void
usage(const char *pname)
{
@@ -384,13 +386,13 @@ usage(const char *pname)
fprintf(stderr, " \-x Use IPC_EXCL flag\en");
exit(EXIT_FAILURE);
}
-
+\&
int
main(int argc, char *argv[])
{
int semid, nsems, flags, opt;
key_t key;
-
+\&
flags = 0;
while ((opt = getopt(argc, argv, "cx")) != \-1) {
switch (opt) {
@@ -399,26 +401,26 @@ main(int argc, char *argv[])
default: usage(argv[0]);
}
}
-
+\&
if (argc != optind + 3)
usage(argv[0]);
-
+\&
key = ftok(argv[optind], argv[optind + 1][0]);
if (key == \-1) {
perror("ftok");
exit(EXIT_FAILURE);
}
-
+\&
nsems = atoi(argv[optind + 2]);
-
+\&
semid = semget(key, nsems, flags | 0600);
if (semid == \-1) {
perror("semget");
exit(EXIT_FAILURE);
}
-
+\&
printf("ID = %d\en", semid);
-
+\&
exit(EXIT_SUCCESS);
}
.EE
diff --git a/man2/semop.2 b/man2/semop.2
index eb76690fe..ece7a0e52 100644
--- a/man2/semop.2
+++ b/man2/semop.2
@@ -12,7 +12,7 @@
.\" 2005-04-08, mtk, Noted kernel version numbers for semtimedop()
.\" 2007-07-09, mtk, Added an EXAMPLE code segment.
.\"
-.TH semop 2 2023-02-05 "Linux man-pages 6.03"
+.TH semop 2 2023-05-03 "Linux man-pages 6.05.01"
.SH NAME
semop, semtimedop \- System V semaphore operations
.SH LIBRARY
@@ -355,15 +355,12 @@ is greater than
.BR SEMVMX ,
the implementation dependent maximum value for
.IR semval .
-.SH VERSIONS
-.BR semtimedop ()
-first appeared in Linux 2.5.52,
-and was subsequently backported into Linux 2.4.22.
-glibc support for
-.BR semtimedop ()
-first appeared in Linux 2.3.3.
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, SVr4.
+POSIX.1-2008.
+.SH VERSIONS
+Linux 2.5.52 (backported into Linux 2.4.22),
+glibc 2.3.3.
+POSIX.1-2001, SVr4.
.\" SVr4 documents additional error conditions EINVAL, EFBIG, ENOSPC.
.SH NOTES
The
@@ -493,17 +490,17 @@ and then increment the semaphore value by one.
.EX
struct sembuf sops[2];
int semid;
-
+\&
/* Code to set \fIsemid\fP omitted */
-
+\&
sops[0].sem_num = 0; /* Operate on semaphore 0 */
sops[0].sem_op = 0; /* Wait for value to equal 0 */
sops[0].sem_flg = 0;
-
+\&
sops[1].sem_num = 0; /* Operate on semaphore 0 */
sops[1].sem_op = 1; /* Increment value by one */
sops[1].sem_flg = 0;
-
+\&
if (semop(semid, sops, 2) == \-1) {
perror("semop");
exit(EXIT_FAILURE);
diff --git a/man2/send.2 b/man2/send.2
index d89f4e2ff..16c58b5eb 100644
--- a/man2/send.2
+++ b/man2/send.2
@@ -9,7 +9,7 @@
.\" Modified Oct 2003 by aeb
.\" Modified 2004-07-01 by mtk
.\"
-.TH send 2 2022-12-04 "Linux man-pages 6.03"
+.TH send 2 2023-03-30 "Linux man-pages 6.05.01"
.SH NAME
send, sendto, sendmsg \- send a message on a socket
.SH LIBRARY
@@ -437,21 +437,7 @@ will also receive a
unless
.B MSG_NOSIGNAL
is set.
-.SH STANDARDS
-4.4BSD, SVr4, POSIX.1-2001.
-These interfaces first appeared in 4.2BSD.
-.PP
-POSIX.1-2001 describes only the
-.B MSG_OOB
-and
-.B MSG_EOR
-flags.
-POSIX.1-2008 adds a specification of
-.BR MSG_NOSIGNAL .
-The
-.B MSG_CONFIRM
-flag is a Linux extension.
-.SH NOTES
+.SH VERSIONS
According to POSIX.1-2001, the
.I msg_controllen
field of the
@@ -470,7 +456,23 @@ but glibc currently types both as
.\" __kernel_size_t type used to type these fields varies
.\" across architectures, but socklen_t is always 32 bits,
.\" as (at least with GCC) is int.
+.SH STANDARDS
+POSIX.1-2008.
+.PP
+.B MSG_CONFIRM
+is a Linux extension.
+.SH HISTORY
+4.4BSD, SVr4, POSIX.1-2001.
+(first appeared in 4.2BSD).
.PP
+POSIX.1-2001 describes only the
+.B MSG_OOB
+and
+.B MSG_EOR
+flags.
+POSIX.1-2008 adds a specification of
+.BR MSG_NOSIGNAL .
+.SH NOTES
See
.BR sendmmsg (2)
for information about a Linux-specific system call
diff --git a/man2/sendfile.2 b/man2/sendfile.2
index 0afde967e..d9c345127 100644
--- a/man2/sendfile.2
+++ b/man2/sendfile.2
@@ -1,11 +1,6 @@
-.\" This man page is Copyright (C) 1998 Pawel Krawczyk.
+.\" SPDX-License-Identifier: Linux-man-pages-1-para
.\"
-.\" %%%LICENSE_START(VERBATIM_ONE_PARA)
-.\" Permission is granted to distribute possibly modified copies
-.\" of this page provided the header is included verbatim,
-.\" and in case of nontrivial modification author and date
-.\" of the modification is added to the header.
-.\" %%%LICENSE_END
+.\" This man page is Copyright (C) 1998 Pawel Krawczyk.
.\"
.\" $Id: sendfile.2,v 1.5 1999/05/18 11:54:11 freitag Exp $
.\" 2000-11-19 bert hubert <ahu@ds9a.nl>: in_fd cannot be socket
@@ -16,7 +11,7 @@
.\"
.\" 2005-03-31 Martin Pool <mbp@sourcefrog.net> mmap() improvements
.\"
-.TH sendfile 2 2022-12-04 "Linux man-pages 6.03"
+.TH sendfile 2 2023-07-15 "Linux man-pages 6.05.01"
.SH NAME
sendfile \- transfer data between file descriptors
.SH LIBRARY
@@ -165,34 +160,15 @@ the input file or the output file.
.I offset
is not NULL but the input file is not seekable.
.SH VERSIONS
-.BR sendfile ()
-first appeared in Linux 2.2.
-The include file
-.I <sys/sendfile.h>
-is present since glibc 2.1.
-.SH STANDARDS
-Not specified in POSIX.1-2001, nor in other standards.
-.PP
Other UNIX systems implement
.BR sendfile ()
with different semantics and prototypes.
It should not be used in portable programs.
-.SH NOTES
-.BR sendfile ()
-will transfer at most 0x7ffff000 (2,147,479,552) bytes,
-returning the number of bytes actually transferred.
-.\" commit e28cc71572da38a5a12c1cfe4d7032017adccf69
-(This is true on both 32-bit and 64-bit systems.)
-.PP
-If you plan to use
-.BR sendfile ()
-for sending files to a TCP socket, but need
-to send some header data in front of the file contents, you will find
-it useful to employ the
-.B TCP_CORK
-option, described in
-.BR tcp (7),
-to minimize the number of packets and to tune performance.
+.SH STANDARDS
+None.
+.SH HISTORY
+Linux 2.2,
+glibc 2.1.
.PP
In Linux 2.4 and earlier,
.I out_fd
@@ -211,6 +187,22 @@ argument.
The glibc
.BR sendfile ()
wrapper function transparently deals with the kernel differences.
+.SH NOTES
+.BR sendfile ()
+will transfer at most 0x7ffff000 (2,147,479,552) bytes,
+returning the number of bytes actually transferred.
+.\" commit e28cc71572da38a5a12c1cfe4d7032017adccf69
+(This is true on both 32-bit and 64-bit systems.)
+.PP
+If you plan to use
+.BR sendfile ()
+for sending files to a TCP socket, but need
+to send some header data in front of the file contents, you will find
+it useful to employ the
+.B TCP_CORK
+option, described in
+.BR tcp (7),
+to minimize the number of packets and to tune performance.
.PP
Applications may wish to fall back to
.BR read (2)
diff --git a/man2/sendmmsg.2 b/man2/sendmmsg.2
index da2c19cf0..283c4a52b 100644
--- a/man2/sendmmsg.2
+++ b/man2/sendmmsg.2
@@ -5,7 +5,7 @@
.\"
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
-.TH sendmmsg 2 2022-12-04 "Linux man-pages 6.03"
+.TH sendmmsg 2 2023-05-03 "Linux man-pages 6.05.01"
.SH NAME
sendmmsg \- send multiple messages on a socket
.SH LIBRARY
@@ -126,14 +126,11 @@ See also BUGS.
.\"
.\" This matches the behavior of other syscalls like read/write - it
.\" is not an error if less than the requested number of elements are sent.
-.SH VERSIONS
-The
-.BR sendmmsg ()
-system call was added in Linux 3.0.
-Support in glibc was added in Linux 2.14.
.SH STANDARDS
-.BR sendmmsg ()
-is Linux-specific.
+Linux.
+.SH HISTORY
+Linux 3.0,
+glibc 2.14.
.SH NOTES
The value specified in
.I vlen
@@ -177,7 +174,7 @@ The contents of the first datagram originates from a pair of buffers.
#include <string.h>
#include <sys/socket.h>
#include <sys/types.h>
-
+\&
int
main(void)
{
@@ -186,13 +183,13 @@ main(void)
struct iovec msg1[2], msg2;
struct mmsghdr msg[2];
struct sockaddr_in addr;
-
+\&
sockfd = socket(AF_INET, SOCK_DGRAM, 0);
if (sockfd == \-1) {
perror("socket()");
exit(EXIT_FAILURE);
}
-
+\&
addr.sin_family = AF_INET;
addr.sin_addr.s_addr = htonl(INADDR_LOOPBACK);
addr.sin_port = htons(1234);
@@ -200,30 +197,30 @@ main(void)
perror("connect()");
exit(EXIT_FAILURE);
}
-
+\&
memset(msg1, 0, sizeof(msg1));
msg1[0].iov_base = "one";
msg1[0].iov_len = 3;
msg1[1].iov_base = "two";
msg1[1].iov_len = 3;
-
+\&
memset(&msg2, 0, sizeof(msg2));
msg2.iov_base = "three";
msg2.iov_len = 5;
-
+\&
memset(msg, 0, sizeof(msg));
msg[0].msg_hdr.msg_iov = msg1;
msg[0].msg_hdr.msg_iovlen = 2;
-
+\&
msg[1].msg_hdr.msg_iov = &msg2;
msg[1].msg_hdr.msg_iovlen = 1;
-
+\&
retval = sendmmsg(sockfd, msg, 2, 0);
if (retval == \-1)
perror("sendmmsg()");
else
printf("%d messages sent\en", retval);
-
+\&
exit(0);
}
.EE
diff --git a/man2/set_mempolicy.2 b/man2/set_mempolicy.2
index a65db9bbe..a7f561d96 100644
--- a/man2/set_mempolicy.2
+++ b/man2/set_mempolicy.2
@@ -1,30 +1,13 @@
+.\" SPDX-License-Identifier: Linux-man-pages-copyleft-var
+.\"
.\" Copyright 2003,2004 Andi Kleen, SuSE Labs.
.\" and Copyright 2007 Lee Schermerhorn, Hewlett Packard
.\"
-.\" %%%LICENSE_START(VERBATIM_PROF)
-.\" Permission is granted to make and distribute verbatim copies of this
-.\" manual provided the copyright notice and this permission notice are
-.\" preserved on all copies.
-.\"
-.\" Permission is granted to copy and distribute modified versions of this
-.\" manual under the conditions for verbatim copying, provided that the
-.\" entire resulting derived work is distributed under the terms of a
-.\" permission notice identical to this one.
-.\"
-.\" Since the Linux kernel and libraries are constantly changing, this
-.\" manual page may be incorrect or out-of-date. The author(s) assume no
-.\" responsibility for errors or omissions, or for damages resulting from
-.\" the use of the information contained herein.
-.\"
-.\" Formatted or processed versions of this manual, if unaccompanied by
-.\" the source, must acknowledge the copyright and authors of this work.
-.\" %%%LICENSE_END
-.\"
.\" 2006-02-03, mtk, substantial wording changes and other improvements
.\" 2007-08-27, Lee Schermerhorn <Lee.Schermerhorn@hp.com>
.\" more precise specification of behavior.
.\"
-.TH set_mempolicy 2 2023-02-05 "Linux man-pages 6.03"
+.TH set_mempolicy 2 2023-07-16 "Linux man-pages 6.05.01"
.SH NAME
set_mempolicy \- set default NUMA memory policy for a thread and its children
.SH LIBRARY
@@ -319,12 +302,10 @@ other than
.TP
.B ENOMEM
Insufficient kernel memory was available.
-.SH VERSIONS
-The
-.BR set_mempolicy ()
-system call was added in Linux 2.6.7.
.SH STANDARDS
-This system call is Linux-specific.
+Linux.
+.SH HISTORY
+Linux 2.6.7.
.SH NOTES
Memory policy is not remembered if the page is swapped out.
When such a page is paged back in, it will use the policy of
diff --git a/man2/set_thread_area.2 b/man2/set_thread_area.2
index 99038f351..b98211237 100644
--- a/man2/set_thread_area.2
+++ b/man2/set_thread_area.2
@@ -4,7 +4,7 @@
.\"
.\" SPDX-License-Identifier: GPL-1.0-or-later
.\"
-.TH set_thread_area 2 2022-10-30 "Linux man-pages 6.03"
+.TH set_thread_area 2 2023-03-30 "Linux man-pages 6.05.01"
.SH NAME
get_thread_area, set_thread_area \- manipulate thread-local storage information
.SH LIBRARY
@@ -164,17 +164,15 @@ was invoked as a 64-bit system call.
.B ESRCH
.RB ( set_thread_area ())
A free TLS entry could not be located.
-.SH VERSIONS
-.BR set_thread_area ()
-first appeared in Linux 2.5.29.
-.BR get_thread_area ()
-first appeared in Linux 2.5.32.
.SH STANDARDS
+Linux.
+.SH HISTORY
+.TP
.BR set_thread_area ()
-and
+Linux 2.5.29.
+.TP
.BR get_thread_area ()
-are Linux-specific and should not be used in programs that are intended
-to be portable.
+Linux 2.5.32.
.SH NOTES
These system calls are generally intended for use only by threading libraries.
.PP
diff --git a/man2/set_tid_address.2 b/man2/set_tid_address.2
index bd2d6e043..180b90925 100644
--- a/man2/set_tid_address.2
+++ b/man2/set_tid_address.2
@@ -2,7 +2,7 @@
.\"
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
-.TH set_tid_address 2 2022-10-30 "Linux man-pages 6.03"
+.TH set_tid_address 2 2023-03-30 "Linux man-pages 6.05.01"
.SH NAME
set_tid_address \- set pointer to thread ID
.SH LIBRARY
@@ -85,11 +85,12 @@ always returns the caller's thread ID.
.SH ERRORS
.BR set_tid_address ()
always succeeds.
-.SH VERSIONS
-This call is present since Linux 2.5.48.
-Details as given here are valid since Linux 2.5.49.
.SH STANDARDS
-This system call is Linux-specific.
+Linux.
+.SH HISTORY
+Linux 2.5.48.
+.PP
+Details as given here are valid since Linux 2.5.49.
.SH SEE ALSO
.BR clone (2),
.BR futex (2),
diff --git a/man2/seteuid.2 b/man2/seteuid.2
index f7b182577..0c47f6af6 100644
--- a/man2/seteuid.2
+++ b/man2/seteuid.2
@@ -6,7 +6,7 @@
.\" Modified, 27 May 2004, Michael Kerrisk <mtk.manpages@gmail.com>
.\" Added notes on capability requirements
.\"
-.TH seteuid 2 2023-02-05 "Linux man-pages 6.03"
+.TH seteuid 2 2023-03-30 "Linux man-pages 6.05.01"
.SH NAME
seteuid, setegid \- set effective user or group ID
.SH LIBRARY
@@ -80,9 +80,7 @@ capability in its user namespace) and
.I egid
does not match the current real group ID, current effective group ID,
or current saved set-group-ID.
-.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, 4.3BSD.
-.SH NOTES
+.SH VERSIONS
Setting the effective user (group) ID to the
saved set-user-ID (saved set-group-ID) is
possible since Linux 1.1.37 (1.1.38).
@@ -122,6 +120,10 @@ are implemented as library functions that call, respectively,
.BR setreuid (2)
and
.BR setregid (2).
+.SH STANDARDS
+POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001, 4.3BSD.
.SH SEE ALSO
.BR geteuid (2),
.BR setresuid (2),
diff --git a/man2/setfsgid.2 b/man2/setfsgid.2
index 664ed3814..43b5507b4 100644
--- a/man2/setfsgid.2
+++ b/man2/setfsgid.2
@@ -9,7 +9,7 @@
.\" Modified, 27 May 2004, Michael Kerrisk <mtk.manpages@gmail.com>
.\" Added notes on capability requirements
.\"
-.TH setfsgid 2 2022-12-04 "Linux man-pages 6.03"
+.TH setfsgid 2 2023-03-30 "Linux man-pages 6.05.01"
.SH NAME
setfsgid \- set group identity used for filesystem checks
.SH LIBRARY
@@ -19,7 +19,7 @@ Standard C library
.nf
.B #include <sys/fsuid.h>
.PP
-.BI "int setfsgid(gid_t " fsgid );
+.BI "[[deprecated]] int setfsgid(gid_t " fsgid );
.fi
.SH DESCRIPTION
On Linux, a process has both a filesystem group ID and an effective group ID.
@@ -48,14 +48,21 @@ saved set-group-ID, or current the filesystem user ID.
.SH RETURN VALUE
On both success and failure,
this call returns the previous filesystem group ID of the caller.
-.SH VERSIONS
-This system call is present since Linux 1.2.
-.\" This system call is present since Linux 1.1.44
-.\" and in libc since libc 4.7.6.
.SH STANDARDS
-.BR setfsgid ()
-is Linux-specific and should not be used in programs intended
-to be portable.
+Linux.
+.SH HISTORY
+Linux 1.2.
+.\" Linux 1.1.44
+.\" and in libc since libc 4.7.6.
+.SS C library/kernel differences
+In glibc 2.15 and earlier,
+when the wrapper for this system call determines that the argument can't be
+passed to the kernel without integer truncation (because the kernel
+is old and does not support 32-bit group IDs),
+it will return \-1 and set \fIerrno\fP to
+.B EINVAL
+without attempting
+the system call.
.SH NOTES
The filesystem group ID concept and the
.BR setfsgid ()
@@ -78,15 +85,6 @@ supporting 32-bit IDs.
The glibc
.BR setfsgid ()
wrapper function transparently deals with the variation across kernel versions.
-.SS C library/kernel differences
-In glibc 2.15 and earlier,
-when the wrapper for this system call determines that the argument can't be
-passed to the kernel without integer truncation (because the kernel
-is old and does not support 32-bit group IDs),
-it will return \-1 and set \fIerrno\fP to
-.B EINVAL
-without attempting
-the system call.
.SH BUGS
No error indications of any kind are returned to the caller,
and the fact that both successful and unsuccessful calls return
diff --git a/man2/setfsuid.2 b/man2/setfsuid.2
index 588d89e80..56964b08c 100644
--- a/man2/setfsuid.2
+++ b/man2/setfsuid.2
@@ -9,7 +9,7 @@
.\" Modified, 27 May 2004, Michael Kerrisk <mtk.manpages@gmail.com>
.\" Added notes on capability requirements
.\"
-.TH setfsuid 2 2022-12-04 "Linux man-pages 6.03"
+.TH setfsuid 2 2023-03-30 "Linux man-pages 6.05.01"
.SH NAME
setfsuid \- set user identity used for filesystem checks
.SH LIBRARY
@@ -19,7 +19,7 @@ Standard C library
.nf
.B #include <sys/fsuid.h>
.PP
-.BI "int setfsuid(uid_t " fsuid );
+.BI "[[deprecated]] int setfsuid(uid_t " fsuid );
.fi
.SH DESCRIPTION
On Linux, a process has both a filesystem user ID and an effective user ID.
@@ -59,15 +59,13 @@ saved set-user-ID, or current filesystem user ID.
.SH RETURN VALUE
On both success and failure,
this call returns the previous filesystem user ID of the caller.
-.SH VERSIONS
-This system call is present since Linux 1.2.
-.\" This system call is present since Linux 1.1.44
-.\" and in libc since libc 4.7.6.
.SH STANDARDS
-.BR setfsuid ()
-is Linux-specific and should not be used in programs intended
-to be portable.
-.SH NOTES
+Linux.
+.SH HISTORY
+Linux 1.2.
+.\" Linux 1.1.44
+.\" and in libc since libc 4.7.6.
+.PP
At the time when this system call was introduced, one process
could send a signal to another process with the same effective user ID.
This meant that if a privileged process changed its effective user ID
diff --git a/man2/setgid.2 b/man2/setgid.2
index 4a2003707..f61888762 100644
--- a/man2/setgid.2
+++ b/man2/setgid.2
@@ -7,7 +7,7 @@
.\" Modified 1997-01-31 by Eric S. Raymond <esr@thyrsus.com>
.\" Modified 2002-03-09 by aeb
.\"
-.TH setgid 2 2022-10-30 "Linux man-pages 6.03"
+.TH setgid 2 2023-03-30 "Linux man-pages 6.05.01"
.SH NAME
setgid \- set group identity
.SH LIBRARY
@@ -54,19 +54,7 @@ The calling process is not privileged (does not have the
.I gid
does not match the real group ID or saved set-group-ID of
the calling process.
-.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, SVr4.
-.SH NOTES
-The original Linux
-.BR setgid ()
-system call supported only 16-bit group IDs.
-Subsequently, Linux 2.4 added
-.BR setgid32 ()
-supporting 32-bit IDs.
-The glibc
-.BR setgid ()
-wrapper function transparently deals with the variation across kernel versions.
-.\"
+.SH VERSIONS
.SS C library/kernel differences
At the kernel level, user IDs and group IDs are a per-thread attribute.
However, POSIX requires that all threads in a process
@@ -81,6 +69,20 @@ that when one thread changes credentials,
all of the other threads in the process also change their credentials.
For details, see
.BR nptl (7).
+.SH STANDARDS
+POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001, SVr4.
+.PP
+The original Linux
+.BR setgid ()
+system call supported only 16-bit group IDs.
+Subsequently, Linux 2.4 added
+.BR setgid32 ()
+supporting 32-bit IDs.
+The glibc
+.BR setgid ()
+wrapper function transparently deals with the variation across kernel versions.
.SH SEE ALSO
.BR getgid (2),
.BR setegid (2),
diff --git a/man2/setns.2 b/man2/setns.2
index 54d7597d8..13565de4a 100644
--- a/man2/setns.2
+++ b/man2/setns.2
@@ -3,7 +3,7 @@
.\"
.\" SPDX-License-Identifier: GPL-2.0-only
.\"
-.TH setns 2 2023-02-05 "Linux man-pages 6.03"
+.TH setns 2 2023-05-03 "Linux man-pages 6.05.01"
.SH NAME
setns \- reassociate thread with a namespace
.SH LIBRARY
@@ -35,7 +35,7 @@ The
.I nstype
argument is interpreted differently in each case.
.\"
-.SS fd refers to a /proc/[pid]/ns/ link
+.SS fd refers to a \fI/proc/\fPpid\fI/ns/\fP link
If
.I fd
refers to a
@@ -302,15 +302,11 @@ for this operation.
.I fd
is a PID file descriptor but the process it refers to no longer exists
(i.e., it has terminated and been waited on).
-.SH VERSIONS
-The
-.BR setns ()
-system call first appeared in Linux 3.0;
-library support was added in glibc 2.14.
.SH STANDARDS
-The
-.BR setns ()
-system call is Linux-specific.
+Linux.
+.SH VERSIONS
+Linux 3.0,
+glibc 2.14.
.SH NOTES
For further information on the
.IR /proc/ pid /ns/
@@ -386,28 +382,28 @@ bizarro
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
-
+\&
int
main(int argc, char *argv[])
{
int fd;
-
+\&
if (argc < 3) {
fprintf(stderr, "%s /proc/PID/ns/FILE cmd args...\en", argv[0]);
exit(EXIT_FAILURE);
}
-
+\&
/* Get file descriptor for namespace; the file descriptor is opened
with O_CLOEXEC so as to ensure that it is not inherited by the
program that is later executed. */
-
+\&
fd = open(argv[1], O_RDONLY | O_CLOEXEC);
if (fd == \-1)
err(EXIT_FAILURE, "open");
-
+\&
if (setns(fd, 0) == \-1) /* Join that namespace */
err(EXIT_FAILURE, "setns");
-
+\&
execvp(argv[2], &argv[2]); /* Execute a command in namespace */
err(EXIT_FAILURE, "execvp");
}
diff --git a/man2/setpgid.2 b/man2/setpgid.2
index bef612c56..2d8bc965e 100644
--- a/man2/setpgid.2
+++ b/man2/setpgid.2
@@ -17,7 +17,7 @@
.\" 2007-07-25, mtk, fairly substantial rewrites and rearrangements
.\" of text.
.\"
-.TH setpgid 2 2023-02-05 "Linux man-pages 6.03"
+.TH setpgid 2 2023-03-30 "Linux man-pages 6.05.01"
.SH NAME
setpgid, getpgid, setpgrp, getpgrp \- set/get process group
.SH LIBRARY
@@ -214,6 +214,11 @@ a session leader
.RB ( setpgid (),
.BR setpgrp ()).
.TP
+.B EPERM
+The target process group does not exist.
+.RB ( setpgid (),
+.BR setpgrp ()).
+.TP
.B ESRCH
For
.BR getpgid ():
@@ -224,27 +229,37 @@ For
.I pid
is not the calling process and not a child of the calling process.
.SH STANDARDS
+.TP
+.BR getpgid ()
+.TQ
.BR setpgid ()
-and the version of
-.BR getpgrp ()
-with no arguments
-conform to POSIX.1-2001.
-.PP
-POSIX.1-2001 also specifies
+.TQ
+.BR getpgrp "() (no args)"
+.TQ
+.BR setpgrp "() (no args)"
+POSIX.1-2008 (but see HISTORY).
+.TP
+.BR setpgrp "() (2 args)"
+.TQ
+.BR getpgrp "() (1 arg)"
+None.
+.SH HISTORY
+.TP
.BR getpgid ()
-and the version of
-.BR setpgrp ()
-that takes no arguments.
-(POSIX.1-2008 marks this
-.BR setpgrp ()
-specification as obsolete.)
-.PP
-The version of
-.BR getpgrp ()
-with one argument and the version of
-.BR setpgrp ()
-that takes two arguments derive from 4.2BSD,
-and are not specified by POSIX.1.
+.TQ
+.BR setpgid ()
+.TQ
+.BR getpgrp "() (no args)"
+POSIX.1-2001.
+.TP
+.BR setpgrp "() (no args)"
+POSIX.1-2001.
+POSIX.1-2008 marks it as obsolete.
+.TP
+.BR setpgrp "() (2 args)"
+.TQ
+.BR getpgrp "() (1 arg)"
+4.2BSD.
.SH NOTES
A child created via
.BR fork (2)
diff --git a/man2/setresuid.2 b/man2/setresuid.2
index 19542bc93..97f0af938 100644
--- a/man2/setresuid.2
+++ b/man2/setresuid.2
@@ -4,7 +4,7 @@
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
.\" Modified, 2003-05-26, Michael Kerrisk, <mtk.manpages@gmail.com>
-.TH setresuid 2 2022-12-04 "Linux man-pages 6.03"
+.TH setresuid 2 2023-03-30 "Linux man-pages 6.05.01"
.SH NAME
setresuid, setresgid \- set real, effective, and saved user or group ID
.SH LIBRARY
@@ -97,14 +97,28 @@ for
it is
.BR CAP_SETGID .
.SH VERSIONS
-These calls are available under Linux since Linux 2.1.44.
+.SS C library/kernel differences
+At the kernel level, user IDs and group IDs are a per-thread attribute.
+However, POSIX requires that all threads in a process
+share the same credentials.
+The NPTL threading implementation handles the POSIX requirements by
+providing wrapper functions for
+the various system calls that change process UIDs and GIDs.
+These wrapper functions (including those for
+.BR setresuid ()
+and
+.BR setresgid ())
+employ a signal-based technique to ensure
+that when one thread changes credentials,
+all of the other threads in the process also change their credentials.
+For details, see
+.BR nptl (7).
.SH STANDARDS
-These calls are nonstandard;
-they also appear on HP-UX and some of the BSDs.
-.SH NOTES
-Under HP-UX and FreeBSD, the prototype is found in
-.IR <unistd.h> .
-Under Linux, the prototype is provided since glibc 2.3.2.
+None.
+.SH HISTORY
+Linux 2.1.44,
+glibc 2.3.2.
+HP-UX, FreeBSD.
.PP
The original Linux
.BR setresuid ()
@@ -121,23 +135,6 @@ The glibc
and
.BR setresgid ()
wrapper functions transparently deal with the variations across kernel versions.
-.\"
-.SS C library/kernel differences
-At the kernel level, user IDs and group IDs are a per-thread attribute.
-However, POSIX requires that all threads in a process
-share the same credentials.
-The NPTL threading implementation handles the POSIX requirements by
-providing wrapper functions for
-the various system calls that change process UIDs and GIDs.
-These wrapper functions (including those for
-.BR setresuid ()
-and
-.BR setresgid ())
-employ a signal-based technique to ensure
-that when one thread changes credentials,
-all of the other threads in the process also change their credentials.
-For details, see
-.BR nptl (7).
.SH SEE ALSO
.BR getresuid (2),
.BR getuid (2),
diff --git a/man2/setreuid.2 b/man2/setreuid.2
index e9a47f6c4..121deb4f8 100644
--- a/man2/setreuid.2
+++ b/man2/setreuid.2
@@ -15,7 +15,7 @@
.\" 2004-07-04 by aeb
.\" 2004-05-27 by Michael Kerrisk
.\"
-.TH setreuid 2 2023-02-05 "Linux man-pages 6.03"
+.TH setreuid 2 2023-03-30 "Linux man-pages 6.05.01"
.SH NAME
setreuid, setregid \- set real and/or effective user or group ID
.SH LIBRARY
@@ -120,17 +120,7 @@ swapping the effective user (group) ID with the real user (group) ID,
or (ii) setting one to the value of the other or (iii) setting the
effective user (group) ID to the value of the
saved set-user-ID (saved set-group-ID) was specified.
-.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, 4.3BSD
-.RB ( setreuid ()
-and
-.BR setregid ()
-first appeared in 4.2BSD).
-.SH NOTES
-Setting the effective user (group) ID to the
-saved set-user-ID (saved set-group-ID) is
-possible since Linux 1.1.37 (1.1.38).
-.PP
+.SH VERSIONS
POSIX.1 does not specify all of the UID changes that Linux permits
for an unprivileged process.
For
@@ -150,6 +140,14 @@ across implementations.
.PP
POSIX.1 makes no specification about the effect of these calls
on the saved set-user-ID and saved set-group-ID.
+.SH STANDARDS
+POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001, 4.3BSD (first appeared in 4.2BSD).
+.PP
+Setting the effective user (group) ID to the
+saved set-user-ID (saved set-group-ID) is
+possible since Linux 1.1.37 (1.1.38).
.PP
The original Linux
.BR setreuid ()
diff --git a/man2/setsid.2 b/man2/setsid.2
index d454c72a8..ae0402823 100644
--- a/man2/setsid.2
+++ b/man2/setsid.2
@@ -9,7 +9,7 @@
.\" tiny changes from a man page by Charles Livingston).
.\" Modified Sun Jul 21 14:45:46 1996 <aeb@cwi.nl>
.\"
-.TH setsid 2 2022-10-30 "Linux man-pages 6.03"
+.TH setsid 2 2023-03-30 "Linux man-pages 6.05.01"
.SH NAME
setsid \- creates a session and sets the process group ID
.SH LIBRARY
@@ -52,7 +52,9 @@ Thus, in particular,
.BR setsid ()
fails if the calling process is already a process group leader.
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, SVr4.
+POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001, SVr4.
.SH NOTES
A child created via
.BR fork (2)
diff --git a/man2/setuid.2 b/man2/setuid.2
index 9e416b932..80284d6e5 100644
--- a/man2/setuid.2
+++ b/man2/setuid.2
@@ -8,7 +8,7 @@
.\" <richard@greenend.org.uk>, aeb 970616.
.\" Modified, 27 May 2004, Michael Kerrisk <mtk.manpages@gmail.com>
.\" Added notes on capability requirements
-.TH setuid 2 2022-10-30 "Linux man-pages 6.03"
+.TH setuid 2 2023-03-30 "Linux man-pages 6.05.01"
.SH NAME
setuid \- set user identity
.SH LIBRARY
@@ -100,11 +100,39 @@ The user is not privileged (Linux: does not have the
capability in its user namespace) and
.I uid
does not match the real UID or saved set-user-ID of the calling process.
+.SH VERSIONS
+.SS C library/kernel differences
+At the kernel level, user IDs and group IDs are a per-thread attribute.
+However, POSIX requires that all threads in a process
+share the same credentials.
+The NPTL threading implementation handles the POSIX requirements by
+providing wrapper functions for
+the various system calls that change process UIDs and GIDs.
+These wrapper functions (including the one for
+.BR setuid ())
+employ a signal-based technique to ensure
+that when one thread changes credentials,
+all of the other threads in the process also change their credentials.
+For details, see
+.BR nptl (7).
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, SVr4.
+POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001, SVr4.
+.PP
Not quite compatible with the 4.4BSD call, which
sets all of the real, saved, and effective user IDs.
.\" SVr4 documents an additional EINVAL error condition.
+.PP
+The original Linux
+.BR setuid ()
+system call supported only 16-bit user IDs.
+Subsequently, Linux 2.4 added
+.BR setuid32 ()
+supporting 32-bit IDs.
+The glibc
+.BR setuid ()
+wrapper function transparently deals with the variation across kernel versions.
.SH NOTES
Linux has the concept of the filesystem user ID, normally equal to the
effective user ID.
@@ -118,31 +146,6 @@ If
.I uid
is different from the old effective UID, the process will
be forbidden from leaving core dumps.
-.PP
-The original Linux
-.BR setuid ()
-system call supported only 16-bit user IDs.
-Subsequently, Linux 2.4 added
-.BR setuid32 ()
-supporting 32-bit IDs.
-The glibc
-.BR setuid ()
-wrapper function transparently deals with the variation across kernel versions.
-.\"
-.SS C library/kernel differences
-At the kernel level, user IDs and group IDs are a per-thread attribute.
-However, POSIX requires that all threads in a process
-share the same credentials.
-The NPTL threading implementation handles the POSIX requirements by
-providing wrapper functions for
-the various system calls that change process UIDs and GIDs.
-These wrapper functions (including the one for
-.BR setuid ())
-employ a signal-based technique to ensure
-that when one thread changes credentials,
-all of the other threads in the process also change their credentials.
-For details, see
-.BR nptl (7).
.SH SEE ALSO
.BR getuid (2),
.BR seteuid (2),
diff --git a/man2/setup.2 b/man2/setup.2
index 160f5961b..61a600238 100644
--- a/man2/setup.2
+++ b/man2/setup.2
@@ -11,7 +11,7 @@
.\" Modified Wed Nov 6 04:05:28 1996 by Eric S. Raymond <esr@thyrsus.com>
.\" Modified Sat Jan 29 01:08:23 2000 by aeb
.\"
-.TH setup 2 2022-10-30 "Linux man-pages 6.03"
+.TH setup 2 2023-03-30 "Linux man-pages 6.05.01"
.SH NAME
setup \- setup devices and filesystems, mount root filesystem
.SH LIBRARY
@@ -21,7 +21,7 @@ Standard C library
.nf
.B #include <unistd.h>
.PP
-.B int setup(void);
+.B [[deprecated]] int setup(void);
.fi
.SH DESCRIPTION
.BR setup ()
@@ -42,12 +42,11 @@ always returns \-1 for a user process.
.TP
.B EPERM
Always, for a user process.
-.SH VERSIONS
-Since Linux 2.1.121, no such function exists anymore.
.SH STANDARDS
-This function is Linux-specific, and should not be used in programs
-intended to be portable, or indeed in any programs at all.
-.SH NOTES
+Linux.
+.SH VERSIONS
+Removed in Linux 2.1.121.
+.PP
The calling sequence varied: at some times
.BR setup ()
has had a single argument
diff --git a/man2/setxattr.2 b/man2/setxattr.2
index 7331bf5d0..cc2a6b097 100644
--- a/man2/setxattr.2
+++ b/man2/setxattr.2
@@ -3,7 +3,7 @@
.\"
.\" SPDX-License-Identifier: GPL-2.0-or-later
.\"
-.TH setxattr 2 2022-12-04 "Linux man-pages 6.03"
+.TH setxattr 2 2023-07-28 "Linux man-pages 6.05.01"
.SH NAME
setxattr, lsetxattr, fsetxattr \- set an extended attribute value
.SH LIBRARY
@@ -22,8 +22,7 @@ Standard C library
.fi
.SH DESCRIPTION
Extended attributes are
-.IR name :\c
-.I value
+.IR name : value
pairs associated with inodes (files, directories, symbolic links, etc.).
They are extensions to the normal attributes which are associated
with all inodes in the system (i.e., the
@@ -137,11 +136,11 @@ The size of
or
.I value
exceeds a filesystem-specific limit.
-.SH VERSIONS
-These system calls have been available since Linux 2.4;
-glibc support is provided since glibc 2.3.
.SH STANDARDS
-These system calls are Linux-specific.
+Linux.
+.SH HISTORY
+Linux 2.4,
+glibc 2.3.
.\" .SH AUTHORS
.\" Andreas Gruenbacher,
.\" .RI < a.gruenbacher@computer.org >
diff --git a/man2/sgetmask.2 b/man2/sgetmask.2
index 5a6d1079c..d0c99a276 100644
--- a/man2/sgetmask.2
+++ b/man2/sgetmask.2
@@ -2,7 +2,7 @@
.\"
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
-.TH sgetmask 2 2022-10-30 "Linux man-pages 6.03"
+.TH sgetmask 2 2023-03-30 "Linux man-pages 6.05.01"
.SH NAME
sgetmask, ssetmask \- manipulation of signal mask (obsolete)
.SH LIBRARY
@@ -46,15 +46,15 @@ always successfully returns the signal mask.
always succeeds, and returns the previous signal mask.
.SH ERRORS
These system calls always succeed.
-.SH VERSIONS
+.SH STANDARDS
+Linux.
+.SH HISTORY
Since Linux 3.16,
.\" f6187769dae48234f3877df3c4d99294cc2254fa
support for these system calls is optional,
depending on whether the kernel was built with the
.B CONFIG_SGETMASK_SYSCALL
option.
-.SH STANDARDS
-These system calls are Linux-specific.
.SH NOTES
These system calls are unaware of signal numbers greater than 31
(i.e., real-time signals).
diff --git a/man2/shmctl.2 b/man2/shmctl.2
index dfbac19c6..4bfb2c527 100644
--- a/man2/shmctl.2
+++ b/man2/shmctl.2
@@ -24,7 +24,7 @@
.\" 2005-08-02, mtk: Added IPC_INFO, SHM_INFO, SHM_STAT descriptions.
.\" 2018-03-20, dbueso: Added SHM_STAT_ANY description.
.\"
-.TH shmctl 2 2022-12-15 "Linux man-pages 6.03"
+.TH shmctl 2 2023-03-30 "Linux man-pages 6.05.01"
.SH NAME
shmctl \- System V shared memory control
.SH LIBRARY
@@ -441,24 +441,7 @@ capability).
(Since Linux 2.6.9, this error can also occur if the
.B RLIMIT_MEMLOCK
is 0 and the caller is not privileged.)
-.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, SVr4.
-.\" SVr4 documents additional error conditions EINVAL,
-.\" ENOENT, ENOSPC, ENOMEM, EEXIST. Neither SVr4 nor SVID documents
-.\" an EIDRM error condition.
-.SH NOTES
-The
-.BR IPC_INFO ,
-.BR SHM_STAT ,
-and
-.B SHM_INFO
-operations are used by the
-.BR ipcs (1)
-program to provide information on allocated resources.
-In the future, these may modified or moved to a
-.I /proc
-filesystem interface.
-.PP
+.SH VERSIONS
Linux permits a process to attach
.RB ( shmat (2))
a shared memory segment that has already been marked for deletion
@@ -466,6 +449,13 @@ using
.IR shmctl(IPC_RMID) .
This feature is not available on other UNIX implementations;
portable applications should avoid relying on it.
+.SH STANDARDS
+POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001, SVr4.
+.\" SVr4 documents additional error conditions EINVAL,
+.\" ENOENT, ENOSPC, ENOMEM, EEXIST. Neither SVr4 nor SVID documents
+.\" an EIDRM error condition.
.PP
Various fields in a \fIstruct shmid_ds\fP were typed as
.I short
@@ -479,6 +469,18 @@ a recompilation under glibc-2.1.91 or later should suffice.
.B IPC_64
flag in
.IR cmd .)
+.SH NOTES
+The
+.BR IPC_INFO ,
+.BR SHM_STAT ,
+and
+.B SHM_INFO
+operations are used by the
+.BR ipcs (1)
+program to provide information on allocated resources.
+In the future, these may modified or moved to a
+.I /proc
+filesystem interface.
.SH SEE ALSO
.BR mlock (2),
.BR setrlimit (2),
diff --git a/man2/shmget.2 b/man2/shmget.2
index dfb5c8364..074e83e56 100644
--- a/man2/shmget.2
+++ b/man2/shmget.2
@@ -15,7 +15,7 @@
.\" Language and formatting clean-ups
.\" Added notes on /proc files
.\"
-.TH shmget 2 2023-02-10 "Linux man-pages 6.03"
+.TH shmget 2 2023-03-30 "Linux man-pages 6.05.01"
.SH NAME
shmget \- allocates a System V shared memory segment
.SH LIBRARY
@@ -262,13 +262,15 @@ group; see the description of
in
.BR proc (5).
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, SVr4.
-.\" SVr4 documents an additional error condition EEXIST.
+POSIX.1-2008.
.PP
.B SHM_HUGETLB
and
.B SHM_NORESERVE
are Linux extensions.
+.SH HISTORY
+POSIX.1-2001, SVr4.
+.\" SVr4 documents an additional error condition EEXIST.
.SH NOTES
.B IPC_PRIVATE
isn't a flag field but a
diff --git a/man2/shmop.2 b/man2/shmop.2
index 6c1c4c237..09168ec0b 100644
--- a/man2/shmop.2
+++ b/man2/shmop.2
@@ -17,7 +17,7 @@
.\" Changed wording and placement of sentence regarding attachment
.\" of segments marked for destruction
.\"
-.TH SHMOP 2 2023-02-05 "Linux man-pages 6.03"
+.TH SHMOP 2 2023-05-03 "Linux man-pages 6.05.01"
.SH NAME
shmat, shmdt \- System V shared memory operations
.SH LIBRARY
@@ -201,7 +201,9 @@ or,
.I shmaddr
is not aligned on a page boundary.
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, SVr4.
+POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001, SVr4.
.\" SVr4 documents an additional error condition EMFILE.
.PP
In SVID 3 (or perhaps earlier),
@@ -314,7 +316,7 @@ The following header file is included by the "reader" and "writer" programs:
.\" SRC BEGIN (svshm_string.h)
.EX
/* svshm_string.h
-
+\&
Licensed under GNU General Public License v2 or later.
*/
#include <sys/types.h>
@@ -324,10 +326,10 @@ The following header file is included by the "reader" and "writer" programs:
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-
+\&
#define errExit(msg) do { perror(msg); exit(EXIT_FAILURE); \e
} while (0)
-
+\&
union semun { /* Used in calls to semctl() */
int val;
struct semid_ds * buf;
@@ -336,7 +338,7 @@ union semun { /* Used in calls to semctl() */
struct seminfo * __buf;
#endif
};
-
+\&
#define MEM_SIZE 4096
.EE
.\" SRC END
@@ -355,7 +357,7 @@ shared memory segment by the "writer".
.\" SRC BEGIN (svshm_string_read.c)
.EX
/* svshm_string_read.c
-
+\&
Licensed under GNU General Public License v2 or later.
*/
#include <stdio.h>
@@ -363,9 +365,9 @@ shared memory segment by the "writer".
#include <sys/ipc.h>
#include <sys/sem.h>
#include <sys/shm.h>
-
+\&
#include "svshm_string.h"
-
+\&
int
main(void)
{
@@ -373,52 +375,52 @@ main(void)
char *addr;
union semun arg, dummy;
struct sembuf sop;
-
+\&
/* Create shared memory and semaphore set containing one
semaphore. */
-
+\&
shmid = shmget(IPC_PRIVATE, MEM_SIZE, IPC_CREAT | 0600);
if (shmid == \-1)
errExit("shmget");
-
+\&
semid = semget(IPC_PRIVATE, 1, IPC_CREAT | 0600);
if (semid == \-1)
errExit("semget");
-
+\&
/* Attach shared memory into our address space. */
-
+\&
addr = shmat(shmid, NULL, SHM_RDONLY);
if (addr == (void *) \-1)
errExit("shmat");
-
+\&
/* Initialize semaphore 0 in set with value 1. */
-
+\&
arg.val = 1;
if (semctl(semid, 0, SETVAL, arg) == \-1)
errExit("semctl");
-
+\&
printf("shmid = %d; semid = %d\en", shmid, semid);
-
+\&
/* Wait for semaphore value to become 0. */
-
+\&
sop.sem_num = 0;
sop.sem_op = 0;
sop.sem_flg = 0;
-
+\&
if (semop(semid, &sop, 1) == \-1)
errExit("semop");
-
+\&
/* Print the string from shared memory. */
-
+\&
printf("%s\en", addr);
-
+\&
/* Remove shared memory and semaphore set. */
-
+\&
if (shmctl(shmid, IPC_RMID, NULL) == \-1)
errExit("shmctl");
if (semctl(semid, 0, IPC_RMID, dummy) == \-1)
errExit("semctl");
-
+\&
exit(EXIT_SUCCESS);
}
.EE
@@ -437,7 +439,7 @@ and then decrements the semaphore value to 0 in order to inform the
.\" SRC BEGIN (svshm_string_write.c)
.EX
/* svshm_string_write.c
-
+\&
Licensed under GNU General Public License v2 or later.
*/
#include <stdio.h>
@@ -445,9 +447,9 @@ and then decrements the semaphore value to 0 in order to inform the
#include <string.h>
#include <sys/sem.h>
#include <sys/shm.h>
-
+\&
#include "svshm_string.h"
-
+\&
int
main(int argc, char *argv[])
{
@@ -455,41 +457,41 @@ main(int argc, char *argv[])
char *addr;
size_t len;
struct sembuf sop;
-
+\&
if (argc != 4) {
fprintf(stderr, "Usage: %s shmid semid string\en", argv[0]);
exit(EXIT_FAILURE);
}
-
+\&
len = strlen(argv[3]) + 1; /* +1 to include trailing \[aq]\e0\[aq] */
if (len > MEM_SIZE) {
fprintf(stderr, "String is too big!\en");
exit(EXIT_FAILURE);
}
-
+\&
/* Get object IDs from command\-line. */
-
+\&
shmid = atoi(argv[1]);
semid = atoi(argv[2]);
-
+\&
/* Attach shared memory into our address space and copy string
(including trailing null byte) into memory. */
-
+\&
addr = shmat(shmid, NULL, 0);
if (addr == (void *) \-1)
errExit("shmat");
-
+\&
memcpy(addr, argv[3], len);
-
+\&
/* Decrement semaphore to 0. */
-
+\&
sop.sem_num = 0;
sop.sem_op = \-1;
sop.sem_flg = 0;
-
+\&
if (semop(semid, &sop, 1) == \-1)
errExit("semop");
-
+\&
exit(EXIT_SUCCESS);
}
.EE
diff --git a/man2/shutdown.2 b/man2/shutdown.2
index 1f6d9d689..d9cbcc1c8 100644
--- a/man2/shutdown.2
+++ b/man2/shutdown.2
@@ -9,7 +9,7 @@
.\" Modified Tue Oct 22 22:04:51 1996 by Eric S. Raymond <esr@thyrsus.com>
.\" Modified 1998 by Andi Kleen
.\"
-.TH shutdown 2 2022-10-30 "Linux man-pages 6.03"
+.TH shutdown 2 2023-03-30 "Linux man-pages 6.05.01"
.SH NAME
shutdown \- shut down part of a full-duplex connection
.SH LIBRARY
@@ -67,9 +67,10 @@ The file descriptor
.I sockfd
does not refer to a socket.
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, 4.4BSD
-.RB ( shutdown ()
-first appeared in 4.2BSD).
+POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001, 4.4BSD
+(first appeared in 4.2BSD).
.SH NOTES
The constants
.BR SHUT_RD ,
diff --git a/man2/sigaction.2 b/man2/sigaction.2
index b1b900918..8edde42f6 100644
--- a/man2/sigaction.2
+++ b/man2/sigaction.2
@@ -25,7 +25,7 @@
.\" 2015-01-17, Kees Cook <keescook@chromium.org>
.\" Added notes on ptrace SIGTRAP and SYS_SECCOMP.
.\"
-.TH sigaction 2 2023-02-10 "Linux man-pages 6.03"
+.TH sigaction 2 2023-05-03 "Linux man-pages 6.05.01"
.SH NAME
sigaction, rt_sigaction \- examine and change a signal action
.SH LIBRARY
@@ -942,35 +942,63 @@ This will also be generated if an attempt
is made to change the action for
.BR SIGKILL " or " SIGSTOP ,
which cannot be caught or ignored.
+.SH VERSIONS
+.SS C library/kernel differences
+The glibc wrapper function for
+.BR sigaction ()
+gives an error
+.RB ( EINVAL )
+on attempts to change the disposition of the two real-time signals
+used internally by the NPTL threading implementation.
+See
+.BR nptl (7)
+for details.
+.PP
+On architectures where the signal trampoline resides in the C library,
+the glibc wrapper function for
+.BR sigaction ()
+places the address of the trampoline code in the
+.I act.sa_restorer
+field and sets the
+.B SA_RESTORER
+flag in the
+.I act.sa_flags
+field.
+See
+.BR sigreturn (2).
+.PP
+The original Linux system call was named
+.BR sigaction ().
+However, with the addition of real-time signals in Linux 2.2,
+the fixed-size, 32-bit
+.I sigset_t
+type supported by that system call was no longer fit for purpose.
+Consequently, a new system call,
+.BR rt_sigaction (),
+was added to support an enlarged
+.I sigset_t
+type.
+The new system call takes a fourth argument,
+.IR "size_t sigsetsize" ,
+which specifies the size in bytes of the signal sets in
+.I act.sa_mask
+and
+.IR oldact.sa_mask .
+This argument is currently required to have the value
+.I sizeof(sigset_t)
+(or the error
+.B EINVAL
+results).
+The glibc
+.BR sigaction ()
+wrapper function hides these details from us, transparently calling
+.BR rt_sigaction ()
+when the kernel provides it.
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, SVr4.
+POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001, SVr4.
.\" SVr4 does not document the EINTR condition.
-.SH NOTES
-A child created via
-.BR fork (2)
-inherits a copy of its parent's signal dispositions.
-During an
-.BR execve (2),
-the dispositions of handled signals are reset to the default;
-the dispositions of ignored signals are left unchanged.
-.PP
-According to POSIX, the behavior of a process is undefined after it
-ignores a
-.BR SIGFPE ,
-.BR SIGILL ,
-or
-.B SIGSEGV
-signal that was not generated by
-.BR kill (2)
-or
-.BR raise (3).
-Integer division by zero has undefined result.
-On some architectures it will generate a
-.B SIGFPE
-signal.
-(Also dividing the most negative integer by \-1 may generate
-.BR SIGFPE .)
-Ignoring this signal might lead to an endless loop.
.PP
POSIX.1-1990 disallowed setting the action for
.B SIGCHLD
@@ -1018,6 +1046,32 @@ allowed the receipt of any signal, not just the one we are installing
(effectively overriding any
.I sa_mask
settings).
+.SH NOTES
+A child created via
+.BR fork (2)
+inherits a copy of its parent's signal dispositions.
+During an
+.BR execve (2),
+the dispositions of handled signals are reset to the default;
+the dispositions of ignored signals are left unchanged.
+.PP
+According to POSIX, the behavior of a process is undefined after it
+ignores a
+.BR SIGFPE ,
+.BR SIGILL ,
+or
+.B SIGSEGV
+signal that was not generated by
+.BR kill (2)
+or
+.BR raise (3).
+Integer division by zero has undefined result.
+On some architectures it will generate a
+.B SIGFPE
+signal.
+(Also dividing the most negative integer by \-1 may generate
+.BR SIGFPE .)
+Ignoring this signal might lead to an endless loop.
.PP
.BR sigaction ()
can be called with a NULL second argument to query the current signal
@@ -1040,58 +1094,6 @@ See
for a list of the async-signal-safe functions that can be
safely called inside from inside a signal handler.
.\"
-.SS C library/kernel differences
-The glibc wrapper function for
-.BR sigaction ()
-gives an error
-.RB ( EINVAL )
-on attempts to change the disposition of the two real-time signals
-used internally by the NPTL threading implementation.
-See
-.BR nptl (7)
-for details.
-.PP
-On architectures where the signal trampoline resides in the C library,
-the glibc wrapper function for
-.BR sigaction ()
-places the address of the trampoline code in the
-.I act.sa_restorer
-field and sets the
-.B SA_RESTORER
-flag in the
-.I act.sa_flags
-field.
-See
-.BR sigreturn (2).
-.PP
-The original Linux system call was named
-.BR sigaction ().
-However, with the addition of real-time signals in Linux 2.2,
-the fixed-size, 32-bit
-.I sigset_t
-type supported by that system call was no longer fit for purpose.
-Consequently, a new system call,
-.BR rt_sigaction (),
-was added to support an enlarged
-.I sigset_t
-type.
-The new system call takes a fourth argument,
-.IR "size_t sigsetsize" ,
-which specifies the size in bytes of the signal sets in
-.I act.sa_mask
-and
-.IR oldact.sa_mask .
-This argument is currently required to have the value
-.I sizeof(sigset_t)
-(or the error
-.B EINVAL
-results).
-The glibc
-.BR sigaction ()
-wrapper function hides these details from us, transparently calling
-.BR rt_sigaction ()
-when the kernel provides it.
-.\"
.SS Undocumented
Before the introduction of
.BR SA_SIGINFO ,
@@ -1145,12 +1147,12 @@ otherwise.
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
-
+\&
void
handler(int signo, siginfo_t *info, void *context)
{
struct sigaction oldact;
-
+\&
if (sigaction(SIGSEGV, NULL, &oldact) == \-1
|| (oldact.sa_flags & SA_UNSUPPORTED)
|| !(oldact.sa_flags & SA_EXPOSE_TAGBITS))
@@ -1159,19 +1161,19 @@ handler(int signo, siginfo_t *info, void *context)
}
_exit(EXIT_SUCCESS);
}
-
+\&
int
main(void)
{
struct sigaction act = { 0 };
-
+\&
act.sa_flags = SA_SIGINFO | SA_UNSUPPORTED | SA_EXPOSE_TAGBITS;
act.sa_sigaction = &handler;
if (sigaction(SIGSEGV, &act, NULL) == \-1) {
perror("sigaction");
exit(EXIT_FAILURE);
}
-
+\&
raise(SIGSEGV);
}
.EE
diff --git a/man2/sigaltstack.2 b/man2/sigaltstack.2
index fb305d75a..0ebfebd0d 100644
--- a/man2/sigaltstack.2
+++ b/man2/sigaltstack.2
@@ -4,7 +4,7 @@
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
.\" aeb, various minor fixes
-.TH sigaltstack 2 2023-02-05 "Linux man-pages 6.03"
+.TH sigaltstack 2 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
sigaltstack \- set and/or get signal stack context
.SH LIBRARY
@@ -196,26 +196,25 @@ on the current alternate signal stack).
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR sigaltstack ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, SUSv2, SVr4.
+POSIX.1-2008.
.PP
-The
.B SS_AUTODISARM
-flag is a Linux extension.
+is a Linux extension.
+.SH HISTORY
+POSIX.1-2001, SUSv2, SVr4.
.SH NOTES
The most common usage of an alternate signal stack is to handle the
.B SIGSEGV
@@ -229,7 +228,7 @@ Establishing an alternate signal stack is useful if a thread
expects that it may exhaust its standard stack.
This may occur, for example, because the stack grows so large
that it encounters the upwardly growing heap, or it reaches a
-limit established by a call to \fBsetrlimit(RLIMIT_STACK, &rlim)\fP.
+limit established by a call to \fB\%setrlimit(RLIMIT_STACK, &rlim)\fP.
If the standard stack is exhausted, the kernel sends
the thread a \fBSIGSEGV\fP signal.
In these circumstances the only way to catch this signal is
@@ -332,20 +331,20 @@ signal:
.in +4n
.EX
stack_t ss;
-
+\&
ss.ss_sp = malloc(SIGSTKSZ);
if (ss.ss_sp == NULL) {
perror("malloc");
exit(EXIT_FAILURE);
}
-
+\&
ss.ss_size = SIGSTKSZ;
ss.ss_flags = 0;
if (sigaltstack(&ss, NULL) == \-1) {
perror("sigaltstack");
exit(EXIT_FAILURE);
}
-
+\&
sa.sa_flags = SA_ONSTACK;
sa.sa_handler = handler(); /* Address of a signal handler */
sigemptyset(&sa.sa_mask);
diff --git a/man2/signal.2 b/man2/signal.2
index 269103e7d..619babf00 100644
--- a/man2/signal.2
+++ b/man2/signal.2
@@ -13,7 +13,7 @@
.\" various sections.
.\" 2008-07-11, mtk: rewrote and expanded portability discussion.
.\"
-.TH signal 2 2023-02-05 "Linux man-pages 6.03"
+.TH signal 2 2023-03-30 "Linux man-pages 6.05.01"
.SH NAME
signal \- ANSI C signal handling
.SH LIBRARY
@@ -93,43 +93,7 @@ is set to indicate the error.
.B EINVAL
.I signum
is invalid.
-.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, C99.
-.SH NOTES
-The effects of
-.BR signal ()
-in a multithreaded process are unspecified.
-.PP
-According to POSIX, the behavior of a process is undefined after it
-ignores a
-.BR SIGFPE ,
-.BR SIGILL ,
-or
-.B SIGSEGV
-signal that was not generated by
-.BR kill (2)
-or
-.BR raise (3).
-Integer division by zero has undefined result.
-On some architectures it will generate a
-.B SIGFPE
-signal.
-(Also dividing the most negative integer by \-1 may generate
-.BR SIGFPE .)
-Ignoring this signal might lead to an endless loop.
-.PP
-See
-.BR sigaction (2)
-for details on what happens when the disposition
-.B SIGCHLD
-is set to
-.BR SIG_IGN .
-.PP
-See
-.BR signal\-safety (7)
-for a list of the async-signal-safe functions that can be
-safely called from inside a signal handler.
-.PP
+.SH VERSIONS
The use of
.I sighandler_t
is a GNU extension, exposed if
@@ -173,6 +137,10 @@ POSIX.1 solved the portability mess by specifying
which provides explicit control of the semantics when a
signal handler is invoked; use that interface instead of
.BR signal ().
+.SH STANDARDS
+C11, POSIX.1-2008.
+.SH HISTORY
+C89, POSIX.1-2001.
.PP
In the original UNIX systems, when a handler that was established using
.BR signal ()
@@ -257,6 +225,40 @@ provides System\ V semantics.
.\" then
.\" .BR signal ()
.\" provides BSD semantics.
+.SH NOTES
+The effects of
+.BR signal ()
+in a multithreaded process are unspecified.
+.PP
+According to POSIX, the behavior of a process is undefined after it
+ignores a
+.BR SIGFPE ,
+.BR SIGILL ,
+or
+.B SIGSEGV
+signal that was not generated by
+.BR kill (2)
+or
+.BR raise (3).
+Integer division by zero has undefined result.
+On some architectures it will generate a
+.B SIGFPE
+signal.
+(Also dividing the most negative integer by \-1 may generate
+.BR SIGFPE .)
+Ignoring this signal might lead to an endless loop.
+.PP
+See
+.BR sigaction (2)
+for details on what happens when the disposition
+.B SIGCHLD
+is set to
+.BR SIG_IGN .
+.PP
+See
+.BR signal\-safety (7)
+for a list of the async-signal-safe functions that can be
+safely called from inside a signal handler.
.SH SEE ALSO
.BR kill (1),
.BR alarm (2),
diff --git a/man2/signalfd.2 b/man2/signalfd.2
index c6ed4d8cd..9af22b0a7 100644
--- a/man2/signalfd.2
+++ b/man2/signalfd.2
@@ -3,7 +3,7 @@
.\"
.\" SPDX-License-Identifier: GPL-2.0-or-later
.\"
-.TH signalfd 2 2023-02-05 "Linux man-pages 6.03"
+.TH signalfd 2 2023-05-03 "Linux man-pages 6.05.01"
.SH NAME
signalfd \- create a file descriptor for accepting signals
.SH LIBRARY
@@ -328,18 +328,43 @@ Could not mount (internal) anonymous inode device.
.B ENOMEM
There was insufficient memory to create a new signalfd file descriptor.
.SH VERSIONS
+.SS C library/kernel differences
+The underlying Linux system call requires an additional argument,
+.IR "size_t sizemask" ,
+which specifies the size of the
+.I mask
+argument.
+The glibc
.BR signalfd ()
-is available since Linux 2.6.22.
-Working support is provided since glibc 2.8.
-.\" signalfd() is in glibc 2.7, but reportedly does not build
-The
+wrapper function does not include this argument,
+since it provides the required value for the underlying system call.
+.PP
+There are two underlying Linux system calls:
+.BR signalfd ()
+and the more recent
+.BR signalfd4 ().
+The former system call does not implement a
+.I flags
+argument.
+The latter system call implements the
+.I flags
+values described above.
+Starting with glibc 2.9, the
+.BR signalfd ()
+wrapper function will use
.BR signalfd4 ()
-system call (see NOTES) is available since Linux 2.6.27.
+where it is available.
.SH STANDARDS
+Linux.
+.SH HISTORY
+.TP
.BR signalfd ()
-and
+Linux 2.6.22,
+glibc 2.8.
+.\" signalfd() is in glibc 2.7, but reportedly does not build
+.TP
.BR signalfd4 ()
-are Linux-specific.
+Linux 2.6.27.
.SH NOTES
A process can create multiple signalfd file descriptors.
This makes it possible to accept different signals
@@ -400,33 +425,6 @@ handler that writes to a file descriptor monitored by
.BR poll (2),
or
.BR epoll (7).
-.\"
-.SS C library/kernel differences
-The underlying Linux system call requires an additional argument,
-.IR "size_t sizemask" ,
-which specifies the size of the
-.I mask
-argument.
-The glibc
-.BR signalfd ()
-wrapper function does not include this argument,
-since it provides the required value for the underlying system call.
-.PP
-There are two underlying Linux system calls:
-.BR signalfd ()
-and the more recent
-.BR signalfd4 ().
-The former system call does not implement a
-.I flags
-argument.
-The latter system call implements the
-.I flags
-values described above.
-Starting with glibc 2.9, the
-.BR signalfd ()
-wrapper function will use
-.BR signalfd4 ()
-where it is available.
.SH BUGS
Before Linux 2.6.25, the
.I ssi_ptr
@@ -468,7 +466,7 @@ $
#include <stdlib.h>
#include <sys/signalfd.h>
#include <unistd.h>
-
+\&
int
main(void)
{
@@ -476,26 +474,26 @@ main(void)
ssize_t s;
sigset_t mask;
struct signalfd_siginfo fdsi;
-
+\&
sigemptyset(&mask);
sigaddset(&mask, SIGINT);
sigaddset(&mask, SIGQUIT);
-
+\&
/* Block signals so that they aren\[aq]t handled
according to their default dispositions. */
-
+\&
if (sigprocmask(SIG_BLOCK, &mask, NULL) == \-1)
err(EXIT_FAILURE, "sigprocmask");
-
+\&
sfd = signalfd(\-1, &mask, 0);
if (sfd == \-1)
err(EXIT_FAILURE, "signalfd");
-
+\&
for (;;) {
s = read(sfd, &fdsi, sizeof(fdsi));
if (s != sizeof(fdsi))
err(EXIT_FAILURE, "read");
-
+\&
if (fdsi.ssi_signo == SIGINT) {
printf("Got SIGINT\en");
} else if (fdsi.ssi_signo == SIGQUIT) {
diff --git a/man2/sigpending.2 b/man2/sigpending.2
index 65ca7a41d..e1b3158a7 100644
--- a/man2/sigpending.2
+++ b/man2/sigpending.2
@@ -6,7 +6,7 @@
.\"
.\" 2005-09-15, mtk, Created new page by splitting off from sigaction.2
.\"
-.TH sigpending 2 2022-12-04 "Linux man-pages 6.03"
+.TH sigpending 2 2023-03-30 "Linux man-pages 6.05.01"
.SH NAME
sigpending, rt_sigpending \- examine pending signals
.SH LIBRARY
@@ -46,27 +46,9 @@ is set to indicate the error.
.I set
points to memory which is not a valid part of the process address space.
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008.
-.SH NOTES
-See
-.BR sigsetops (3)
-for details on manipulating signal sets.
-.PP
-If a signal is both blocked and has a disposition of "ignored", it is
-.I not
-added to the mask of pending signals when generated.
-.PP
-The set of signals that is pending for a thread
-is the union of the set of signals that is pending for that thread
-and the set of signals that is pending for the process as a whole; see
-.BR signal (7).
-.PP
-A child created via
-.BR fork (2)
-initially has an empty pending signal set;
-the pending signal set is preserved across an
-.BR execve (2).
-.\"
+POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001.
.SS C library/kernel differences
The original Linux system call was named
.BR sigpending ().
@@ -93,7 +75,25 @@ The glibc
wrapper function hides these details from us, transparently calling
.BR rt_sigpending ()
when the kernel provides it.
-.\"
+.SH NOTES
+See
+.BR sigsetops (3)
+for details on manipulating signal sets.
+.PP
+If a signal is both blocked and has a disposition of "ignored", it is
+.I not
+added to the mask of pending signals when generated.
+.PP
+The set of signals that is pending for a thread
+is the union of the set of signals that is pending for that thread
+and the set of signals that is pending for the process as a whole; see
+.BR signal (7).
+.PP
+A child created via
+.BR fork (2)
+initially has an empty pending signal set;
+the pending signal set is preserved across an
+.BR execve (2).
.SH BUGS
Up to and including glibc 2.2.1,
there is a bug in the wrapper function for
diff --git a/man2/sigprocmask.2 b/man2/sigprocmask.2
index 2ca69309e..a89c1ede3 100644
--- a/man2/sigprocmask.2
+++ b/man2/sigprocmask.2
@@ -6,7 +6,7 @@
.\"
.\" 2005-09-15, mtk, Created new page by splitting off from sigaction.2
.\"
-.TH sigprocmask 2 2022-12-03 "Linux man-pages 6.03"
+.TH sigprocmask 2 2023-03-30 "Linux man-pages 6.05.01"
.SH NAME
sigprocmask, rt_sigprocmask \- examine and change blocked signals
.SH LIBRARY
@@ -116,45 +116,7 @@ Either the value specified in
.I how
was invalid or the kernel does not support the size passed in
.I sigsetsize.
-.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008.
-.SH NOTES
-It is not possible to block
-.BR SIGKILL " or " SIGSTOP .
-Attempts to do so are silently ignored.
-.PP
-Each of the threads in a process has its own signal mask.
-.PP
-A child created via
-.BR fork (2)
-inherits a copy of its parent's signal mask;
-the signal mask is preserved across
-.BR execve (2).
-.PP
-If
-.BR SIGBUS ,
-.BR SIGFPE ,
-.BR SIGILL ,
-or
-.B SIGSEGV
-are generated
-while they are blocked, the result is undefined,
-unless the signal was generated by
-.BR kill (2),
-.BR sigqueue (3),
-or
-.BR raise (3).
-.PP
-See
-.BR sigsetops (3)
-for details on manipulating signal sets.
-.PP
-Note that it is permissible (although not very useful) to specify both
-.I set
-and
-.I oldset
-as NULL.
-.\"
+.SH VERSIONS
.SS C library/kernel differences
The kernel's definition of
.I sigset_t
@@ -209,6 +171,46 @@ wrapper function hides these details from us, transparently calling
.BR rt_sigprocmask ()
when the kernel provides it.
.\"
+.SH STANDARDS
+POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001.
+.SH NOTES
+It is not possible to block
+.BR SIGKILL " or " SIGSTOP .
+Attempts to do so are silently ignored.
+.PP
+Each of the threads in a process has its own signal mask.
+.PP
+A child created via
+.BR fork (2)
+inherits a copy of its parent's signal mask;
+the signal mask is preserved across
+.BR execve (2).
+.PP
+If
+.BR SIGBUS ,
+.BR SIGFPE ,
+.BR SIGILL ,
+or
+.B SIGSEGV
+are generated
+while they are blocked, the result is undefined,
+unless the signal was generated by
+.BR kill (2),
+.BR sigqueue (3),
+or
+.BR raise (3).
+.PP
+See
+.BR sigsetops (3)
+for details on manipulating signal sets.
+.PP
+Note that it is permissible (although not very useful) to specify both
+.I set
+and
+.I oldset
+as NULL.
.SH SEE ALSO
.BR kill (2),
.BR pause (2),
diff --git a/man2/sigreturn.2 b/man2/sigreturn.2
index c4769841b..03ce95230 100644
--- a/man2/sigreturn.2
+++ b/man2/sigreturn.2
@@ -7,7 +7,7 @@
.\" 2008-06-26, mtk, added some more detail on the work done by sigreturn()
.\" 2014-12-05, mtk, rewrote all of the rest of the original page
.\"
-.TH sigreturn 2 2023-02-05 "Linux man-pages 6.03"
+.TH sigreturn 2 2023-03-30 "Linux man-pages 6.05.01"
.SH NAME
sigreturn, rt_sigreturn \- return from signal handler and cleanup stack frame
.SH LIBRARY
@@ -52,12 +52,14 @@ at the point where it was interrupted by the signal.
.SH RETURN VALUE
.BR sigreturn ()
never returns.
-.SH STANDARDS
+.SH VERSIONS
Many UNIX-type systems have a
.BR sigreturn ()
system call or near equivalent.
However, this call is not specified in POSIX,
and details of its behavior vary across systems.
+.SH STANDARDS
+None.
.SH NOTES
.BR sigreturn ()
exists only to allow the implementation of signal handlers.
diff --git a/man2/sigsuspend.2 b/man2/sigsuspend.2
index 622e9a39e..f89a6cad9 100644
--- a/man2/sigsuspend.2
+++ b/man2/sigsuspend.2
@@ -6,7 +6,7 @@
.\"
.\" 2005-09-15, mtk, Created new page by splitting off from sigaction.2
.\"
-.TH sigsuspend 2 2022-10-30 "Linux man-pages 6.03"
+.TH sigsuspend 2 2023-03-30 "Linux man-pages 6.05.01"
.SH NAME
sigsuspend, rt_sigsuspend \- wait for a signal
.SH LIBRARY
@@ -68,29 +68,9 @@ points to memory which is not a valid part of the process address space.
The call was interrupted by a signal;
.BR signal (7).
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008.
-.SH NOTES
-Normally,
-.BR sigsuspend ()
-is used in conjunction with
-.BR sigprocmask (2)
-in order to prevent delivery of a signal during the execution of a
-critical code section.
-The caller first blocks the signals with
-.BR sigprocmask (2).
-When the critical code has completed, the caller then waits for the
-signals by calling
-.BR sigsuspend ()
-with the signal mask that was returned by
-.BR sigprocmask (2)
-(in the
-.I oldset
-argument).
-.PP
-See
-.BR sigsetops (3)
-for details on manipulating signal sets.
-.\"
+POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001.
.SS C library/kernel differences
The original Linux system call was named
.BR sigsuspend ().
@@ -118,6 +98,27 @@ wrapper function hides these details from us, transparently calling
.BR rt_sigsuspend ()
when the kernel provides it.
.\"
+.SH NOTES
+Normally,
+.BR sigsuspend ()
+is used in conjunction with
+.BR sigprocmask (2)
+in order to prevent delivery of a signal during the execution of a
+critical code section.
+The caller first blocks the signals with
+.BR sigprocmask (2).
+When the critical code has completed, the caller then waits for the
+signals by calling
+.BR sigsuspend ()
+with the signal mask that was returned by
+.BR sigprocmask (2)
+(in the
+.I oldset
+argument).
+.PP
+See
+.BR sigsetops (3)
+for details on manipulating signal sets.
.SH SEE ALSO
.BR kill (2),
.BR pause (2),
diff --git a/man2/sigwaitinfo.2 b/man2/sigwaitinfo.2
index 9324eda36..a5703fcc2 100644
--- a/man2/sigwaitinfo.2
+++ b/man2/sigwaitinfo.2
@@ -2,7 +2,7 @@
.\"
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
-.TH sigwaitinfo 2 2022-12-03 "Linux man-pages 6.03"
+.TH sigwaitinfo 2 2023-03-30 "Linux man-pages 6.05.01"
.SH NAME
sigwaitinfo, sigtimedwait, rt_sigtimedwait \- synchronously wait
for queued signals
@@ -110,8 +110,53 @@ The wait was interrupted by a signal handler; see
.B EINVAL
.I timeout
was invalid.
+.SH VERSIONS
+.SS C library/kernel differences
+On Linux,
+.BR sigwaitinfo ()
+is a library function implemented on top of
+.BR sigtimedwait ().
+.PP
+The glibc wrapper functions for
+.BR sigwaitinfo ()
+and
+.BR sigtimedwait ()
+silently ignore attempts to wait for the two real-time signals that
+are used internally by the NPTL threading implementation.
+See
+.BR nptl (7)
+for details.
+.PP
+The original Linux system call was named
+.BR sigtimedwait ().
+However, with the addition of real-time signals in Linux 2.2,
+the fixed-size, 32-bit
+.I sigset_t
+type supported by that system call was no longer fit for purpose.
+Consequently, a new system call,
+.BR rt_sigtimedwait (),
+was added to support an enlarged
+.I sigset_t
+type.
+The new system call takes a fourth argument,
+.IR "size_t sigsetsize" ,
+which specifies the size in bytes of the signal set in
+.IR set .
+This argument is currently required to have the value
+.I sizeof(sigset_t)
+(or the error
+.B EINVAL
+results).
+The glibc
+.BR sigtimedwait ()
+wrapper function hides these details from us, transparently calling
+.BR rt_sigtimedwait ()
+when the kernel provides it.
+.\"
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008.
+POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001.
.SH NOTES
In normal usage, the calling program blocks the signals in
.I set
@@ -171,49 +216,6 @@ unspecified, permitting the possibility that this has the same meaning
as a call to
.BR sigwaitinfo (),
and indeed this is what is done on Linux.
-.\"
-.SS C library/kernel differences
-On Linux,
-.BR sigwaitinfo ()
-is a library function implemented on top of
-.BR sigtimedwait ().
-.PP
-The glibc wrapper functions for
-.BR sigwaitinfo ()
-and
-.BR sigtimedwait ()
-silently ignore attempts to wait for the two real-time signals that
-are used internally by the NPTL threading implementation.
-See
-.BR nptl (7)
-for details.
-.PP
-The original Linux system call was named
-.BR sigtimedwait ().
-However, with the addition of real-time signals in Linux 2.2,
-the fixed-size, 32-bit
-.I sigset_t
-type supported by that system call was no longer fit for purpose.
-Consequently, a new system call,
-.BR rt_sigtimedwait (),
-was added to support an enlarged
-.I sigset_t
-type.
-The new system call takes a fourth argument,
-.IR "size_t sigsetsize" ,
-which specifies the size in bytes of the signal set in
-.IR set .
-This argument is currently required to have the value
-.I sizeof(sigset_t)
-(or the error
-.B EINVAL
-results).
-The glibc
-.BR sigtimedwait ()
-wrapper function hides these details from us, transparently calling
-.BR rt_sigtimedwait ()
-when the kernel provides it.
-.\"
.SH SEE ALSO
.BR kill (2),
.BR sigaction (2),
diff --git a/man2/socket.2 b/man2/socket.2
index 2eece28e0..2a35f2b7b 100644
--- a/man2/socket.2
+++ b/man2/socket.2
@@ -12,7 +12,7 @@
.\" Modified 2002-07-17 by Michael Kerrisk <mtk.manpages@gmail.com>
.\" Modified 2004-06-17 by Michael Kerrisk <mtk.manpages@gmail.com>
.\"
-.TH socket 2 2023-02-05 "Linux man-pages 6.03"
+.TH socket 2 2023-03-30 "Linux man-pages 6.05.01"
.SH NAME
socket \- create an endpoint for communication
.SH LIBRARY
@@ -428,20 +428,21 @@ supported within this domain.
.PP
Other errors may be generated by the underlying protocol modules.
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, 4.4BSD.
+POSIX.1-2008.
.PP
-The
.B SOCK_NONBLOCK
and
.B SOCK_CLOEXEC
-flags are Linux-specific.
+are Linux-specific.
+.SH HISTORY
+POSIX.1-2001, 4.4BSD.
.PP
.BR socket ()
appeared in 4.2BSD.
It is generally portable to/from
non-BSD systems supporting clones of the BSD socket layer (including
System\ V variants).
-.SH NOTES
+.PP
The manifest constants used under 4.x BSD for protocol families
are
.BR PF_UNIX ,
diff --git a/man2/socketcall.2 b/man2/socketcall.2
index c22acd8db..24f7f6b21 100644
--- a/man2/socketcall.2
+++ b/man2/socketcall.2
@@ -4,7 +4,7 @@
.\" SPDX-License-Identifier: GPL-2.0-or-later
.\"
.\" Modified Tue Oct 22 22:11:53 1996 by Eric S. Raymond <esr@thyrsus.com>
-.TH socketcall 2 2023-02-05 "Linux man-pages 6.03"
+.TH socketcall 2 2023-03-30 "Linux man-pages 6.05.01"
.SH NAME
socketcall \- socket system calls
.SH LIBRARY
@@ -142,10 +142,7 @@ T}:T{
.BR sendmmsg (2)
T}
.TE
-.SH STANDARDS
-This call is specific to Linux, and should not be used in programs
-intended to be portable.
-.SH NOTES
+.SH VERSIONS
On some architectures\[em]for example, x86-64 and ARM\[em]there is no
.BR socketcall ()
system call; instead
@@ -153,6 +150,8 @@ system call; instead
.BR accept (2),
.BR bind (2),
and so on really are implemented as separate system calls.
+.SH STANDARDS
+Linux.
.PP
On x86-32,
.BR socketcall ()
diff --git a/man2/socketpair.2 b/man2/socketpair.2
index 1b04b94e7..741596e65 100644
--- a/man2/socketpair.2
+++ b/man2/socketpair.2
@@ -11,7 +11,7 @@
.\" Modified 2004-06-17 by Michael Kerrisk <mtk.manpages@gmail.com>
.\" 2008-10-11, mtk: Add description of SOCK_NONBLOCK and SOCK_CLOEXEC
.\"
-.TH socketpair 2 2022-10-30 "Linux man-pages 6.03"
+.TH socketpair 2 2023-03-30 "Linux man-pages 6.05.01"
.SH NAME
socketpair \- create a pair of connected sockets
.SH LIBRARY
@@ -77,14 +77,7 @@ The specified protocol does not support creation of socket pairs.
.TP
.B EPROTONOSUPPORT
The specified protocol is not supported on this machine.
-.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, 4.4BSD.
-.BR socketpair ()
-first appeared in 4.2BSD.
-It is generally portable to/from
-non-BSD systems supporting clones of the BSD socket layer (including
-System\ V variants).
-.SH NOTES
+.SH VERSIONS
On Linux, the only supported domains for this call are
.B AF_UNIX
(or synonymously,
@@ -93,6 +86,16 @@ and
.B AF_TIPC
.\" commit: 70b03759e9ecfae400605fa34f3d7154cccbbba3
(since Linux 4.12).
+.SH STANDARDS
+POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001, 4.4BSD.
+.PP
+.BR socketpair ()
+first appeared in 4.2BSD.
+It is generally portable to/from
+non-BSD systems supporting clones of the BSD socket layer (including
+System\ V variants).
.PP
Since Linux 2.6.27,
.BR socketpair ()
diff --git a/man2/splice.2 b/man2/splice.2
index a704f2f95..88d416049 100644
--- a/man2/splice.2
+++ b/man2/splice.2
@@ -3,7 +3,7 @@
.\"
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
-.TH splice 2 2023-02-05 "Linux man-pages 6.03"
+.TH splice 2 2023-07-15 "Linux man-pages 6.05.01"
.SH NAME
splice \- splice data to/from a pipe
.SH LIBRARY
@@ -12,10 +12,11 @@ Standard C library
.SH SYNOPSIS
.nf
.BR "#define _GNU_SOURCE" " /* See feature_test_macros(7) */"
+.B "#define _FILE_OFFSET_BITS 64
.B #include <fcntl.h>
.PP
-.BI "ssize_t splice(int " fd_in ", off64_t *_Nullable " off_in ,
-.BI " int " fd_out ", off64_t *_Nullable " off_out ,
+.BI "ssize_t splice(int " fd_in ", off_t *_Nullable " off_in ,
+.BI " int " fd_out ", off_t *_Nullable " off_out ,
.BI " size_t " len ", unsigned int " flags );
.\" Return type was long before glibc 2.7
.fi
@@ -176,13 +177,21 @@ Either
or
.I off_out
was not NULL, but the corresponding file descriptor refers to a pipe.
-.SH VERSIONS
-The
-.BR splice ()
-system call first appeared in Linux 2.6.17;
-library support was added in glibc 2.5.
.SH STANDARDS
-This system call is Linux-specific.
+Linux.
+.SH HISTORY
+Linux 2.6.17,
+glibc 2.5.
+.PP
+In Linux 2.6.30 and earlier,
+exactly one of
+.I fd_in
+and
+.I fd_out
+was required to be a pipe.
+Since Linux 2.6.31,
+.\" commit 7c77f0b3f9208c339a4b40737bb2cb0f0319bb8d
+both arguments may refer to pipes.
.SH NOTES
The three system calls
.BR splice (),
@@ -235,15 +244,17 @@ only pointers are copied, not the pages of the buffer.
.\" users - for things like logging etc.).
.\"
.PP
-In Linux 2.6.30 and earlier,
-exactly one of
-.I fd_in
-and
-.I fd_out
-was required to be a pipe.
-Since Linux 2.6.31,
-.\" commit 7c77f0b3f9208c339a4b40737bb2cb0f0319bb8d
-both arguments may refer to pipes.
+.B _FILE_OFFSET_BITS
+should be defined to be 64 in code that uses non-null
+.I off_in
+or
+.I off_out
+or that takes the address of
+.BR splice ,
+if the code is intended to be portable
+to traditional 32-bit x86 and ARM platforms where
+.BR off_t 's
+width defaults to 32 bits.
.SH EXAMPLES
See
.BR tee (2).
diff --git a/man2/spu_create.2 b/man2/spu_create.2
index 8c969e879..36d1bbde8 100644
--- a/man2/spu_create.2
+++ b/man2/spu_create.2
@@ -8,7 +8,7 @@
.\" 2007-07-10, some polishing by mtk
.\" 2007-09-28, updates for newer kernels by Jeremy Kerr <jk@ozlabs.org>
.\"
-.TH spu_create 2 2023-02-05 "Linux man-pages 6.03"
+.TH spu_create 2 2023-03-30 "Linux man-pages 6.05.01"
.SH NAME
spu_create \- create a new spu context
.SH LIBRARY
@@ -244,22 +244,10 @@ must point to a location beneath the mount point of
.BR spufs .
By convention, it gets mounted in
.IR /spu .
-.SH VERSIONS
-The
-.BR spu_create ()
-system call was added in Linux 2.6.16.
.SH STANDARDS
-This call is Linux-specific and implemented only on the PowerPC
-architecture.
-Programs using this system call are not portable.
-.SH NOTES
-.BR spu_create ()
-is meant to be used from libraries that implement a more abstract
-interface to SPUs, not to be used from regular applications.
-See
-.UR http://www.bsc.es\:/projects\:/deepcomputing\:/linuxoncell/
-.UE
-for the recommended libraries.
+Linux on PowerPC.
+.SH HISTORY
+Linux 2.6.16.
.PP
Prior to the addition of the
.B SPU_CREATE_AFFINITY_SPU
@@ -268,6 +256,14 @@ flag in Linux 2.6.23, the
system call took only three arguments (i.e., there was no
.I neighbor_fd
argument).
+.SH NOTES
+.BR spu_create ()
+is meant to be used from libraries that implement a more abstract
+interface to SPUs, not to be used from regular applications.
+See
+.UR http://www.bsc.es\:/projects\:/deepcomputing\:/linuxoncell/
+.UE
+for the recommended libraries.
.SH EXAMPLES
See
.BR spu_run (2)
diff --git a/man2/spu_run.2 b/man2/spu_run.2
index a67e1e606..0a9d2299b 100644
--- a/man2/spu_run.2
+++ b/man2/spu_run.2
@@ -9,7 +9,7 @@
.\" 2007-09-28, updates for newer kernels, added example
.\" by Jeremy Kerr <jk@ozlabs.org>
.\"
-.TH spu_run 2 2023-02-08 "Linux man-pages 6.03"
+.TH spu_run 2 2023-05-03 "Linux man-pages 6.05.01"
.SH NAME
spu_run \- execute an SPU context
.SH LIBRARY
@@ -181,14 +181,10 @@ resulting from a Memory Flow Controller (MFC) direct memory access.
The functionality is not provided by the current system, because
either the hardware does not provide SPUs or the spufs module is not
loaded.
-.SH VERSIONS
-The
-.BR spu_run ()
-system call was added in Linux 2.6.16.
.SH STANDARDS
-This call is Linux-specific and implemented only by the PowerPC
-architecture.
-Programs using this system call are not portable.
+Linux on PowerPC.
+.SH HISTORY
+Linux 2.6.16.
.SH NOTES
.BR spu_run ()
is meant to be used from libraries that implement a more abstract
@@ -212,45 +208,45 @@ system call.
#include <stdlib.h>
#include <sys/types.h>
#include <unistd.h>
-
+\&
int main(void)
{
int context, fd, spu_status;
uint32_t instruction, npc;
-
+\&
context = syscall(SYS_spu_create, "/spu/example\-context", 0, 0755);
if (context == \-1)
err(EXIT_FAILURE, "spu_create");
-
+\&
/*
* Write a \[aq]stop 0x1234\[aq] instruction to the SPU\[aq]s
* local store memory.
*/
instruction = 0x00001234;
-
+\&
fd = open("/spu/example\-context/mem", O_RDWR);
if (fd == \-1)
err(EXIT_FAILURE, "open");
write(fd, &instruction, sizeof(instruction));
-
+\&
/*
* set npc to the starting instruction address of the
* SPU program. Since we wrote the instruction at the
* start of the mem file, the entry point will be 0x0.
*/
npc = 0;
-
+\&
spu_status = syscall(SYS_spu_run, context, &npc, NULL);
if (spu_status == \-1)
err(EXIT_FAILURE, "open");
-
+\&
/*
* We should see a status code of 0x12340002:
* 0x00000002 (spu was stopped due to stop\-and\-signal)
* | 0x12340000 (the stop\-and\-signal code)
*/
printf("SPU Status: %#08x\en", spu_status);
-
+\&
exit(EXIT_SUCCESS);
}
.EE
diff --git a/man2/stat.2 b/man2/stat.2
index 096e00132..f41daab46 100644
--- a/man2/stat.2
+++ b/man2/stat.2
@@ -16,7 +16,7 @@
.\" 2007-06-08 mtk: Added example program
.\" 2007-07-05 mtk: Added details on underlying system call interfaces
.\"
-.TH stat 2 2023-02-05 "Linux man-pages 6.03"
+.TH stat 2 2023-05-03 "Linux man-pages 6.05.01"
.SH NAME
stat, fstat, lstat, fstatat \- get file status
.SH LIBRARY
@@ -306,15 +306,16 @@ calls
on a file whose size exceeds
.I (1<<31)\-1
bytes.
-.SH VERSIONS
-.BR fstatat ()
-was added in Linux 2.6.16;
-library support was added in glibc 2.4.
.SH STANDARDS
-.BR stat (),
-.BR fstat (),
-.BR lstat ():
-SVr4, 4.3BSD, POSIX.1-2001, POSIX.1.2008.
+POSIX.1-2008.
+.SH HISTORY
+.TP
+.BR stat ()
+.TQ
+.BR fstat ()
+.TQ
+.BR lstat ()
+SVr4, 4.3BSD, POSIX.1-2001.
.\" SVr4 documents additional
.\" .BR fstat ()
.\" error conditions EINTR, ENOLINK, and EOVERFLOW. SVr4
@@ -323,9 +324,11 @@ SVr4, 4.3BSD, POSIX.1-2001, POSIX.1.2008.
.\" and
.\" .BR lstat ()
.\" error conditions EINTR, EMULTIHOP, ENOLINK, and EOVERFLOW.
-.PP
-.BR fstatat ():
+.TP
+.BR fstatat ()
POSIX.1-2008.
+Linux 2.6.16,
+glibc 2.4.
.PP
According to POSIX.1-2001,
.BR lstat ()
@@ -349,7 +352,6 @@ fields may be less portable.
(They were introduced in BSD.
The interpretation differs between systems,
and possibly on a single system when NFS mounts are involved.)
-.SH NOTES
.SS C library/kernel differences
Over time, increases in the size of the
.I stat
@@ -465,28 +467,28 @@ structure.
#include <sys/stat.h>
#include <sys/sysmacros.h>
#include <time.h>
-
+\&
int
main(int argc, char *argv[])
{
struct stat sb;
-
+\&
if (argc != 2) {
fprintf(stderr, "Usage: %s <pathname>\en", argv[0]);
exit(EXIT_FAILURE);
}
-
+\&
if (lstat(argv[1], &sb) == \-1) {
perror("lstat");
exit(EXIT_FAILURE);
}
-
+\&
printf("ID of containing device: [%x,%x]\en",
major(sb.st_dev),
minor(sb.st_dev));
-
+\&
printf("File type: ");
-
+\&
switch (sb.st_mode & S_IFMT) {
case S_IFBLK: printf("block device\en"); break;
case S_IFCHR: printf("character device\en"); break;
@@ -497,27 +499,27 @@ main(int argc, char *argv[])
case S_IFSOCK: printf("socket\en"); break;
default: printf("unknown?\en"); break;
}
-
+\&
printf("I\-node number: %ju\en", (uintmax_t) sb.st_ino);
-
+\&
printf("Mode: %jo (octal)\en",
(uintmax_t) sb.st_mode);
-
+\&
printf("Link count: %ju\en", (uintmax_t) sb.st_nlink);
printf("Ownership: UID=%ju GID=%ju\en",
(uintmax_t) sb.st_uid, (uintmax_t) sb.st_gid);
-
+\&
printf("Preferred I/O block size: %jd bytes\en",
(intmax_t) sb.st_blksize);
printf("File size: %jd bytes\en",
(intmax_t) sb.st_size);
printf("Blocks allocated: %jd\en",
(intmax_t) sb.st_blocks);
-
+\&
printf("Last status change: %s", ctime(&sb.st_ctime));
printf("Last file access: %s", ctime(&sb.st_atime));
printf("Last file modification: %s", ctime(&sb.st_mtime));
-
+\&
exit(EXIT_SUCCESS);
}
.EE
diff --git a/man2/statfs.2 b/man2/statfs.2
index 02923984a..26dad7c75 100644
--- a/man2/statfs.2
+++ b/man2/statfs.2
@@ -5,7 +5,7 @@
.\" Modified 2003-08-17 by Walter Harms
.\" Modified 2004-06-23 by Michael Kerrisk <mtk.manpages@gmail.com>
.\"
-.TH statfs 2 2022-10-30 "Linux man-pages 6.03"
+.TH statfs 2 2023-07-18 "Linux man-pages 6.05.01"
.SH NAME
statfs, fstatfs \- get filesystem statistics
.SH LIBRARY
@@ -15,9 +15,15 @@ Standard C library
.nf
.BR "#include <sys/vfs.h> " "/* or <sys/statfs.h> */"
.PP
-.BI "[[deprecated]] int statfs(const char *" path ", struct statfs *" buf );
-.BI "[[deprecated]] int fstatfs(int " fd ", struct statfs *" buf );
+.BI "int statfs(const char *" path ", struct statfs *" buf );
+.BI "int fstatfs(int " fd ", struct statfs *" buf );
.fi
+.PP
+Unless you need the
+.I f_type
+field, you should use the standard
+.BR statvfs (3)
+interface instead.
.SH DESCRIPTION
The
.BR statfs ()
@@ -267,61 +273,7 @@ is not a directory.
.TP
.B EOVERFLOW
Some values were too large to be represented in the returned struct.
-.SH STANDARDS
-Linux-specific.
-The Linux
-.BR statfs ()
-was inspired by the 4.4BSD one
-(but they do not use the same structure).
-.SH NOTES
-The
-.I __fsword_t
-type used for various fields in the
-.I statfs
-structure definition is a glibc internal type,
-not intended for public use.
-This leaves the programmer in a bit of a conundrum when trying to copy
-or compare these fields to local variables in a program.
-Using
-.I "unsigned\ int"
-for such variables suffices on most systems.
-.PP
-The original Linux
-.BR statfs ()
-and
-.BR fstatfs ()
-system calls were not designed with extremely large file sizes in mind.
-Subsequently, Linux 2.6
-added new
-.BR statfs64 ()
-and
-.BR fstatfs64 ()
-system calls that employ a new structure,
-.IR statfs64 .
-The new structure contains the same fields as the original
-.I statfs
-structure, but the sizes of various fields are increased,
-to accommodate large file sizes.
-The glibc
-.BR statfs ()
-and
-.BR fstatfs ()
-wrapper functions transparently deal with the kernel differences.
-.PP
-Some systems have only \fI<sys/vfs.h>\fP, other systems also have
-\fI<sys/statfs.h>\fP, where the former includes the latter.
-So it seems
-including the former is the best choice.
-.PP
-LSB has deprecated the library calls
-.BR statfs ()
-and
-.BR fstatfs ()
-and tells us to use
-.BR statvfs (3)
-and
-.BR fstatvfs (3)
-instead.
+.SH VERSIONS
.SS The f_fsid field
Solaris, Irix, and POSIX have a system call
.BR statvfs (2)
@@ -366,6 +318,62 @@ Under some operating systems, the
can be used as the second argument to the
.BR sysfs (2)
system call.
+.SH STANDARDS
+Linux.
+.SH HISTORY
+The Linux
+.BR statfs ()
+was inspired by the 4.4BSD one
+(but they do not use the same structure).
+.PP
+The original Linux
+.BR statfs ()
+and
+.BR fstatfs ()
+system calls were not designed with extremely large file sizes in mind.
+Subsequently, Linux 2.6
+added new
+.BR statfs64 ()
+and
+.BR fstatfs64 ()
+system calls that employ a new structure,
+.IR statfs64 .
+The new structure contains the same fields as the original
+.I statfs
+structure, but the sizes of various fields are increased,
+to accommodate large file sizes.
+The glibc
+.BR statfs ()
+and
+.BR fstatfs ()
+wrapper functions transparently deal with the kernel differences.
+.PP
+LSB has deprecated the library calls
+.BR statfs ()
+and
+.BR fstatfs ()
+and tells us to use
+.BR statvfs (3)
+and
+.BR fstatvfs (3)
+instead.
+.SH NOTES
+The
+.I __fsword_t
+type used for various fields in the
+.I statfs
+structure definition is a glibc internal type,
+not intended for public use.
+This leaves the programmer in a bit of a conundrum when trying to copy
+or compare these fields to local variables in a program.
+Using
+.I "unsigned\ int"
+for such variables suffices on most systems.
+.PP
+Some systems have only \fI<sys/vfs.h>\fP, other systems also have
+\fI<sys/statfs.h>\fP, where the former includes the latter.
+So it seems
+including the former is the best choice.
.SH BUGS
From Linux 2.6.38 up to and including Linux 3.1,
.\" broken in commit ff0c7d15f9787b7e8c601533c015295cc68329f8
diff --git a/man2/statx.2 b/man2/statx.2
index 2829bd456..d7c36b8db 100644
--- a/man2/statx.2
+++ b/man2/statx.2
@@ -8,7 +8,7 @@
.\"
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
-.TH statx 2 2023-02-05 "Linux man-pages 6.03"
+.TH statx 2 2023-06-01 "Linux man-pages 6.05.01"
.SH NAME
statx \- get file status (extended)
.SH LIBRARY
@@ -46,25 +46,25 @@ struct statx {
__u64 stx_attributes_mask;
/* Mask to show what\[aq]s supported
in stx_attributes */
-
+\&
/* The following fields are file timestamps */
struct statx_timestamp stx_atime; /* Last access */
struct statx_timestamp stx_btime; /* Creation */
struct statx_timestamp stx_ctime; /* Last status change */
struct statx_timestamp stx_mtime; /* Last modification */
-
+\&
/* If this file represents a device, then the next two
fields contain the ID of the device */
__u32 stx_rdev_major; /* Major ID */
__u32 stx_rdev_minor; /* Minor ID */
-
+\&
/* The next two fields contain the ID of the device
containing the filesystem where the file resides */
__u32 stx_dev_major; /* Major ID */
__u32 stx_dev_minor; /* Minor ID */
-
+\&
__u64 stx_mnt_id; /* Mount ID */
-
+\&
/* Direct I/O alignment restrictions */
__u32 stx_dio_mem_align;
__u32 stx_dio_offset_align;
@@ -521,6 +521,10 @@ without an explicit
See
.BR mmap (2)
for more information.
+.TP
+.BR STATX_ATTR_MOUNT_ROOT " (since Linux 5.8)"
+.\" commit 80340fe3605c0e78cfe496c3b3878be828cfdbfe
+The file is the root of a mount.
.SH RETURN VALUE
On success, zero is returned.
On error, \-1 is returned, and
@@ -589,12 +593,11 @@ is not a directory or
is relative and
.I dirfd
is a file descriptor referring to a file other than a directory.
-.SH VERSIONS
-.BR statx ()
-was added in Linux 4.11; library support was added in glibc 2.28.
.SH STANDARDS
-.BR statx ()
-is Linux-specific.
+Linux.
+.SH HISTORY
+Linux 4.11,
+glibc 2.28.
.SH SEE ALSO
.BR ls (1),
.BR stat (1),
diff --git a/man2/stime.2 b/man2/stime.2
index 980e6ee18..e4d1a38a3 100644
--- a/man2/stime.2
+++ b/man2/stime.2
@@ -7,7 +7,7 @@
.\" Modified 2001-03-16 by Andries Brouwer <aeb@cwi.nl>
.\" Modified 2004-05-27 by Michael Kerrisk <mtk.manpages@gmail.com>
.\"
-.TH stime 2 2023-02-05 "Linux man-pages 6.03"
+.TH stime 2 2023-03-30 "Linux man-pages 6.05.01"
.SH NAME
stime \- set time
.SH SYNOPSIS
@@ -59,8 +59,10 @@ Under Linux, the
.B CAP_SYS_TIME
privilege is required.
.SH STANDARDS
+None.
+.SH HISTORY
SVr4.
-.SH NOTES
+.PP
Starting with glibc 2.31,
this function is no longer available to newly linked applications
and is no longer declared in
diff --git a/man2/subpage_prot.2 b/man2/subpage_prot.2
index 443712c97..4309a7d60 100644
--- a/man2/subpage_prot.2
+++ b/man2/subpage_prot.2
@@ -7,7 +7,7 @@
.\" in Linux commit fa28237cfcc5827553044cbd6ee52e33692b0faa
.\" both written by Paul Mackerras <paulus@samba.org>
.\"
-.TH subpage_prot 2 2022-12-04 "Linux man-pages 6.03"
+.TH subpage_prot 2 2023-03-30 "Linux man-pages 6.05.01"
.SH NAME
subpage_prot \- define a subpage protection for an address range
.SH LIBRARY
@@ -76,14 +76,13 @@ address space of the process or to a region that consists of huge pages.
.TP
.B ENOMEM
Out of memory.
-.SH VERSIONS
-This system call is provided on the PowerPC architecture
-since Linux 2.6.25.
+.SH STANDARDS
+Linux.
+.SH HISTORY
+Linux 2.6.25 (PowerPC).
+.PP
The system call is provided only if the kernel is configured with
.BR CONFIG_PPC_64K_PAGES .
-No library support is provided.
-.SH STANDARDS
-This system call is Linux-specific.
.SH NOTES
Normal page protections (at the 64-kB page level) also apply;
the subpage protection mechanism is an additional constraint,
diff --git a/man2/swapon.2 b/man2/swapon.2
index eaa716e83..400f60972 100644
--- a/man2/swapon.2
+++ b/man2/swapon.2
@@ -22,7 +22,7 @@
.\" Author: Rafael Aquini <aquini@redhat.com>
.\" Date: Wed Jul 3 15:02:46 2013 -0700
.\"
-.TH swapon 2 2022-12-04 "Linux man-pages 6.03"
+.TH swapon 2 2023-03-30 "Linux man-pages 6.05.01"
.SH NAME
swapon, swapoff \- start/stop swapping to file/device
.SH LIBRARY
@@ -148,9 +148,9 @@ capability.
Alternatively, the maximum number of swap files are already in use;
see NOTES below.
.SH STANDARDS
-These functions are Linux-specific and should not be used in programs
-intended to be portable.
-The second
+Linux.
+.SH HISTORY
+The
.I swapflags
argument was introduced in Linux 1.3.2.
.SH NOTES
diff --git a/man2/symlink.2 b/man2/symlink.2
index 9fa1e84e3..dd87f2dca 100644
--- a/man2/symlink.2
+++ b/man2/symlink.2
@@ -10,7 +10,7 @@
.\" Modified 1997-01-31 by Eric S. Raymond <esr@thyrsus.com>
.\" Modified 2004-06-23 by Michael Kerrisk <mtk.manpages@gmail.com>
.\"
-.TH symlink 2 2023-02-05 "Linux man-pages 6.03"
+.TH symlink 2 2023-03-30 "Linux man-pages 6.05.01"
.SH NAME
symlink, symlinkat \- make a new name for a file
.SH LIBRARY
@@ -214,29 +214,21 @@ does not support the creation of symbolic links.
.B EROFS
.I linkpath
is on a read-only filesystem.
-.SH VERSIONS
-.BR symlinkat ()
-was added in Linux 2.6.16;
-library support was added in glibc 2.4.
.SH STANDARDS
-.BR symlink ():
-SVr4, 4.3BSD, POSIX.1-2001, POSIX.1-2008.
+POSIX.1-2008.
+.SH HISTORY
+.TP
+.BR symlink ()
+SVr4, 4.3BSD, POSIX.1-2001.
.\" SVr4 documents additional error codes EDQUOT and ENOSYS.
.\" See
.\" .BR open (2)
.\" re multiple files with the same name, and NFS.
-.PP
-.BR symlinkat ():
+.TP
+.BR symlinkat ()
POSIX.1-2008.
-.SH NOTES
-No checking of
-.I target
-is done.
-.PP
-Deleting the name referred to by a symbolic link will actually delete the
-file (unless it also has other hard links).
-If this behavior is not desired, use
-.BR link (2).
+Linux 2.6.16,
+glibc 2.4.
.SS glibc notes
On older kernels where
.BR symlinkat ()
@@ -250,6 +242,15 @@ glibc constructs a pathname based on the symbolic link in
that corresponds to the
.I newdirfd
argument.
+.SH NOTES
+No checking of
+.I target
+is done.
+.PP
+Deleting the name referred to by a symbolic link will actually delete the
+file (unless it also has other hard links).
+If this behavior is not desired, use
+.BR link (2).
.SH SEE ALSO
.BR ln (1),
.BR namei (1),
diff --git a/man2/sync.2 b/man2/sync.2
index 693984ef7..21f01d7f7 100644
--- a/man2/sync.2
+++ b/man2/sync.2
@@ -13,7 +13,7 @@
.\" Modified 2001-10-10 by aeb, following Michael Kerrisk.
.\" 2011-09-07, mtk, Added syncfs() documentation,
.\"
-.TH sync 2 2023-02-05 "Linux man-pages 6.03"
+.TH sync 2 2023-03-30 "Linux man-pages 6.05.01"
.SH NAME
sync, syncfs \- commit filesystem caches to disk
.SH LIBRARY
@@ -88,25 +88,6 @@ allocate space at the time of a
system call, and some previous write failed due to insufficient
storage space.
.SH VERSIONS
-.BR syncfs ()
-first appeared in Linux 2.6.39;
-library support was added in glibc 2.14.
-.SH STANDARDS
-.BR sync ():
-POSIX.1-2001, POSIX.1-2008, SVr4, 4.3BSD.
-.PP
-.BR syncfs ()
-is Linux-specific.
-.SH NOTES
-Since glibc 2.2.2, the Linux prototype for
-.BR sync ()
-is as listed above,
-following the various standards.
-In glibc 2.2.1 and earlier,
-it was "int sync(void)", and
-.BR sync ()
-always returned 0.
-.PP
According to the standard specification (e.g., POSIX.1-2001),
.BR sync ()
schedules the writes, but may return before the actual
@@ -120,6 +101,30 @@ provide the same guarantees as
.BR fsync ()
called on every file in
the system or filesystem respectively.
+.SH STANDARDS
+.TP
+.BR sync ()
+POSIX.1-2008.
+.TP
+.BR syncfs ()
+Linux.
+.SH HISTORY
+.TP
+.BR sync ()
+POSIX.1-2001, SVr4, 4.3BSD.
+.TP
+.BR syncfs ()
+Linux 2.6.39,
+glibc 2.14.
+.PP
+Since glibc 2.2.2, the Linux prototype for
+.BR sync ()
+is as listed above,
+following the various standards.
+In glibc 2.2.1 and earlier,
+it was "int sync(void)", and
+.BR sync ()
+always returned 0.
.PP
In mainline kernel versions prior to Linux 5.8,
.BR syncfs ()
diff --git a/man2/sync_file_range.2 b/man2/sync_file_range.2
index f48fbd498..f324f7589 100644
--- a/man2/sync_file_range.2
+++ b/man2/sync_file_range.2
@@ -7,7 +7,7 @@
.\" Andrew Morton's comments in fs/sync.c
.\" 2010-10-09, mtk, Document sync_file_range2()
.\"
-.TH sync_file_range 2 2022-12-04 "Linux man-pages 6.03"
+.TH sync_file_range 2 2023-07-15 "Linux man-pages 6.05.01"
.SH NAME
sync_file_range \- sync a file segment with disk
.SH LIBRARY
@@ -16,9 +16,10 @@ Standard C library
.SH SYNOPSIS
.nf
.BR "#define _GNU_SOURCE" " /* See feature_test_macros(7) */"
+.B #define _FILE_OFFSET_BITS 64
.B #include <fcntl.h>
.PP
-.BI "int sync_file_range(int " fd ", off64_t " offset ", off64_t " nbytes ,
+.BI "int sync_file_range(int " fd ", off_t " offset ", off_t " nbytes ,
.BI " unsigned int " flags );
.fi
.SH DESCRIPTION
@@ -155,12 +156,6 @@ Out of disk space.
refers to something other than a regular file, a block device, or
a directory.
.SH VERSIONS
-.BR sync_file_range ()
-appeared in Linux 2.6.17.
-.SH STANDARDS
-This system call is Linux-specific, and should be avoided
-in portable programs.
-.SH NOTES
.SS sync_file_range2()
Some architectures (e.g., PowerPC, ARM)
need 64-bit arguments to be aligned in a suitable pair of registers.
@@ -182,13 +177,17 @@ system call that orders the arguments suitably:
.in +4n
.EX
.BI "int sync_file_range2(int " fd ", unsigned int " flags ,
-.BI " off64_t " offset ", off64_t " nbytes );
+.BI " off_t " offset ", off_t " nbytes );
.EE
.in
.PP
The behavior of this system call is otherwise exactly the same as
.BR sync_file_range ().
-.PP
+.SH STANDARDS
+Linux.
+.SH HISTORY
+Linux 2.6.17.
+.SS sync_file_range2()
A system call with this signature first appeared on the ARM architecture
in Linux 2.6.20, with the name
.BR arm_sync_file_range ().
@@ -199,6 +198,14 @@ glibc transparently wraps
.BR sync_file_range2 ()
under the name
.BR sync_file_range ().
+.SH NOTES
+.B _FILE_OFFSET_BITS
+should be defined to be 64 in code that takes the address of
+.BR sync_file_range ,
+if the code is intended to be portable
+to traditional 32-bit x86 and ARM platforms where
+.BR off_t 's
+width defaults to 32 bits.
.SH SEE ALSO
.BR fdatasync (2),
.BR fsync (2),
diff --git a/man2/syscall.2 b/man2/syscall.2
index 3051baa52..43f054a5f 100644
--- a/man2/syscall.2
+++ b/man2/syscall.2
@@ -12,7 +12,7 @@
.\" 2015-01-17, Kees Cook <keescook@chromium.org>
.\" Added mips and arm64.
.\"
-.TH syscall 2 2023-02-05 "Linux man-pages 6.03"
+.TH syscall 2 2023-05-03 "Linux man-pages 6.05.01"
.SH NAME
syscall \- indirect system call
.SH LIBRARY
@@ -64,6 +64,12 @@ In general, a 0 return value indicates success.
A \-1 return value indicates an error,
and an error number is stored in
.IR errno .
+.SH ERRORS
+.TP
+.B ENOSYS
+The requested system call number is not implemented.
+.PP
+Other errors are specific to the invoked system call.
.SH NOTES
.BR syscall ()
first appeared in
@@ -235,7 +241,7 @@ nuances:
In order to indicate that a system call is called under the x32 ABI,
an additional bit,
.BR __X32_SYSCALL_BIT ,
-is bitwise-ORed with the system call number.
+is bitwise ORed with the system call number.
The ABI used by a process affects some process behaviors,
including signal handling or system call restarting.
.IP \[bu]
@@ -342,12 +348,12 @@ architectures may indiscriminately clobber other registers not listed here.
#include <signal.h>
#include <sys/syscall.h>
#include <unistd.h>
-
+\&
int
main(void)
{
pid_t tid;
-
+\&
tid = syscall(SYS_gettid);
syscall(SYS_tgkill, getpid(), tid, SIGHUP);
}
diff --git a/man2/syscalls.2 b/man2/syscalls.2
index d7c9f9df0..1011c14e0 100644
--- a/man2/syscalls.2
+++ b/man2/syscalls.2
@@ -9,7 +9,7 @@
.\"
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
-.TH syscalls 2 2023-02-05 "Linux man-pages 6.03"
+.TH syscalls 2 2023-07-30 "Linux man-pages 6.05.01"
.SH NAME
syscalls \- Linux system calls
.SH SYNOPSIS
@@ -136,8 +136,6 @@ The list of system calls that are available as at Linux 5.14
.\" Looking at scripts/checksyscalls.sh in the kernel source is
.\" instructive about x86 specifics.
.\"
-.nh
-.ad l
.TS
l2 le l
---
@@ -596,7 +594,8 @@ T}
\fBs390_sthyi\fP(2) 4.15 s390 only
\fBs390_guarded_storage\fP(2) 4.12 s390 only
\fBsched_get_affinity\fP(2) 2.6 T{
-Name of \fBsched_getaffinity\fP(2)
+Name of
+.BR \%sched_getaffinity (2)
on SPARC and SPARC64
T}
\fBsched_get_priority_max\fP(2) 2.0
@@ -607,7 +606,8 @@ T}
\fBsched_getscheduler\fP(2) 2.0
\fBsched_rr_get_interval\fP(2) 2.0
\fBsched_set_affinity\fP(2) 2.6 T{
-Name of \fBsched_setaffinity\fP(2)
+Name of
+.BR \%sched_setaffinity (2)
on SPARC and SPARC64
T}
\fBsched_setaffinity\fP(2) 2.6
@@ -832,8 +832,6 @@ T}
.\" 5a0015d62668e64c8b6e02e360fbbea121bfd5e6
\fBxtensa\fP(2) 2.6.13 Xtensa only
.TE
-.ad
-.hy
.PP
On many platforms, including x86-32, socket calls are all multiplexed
(via glibc wrapper functions) through
diff --git a/man2/sysctl.2 b/man2/sysctl.2
index 8cef090be..fbe967fda 100644
--- a/man2/sysctl.2
+++ b/man2/sysctl.2
@@ -7,7 +7,7 @@
.\" Modified Tue Oct 22 22:28:41 1996 by Eric S. Raymond <esr@thyrsus.com>
.\" Modified Mon Jan 5 20:31:04 1998 by aeb.
.\"
-.TH sysctl 2 2022-12-04 "Linux man-pages 6.03"
+.TH sysctl 2 2023-05-03 "Linux man-pages 6.05.01"
.SH NAME
sysctl \- read/write system parameters
.SH SYNOPSIS
@@ -73,12 +73,12 @@ non-NULL, but allowed zero room in
.B ENOTDIR
.I name
was not found.
-.SH VERSIONS
-This system call first appeared in Linux 1.3.57.
-It was removed in Linux 5.5; glibc support was removed in glibc 2.32.
.SH STANDARDS
-This call is Linux-specific, and should not be used in programs
-intended to be portable.
+Linux.
+.SH HISTORY
+Linux 1.3.57.
+Removed in Linux 5.5, glibc 2.32.
+.PP
It originated in
4.4BSD.
Only Linux has the
@@ -120,15 +120,15 @@ It is not yet possible to change operating system by writing to
#include <string.h>
#include <sys/syscall.h>
#include <unistd.h>
-
+\&
#include <linux/sysctl.h>
-
+\&
#define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]))
-
+\&
int _sysctl(struct __sysctl_args *args);
-
+\&
#define OSNAMESZ 100
-
+\&
int
main(void)
{
@@ -136,15 +136,15 @@ main(void)
char osname[OSNAMESZ];
size_t osnamelth;
struct __sysctl_args args;
-
+\&
memset(&args, 0, sizeof(args));
args.name = name;
args.nlen = ARRAY_SIZE(name);
args.oldval = osname;
args.oldlenp = &osnamelth;
-
+\&
osnamelth = sizeof(osname);
-
+\&
if (syscall(SYS__sysctl, &args) == \-1) {
perror("_sysctl");
exit(EXIT_FAILURE);
diff --git a/man2/sysfs.2 b/man2/sysfs.2
index 2f7a18d2e..d650a9c6e 100644
--- a/man2/sysfs.2
+++ b/man2/sysfs.2
@@ -4,7 +4,7 @@
.\"
.\" Created Wed Aug 9 1995 Thomas K. Dyas <tdyas@eden.rutgers.edu>
.\"
-.TH sysfs 2 2022-10-30 "Linux man-pages 6.03"
+.TH sysfs 2 2023-03-30 "Linux man-pages 6.05.01"
.SH NAME
sysfs \- get filesystem type information
.SH SYNOPSIS
@@ -79,8 +79,10 @@ is out-of-bounds;
.I option
is invalid.
.SH STANDARDS
+None.
+.SH HISTORY
SVr4.
-.SH NOTES
+.PP
This System-V derived system call is obsolete; don't use it.
On systems with
.IR /proc ,
diff --git a/man2/sysinfo.2 b/man2/sysinfo.2
index f620ee947..fc4413676 100644
--- a/man2/sysinfo.2
+++ b/man2/sysinfo.2
@@ -12,7 +12,7 @@
.\" Modified Tue Oct 22 22:29:51 1996 by Eric S. Raymond <esr@thyrsus.com>
.\" Modified Mon Aug 25 16:06:11 1997 by Nicolás Lichtmaier <nick@debian.org>
.\"
-.TH sysinfo 2 2022-10-30 "Linux man-pages 6.03"
+.TH sysinfo 2 2023-03-30 "Linux man-pages 6.05.01"
.SH NAME
sysinfo \- return system information
.SH LIBRARY
@@ -93,12 +93,10 @@ is set to indicate the error.
.B EFAULT
.I info
is not a valid address.
-.SH VERSIONS
-.BR sysinfo ()
-first appeared in Linux 0.98.pl6.
.SH STANDARDS
-This function is Linux-specific, and should not be used in programs
-intended to be portable.
+Linux.
+.SH HISTORY
+Linux 0.98.pl6.
.SH NOTES
All of the information provided by this system call is also available via
.I /proc/meminfo
diff --git a/man2/syslog.2 b/man2/syslog.2
index 9ee68a281..4e907781a 100644
--- a/man2/syslog.2
+++ b/man2/syslog.2
@@ -10,7 +10,7 @@
.\" 2008-02-15, Michael Kerrisk <mtk.manpages@gmail.com>
.\" Update LOG_BUF_LEN details; update RETURN VALUE section.
.\"
-.TH syslog 2 2023-02-05 "Linux man-pages 6.03"
+.TH syslog 2 2023-03-30 "Linux man-pages 6.05.01"
.SH NAME
syslog, klogctl \- read and/or clear kernel message ring buffer;
set console_loglevel
@@ -363,9 +363,8 @@ capability).
System call was interrupted by a signal; nothing was read.
(This can be seen only during a trace.)
.SH STANDARDS
-This system call is Linux-specific and should not be used in programs
-intended to be portable.
-.SH NOTES
+Linux.
+.SH HISTORY
From the very start, people noted that it is unfortunate that
a system call and a library routine of the same name are entirely
different animals.
diff --git a/man2/tee.2 b/man2/tee.2
index faba7f7ba..7a3a6b148 100644
--- a/man2/tee.2
+++ b/man2/tee.2
@@ -3,7 +3,7 @@
.\"
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
-.TH tee 2 2022-12-04 "Linux man-pages 6.03"
+.TH tee 2 2023-05-03 "Linux man-pages 6.05.01"
.SH NAME
tee \- duplicating pipe content
.SH LIBRARY
@@ -100,13 +100,11 @@ refer to the same pipe.
.TP
.B ENOMEM
Out of memory.
-.SH VERSIONS
-The
-.BR tee ()
-system call first appeared in Linux 2.6.17;
-library support was added in glibc 2.5.
.SH STANDARDS
-This system call is Linux-specific.
+Linux.
+.SH HISTORY
+Linux 2.6.17,
+glibc 2.5.
.SH NOTES
Conceptually,
.BR tee ()
@@ -143,24 +141,24 @@ Tue Oct 28 10:06:00 CET 2014
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
-
+\&
int
main(int argc, char *argv[])
{
int fd;
ssize_t len, slen;
-
+\&
if (argc != 2) {
fprintf(stderr, "Usage: %s <file>\en", argv[0]);
exit(EXIT_FAILURE);
}
-
+\&
fd = open(argv[1], O_WRONLY | O_CREAT | O_TRUNC, 0644);
if (fd == \-1) {
perror("open");
exit(EXIT_FAILURE);
}
-
+\&
for (;;) {
/*
* tee stdin to stdout.
@@ -175,7 +173,7 @@ main(int argc, char *argv[])
}
if (len == 0)
break;
-
+\&
/*
* Consume stdin by splicing it to a file.
*/
@@ -189,7 +187,7 @@ main(int argc, char *argv[])
len \-= slen;
}
}
-
+\&
close(fd);
exit(EXIT_SUCCESS);
}
diff --git a/man2/time.2 b/man2/time.2
index e6038140c..f121e9cb4 100644
--- a/man2/time.2
+++ b/man2/time.2
@@ -6,7 +6,7 @@
.\" Modified Sat Jul 24 14:13:40 1993 by Rik Faith <faith@cs.unc.edu>
.\" Additions by Joseph S. Myers <jsm28@cam.ac.uk>, 970909
.\"
-.TH time 2 2022-12-29 "Linux man-pages 6.03"
+.TH time 2 2023-03-30 "Linux man-pages 6.05.01"
.SH NAME
time \- get time in seconds
.SH LIBRARY
@@ -47,12 +47,7 @@ wrapper function invokes an implementation provided by the
an invalid address may instead trigger a
.B SIGSEGV
signal.
-.SH STANDARDS
-SVr4, 4.3BSD, C99, POSIX.1-2001.
-.\" Under 4.3BSD, this call is obsoleted by
-.\" .BR gettimeofday (2).
-POSIX does not specify any error conditions.
-.SH NOTES
+.SH VERSIONS
POSIX.1 defines
.I seconds since the Epoch
using a formula that approximates the number of seconds between a
@@ -88,6 +83,17 @@ range.
Applications intended to run after 2038 should use ABIs with
.I time_t
wider than 32 bits.
+.SS C library/kernel differences
+On some architectures, an implementation of
+.BR time ()
+is provided in the
+.BR vdso (7).
+.SH STANDARDS
+C11, POSIX.1-2008.
+.SH HISTORY
+SVr4, 4.3BSD, C89, POSIX.1-2001.
+.\" Under 4.3BSD, this call is obsoleted by
+.\" .BR gettimeofday (2).
.SH BUGS
Error returns from this system call are indistinguishable from
successful reports that the time is a few seconds
@@ -102,12 +108,6 @@ argument is obsolescent and should always be NULL in new code.
When
.I tloc
is NULL, the call cannot fail.
-.\"
-.SS C library/kernel differences
-On some architectures, an implementation of
-.BR time ()
-is provided in the
-.BR vdso (7).
.SH SEE ALSO
.BR date (1),
.BR gettimeofday (2),
diff --git a/man2/timer_create.2 b/man2/timer_create.2
index a8d553275..3265b27c4 100644
--- a/man2/timer_create.2
+++ b/man2/timer_create.2
@@ -3,7 +3,7 @@
.\"
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
-.TH timer_create 2 2023-02-05 "Linux man-pages 6.03"
+.TH timer_create 2 2023-05-03 "Linux man-pages 6.05.01"
.SH NAME
timer_create \- create a POSIX per-process timer
.SH LIBRARY
@@ -222,9 +222,51 @@ but the caller did not have the
.B CAP_WAKE_ALARM
capability.
.SH VERSIONS
-This system call is available since Linux 2.6.
+.SS C library/kernel differences
+Part of the implementation of the POSIX timers API is provided by glibc.
+.\" See nptl/sysdeps/unix/sysv/linux/timer_create.c
+In particular:
+.IP \[bu] 3
+Much of the functionality for
+.B SIGEV_THREAD
+is implemented within glibc, rather than the kernel.
+(This is necessarily so,
+since the thread involved in handling the notification is one
+that must be managed by the C library POSIX threads implementation.)
+Although the notification delivered to the process is via a thread,
+internally the NPTL implementation uses a
+.I sigev_notify
+value of
+.B SIGEV_THREAD_ID
+along with a real-time signal that is reserved by the implementation (see
+.BR nptl (7)).
+.IP \[bu]
+The implementation of the default case where
+.I evp
+is NULL is handled inside glibc,
+which invokes the underlying system call with a suitably populated
+.I sigevent
+structure.
+.IP \[bu]
+The timer IDs presented at user level are maintained by glibc,
+which maps these IDs to the timer IDs employed by the kernel.
+.\" See the glibc source file kernel-posix-timers.h for the structure
+.\" that glibc uses to map user-space timer IDs to kernel timer IDs
+.\" The kernel-level timer ID is exposed via siginfo.si_tid.
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008.
+POSIX.1-2008.
+.SH HISTORY
+Linux 2.6.
+POSIX.1-2001.
+.PP
+Prior to Linux 2.6,
+glibc provided an incomplete user-space implementation
+.RB ( CLOCK_REALTIME
+timers only) using POSIX threads,
+and before glibc 2.17,
+.\" glibc commit 93a78ac437ba44f493333d7e2a4b0249839ce460
+the implementation falls back to this technique on systems
+running kernels older than Linux 2.6.
.SH NOTES
A program may create multiple interval timers using
.BR timer_create ().
@@ -277,48 +319,6 @@ support for POSIX timers is a configurable option that is enabled by default.
Kernel support can be disabled via the
.B CONFIG_POSIX_TIMERS
option.
-.\"
-.SS C library/kernel differences
-Part of the implementation of the POSIX timers API is provided by glibc.
-.\" See nptl/sysdeps/unix/sysv/linux/timer_create.c
-In particular:
-.IP \[bu] 3
-Much of the functionality for
-.B SIGEV_THREAD
-is implemented within glibc, rather than the kernel.
-(This is necessarily so,
-since the thread involved in handling the notification is one
-that must be managed by the C library POSIX threads implementation.)
-Although the notification delivered to the process is via a thread,
-internally the NPTL implementation uses a
-.I sigev_notify
-value of
-.B SIGEV_THREAD_ID
-along with a real-time signal that is reserved by the implementation (see
-.BR nptl (7)).
-.IP \[bu]
-The implementation of the default case where
-.I evp
-is NULL is handled inside glibc,
-which invokes the underlying system call with a suitably populated
-.I sigevent
-structure.
-.IP \[bu]
-The timer IDs presented at user level are maintained by glibc,
-which maps these IDs to the timer IDs employed by the kernel.
-.\" See the glibc source file kernel-posix-timers.h for the structure
-.\" that glibc uses to map user-space timer IDs to kernel timer IDs
-.\" The kernel-level timer ID is exposed via siginfo.si_tid.
-.PP
-The POSIX timers system calls first appeared in Linux 2.6.
-Prior to this,
-glibc provided an incomplete user-space implementation
-.RB ( CLOCK_REALTIME
-timers only) using POSIX threads,
-and before glibc 2.17,
-.\" glibc commit 93a78ac437ba44f493333d7e2a4b0249839ce460
-the implementation falls back to this technique on systems
-running kernels older than Linux 2.6.
.SH EXAMPLES
The program below takes two arguments: a sleep period in seconds,
and a timer frequency in nanoseconds.
@@ -360,31 +360,31 @@ Caught signal 34
#include <stdlib.h>
#include <time.h>
#include <unistd.h>
-
+\&
#define CLOCKID CLOCK_REALTIME
#define SIG SIGRTMIN
-
+\&
#define errExit(msg) do { perror(msg); exit(EXIT_FAILURE); \e
} while (0)
-
+\&
static void
print_siginfo(siginfo_t *si)
{
int or;
timer_t *tidp;
-
+\&
tidp = si\->si_value.sival_ptr;
-
+\&
printf(" sival_ptr = %p; ", si\->si_value.sival_ptr);
printf(" *sival_ptr = %#jx\en", (uintmax_t) *tidp);
-
+\&
or = timer_getoverrun(*tidp);
if (or == \-1)
errExit("timer_getoverrun");
else
printf(" overrun count = %d\en", or);
}
-
+\&
static void
handler(int sig, siginfo_t *si, void *uc)
{
@@ -393,12 +393,12 @@ handler(int sig, siginfo_t *si, void *uc)
printf() is not async\-signal\-safe; see signal\-safety(7).
Nevertheless, we use printf() here as a simple way of
showing that the handler was called. */
-
+\&
printf("Caught signal %d\en", sig);
print_siginfo(si);
signal(sig, SIG_IGN);
}
-
+\&
int
main(int argc, char *argv[])
{
@@ -408,64 +408,64 @@ main(int argc, char *argv[])
struct sigevent sev;
struct sigaction sa;
struct itimerspec its;
-
+\&
if (argc != 3) {
fprintf(stderr, "Usage: %s <sleep\-secs> <freq\-nanosecs>\en",
argv[0]);
exit(EXIT_FAILURE);
}
-
+\&
/* Establish handler for timer signal. */
-
+\&
printf("Establishing handler for signal %d\en", SIG);
sa.sa_flags = SA_SIGINFO;
sa.sa_sigaction = handler;
sigemptyset(&sa.sa_mask);
if (sigaction(SIG, &sa, NULL) == \-1)
errExit("sigaction");
-
+\&
/* Block timer signal temporarily. */
-
+\&
printf("Blocking signal %d\en", SIG);
sigemptyset(&mask);
sigaddset(&mask, SIG);
if (sigprocmask(SIG_SETMASK, &mask, NULL) == \-1)
errExit("sigprocmask");
-
+\&
/* Create the timer. */
-
+\&
sev.sigev_notify = SIGEV_SIGNAL;
sev.sigev_signo = SIG;
sev.sigev_value.sival_ptr = &timerid;
if (timer_create(CLOCKID, &sev, &timerid) == \-1)
errExit("timer_create");
-
+\&
printf("timer ID is %#jx\en", (uintmax_t) timerid);
-
+\&
/* Start the timer. */
-
+\&
freq_nanosecs = atoll(argv[2]);
its.it_value.tv_sec = freq_nanosecs / 1000000000;
its.it_value.tv_nsec = freq_nanosecs % 1000000000;
its.it_interval.tv_sec = its.it_value.tv_sec;
its.it_interval.tv_nsec = its.it_value.tv_nsec;
-
+\&
if (timer_settime(timerid, 0, &its, NULL) == \-1)
errExit("timer_settime");
-
+\&
/* Sleep for a while; meanwhile, the timer may expire
multiple times. */
-
+\&
printf("Sleeping for %d seconds\en", atoi(argv[1]));
sleep(atoi(argv[1]));
-
+\&
/* Unlock the timer signal, so that timer notification
can be delivered. */
-
+\&
printf("Unblocking signal %d\en", SIG);
if (sigprocmask(SIG_UNBLOCK, &mask, NULL) == \-1)
errExit("sigprocmask");
-
+\&
exit(EXIT_SUCCESS);
}
.EE
diff --git a/man2/timer_delete.2 b/man2/timer_delete.2
index f7d9c1688..ee1468e60 100644
--- a/man2/timer_delete.2
+++ b/man2/timer_delete.2
@@ -3,7 +3,7 @@
.\"
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
-.TH timer_delete 2 2022-10-30 "Linux man-pages 6.03"
+.TH timer_delete 2 2023-03-30 "Linux man-pages 6.05.01"
.SH NAME
timer_delete \- delete a POSIX per-process timer
.SH LIBRARY
@@ -45,10 +45,11 @@ is set to indicate the error.
.B EINVAL
.I timerid
is not a valid timer ID.
-.SH VERSIONS
-This system call is available since Linux 2.6.
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008.
+POSIX.1-2008.
+.SH HISTORY
+Linux 2.6.
+POSIX.1-2001.
.SH SEE ALSO
.BR clock_gettime (2),
.BR timer_create (2),
diff --git a/man2/timer_getoverrun.2 b/man2/timer_getoverrun.2
index e2a40d0b4..75219572e 100644
--- a/man2/timer_getoverrun.2
+++ b/man2/timer_getoverrun.2
@@ -3,7 +3,7 @@
.\"
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
-.TH timer_getoverrun 2 2022-10-30 "Linux man-pages 6.03"
+.TH timer_getoverrun 2 2023-03-30 "Linux man-pages 6.05.01"
.SH NAME
timer_getoverrun \- get overrun count for a POSIX per-process timer
.SH LIBRARY
@@ -76,10 +76,6 @@ is set to indicate the error.
.I timerid
is not a valid timer ID.
.SH VERSIONS
-This system call is available since Linux 2.6.
-.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008.
-.SH NOTES
When timer notifications are delivered via signals
.RB ( SIGEV_SIGNAL ),
on Linux it is also possible to obtain the overrun count via the
@@ -96,6 +92,11 @@ POSIX.1 discusses timer overruns only in the context of
timer notifications using signals.
.\" FIXME . Austin bug filed, 11 Feb 09
.\" https://www.austingroupbugs.net/view.php?id=95
+.SH STANDARDS
+POSIX.1-2008.
+.SH HISTORY
+Linux 2.6.
+POSIX.1-2001.
.SH BUGS
POSIX.1 specifies that if the timer overrun count
is equal to or greater than an implementation-defined maximum,
diff --git a/man2/timer_settime.2 b/man2/timer_settime.2
index 6c9dcf956..030bab543 100644
--- a/man2/timer_settime.2
+++ b/man2/timer_settime.2
@@ -3,7 +3,7 @@
.\"
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
-.TH timer_settime 2 2022-12-03 "Linux man-pages 6.03"
+.TH timer_settime 2 2023-03-30 "Linux man-pages 6.05.01"
.SH NAME
timer_settime, timer_gettime \- arm/disarm and fetch
state of POSIX per-process timer
@@ -14,10 +14,10 @@ Real-time library
.nf
.B #include <time.h>
.PP
+.BI "int timer_gettime(timer_t " timerid ", struct itimerspec *" curr_value );
.BI "int timer_settime(timer_t " timerid ", int " flags ,
.BI " const struct itimerspec *restrict " new_value ,
.BI " struct itimerspec *_Nullable restrict " old_value );
-.BI "int timer_gettime(timer_t " timerid ", struct itimerspec *" curr_value );
.fi
.PP
.RS -4
@@ -172,10 +172,11 @@ may fail with the following errors:
is negative; or
.I new_value.it_value.tv_nsec
is negative or greater than 999,999,999.
-.SH VERSIONS
-These system calls are available since Linux 2.6.
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008.
+POSIX.1-2008.
+.SH HISTORY
+Linux 2.6.
+POSIX.1-2001.
.SH EXAMPLES
See
.BR timer_create (2).
diff --git a/man2/timerfd_create.2 b/man2/timerfd_create.2
index 56514d56c..6ceea56ac 100644
--- a/man2/timerfd_create.2
+++ b/man2/timerfd_create.2
@@ -2,7 +2,7 @@
.\"
.\" SPDX-License-Identifier: GPL-2.0-or-later
.\"
-.TH timerfd_create 2 2023-02-05 "Linux man-pages 6.03"
+.TH timerfd_create 2 2023-05-03 "Linux man-pages 6.05.01"
.SH NAME
timerfd_create, timerfd_settime, timerfd_gettime \-
timers that notify via file descriptors
@@ -468,11 +468,11 @@ falls outside the range zero to 999,999,999).
.\" In older kernel versions, no check was made for invalid flags.
.I flags
is invalid.
-.SH VERSIONS
-These system calls are available since Linux 2.6.25.
-Library support is provided since glibc 2.8.
.SH STANDARDS
-These system calls are Linux-specific.
+Linux.
+.SH HISTORY
+Linux 2.6.25,
+glibc 2.8.
.SH NOTES
Suppose the following scenario for
.B CLOCK_REALTIME
@@ -602,7 +602,7 @@ a.out 3 1 100
#include <sys/timerfd.h>
#include <time.h>
#include <unistd.h>
-
+\&
static void
print_elapsed_time(void)
{
@@ -610,16 +610,16 @@ print_elapsed_time(void)
static int first_call = 1;
struct timespec curr;
static struct timespec start;
-
+\&
if (first_call) {
first_call = 0;
if (clock_gettime(CLOCK_MONOTONIC, &start) == \-1)
err(EXIT_FAILURE, "clock_gettime");
}
-
+\&
if (clock_gettime(CLOCK_MONOTONIC, &curr) == \-1)
err(EXIT_FAILURE, "clock_gettime");
-
+\&
secs = curr.tv_sec \- start.tv_sec;
nsecs = curr.tv_nsec \- start.tv_nsec;
if (nsecs < 0) {
@@ -628,7 +628,7 @@ print_elapsed_time(void)
}
printf("%d.%03d: ", secs, (nsecs + 500000) / 1000000);
}
-
+\&
int
main(int argc, char *argv[])
{
@@ -637,19 +637,19 @@ main(int argc, char *argv[])
uint64_t exp, tot_exp, max_exp;
struct timespec now;
struct itimerspec new_value;
-
+\&
if (argc != 2 && argc != 4) {
fprintf(stderr, "%s init\-secs [interval\-secs max\-exp]\en",
argv[0]);
exit(EXIT_FAILURE);
}
-
+\&
if (clock_gettime(CLOCK_REALTIME, &now) == \-1)
err(EXIT_FAILURE, "clock_gettime");
-
+\&
/* Create a CLOCK_REALTIME absolute timer with initial
expiration and interval as specified in command line. */
-
+\&
new_value.it_value.tv_sec = now.tv_sec + atoi(argv[1]);
new_value.it_value.tv_nsec = now.tv_nsec;
if (argc == 2) {
@@ -660,27 +660,27 @@ main(int argc, char *argv[])
max_exp = atoi(argv[3]);
}
new_value.it_interval.tv_nsec = 0;
-
+\&
fd = timerfd_create(CLOCK_REALTIME, 0);
if (fd == \-1)
err(EXIT_FAILURE, "timerfd_create");
-
+\&
if (timerfd_settime(fd, TFD_TIMER_ABSTIME, &new_value, NULL) == \-1)
err(EXIT_FAILURE, "timerfd_settime");
-
+\&
print_elapsed_time();
printf("timer started\en");
-
+\&
for (tot_exp = 0; tot_exp < max_exp;) {
s = read(fd, &exp, sizeof(uint64_t));
if (s != sizeof(uint64_t))
err(EXIT_FAILURE, "read");
-
+\&
tot_exp += exp;
print_elapsed_time();
printf("read: %" PRIu64 "; total=%" PRIu64 "\en", exp, tot_exp);
}
-
+\&
exit(EXIT_SUCCESS);
}
.EE
diff --git a/man2/times.2 b/man2/times.2
index a0a644f06..1d85010ce 100644
--- a/man2/times.2
+++ b/man2/times.2
@@ -15,7 +15,7 @@
.\" Added notes on nonstandard behavior: Linux allows 'buf' to
.\" be NULL, but POSIX.1 doesn't specify this and it's nonportable.
.\"
-.TH times 2 2023-02-10 "Linux man-pages 6.03"
+.TH times 2 2023-03-30 "Linux man-pages 6.05.01"
.SH NAME
times \- get process times
.SH LIBRARY
@@ -101,19 +101,25 @@ is set to indicate the error.
.B EFAULT
.I tms
points outside the process's address space.
+.SH VERSIONS
+On Linux,
+the
+.I buf
+argument can be specified as NULL,
+with the result that
+.BR times ()
+just returns a function result.
+However,
+POSIX does not specify this behavior,
+and most
+other UNIX implementations require a non-NULL value for
+.IR buf .
.SH STANDARDS
+POSIX.1-2008.
+.SH HISTORY
POSIX.1-2001,
-POSIX.1-2008,
SVr4,
4.3BSD.
-.SH NOTES
-The number of clock ticks per second can be obtained using:
-.PP
-.in +4n
-.EX
-sysconf(_SC_CLK_TCK);
-.EE
-.in
.PP
In POSIX.1-1996 the symbol \fBCLK_TCK\fP (defined in
.IR <time.h> )
@@ -141,28 +147,6 @@ This nonconformance is rectified in Linux 2.6.9 and later.
.\" or waitpid() returns the process ID of this terminated child.
.PP
On Linux,
-the
-.I buf
-argument can be specified as NULL,
-with the result that
-.BR times ()
-just returns a function result.
-However,
-POSIX does not specify this behavior,
-and most
-other UNIX implementations require a non-NULL value for
-.IR buf .
-.PP
-Note that
-.BR clock (3)
-also returns a value of type
-.IR clock_t ,
-but this value is measured in units of
-.BR CLOCKS_PER_SEC ,
-not the clock ticks used by
-.BR times ().
-.PP
-On Linux,
the \[lq]arbitrary point in the past\[rq]
from which the return value of
.BR times ()
@@ -183,7 +167,7 @@ instead.
.\" .PP
.\" On older systems the number of clock ticks per second is given
.\" by the variable HZ.
-.SS Historical
+.PP
SVr1-3 returns
.I long
and the struct members are of type
@@ -196,6 +180,23 @@ for the struct members,
because it had no type
.I time_t
yet.
+.SH NOTES
+The number of clock ticks per second can be obtained using:
+.PP
+.in +4n
+.EX
+sysconf(_SC_CLK_TCK);
+.EE
+.in
+.PP
+Note that
+.BR clock (3)
+also returns a value of type
+.IR clock_t ,
+but this value is measured in units of
+.BR CLOCKS_PER_SEC ,
+not the clock ticks used by
+.BR times ().
.SH BUGS
A limitation of the Linux system call conventions on some architectures
(notably i386) means that on Linux 2.6 there is a small time window
diff --git a/man2/tkill.2 b/man2/tkill.2
index 0e893f7c2..8780e8a0f 100644
--- a/man2/tkill.2
+++ b/man2/tkill.2
@@ -6,7 +6,7 @@
.\" 2004-05-31, added tgkill, ahu, aeb
.\" 2008-01-15 mtk -- rewrote DESCRIPTION
.\"
-.TH tkill 2 2022-12-04 "Linux man-pages 6.03"
+.TH tkill 2 2023-03-30 "Linux man-pages 6.05.01"
.SH NAME
tkill, tgkill \- send a signal to a thread
.SH LIBRARY
@@ -107,30 +107,22 @@ For the required permissions, see
.TP
.B ESRCH
No process with the specified thread ID (and thread group ID) exists.
-.SH VERSIONS
-.BR tkill ()
-is supported since Linux 2.4.19 / 2.5.4.
-.BR tgkill ()
-was added in Linux 2.5.75.
-.PP
-Library support for
-.BR tgkill ()
-was added in glibc 2.30.
.SH STANDARDS
+Linux.
+.SH HISTORY
+.TP
.BR tkill ()
-and
+Linux 2.4.19 / 2.5.4.
+.TP
.BR tgkill ()
-are Linux-specific and should not be used
-in programs that are intended to be portable.
+Linux 2.5.75,
+glibc 2.30.
.SH NOTES
See the description of
.B CLONE_THREAD
in
.BR clone (2)
for an explanation of thread groups.
-.PP
-Before glibc 2.30, there was also no wrapper function for
-.BR tgkill ().
.SH SEE ALSO
.BR clone (2),
.BR gettid (2),
diff --git a/man2/truncate.2 b/man2/truncate.2
index 5488e8106..02a12e519 100644
--- a/man2/truncate.2
+++ b/man2/truncate.2
@@ -12,7 +12,7 @@
.\" Modified 2002-04-06 by Andries Brouwer <aeb@cwi.nl>
.\" Modified 2004-06-23 by Michael Kerrisk <mtk.manpages@gmail.com>
.\"
-.TH truncate 2 2023-02-05 "Linux man-pages 6.03"
+.TH truncate 2 2023-03-30 "Linux man-pages 6.05.01"
.SH NAME
truncate, ftruncate \- truncate a file to a specified length
.SH LIBRARY
@@ -176,25 +176,7 @@ POSIX permits, and portable applications should handle,
either error for this case.
(Linux produces
.BR EINVAL .)
-.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008,
-4.4BSD, SVr4 (these calls first appeared in 4.2BSD).
-.\" POSIX.1-1996 has
-.\" .BR ftruncate ().
-.\" POSIX.1-2001 also has
-.\" .BR truncate (),
-.\" as an XSI extension.
-.\" .LP
-.\" SVr4 documents additional
-.\" .BR truncate ()
-.\" error conditions EMFILE, EMULTIHP, ENFILE, ENOLINK. SVr4 documents for
-.\" .BR ftruncate ()
-.\" an additional EAGAIN error condition.
-.SH NOTES
-.BR ftruncate ()
-can also be used to set the size of a POSIX shared memory object; see
-.BR shm_open (3).
-.PP
+.SH VERSIONS
The details in DESCRIPTION are for XSI-compliant systems.
For non-XSI-compliant systems, the POSIX standard allows
two behaviors for
@@ -216,6 +198,27 @@ to be used to extend a file beyond its current length:
a notable example on Linux is VFAT.
.\" At the very least: OSF/1, Solaris 7, and FreeBSD conform, mtk, Jan 2002
.PP
+On some 32-bit architectures,
+the calling signature for these system calls differ,
+for the reasons described in
+.BR syscall (2).
+.SH STANDARDS
+POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001,
+4.4BSD, SVr4 (first appeared in 4.2BSD).
+.\" POSIX.1-1996 has
+.\" .BR ftruncate ().
+.\" POSIX.1-2001 also has
+.\" .BR truncate (),
+.\" as an XSI extension.
+.\" .LP
+.\" SVr4 documents additional
+.\" .BR truncate ()
+.\" error conditions EMFILE, EMULTIHP, ENFILE, ENOLINK. SVr4 documents for
+.\" .BR ftruncate ()
+.\" an additional EAGAIN error condition.
+.PP
The original Linux
.BR truncate ()
and
@@ -229,11 +232,10 @@ system calls that handle large files.
However, these details can be ignored by applications using glibc, whose
wrapper functions transparently employ the more recent system calls
where they are available.
-.PP
-On some 32-bit architectures,
-the calling signature for these system calls differ,
-for the reasons described in
-.BR syscall (2).
+.SH NOTES
+.BR ftruncate ()
+can also be used to set the size of a POSIX shared memory object; see
+.BR shm_open (3).
.SH BUGS
A header file bug in glibc 2.12 meant that the minimum value of
.\" http://sourceware.org/bugzilla/show_bug.cgi?id=12037
diff --git a/man2/umask.2 b/man2/umask.2
index db57df55c..c920b55e5 100644
--- a/man2/umask.2
+++ b/man2/umask.2
@@ -11,7 +11,7 @@
.\" <nick@debian.com> with Lars Wirzenius <liw@iki.fi> suggestion
.\" 2006-05-13, mtk, substantial rewrite of description of 'mask'
.\" 2008-01-09, mtk, a few rewrites and additions.
-.TH umask 2 2023-02-05 "Linux man-pages 6.03"
+.TH umask 2 2023-03-30 "Linux man-pages 6.05.01"
.SH NAME
umask \- set file mode creation mask
.SH LIBRARY
@@ -100,7 +100,9 @@ resulting file will be:
This system call always succeeds and the previous value of the mask
is returned.
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, SVr4, 4.3BSD.
+POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001, SVr4, 4.3BSD.
.SH NOTES
A child process created via
.BR fork (2)
diff --git a/man2/umount.2 b/man2/umount.2
index 605d91fd1..cba0abcb4 100644
--- a/man2/umount.2
+++ b/man2/umount.2
@@ -7,7 +7,7 @@
.\" 2008-10-06, mtk: Created this as a new page by splitting
.\" umount/umount2 material out of mount.2
.\"
-.TH umount 2 2022-12-04 "Linux man-pages 6.03"
+.TH umount 2 2023-03-30 "Linux man-pages 6.05.01"
.SH NAME
umount, umount2 \- unmount filesystem
.SH LIBRARY
@@ -154,15 +154,25 @@ The kernel could not allocate a free page to copy filenames or data into.
.TP
.B EPERM
The caller does not have the required privileges.
-.SH VERSIONS
+.SH STANDARDS
+Linux.
+.SH HISTORY
.B MNT_DETACH
and
.B MNT_EXPIRE
.\" http://sourceware.org/bugzilla/show_bug.cgi?id=10092
are available since glibc 2.11.
-.SH STANDARDS
-These functions are Linux-specific and should not be used in
-programs intended to be portable.
+.PP
+The original
+.BR umount ()
+function was called as \fIumount(device)\fP and would return
+.B ENOTBLK
+when called with something other than a block device.
+In Linux 0.98p4, a call \fIumount(dir)\fP was added, in order to
+support anonymous devices.
+In Linux 2.3.99-pre7, the call \fIumount(device)\fP was removed,
+leaving only \fIumount(dir)\fP (since now devices can be mounted
+in more than one place, so specifying the device does not suffice).
.SH NOTES
.SS umount() and shared mounts
Shared mounts cause any mount activity on a mount, including
@@ -196,17 +206,6 @@ and
prior to
.BR umount ()
being called.
-.SS Historical details
-The original
-.BR umount ()
-function was called as \fIumount(device)\fP and would return
-.B ENOTBLK
-when called with something other than a block device.
-In Linux 0.98p4, a call \fIumount(dir)\fP was added, in order to
-support anonymous devices.
-In Linux 2.3.99-pre7, the call \fIumount(device)\fP was removed,
-leaving only \fIumount(dir)\fP (since now devices can be mounted
-in more than one place, so specifying the device does not suffice).
.SH SEE ALSO
.BR mount (2),
.BR mount_namespaces (7),
diff --git a/man2/uname.2 b/man2/uname.2
index 601b674f4..e84f3e76e 100644
--- a/man2/uname.2
+++ b/man2/uname.2
@@ -4,7 +4,7 @@
.\"
.\" 2007-07-05 mtk: Added details on underlying system call interfaces
.\"
-.TH uname 2 2023-02-05 "Linux man-pages 6.03"
+.TH uname 2 2023-03-30 "Linux man-pages 6.05.01"
.SH NAME
uname \- get name and information about current kernel
.SH LIBRARY
@@ -56,24 +56,10 @@ is set to indicate the error.
.B EFAULT
.I buf
is not valid.
-.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, SVr4, 4.4BSD.
-.PP
+.SH VERSIONS
The
.I domainname
member (the NIS or YP domain name) is a GNU extension.
-.SH NOTES
-The kernel has the name, release, version, and supported machine type built in.
-Conversely, the
-.I nodename
-field is configured by the administrator to match the network
-(this is what the BSD historically calls the "hostname",
-and is set via
-.BR sethostname (2)).
-Similarly, the
-.I domainname
-field is set via
-.BR setdomainname (2).
.PP
The length of the fields in the struct varies.
Some operating systems
@@ -90,13 +76,10 @@ Clearly, it is a bad
idea to use any of these constants; just use sizeof(...).
SVr4 uses 257, "to support Internet hostnames"
\[em] this is the largest value likely to be encountered in the wild.
-.PP
-Part of the utsname information is also accessible via
-.IR /proc/sys/kernel/ { ostype ,
-.IR hostname ,
-.IR osrelease ,
-.IR version ,
-.IR domainname }.
+.SH STANDARDS
+POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001, SVr4, 4.4BSD.
.SS C library/kernel differences
Over time, increases in the size of the
.I utsname
@@ -125,6 +108,25 @@ The glibc
.BR uname ()
wrapper function hides these details from applications,
invoking the most recent version of the system call provided by the kernel.
+.SH NOTES
+The kernel has the name, release, version, and supported machine type built in.
+Conversely, the
+.I nodename
+field is configured by the administrator to match the network
+(this is what the BSD historically calls the "hostname",
+and is set via
+.BR sethostname (2)).
+Similarly, the
+.I domainname
+field is set via
+.BR setdomainname (2).
+.PP
+Part of the utsname information is also accessible via
+.IR /proc/sys/kernel/ { ostype ,
+.IR hostname ,
+.IR osrelease ,
+.IR version ,
+.IR domainname }.
.SH SEE ALSO
.BR uname (1),
.BR getdomainname (2),
diff --git a/man2/unimplemented.2 b/man2/unimplemented.2
index 143411e2e..535d3e93f 100644
--- a/man2/unimplemented.2
+++ b/man2/unimplemented.2
@@ -4,7 +4,7 @@
.\"
.\" Updated, aeb, 980612
.\"
-.TH UNIMPLEMENTED 2 2022-10-09 "Linux man-pages 6.03"
+.TH UNIMPLEMENTED 2 2022-10-09 "Linux man-pages 6.05.01"
.SH NAME
afs_syscall, break, fattach, fdetach, ftime, getmsg, getpmsg, gtty, isastream,
lock, madvise1, mpx, prof, profil, putmsg, putpmsg, security,
diff --git a/man2/unlink.2 b/man2/unlink.2
index 4ace85760..85cb670aa 100644
--- a/man2/unlink.2
+++ b/man2/unlink.2
@@ -10,7 +10,7 @@
.\" Modified 2001-05-17 by aeb
.\" Modified 2004-06-23 by Michael Kerrisk <mtk.manpages@gmail.com>
.\"
-.TH unlink 2 2023-02-05 "Linux man-pages 6.03"
+.TH unlink 2 2023-03-30 "Linux man-pages 6.05.01"
.SH NAME
unlink, unlinkat \- delete a name and possibly the file it refers to
.SH LIBRARY
@@ -252,20 +252,20 @@ was not specified in
is relative and
.I dirfd
is a file descriptor referring to a file other than a directory.
-.SH VERSIONS
-.BR unlinkat ()
-was added in Linux 2.6.16;
-library support was added in glibc 2.4.
.SH STANDARDS
-.BR unlink ():
-SVr4, 4.3BSD, POSIX.1-2001, POSIX.1-2008.
+POSIX.1-2008.
+.SH HISTORY
+.TP
+.BR unlink ()
+SVr4, 4.3BSD, POSIX.1-2001.
.\" SVr4 documents additional error
.\" conditions EINTR, EMULTIHOP, ETXTBSY, ENOLINK.
-.PP
-.BR unlinkat ():
+.TP
+.BR unlinkat ()
POSIX.1-2008.
-.SH NOTES
-.SS glibc notes
+Linux 2.6.16,
+glibc 2.4.
+.SS glibc
On older kernels where
.BR unlinkat ()
is unavailable, the glibc wrapper function falls back to the use of
diff --git a/man2/unshare.2 b/man2/unshare.2
index 5796ddc52..b12afb55e 100644
--- a/man2/unshare.2
+++ b/man2/unshare.2
@@ -15,7 +15,7 @@
.\" by clone, which would require porting and maintaining all commands
.\" such as login, and su, that establish a user session.
.\"
-.TH unshare 2 2023-02-05 "Linux man-pages 6.03"
+.TH unshare 2 2023-05-26 "Linux man-pages 6.05.01"
.SH NAME
unshare \- disassociate parts of the process execution context
.SH LIBRARY
@@ -419,14 +419,10 @@ and the limit on the number of nested user namespaces would be exceeded.
See the discussion of the
.B ENOSPC
error above.
-.SH VERSIONS
-The
-.BR unshare ()
-system call was added in Linux 2.6.16.
.SH STANDARDS
-The
-.BR unshare ()
-system call is Linux-specific.
+Linux.
+.SH HISTORY
+Linux 2.6.16.
.SH NOTES
Not all of the process attributes that can be shared when
a new process is created using
@@ -500,7 +496,7 @@ commands shows that the two shells are in different mount namespaces.
.\" SRC BEGIN (unshare.c)
.EX
/* unshare.c
-
+\&
A simple implementation of the unshare(1) command: unshare
namespaces and execute a command.
*/
@@ -510,7 +506,7 @@ commands shows that the two shells are in different mount namespaces.
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
-
+\&
static void
usage(char *pname)
{
@@ -526,34 +522,34 @@ usage(char *pname)
fprintf(stderr, " \-U unshare user namespace\en");
exit(EXIT_FAILURE);
}
-
+\&
int
main(int argc, char *argv[])
{
int flags, opt;
-
+\&
flags = 0;
-
+\&
while ((opt = getopt(argc, argv, "CimnptuU")) != \-1) {
switch (opt) {
- case \[aq]C\[aq]: flags |= CLONE_NEWCGROUP; break;
+ case \[aq]C\[aq]: flags |= CLONE_NEWCGROUP; break;
case \[aq]i\[aq]: flags |= CLONE_NEWIPC; break;
case \[aq]m\[aq]: flags |= CLONE_NEWNS; break;
case \[aq]n\[aq]: flags |= CLONE_NEWNET; break;
case \[aq]p\[aq]: flags |= CLONE_NEWPID; break;
- case \[aq]t\[aq]: flags |= CLONE_NEWTIME; break;
+ case \[aq]t\[aq]: flags |= CLONE_NEWTIME; break;
case \[aq]u\[aq]: flags |= CLONE_NEWUTS; break;
case \[aq]U\[aq]: flags |= CLONE_NEWUSER; break;
default: usage(argv[0]);
}
}
-
+\&
if (optind >= argc)
usage(argv[0]);
-
+\&
if (unshare(flags) == \-1)
err(EXIT_FAILURE, "unshare");
-
+\&
execvp(argv[optind], &argv[optind]);
err(EXIT_FAILURE, "execvp");
}
diff --git a/man2/uselib.2 b/man2/uselib.2
index d941a76ad..1d6a072f1 100644
--- a/man2/uselib.2
+++ b/man2/uselib.2
@@ -8,7 +8,7 @@
.\" Modified 2004-06-23 by Michael Kerrisk <mtk.manpages@gmail.com>
.\" Modified 2005-01-09 by aeb
.\"
-.TH uselib 2 2023-01-07 "Linux man-pages 6.03"
+.TH uselib 2 2023-03-30 "Linux man-pages 6.05.01"
.SH NAME
uselib \- load shared library
.SH SYNOPSIS
@@ -56,10 +56,8 @@ The file specified by
is not an executable of a known type;
for example, it does not have the correct magic numbers.
.SH STANDARDS
-.BR uselib ()
-is Linux-specific, and should not be used in programs
-intended to be portable.
-.SH NOTES
+Linux.
+.SH HISTORY
This obsolete system call is not supported by glibc.
No declaration is provided in glibc headers, but, through a quirk of history,
glibc before glibc 2.23 did export an ABI for this system call.
diff --git a/man2/userfaultfd.2 b/man2/userfaultfd.2
index eabf32cf7..82903c638 100644
--- a/man2/userfaultfd.2
+++ b/man2/userfaultfd.2
@@ -4,7 +4,7 @@
.\"
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
-.TH userfaultfd 2 2023-02-05 "Linux man-pages 6.03"
+.TH userfaultfd 2 2023-05-03 "Linux man-pages 6.05.01"
.SH NAME
userfaultfd \- create a file descriptor for handling page faults in user space
.SH LIBRARY
@@ -407,25 +407,25 @@ struct uffd_msg {
__u32 ptid; /* Thread ID of the fault */
} feat;
} pagefault;
-
+\&
struct { /* Since Linux 4.11 */
__u32 ufd; /* Userfault file descriptor
of the child process */
} fork;
-
+\&
struct { /* Since Linux 4.11 */
__u64 from; /* Old address of remapped area */
__u64 to; /* New address of remapped area */
__u64 len; /* Original mapping length */
} remap;
-
+\&
struct { /* Since Linux 4.11 */
__u64 start; /* Start address of removed area */
__u64 end; /* End address of removed area */
} remove;
...
} arg;
-
+\&
/* Padding fields omitted */
} __packed;
.EE
@@ -632,17 +632,13 @@ The caller is not privileged (does not have the
capability in the initial user namespace), and
.I /proc/sys/vm/unprivileged_userfaultfd
has the value 0.
-.SH VERSIONS
-The
-.BR userfaultfd ()
-system call first appeared in Linux 4.3.
+.SH STANDARDS
+Linux.
+.SH HISTORY
+Linux 4.3.
.PP
-The support for hugetlbfs and shared memory areas and
+Support for hugetlbfs and shared memory areas and
non-page-fault events was added in Linux 4.11
-.SH STANDARDS
-.BR userfaultfd ()
-is Linux-specific and should not be used in programs intended to be
-portable.
.SH NOTES
The userfaultfd mechanism can be used as an alternative to
traditional user-space paging techniques based on the use of the
@@ -710,7 +706,7 @@ The following is an example of what we see when running the program:
.EX
$ \fB./userfaultfd_demo 3\fP
Address returned by mmap() = 0x7fd30106c000
-
+\&
fault_handler_thread():
poll() returns: nready = 1; POLLIN = 1; POLLERR = 0
UFFD_EVENT_PAGEFAULT event: flags = 0; address = 7fd30106c00f
@@ -719,7 +715,7 @@ Read address 0x7fd30106c00f in main(): A
Read address 0x7fd30106c40f in main(): A
Read address 0x7fd30106c80f in main(): A
Read address 0x7fd30106cc0f in main(): A
-
+\&
fault_handler_thread():
poll() returns: nready = 1; POLLIN = 1; POLLERR = 0
UFFD_EVENT_PAGEFAULT event: flags = 0; address = 7fd30106d00f
@@ -728,7 +724,7 @@ Read address 0x7fd30106d00f in main(): B
Read address 0x7fd30106d40f in main(): B
Read address 0x7fd30106d80f in main(): B
Read address 0x7fd30106dc0f in main(): B
-
+\&
fault_handler_thread():
poll() returns: nready = 1; POLLIN = 1; POLLERR = 0
UFFD_EVENT_PAGEFAULT event: flags = 0; address = 7fd30106e00f
@@ -744,7 +740,7 @@ Read address 0x7fd30106ec0f in main(): C
.\" SRC BEGIN (userfaultfd.c)
.EX
/* userfaultfd_demo.c
-
+\&
Licensed under the GNU General Public License version 2 or later.
*/
#define _GNU_SOURCE
@@ -762,9 +758,9 @@ Read address 0x7fd30106ec0f in main(): C
#include <sys/mman.h>
#include <sys/syscall.h>
#include <unistd.h>
-
+\&
static int page_size;
-
+\&
static void *
fault_handler_thread(void *arg)
{
@@ -773,77 +769,77 @@ fault_handler_thread(void *arg)
ssize_t nread;
struct pollfd pollfd;
struct uffdio_copy uffdio_copy;
-
+\&
static int fault_cnt = 0; /* Number of faults so far handled */
static char *page = NULL;
static struct uffd_msg msg; /* Data read from userfaultfd */
-
+\&
uffd = (long) arg;
-
+\&
/* Create a page that will be copied into the faulting region. */
-
+\&
if (page == NULL) {
page = mmap(NULL, page_size, PROT_READ | PROT_WRITE,
MAP_PRIVATE | MAP_ANONYMOUS, \-1, 0);
if (page == MAP_FAILED)
err(EXIT_FAILURE, "mmap");
}
-
+\&
/* Loop, handling incoming events on the userfaultfd
file descriptor. */
-
+\&
for (;;) {
-
+\&
/* See what poll() tells us about the userfaultfd. */
-
+\&
pollfd.fd = uffd;
pollfd.events = POLLIN;
nready = poll(&pollfd, 1, \-1);
if (nready == \-1)
err(EXIT_FAILURE, "poll");
-
+\&
printf("\enfault_handler_thread():\en");
printf(" poll() returns: nready = %d; "
"POLLIN = %d; POLLERR = %d\en", nready,
(pollfd.revents & POLLIN) != 0,
(pollfd.revents & POLLERR) != 0);
-
+\&
/* Read an event from the userfaultfd. */
-
+\&
nread = read(uffd, &msg, sizeof(msg));
if (nread == 0) {
printf("EOF on userfaultfd!\en");
exit(EXIT_FAILURE);
}
-
+\&
if (nread == \-1)
err(EXIT_FAILURE, "read");
-
+\&
/* We expect only one kind of event; verify that assumption. */
-
+\&
if (msg.event != UFFD_EVENT_PAGEFAULT) {
fprintf(stderr, "Unexpected event on userfaultfd\en");
exit(EXIT_FAILURE);
}
-
+\&
/* Display info about the page\-fault event. */
-
+\&
printf(" UFFD_EVENT_PAGEFAULT event: ");
printf("flags = %"PRIx64"; ", msg.arg.pagefault.flags);
printf("address = %"PRIx64"\en", msg.arg.pagefault.address);
-
+\&
/* Copy the page pointed to by \[aq]page\[aq] into the faulting
region. Vary the contents that are copied in, so that it
is more obvious that each fault is handled separately. */
-
+\&
memset(page, \[aq]A\[aq] + fault_cnt % 20, page_size);
fault_cnt++;
-
+\&
uffdio_copy.src = (unsigned long) page;
-
+\&
/* We need to handle page faults in units of pages(!).
So, round faulting address down to page boundary. */
-
+\&
uffdio_copy.dst = (unsigned long) msg.arg.pagefault.address &
\[ti](page_size \- 1);
uffdio_copy.len = page_size;
@@ -851,12 +847,12 @@ fault_handler_thread(void *arg)
uffdio_copy.copy = 0;
if (ioctl(uffd, UFFDIO_COPY, &uffdio_copy) == \-1)
err(EXIT_FAILURE, "ioctl\-UFFDIO_COPY");
-
+\&
printf(" (uffdio_copy.copy returned %"PRId64")\en",
uffdio_copy.copy);
}
}
-
+\&
int
main(int argc, char *argv[])
{
@@ -868,59 +864,59 @@ main(int argc, char *argv[])
pthread_t thr; /* ID of thread that handles page faults */
struct uffdio_api uffdio_api;
struct uffdio_register uffdio_register;
-
+\&
if (argc != 2) {
fprintf(stderr, "Usage: %s num\-pages\en", argv[0]);
exit(EXIT_FAILURE);
}
-
+\&
page_size = sysconf(_SC_PAGE_SIZE);
len = strtoull(argv[1], NULL, 0) * page_size;
-
+\&
/* Create and enable userfaultfd object. */
-
+\&
uffd = syscall(SYS_userfaultfd, O_CLOEXEC | O_NONBLOCK);
if (uffd == \-1)
err(EXIT_FAILURE, "userfaultfd");
-
+\&
uffdio_api.api = UFFD_API;
uffdio_api.features = 0;
if (ioctl(uffd, UFFDIO_API, &uffdio_api) == \-1)
err(EXIT_FAILURE, "ioctl\-UFFDIO_API");
-
+\&
/* Create a private anonymous mapping. The memory will be
demand\-zero paged\-\-that is, not yet allocated. When we
actually touch the memory, it will be allocated via
the userfaultfd. */
-
+\&
addr = mmap(NULL, len, PROT_READ | PROT_WRITE,
MAP_PRIVATE | MAP_ANONYMOUS, \-1, 0);
if (addr == MAP_FAILED)
err(EXIT_FAILURE, "mmap");
-
+\&
printf("Address returned by mmap() = %p\en", addr);
-
+\&
/* Register the memory range of the mapping we just created for
handling by the userfaultfd object. In mode, we request to track
missing pages (i.e., pages that have not yet been faulted in). */
-
+\&
uffdio_register.range.start = (unsigned long) addr;
uffdio_register.range.len = len;
uffdio_register.mode = UFFDIO_REGISTER_MODE_MISSING;
if (ioctl(uffd, UFFDIO_REGISTER, &uffdio_register) == \-1)
err(EXIT_FAILURE, "ioctl\-UFFDIO_REGISTER");
-
+\&
/* Create a thread that will process the userfaultfd events. */
-
+\&
s = pthread_create(&thr, NULL, fault_handler_thread, (void *) uffd);
if (s != 0) {
errc(EXIT_FAILURE, s, "pthread_create");
}
-
+\&
/* Main thread now touches memory in the mapping, touching
locations 1024 bytes apart. This will trigger userfaultfd
events for all pages in the region. */
-
+\&
l = 0xf; /* Ensure that faulting address is not on a page
boundary, in order to test that we correctly
handle that case in fault_handling_thread(). */
@@ -931,7 +927,7 @@ main(int argc, char *argv[])
l += 1024;
usleep(100000); /* Slow things down a little */
}
-
+\&
exit(EXIT_SUCCESS);
}
.EE
diff --git a/man2/ustat.2 b/man2/ustat.2
index 3bd447793..a894b137c 100644
--- a/man2/ustat.2
+++ b/man2/ustat.2
@@ -7,7 +7,7 @@
.\" Modified 2001-03-22 by aeb
.\" Modified 2003-08-04 by aeb
.\"
-.TH ustat 2 2023-02-05 "Linux man-pages 6.03"
+.TH ustat 2 2023-03-30 "Linux man-pages 6.05.01"
.SH NAME
ustat \- get filesystem statistics
.SH LIBRARY
@@ -72,13 +72,14 @@ The mounted filesystem referenced by
.I dev
does not support this operation,
or any version of Linux before Linux 1.3.16.
-.SH VERSIONS
-Since glibc 2.28, glibc no longer provides a wrapper for this system call.
.SH STANDARDS
+None.
+.SH HISTORY
SVr4.
+Removed in glibc 2.28.
.\" SVr4 documents additional error conditions ENOLINK, ECOMM, and EINTR
.\" but has no ENOSYS condition.
-.SH NOTES
+.PP
.BR ustat ()
is deprecated and has been provided only for compatibility.
All new programs should use
diff --git a/man2/utime.2 b/man2/utime.2
index 1b41ef590..86760abb5 100644
--- a/man2/utime.2
+++ b/man2/utime.2
@@ -8,7 +8,7 @@
.\" Modified 2004-06-23 by Michael Kerrisk <mtk.manpages@gmail.com>
.\" Modified 2004-10-10 by Andries Brouwer <aeb@cwi.nl>
.\"
-.TH utime 2 2022-12-03 "Linux man-pages 6.03"
+.TH utime 2 2023-03-30 "Linux man-pages 6.05.01"
.SH NAME
utime, utimes \- change file last access and modification times
.SH LIBRARY
@@ -149,13 +149,14 @@ capability).
.I path
resides on a read-only filesystem.
.SH STANDARDS
-.BR utime ():
-SVr4, POSIX.1-2001.
-POSIX.1-2008 marks
+POSIX.1-2008.
+.SH HISTORY
+.TP
.BR utime ()
-as obsolete.
-.PP
-.BR utimes ():
+SVr4, POSIX.1-2001.
+POSIX.1-2008 marks it as obsolete.
+.TP
+.BR utimes ()
4.3BSD, POSIX.1-2001.
.SH NOTES
Linux does not allow changing the timestamps on an immutable file,
diff --git a/man2/utimensat.2 b/man2/utimensat.2
index fd1f70ba5..77456fc43 100644
--- a/man2/utimensat.2
+++ b/man2/utimensat.2
@@ -4,7 +4,7 @@
.\"
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
-.TH utimensat 2 2023-02-12 "Linux man-pages 6.03"
+.TH utimensat 2 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
utimensat, futimens \- change file timestamps with nanosecond precision
.SH LIBRARY
@@ -368,62 +368,23 @@ The file is on a read-only filesystem.
.RB ( utimensat ())
Search permission is denied for one of the prefix components of
.IR pathname .
-.SH VERSIONS
-.BR utimensat ()
-was added in Linux 2.6.22;
-glibc support was added with glibc 2.6.
-.PP
-Support for
-.BR futimens ()
-first appeared in glibc 2.6.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR utimensat (),
.BR futimens ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
-.SH STANDARDS
-.BR futimens ()
-and
-.BR utimensat ()
-are specified in POSIX.1-2008.
-.SH NOTES
-.BR utimensat ()
-obsoletes
-.BR futimesat (2).
-.PP
-On Linux, timestamps cannot be changed for a file marked immutable,
-and the only change permitted for files marked append-only is to
-set the timestamps to the current time.
-(This is consistent with the historical behavior of
-.BR utime (2)
-and
-.BR utimes (2)
-on Linux.)
-.PP
-If both
-.I tv_nsec
-fields are specified as
-.BR UTIME_OMIT ,
-then the Linux implementation of
-.BR utimensat ()
-succeeds even if the file referred to by
-.I dirfd
-and
-.I pathname
-does not exist.
+.SH VERSIONS
.SS C library/kernel ABI differences
On Linux,
.BR futimens ()
@@ -455,6 +416,43 @@ disallows passing NULL as the value for
the wrapper function returns the error
.B EINVAL
in this case.
+.SH STANDARDS
+POSIX.1-2008.
+.SH VERSIONS
+.TP
+.BR utimensat ()
+Linux 2.6.22,
+glibc 2.6.
+POSIX.1-2008.
+.TP
+.BR futimens ()
+glibc 2.6.
+POSIX.1-2008.
+.SH NOTES
+.BR utimensat ()
+obsoletes
+.BR futimesat (2).
+.PP
+On Linux, timestamps cannot be changed for a file marked immutable,
+and the only change permitted for files marked append-only is to
+set the timestamps to the current time.
+(This is consistent with the historical behavior of
+.BR utime (2)
+and
+.BR utimes (2)
+on Linux.)
+.PP
+If both
+.I tv_nsec
+fields are specified as
+.BR UTIME_OMIT ,
+then the Linux implementation of
+.BR utimensat ()
+succeeds even if the file referred to by
+.I dirfd
+and
+.I pathname
+does not exist.
.SH BUGS
Several bugs afflict
.BR utimensat ()
diff --git a/man2/vfork.2 b/man2/vfork.2
index 0c3ad6c0f..85c04d3bd 100644
--- a/man2/vfork.2
+++ b/man2/vfork.2
@@ -6,7 +6,7 @@
.\" 1999-11-10: Merged text taken from the page contributed by
.\" Reed H. Petty (rhp@draper.net)
.\"
-.TH vfork 2 2023-02-05 "Linux man-pages 6.03"
+.TH vfork 2 2023-07-28 "Linux man-pages 6.05.01"
.SH NAME
vfork \- create a child process and block parent
.SH LIBRARY
@@ -134,11 +134,7 @@ The use of
was tricky: for example, not modifying data
in the parent process depended on knowing which variables were
held in a register.
-.SH STANDARDS
-4.3BSD; POSIX.1-2001 (but marked OBSOLETE).
-POSIX.1-2008 removes the specification of
-.BR vfork ().
-.PP
+.SH VERSIONS
The requirements put on
.BR vfork ()
by the standards are weaker than those put on
@@ -149,17 +145,16 @@ remaining blocked until the child either terminates or calls
.BR execve (2),
and cannot rely on any specific behavior with respect to shared memory.
.\" In AIXv3.1 vfork is equivalent to fork.
-.SH NOTES
+.PP
Some consider the semantics of
.BR vfork ()
to be an architectural blemish, and the 4.2BSD man page stated:
-"This system call will be eliminated when proper system sharing mechanisms
-are implemented.
+\[lq]This system call will be eliminated
+when proper system sharing mechanisms are implemented.
Users should not depend on the memory sharing semantics of
-.BR vfork ()
+.I vfork
as it will, in that case, be made synonymous to
-.BR fork (2).\c
-"
+.IR fork .\[rq]
However, even though modern memory management hardware
has decreased the performance difference between
.BR fork (2)
@@ -205,44 +200,6 @@ in this scenario requires either committing an amount of memory equal
to the size of the parent process (if strict overcommitting is in force)
or overcommitting memory with the risk that a process is terminated
by the out-of-memory (OOM) killer.
-.\"
-.SS Caveats
-The child process should take care not to modify the memory in unintended ways,
-since such changes will be seen by the parent process once
-the child terminates or executes another program.
-In this regard, signal handlers can be especially problematic:
-if a signal handler that is invoked in the child of
-.BR vfork ()
-changes memory, those changes may result in an inconsistent process state
-from the perspective of the parent process
-(e.g., memory changes would be visible in the parent,
-but changes to the state of open file descriptors would not be visible).
-.PP
-When
-.BR vfork ()
-is called in a multithreaded process,
-only the calling thread is suspended until the child terminates
-or executes a new program.
-This means that the child is sharing an address space with other running code.
-This can be dangerous if another thread in the parent process
-changes credentials (using
-.BR setuid (2)
-or similar),
-since there are now two processes with different privilege levels
-running in the same address space.
-As an example of the dangers,
-suppose that a multithreaded program running as root creates a child using
-.BR vfork ().
-After the
-.BR vfork (),
-a thread in the parent process drops the process to an unprivileged user
-in order to run some untrusted code
-(e.g., perhaps via plug-in opened with
-.BR dlopen (3)).
-In this case, attacks are possible where the parent process uses
-.BR mmap (2)
-to map in code that will be executed by the privileged child process.
-.\"
.SS Linux notes
Fork handlers established using
.BR pthread_atfork (3)
@@ -268,7 +225,13 @@ specified as:
CLONE_VM | CLONE_VFORK | SIGCHLD
.EE
.in
-.SS History
+.SH STANDARDS
+None.
+.SH HISTORY
+4.3BSD; POSIX.1-2001 (but marked OBSOLETE).
+POSIX.1-2008 removes the specification of
+.BR vfork ().
+.PP
The
.BR vfork ()
system call appeared in 3.0BSD.
@@ -286,6 +249,44 @@ until Linux 2.2.0-pre6 or so.
Since Linux 2.2.0-pre9 (on i386, somewhat later on
other architectures) it is an independent system call.
Support was added in glibc 2.0.112.
+.\"
+.SH CAVEATS
+The child process should take care not to modify the memory in unintended ways,
+since such changes will be seen by the parent process once
+the child terminates or executes another program.
+In this regard, signal handlers can be especially problematic:
+if a signal handler that is invoked in the child of
+.BR vfork ()
+changes memory, those changes may result in an inconsistent process state
+from the perspective of the parent process
+(e.g., memory changes would be visible in the parent,
+but changes to the state of open file descriptors would not be visible).
+.PP
+When
+.BR vfork ()
+is called in a multithreaded process,
+only the calling thread is suspended until the child terminates
+or executes a new program.
+This means that the child is sharing an address space with other running code.
+This can be dangerous if another thread in the parent process
+changes credentials (using
+.BR setuid (2)
+or similar),
+since there are now two processes with different privilege levels
+running in the same address space.
+As an example of the dangers,
+suppose that a multithreaded program running as root creates a child using
+.BR vfork ().
+After the
+.BR vfork (),
+a thread in the parent process drops the process to an unprivileged user
+in order to run some untrusted code
+(e.g., perhaps via plug-in opened with
+.BR dlopen (3)).
+In this case, attacks are possible where the parent process uses
+.BR mmap (2)
+to map in code that will be executed by the privileged child process.
+.\"
.SH BUGS
Details of the signal handling are obscure and differ between systems.
The BSD man page states:
diff --git a/man2/vhangup.2 b/man2/vhangup.2
index a156d55fb..af9853bfb 100644
--- a/man2/vhangup.2
+++ b/man2/vhangup.2
@@ -5,7 +5,7 @@
.\" Modified, 27 May 2004, Michael Kerrisk <mtk.manpages@gmail.com>
.\" Added notes on capability requirements
.\"
-.TH vhangup 2 2022-10-30 "Linux man-pages 6.03"
+.TH vhangup 2 2023-03-30 "Linux man-pages 6.05.01"
.SH NAME
vhangup \- virtually hangup the current terminal
.SH LIBRARY
@@ -52,8 +52,7 @@ the
.B CAP_SYS_TTY_CONFIG
capability is required.
.SH STANDARDS
-This call is Linux-specific, and should not be used in programs
-intended to be portable.
+Linux.
.SH SEE ALSO
.BR init (1),
.BR capabilities (7)
diff --git a/man2/vm86.2 b/man2/vm86.2
index 04c533e44..97595e81d 100644
--- a/man2/vm86.2
+++ b/man2/vm86.2
@@ -3,7 +3,7 @@
.\"
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
-.TH vm86 2 2022-10-30 "Linux man-pages 6.03"
+.TH vm86 2 2023-03-30 "Linux man-pages 6.05.01"
.SH NAME
vm86old, vm86 \- enter virtual 8086 mode
.SH LIBRARY
@@ -55,5 +55,4 @@ Saved kernel stack exists.
(This is a kernel sanity check; the saved
stack should exist only within vm86 mode itself.)
.SH STANDARDS
-This call is specific to Linux on 32-bit Intel processors,
-and should not be used in programs intended to be portable.
+Linux on 32-bit Intel processors.
diff --git a/man2/vmsplice.2 b/man2/vmsplice.2
index 50e154e40..4520b8a6e 100644
--- a/man2/vmsplice.2
+++ b/man2/vmsplice.2
@@ -3,7 +3,7 @@
.\"
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
-.TH vmsplice 2 2022-12-04 "Linux man-pages 6.03"
+.TH vmsplice 2 2023-03-30 "Linux man-pages 6.05.01"
.SH NAME
vmsplice \- splice user pages to/from a pipe
.SH LIBRARY
@@ -132,13 +132,11 @@ set.
.TP
.B ENOMEM
Out of memory.
-.SH VERSIONS
-The
-.BR vmsplice ()
-system call first appeared in Linux 2.6.17;
-library support was added in glibc 2.5.
.SH STANDARDS
-This system call is Linux-specific.
+Linux.
+.SH HISTORY
+Linux 2.6.17,
+glibc 2.5.
.SH NOTES
.BR vmsplice ()
follows the other vectorized read/write type functions when it comes to
diff --git a/man2/wait.2 b/man2/wait.2
index 9164f656c..cbd851eae 100644
--- a/man2/wait.2
+++ b/man2/wait.2
@@ -26,7 +26,7 @@
.\" 2005-05-10, mtk, __W* flags can't be used with waitid()
.\" 2008-07-04, mtk, removed erroneous text about SA_NOCLDSTOP
.\"
-.TH wait 2 2023-02-05 "Linux man-pages 6.03"
+.TH wait 2 2023-05-03 "Linux man-pages 6.05.01"
.SH NAME
wait, waitpid, waitid \- wait for process to change state
.SH LIBRARY
@@ -460,7 +460,34 @@ or
.I pid
is equal to
.BR INT_MIN .
+.SH VERSIONS
+.SS C library/kernel differences
+.BR wait ()
+is actually a library function that (in glibc) is implemented as a call to
+.BR wait4 (2).
+.PP
+On some architectures, there is no
+.BR waitpid ()
+system call;
+.\" e.g., i386 has the system call, but not x86-64
+instead, this interface is implemented via a C library
+wrapper function that calls
+.BR wait4 (2).
+.PP
+The raw
+.BR waitid ()
+system call takes a fifth argument, of type
+.IR "struct rusage\ *" .
+If this argument is non-NULL,
+then it is used to return resource usage information about the child,
+in the same manner as
+.BR wait4 (2).
+See
+.BR getrusage (2)
+for details.
.SH STANDARDS
+POSIX.1-2008.
+.SH HISTORY
SVr4, 4.3BSD, POSIX.1-2001.
.SH NOTES
A child that terminates, but has not been waited for becomes a "zombie".
@@ -577,30 +604,6 @@ Since Linux 4.7,
the
.B __WALL
flag is automatically implied if the child is being ptraced.
-.SS C library/kernel differences
-.BR wait ()
-is actually a library function that (in glibc) is implemented as a call to
-.BR wait4 (2).
-.PP
-On some architectures, there is no
-.BR waitpid ()
-system call;
-.\" e.g., i386 has the system call, but not x86-64
-instead, this interface is implemented via a C library
-wrapper function that calls
-.BR wait4 (2).
-.PP
-The raw
-.BR waitid ()
-system call takes a fifth argument, of type
-.IR "struct rusage\ *" .
-If this argument is non-NULL,
-then it is used to return resource usage information about the child,
-in the same manner as
-.BR wait4 (2).
-See
-.BR getrusage (2)
-for details.
.SH BUGS
According to POSIX.1-2008, an application calling
.BR waitid ()
@@ -660,25 +663,25 @@ $
#include <stdlib.h>
#include <sys/wait.h>
#include <unistd.h>
-
+\&
int
main(int argc, char *argv[])
{
int wstatus;
pid_t cpid, w;
-
+\&
cpid = fork();
if (cpid == \-1) {
perror("fork");
exit(EXIT_FAILURE);
}
-
+\&
if (cpid == 0) { /* Code executed by child */
printf("Child PID is %jd\en", (intmax_t) getpid());
if (argc == 1)
pause(); /* Wait for signals */
_exit(atoi(argv[1]));
-
+\&
} else { /* Code executed by parent */
do {
w = waitpid(cpid, &wstatus, WUNTRACED | WCONTINUED);
@@ -686,7 +689,7 @@ main(int argc, char *argv[])
perror("waitpid");
exit(EXIT_FAILURE);
}
-
+\&
if (WIFEXITED(wstatus)) {
printf("exited, status=%d\en", WEXITSTATUS(wstatus));
} else if (WIFSIGNALED(wstatus)) {
diff --git a/man2/wait4.2 b/man2/wait4.2
index 9f74d4a04..7136d7061 100644
--- a/man2/wait4.2
+++ b/man2/wait4.2
@@ -10,7 +10,7 @@
.\" Rewrote much of this page, and removed much duplicated text,
.\" replacing with pointers to wait.2
.\"
-.TH wait4 2 2023-02-05 "Linux man-pages 6.03"
+.TH wait4 2 2023-03-30 "Linux man-pages 6.05.01"
.SH NAME
wait3, wait4 \- wait for process to change state, BSD style
.SH LIBRARY
@@ -132,6 +132,8 @@ As for
As for
.BR waitpid (2).
.SH STANDARDS
+None.
+.SH HISTORY
4.3BSD.
.PP
SUSv1 included a specification of
@@ -140,7 +142,7 @@ SUSv2 included
.BR wait3 (),
but marked it LEGACY;
SUSv3 removed it.
-.SH NOTES
+.PP
Including
.I <sys/time.h>
is not required these days, but increases portability.
diff --git a/man2/write.2 b/man2/write.2
index f4061b508..d1dc27397 100644
--- a/man2/write.2
+++ b/man2/write.2
@@ -16,7 +16,7 @@
.\" gave some examples of why this might occur.
.\" Noted what happens if write() is interrupted by a signal.
.\"
-.TH write 2 2022-12-04 "Linux man-pages 6.03"
+.TH write 2 2023-04-03 "Linux man-pages 6.05.01"
.SH NAME
write \- write to a file descriptor
.SH LIBRARY
@@ -226,6 +226,8 @@ catches, blocks or ignores this signal.)
Other errors may occur, depending on the object connected to
.IR fd .
.SH STANDARDS
+POSIX.1-2008.
+.SH HISTORY
SVr4, 4.3BSD, POSIX.1-2001.
.\" SVr4 documents additional error
.\" conditions EDEADLK, ENOLCK, ENOLNK, ENOSR, ENXIO, or ERANGE.
@@ -235,13 +237,6 @@ Under SVr4 a write may be interrupted and return
at any point,
not just before any data is written.
.SH NOTES
-The types
-.I size_t
-and
-.I ssize_t
-are, respectively,
-unsigned and signed integer data types specified by POSIX.1.
-.PP
A successful return from
.BR write ()
does not make any guarantee that data has been committed to disk.
diff --git a/man2type/open_how.2type b/man2type/open_how.2type
index 3c9aa9b07..38445a78d 100644
--- a/man2type/open_how.2type
+++ b/man2type/open_how.2type
@@ -3,7 +3,7 @@
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
.\"
-.TH open_how 2type 2022-12-30 "Linux man-pages 6.03"
+.TH open_how 2type 2023-03-30 "Linux man-pages 6.05.01"
.SH NAME
open_how \- how to open a pathname
.SH LIBRARY
@@ -46,6 +46,6 @@ Therefore, a user
.I must
zero-fill this structure on initialization.
.SH STANDARDS
-This type is Linux-specific.
+Linux.
.SH SEE ALSO
.BR openat2 (2)
diff --git a/man3/CPU_SET.3 b/man3/CPU_SET.3
index c41dadc8d..aa5d71d77 100644
--- a/man3/CPU_SET.3
+++ b/man3/CPU_SET.3
@@ -4,7 +4,7 @@
.\"
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
-.TH CPU_SET 3 2022-10-09 "Linux man-pages 6.03"
+.TH CPU_SET 3 2023-05-03 "Linux man-pages 6.05.01"
.SH NAME
CPU_SET, CPU_CLR, CPU_ISSET, CPU_ZERO, CPU_COUNT,
CPU_AND, CPU_OR, CPU_XOR, CPU_EQUAL,
@@ -224,7 +224,9 @@ returns the number of bytes required to store a
CPU set of the specified cardinality.
.PP
The other functions do not return a value.
-.SH VERSIONS
+.SH STANDARDS
+Linux.
+.SH HISTORY
The
.BR CPU_ZERO (),
.BR CPU_SET (),
@@ -253,8 +255,6 @@ first appeared in glibc 2.6.
and
.BR CPU_EQUAL_S ()
first appeared in glibc 2.7.
-.SH STANDARDS
-These interfaces are Linux-specific.
.SH NOTES
To duplicate a CPU set, use
.BR memcpy (3).
@@ -306,36 +306,36 @@ used for dynamically allocated CPU sets.
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
-
+\&
#include <assert.h>
-
+\&
int
main(int argc, char *argv[])
{
cpu_set_t *cpusetp;
size_t size, num_cpus;
-
+\&
if (argc < 2) {
fprintf(stderr, "Usage: %s <num\-cpus>\en", argv[0]);
exit(EXIT_FAILURE);
}
-
+\&
num_cpus = atoi(argv[1]);
-
+\&
cpusetp = CPU_ALLOC(num_cpus);
if (cpusetp == NULL) {
perror("CPU_ALLOC");
exit(EXIT_FAILURE);
}
-
+\&
size = CPU_ALLOC_SIZE(num_cpus);
-
+\&
CPU_ZERO_S(size, cpusetp);
for (size_t cpu = 0; cpu < num_cpus; cpu += 2)
CPU_SET_S(cpu, size, cpusetp);
-
+\&
printf("CPU_COUNT() of set: %d\en", CPU_COUNT_S(size, cpusetp));
-
+\&
CPU_FREE(cpusetp);
exit(EXIT_SUCCESS);
}
diff --git a/man3/INFINITY.3 b/man3/INFINITY.3
index a14fad975..aa7ea0cc7 100644
--- a/man3/INFINITY.3
+++ b/man3/INFINITY.3
@@ -2,7 +2,7 @@
.\"
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
-.TH INFINITY 3 2022-10-09 "Linux man-pages 6.03"
+.TH INFINITY 3 2023-03-30 "Linux man-pages 6.05.01"
.SH NAME
INFINITY, NAN, HUGE_VAL, HUGE_VALF, HUGE_VALL \- floating-point constants
.SH LIBRARY
@@ -55,6 +55,8 @@ and
respectively,
that represent a large positive value, possibly positive infinity.
.SH STANDARDS
+C11.
+.SH HISTORY
C99.
.PP
On a glibc system, the macro
diff --git a/man3/MAX.3 b/man3/MAX.3
index 2fa4216fc..fddf22083 100644
--- a/man3/MAX.3
+++ b/man3/MAX.3
@@ -2,7 +2,7 @@
.\"
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
-.TH MAX 3 2022-10-30 "Linux man-pages 6.03"
+.TH MAX 3 2023-05-03 "Linux man-pages 6.05.01"
.SH NAME
MAX, MIN \- maximum or minimum of two values
.SH LIBRARY
@@ -27,7 +27,7 @@ possibly converted to a different type (see BUGS).
These macros may raise the "invalid" floating-point exception
when any of the arguments is NaN.
.SH STANDARDS
-These nonstandard macros are present in glibc and the BSDs.
+GNU, BSD.
.SH NOTES
If either of the arguments is of a floating-point type,
you might prefer to use
@@ -50,22 +50,22 @@ To avoid this, ensure that both arguments have the same type.
#include <stdio.h>
#include <stdlib.h>
#include <sys/param.h>
-
+\&
int
main(int argc, char *argv[])
{
int a, b, x;
-
+\&
if (argc != 3) {
fprintf(stderr, "Usage: %s <num> <num>\en", argv[0]);
exit(EXIT_FAILURE);
}
-
+\&
a = atoi(argv[1]);
b = atoi(argv[2]);
x = MAX(a, b);
printf("MAX(%d, %d) is %d\en", a, b, x);
-
+\&
exit(EXIT_SUCCESS);
}
.EE
diff --git a/man3/MB_CUR_MAX.3 b/man3/MB_CUR_MAX.3
index 90a6ffd9b..c74d56374 100644
--- a/man3/MB_CUR_MAX.3
+++ b/man3/MB_CUR_MAX.3
@@ -9,7 +9,7 @@
.\"
.\" Modified, aeb, 990824
.\"
-.TH MB_CUR_MAX 3 2022-10-09 "Linux man-pages 6.03"
+.TH MB_CUR_MAX 3 2023-03-30 "Linux man-pages 6.05.01"
.SH NAME
MB_CUR_MAX \- maximum length of a multibyte character in the current locale
.SH LIBRARY
@@ -31,7 +31,9 @@ An integer in the range [1,
.BR MB_LEN_MAX ].
The value 1 denotes traditional 8-bit encoded characters.
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, C99.
+C11, POSIX.1-2008.
+.SH HISTORY
+C99, POSIX.1-2001.
.SH SEE ALSO
.BR MB_LEN_MAX (3),
.BR mblen (3),
diff --git a/man3/MB_LEN_MAX.3 b/man3/MB_LEN_MAX.3
index 234d7a1da..b58bdd539 100644
--- a/man3/MB_LEN_MAX.3
+++ b/man3/MB_LEN_MAX.3
@@ -9,7 +9,7 @@
.\"
.\" Modified, aeb, 990824
.\"
-.TH MB_LEN_MAX 3 2022-10-09 "Linux man-pages 6.03"
+.TH MB_LEN_MAX 3 2023-03-30 "Linux man-pages 6.05.01"
.SH NAME
MB_LEN_MAX \- maximum multibyte length of a character across all locales
.SH LIBRARY
@@ -27,7 +27,9 @@ wide character, in any of the supported locales.
.SH RETURN VALUE
A constant integer greater than zero.
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, C99.
+C11, POSIX.1-2008.
+.SH HISTORY
+C99, POSIX.1-2001.
.SH NOTES
The entities
.B MB_LEN_MAX
diff --git a/man3/_Generic.3 b/man3/_Generic.3
index 14e21d46c..ef1e2a6b7 100644
--- a/man3/_Generic.3
+++ b/man3/_Generic.3
@@ -2,7 +2,7 @@
.\"
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
-.TH _Generic 3 2023-02-12 "Linux man-pages 6.03"
+.TH _Generic 3 2023-05-03 "Linux man-pages 6.05.01"
.SH NAME
_Generic \- type-generic selection
.SH SYNOPSIS
@@ -25,7 +25,9 @@ is not evaluated.
This is especially useful for writing type-generic macros,
that will behave differently depending on the type of the argument.
.SH STANDARDS
-C11 and later.
+C11.
+.SH HISTORY
+C11.
.SH EXAMPLES
The following program demonstrates how to write
a replacement for the standard
@@ -38,24 +40,24 @@ seamlessly upgrading to the widest available type.
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
-
+\&
#define my_imaxabs _Generic(INTMAX_C(0), \e
long: labs, \e
long long: llabs \e
/* long long long: lllabs */ \e
)
-
+\&
int
main(void)
{
off_t a;
-
+\&
a = \-42;
printf("imaxabs(%jd) == %jd\en", (intmax_t) a, my_imaxabs(a));
printf("&imaxabs == %p\en", &my_imaxabs);
printf("&labs == %p\en", &labs);
printf("&llabs == %p\en", &llabs);
-
+\&
exit(EXIT_SUCCESS);
}
.EE
diff --git a/man3/__ppc_get_timebase.3 b/man3/__ppc_get_timebase.3
index f5ae9af3e..7ec1e5a13 100644
--- a/man3/__ppc_get_timebase.3
+++ b/man3/__ppc_get_timebase.3
@@ -2,7 +2,7 @@
.\"
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
-.TH __ppc_get_timebase 3 2023-02-05 "Linux man-pages 6.03"
+.TH __ppc_get_timebase 3 2023-05-03 "Linux man-pages 6.05.01"
.SH NAME
__ppc_get_timebase, __ppc_get_timebase_freq \- get the current value
of the Time Base Register on Power architecture and its frequency.
@@ -36,16 +36,17 @@ Time Base Register.
.BR __ppc_get_timebase_freq ()
returns a 64-bit unsigned integer that represents the frequency at
which the Time Base Register is updated.
-.SH VERSIONS
-GNU C Library support for
-.\" commit d9dc34cd569bcfe714fe8c708e58c028106e8b2e
+.SH STANDARDS
+GNU.
+.SH HISTORY
+.TP
.BR __ppc_get_timebase ()
-has been provided since glibc 2.16 and
-.\" commit 8ad11b9a9cf1de82bd7771306b42070b91417c11
+.\" commit d9dc34cd569bcfe714fe8c708e58c028106e8b2e
+glibc 2.16.
+.TP
.BR __ppc_get_timebase_freq ()
-has been available since glibc 2.17.
-.SH STANDARDS
-Both functions are nonstandard GNU extensions.
+.\" commit 8ad11b9a9cf1de82bd7771306b42070b91417c11
+glibc 2.17.
.SH EXAMPLES
The following program will calculate the time, in microseconds, spent
between two calls to
@@ -59,36 +60,36 @@ between two calls to
#include <stdio.h>
#include <stdlib.h>
#include <sys/platform/ppc.h>
-
+\&
/* Maximum value of the Time Base Register: 2\[ha]60 \- 1.
Source: POWER ISA. */
#define MAX_TB 0xFFFFFFFFFFFFFFF
-
+\&
int
main(void)
{
uint64_t tb1, tb2, diff;
uint64_t freq;
-
+\&
freq = __ppc_get_timebase_freq();
printf("Time Base frequency = %"PRIu64" Hz\en", freq);
-
+\&
tb1 = __ppc_get_timebase();
-
+\&
// Do some stuff...
-
+\&
tb2 = __ppc_get_timebase();
-
+\&
if (tb2 > tb1) {
diff = tb2 \- tb1;
} else {
/* Treat Time Base Register overflow. */
diff = (MAX_TB \- tb2) + tb1;
}
-
+\&
printf("Elapsed time = %1.2f usecs\en",
(double) diff * 1000000 / freq);
-
+\&
exit(EXIT_SUCCESS);
}
.EE
diff --git a/man3/__ppc_set_ppr_med.3 b/man3/__ppc_set_ppr_med.3
index a4140e120..b3effadd0 100644
--- a/man3/__ppc_set_ppr_med.3
+++ b/man3/__ppc_set_ppr_med.3
@@ -3,7 +3,7 @@
.\"
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
-.TH __ppc_set_ppr_med 3 2022-12-15 "Linux man-pages 6.03"
+.TH __ppc_set_ppr_med 3 2023-07-20 "Linux man-pages 6.05.01"
Programmer's Manual"
.SH NAME
__ppc_set_ppr_med, __ppc_set_ppr_very_low, __ppc_set_ppr_low,
@@ -62,29 +62,17 @@ sets the Program Priority to
If the program priority is medium high when the time interval expires or if an
attempt is made to set the priority to medium high when it is not allowed, the
priority is set to medium.
-.SH VERSIONS
-The functions
-.BR __ppc_set_ppr_med (),
-.BR __ppc_set_ppr_low (),
-and
-.BR __ppc_set_ppr_med_low ()
-are provided since glibc 2.18.
-The functions
-.BR __ppc_set_ppr_very_low ()
-and
-.BR __ppc_set_ppr_med_high ()
-first appeared in glibc 2.23.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR __ppc_set_ppr_med (),
.BR __ppc_set_ppr_very_low (),
.BR __ppc_set_ppr_low (),
@@ -92,11 +80,22 @@ T{
.BR __ppc_set_ppr_med_high ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-These functions are nonstandard GNU extensions.
+GNU.
+.SH HISTORY
+.TP
+.BR __ppc_set_ppr_med ()
+.TQ
+.BR __ppc_set_ppr_low ()
+.TQ
+.BR __ppc_set_ppr_med_low ()
+glibc 2.18.
+.TP
+.BR __ppc_set_ppr_very_low ()
+.TQ
+.BR __ppc_set_ppr_med_high ()
+glibc 2.23.
.SH NOTES
The functions
.BR __ppc_set_ppr_very_low ()
diff --git a/man3/__ppc_yield.3 b/man3/__ppc_yield.3
index db44c85ad..465dd29d1 100644
--- a/man3/__ppc_yield.3
+++ b/man3/__ppc_yield.3
@@ -3,7 +3,7 @@
.\"
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
-.TH __ppc_yield 3 2022-12-15 "Linux man-pages 6.03"
+.TH __ppc_yield 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
__ppc_yield, __ppc_mdoio, __ppc_mdoom \-
Hint the processor to release shared resources
@@ -41,29 +41,27 @@ provides a hint that performance will probably be improved if shared
resources dedicated to the executing processor are released until all
outstanding storage accesses to cacheable storage for which the data
is not in the cache have been completed.
-.SH VERSIONS
-These functions first appeared in glibc 2.18.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR __ppc_yield (),
.BR __ppc_mdoio (),
.BR __ppc_mdoom ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-These functions are nonstandard GNU extensions.
+GNU.
+.SH HISTORY
+glibc 2.18.
.SH SEE ALSO
.BR __ppc_set_ppr_med (3)
.PP
diff --git a/man3/__setfpucw.3 b/man3/__setfpucw.3
index 2a581a783..161bbf9ca 100644
--- a/man3/__setfpucw.3
+++ b/man3/__setfpucw.3
@@ -3,7 +3,7 @@
.\"
.\" SPDX-License-Identifier: GPL-1.0-or-later
.\"
-.TH __setfpucw 3 2023-02-05 "Linux man-pages 6.03"
+.TH __setfpucw 3 2023-03-30 "Linux man-pages 6.05.01"
.SH NAME
__setfpucw \- set FPU control word on i386 architecture (obsolete)
.SH LIBRARY
@@ -23,9 +23,10 @@ to the registers of the FPU (floating-point unit) on the i386 architecture.
This was used to control floating-point precision,
rounding and floating-point exceptions.
.SH STANDARDS
-This function was a nonstandard GNU extension.
+GNU.
+.SH HISTORY
+Removed in glibc 2.1.
.SH NOTES
-As of glibc 2.1 this function does not exist anymore.
There are new functions from C99, with prototypes in
.IR <fenv.h> ,
to control FPU rounding modes, like
diff --git a/man3/a64l.3 b/man3/a64l.3
index 4b54dd94d..eec0f70d3 100644
--- a/man3/a64l.3
+++ b/man3/a64l.3
@@ -6,7 +6,7 @@
.\"
.\" Corrected, aeb, 2002-05-30
.\"
-.TH a64l 3 2023-02-05 "Linux man-pages 6.03"
+.TH a64l 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
a64l, l64a \- convert between long and base-64
.SH LIBRARY
@@ -65,25 +65,27 @@ So 123 = 59*64\[ha]0 + 1*64\[ha]1 = "v/".
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR l64a ()
T} Thread safety MT-Unsafe race:l64a
T{
+.na
+.nh
.BR a64l ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008.
+POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001.
.SH NOTES
The value returned by
.BR l64a ()
diff --git a/man3/abort.3 b/man3/abort.3
index e97b663fd..952fd131c 100644
--- a/man3/abort.3
+++ b/man3/abort.3
@@ -12,7 +12,7 @@
.\" Modified Fri Aug 4 10:51:53 2000 - patch from Joseph S. Myers
.\" 2007-12-15, mtk, Mostly rewritten
.\"
-.TH abort 3 2022-12-29 "Linux man-pages 6.03"
+.TH abort 3 2023-07-28 "Linux man-pages 6.05.01"
.SH NAME
abort \- cause abnormal process termination
.SH LIBRARY
@@ -47,6 +47,12 @@ function will still terminate the process.
It does this by restoring the default disposition for
.B SIGABRT
and then raising the signal for a second time.
+.PP
+As with other cases of abnormal termination the functions registered with
+.BR atexit (3)
+and
+.BR on_exit (3)
+are not called.
.SH RETURN VALUE
The
.BR abort ()
@@ -54,23 +60,23 @@ function never returns.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR abort ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-SVr4, POSIX.1-2001, POSIX.1-2008, 4.3BSD, C99.
-.SH NOTES
+C11, POSIX.1-2008.
+.SH HISTORY
+SVr4, POSIX.1-2001, 4.3BSD, C89.
+.PP
Up until glibc 2.26,
if the
.BR abort ()
diff --git a/man3/abs.3 b/man3/abs.3
index 9251606de..1d70ba583 100644
--- a/man3/abs.3
+++ b/man3/abs.3
@@ -12,7 +12,7 @@
.\" Modified Sat Jul 24 21:45:37 1993, Rik Faith (faith@cs.unc.edu)
.\" Modified Sat Dec 16 15:02:59 2000, Joseph S. Myers
.\"
-.TH abs 3 2022-12-29 "Linux man-pages 6.03"
+.TH abs 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
abs, labs, llabs, imaxabs \- compute the absolute value of an integer
.SH LIBRARY
@@ -58,25 +58,39 @@ integer type for the function.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR abs (),
.BR labs (),
.BR llabs (),
.BR imaxabs ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, C99, SVr4, 4.3BSD.
+C11, POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001, C99, SVr4, 4.3BSD.
+.\" POSIX.1 (1996 edition) requires only the
+.\" .BR abs ()
+.\" function.
+.PP
+C89 only
+includes the
+.BR abs ()
+and
+.BR labs ()
+functions; the functions
+.BR llabs ()
+and
+.BR imaxabs ()
+were added in C99.
.SH NOTES
Trying to take the absolute value of the most negative integer
is not defined.
diff --git a/man3/acos.3 b/man3/acos.3
index 23fa603bb..a81b4efa9 100644
--- a/man3/acos.3
+++ b/man3/acos.3
@@ -13,7 +13,7 @@
.\" Modified 2002-07-25 by Walter Harms
.\" (walter.harms@informatik.uni-oldenburg.de)
.\"
-.TH acos 3 2023-02-05 "Linux man-pages 6.03"
+.TH acos 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
acos, acosf, acosl \- arc cosine function
.SH LIBRARY
@@ -89,29 +89,29 @@ is raised.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR acos (),
.BR acosf (),
.BR acosl ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-C99, POSIX.1-2001, POSIX.1-2008.
+C11, POSIX.1-2008.
+.SH HISTORY
+C99, POSIX.1-2001.
.PP
The variant returning
.I double
also conforms to
-SVr4, 4.3BSD.
+C89, SVr4, 4.3BSD.
.SH SEE ALSO
.BR asin (3),
.BR atan (3),
diff --git a/man3/acosh.3 b/man3/acosh.3
index 671c55832..b84680751 100644
--- a/man3/acosh.3
+++ b/man3/acosh.3
@@ -13,7 +13,7 @@
.\" Modified 2002-07-25 by Walter Harms
.\" (walter.harms@informatik.uni-oldenburg.de)
.\"
-.TH acosh 3 2023-02-05 "Linux man-pages 6.03"
+.TH acosh 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
acosh, acoshf, acoshl \- inverse hyperbolic cosine function
.SH LIBRARY
@@ -93,24 +93,24 @@ is raised.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR acosh (),
.BR acoshf (),
.BR acoshl ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-C99, POSIX.1-2001, POSIX.1-2008.
+C11, POSIX.1-2008.
+.SH HISTORY
+C99, POSIX.1-2001.
.PP
The variant returning
.I double
diff --git a/man3/addseverity.3 b/man3/addseverity.3
index 5b654a1cc..447725ce3 100644
--- a/man3/addseverity.3
+++ b/man3/addseverity.3
@@ -5,7 +5,7 @@
.\" adapted glibc info page
.\"
.\" polished a little, aeb
-.TH addseverity 3 2023-02-05 "Linux man-pages 6.03"
+.TH addseverity 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
addseverity \- introduce new severity classes
.SH LIBRARY
@@ -61,33 +61,26 @@ Upon error, the return value is
.BR MM_NOTOK .
Possible errors include: out of memory, attempt to remove a
nonexistent or default severity class.
-.SH VERSIONS
-.BR addseverity ()
-is provided since glibc 2.1.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR addseverity ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-This function is not specified in the X/Open Portability Guide
-although the
-.BR fmtmsg (3)
-function is.
-It is available on System V
-systems.
+GNU.
+.SH HISTORY
+glibc 2.1.
+System V.
.SH NOTES
New severity classes can also be added by setting the environment variable
.BR SEV_LEVEL .
diff --git a/man3/adjtime.3 b/man3/adjtime.3
index f5fb095ed..1d9da6e43 100644
--- a/man3/adjtime.3
+++ b/man3/adjtime.3
@@ -3,7 +3,7 @@
.\"
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
-.TH adjtime 3 2023-02-05 "Linux man-pages 6.03"
+.TH adjtime 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
adjtime \- correct the time to synchronize the system clock
.SH LIBRARY
@@ -94,21 +94,21 @@ capability is required.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR adjtime ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
+None.
+.SH HISTORY
4.3BSD, System V.
.SH NOTES
The adjustment that
diff --git a/man3/aio_cancel.3 b/man3/aio_cancel.3
index c7159b0b0..e8ef7d5a0 100644
--- a/man3/aio_cancel.3
+++ b/man3/aio_cancel.3
@@ -3,7 +3,7 @@
.\"
.\" SPDX-License-Identifier: GPL-2.0-or-later
.\"
-.TH aio_cancel 3 2022-12-15 "Linux man-pages 6.03"
+.TH aio_cancel 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
aio_cancel \- cancel an outstanding asynchronous I/O request
.SH LIBRARY
@@ -92,29 +92,26 @@ is not a valid file descriptor.
.B ENOSYS
.BR aio_cancel ()
is not implemented.
-.SH VERSIONS
-The
-.BR aio_cancel ()
-function is available since glibc 2.1.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR aio_cancel ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008.
+POSIX.1-2008.
+.SH HISTORY
+glibc 2.1.
+POSIX.1-2001.
.SH EXAMPLES
See
.BR aio (7).
diff --git a/man3/aio_error.3 b/man3/aio_error.3
index c2bd642ac..77d33e0f6 100644
--- a/man3/aio_error.3
+++ b/man3/aio_error.3
@@ -3,7 +3,7 @@
.\"
.\" SPDX-License-Identifier: GPL-2.0-or-later
.\"
-.TH aio_error 3 2022-12-15 "Linux man-pages 6.03"
+.TH aio_error 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
aio_error \- get error status of asynchronous I/O operation
.SH LIBRARY
@@ -62,29 +62,26 @@ has not been retrieved yet.
.B ENOSYS
.BR aio_error ()
is not implemented.
-.SH VERSIONS
-The
-.BR aio_error ()
-function is available since glibc 2.1.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR aio_error ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008.
+POSIX.1-2008.
+.SH HISTORY
+glibc 2.1.
+POSIX.1-2001.
.SH EXAMPLES
See
.BR aio (7).
diff --git a/man3/aio_fsync.3 b/man3/aio_fsync.3
index 2c5e1d95f..1dea3d8c2 100644
--- a/man3/aio_fsync.3
+++ b/man3/aio_fsync.3
@@ -3,7 +3,7 @@
.\"
.\" SPDX-License-Identifier: GPL-2.0-or-later
.\"
-.TH aio_fsync 3 2022-12-15 "Linux man-pages 6.03"
+.TH aio_fsync 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
aio_fsync \- asynchronous file synchronization
.SH LIBRARY
@@ -81,29 +81,26 @@ or
.B ENOSYS
.BR aio_fsync ()
is not implemented.
-.SH VERSIONS
-The
-.BR aio_fsync ()
-function is available since glibc 2.1.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR aio_fsync ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008.
+POSIX.1-2008.
+.SH HISTORY
+glibc 2.1.
+POSIX.1-2001.
.SH SEE ALSO
.BR aio_cancel (3),
.BR aio_error (3),
diff --git a/man3/aio_init.3 b/man3/aio_init.3
index 1d4afa837..4b97839db 100644
--- a/man3/aio_init.3
+++ b/man3/aio_init.3
@@ -2,7 +2,7 @@
.\"
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
-.TH aio_init 3 2022-10-30 "Linux man-pages 6.03"
+.TH aio_init 3 2023-03-30 "Linux man-pages 6.05.01"
.SH NAME
aio_init \- asynchronous I/O initialization
.SH LIBRARY
@@ -70,11 +70,9 @@ This field specifies the amount of time in seconds that a
worker thread should wait for further requests before terminating,
after having completed a previous request.
The default value is 1.
-.SH VERSIONS
-The
-.BR aio_init ()
-function is available since glibc 2.1.
.SH STANDARDS
-This function is a GNU extension.
+GNU.
+.SH HISTORY
+glibc 2.1.
.SH SEE ALSO
.BR aio (7)
diff --git a/man3/aio_read.3 b/man3/aio_read.3
index e1f3e1fd4..909d44447 100644
--- a/man3/aio_read.3
+++ b/man3/aio_read.3
@@ -3,7 +3,7 @@
.\"
.\" SPDX-License-Identifier: GPL-2.0-or-later
.\"
-.TH aio_read 3 2023-02-05 "Linux man-pages 6.03"
+.TH aio_read 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
aio_read \- asynchronous read
.SH LIBRARY
@@ -114,29 +114,26 @@ is not implemented.
The file is a regular file, we start reading before end-of-file
and want at least one byte, but the starting position is past
the maximum offset for this file.
-.SH VERSIONS
-The
-.BR aio_read ()
-function is available since glibc 2.1.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR aio_read ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008.
+POSIX.1-2008.
+.SH HISTORY
+glibc 2.1.
+POSIX.1-2001.
.SH NOTES
It is a good idea to zero out the control block before use.
The control block must not be changed while the read operation
diff --git a/man3/aio_return.3 b/man3/aio_return.3
index 6f9d7863d..c0d14a6a9 100644
--- a/man3/aio_return.3
+++ b/man3/aio_return.3
@@ -3,7 +3,7 @@
.\"
.\" SPDX-License-Identifier: GPL-2.0-or-later
.\"
-.TH aio_return 3 2022-12-15 "Linux man-pages 6.03"
+.TH aio_return 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
aio_return \- get return status of asynchronous I/O operation
.SH LIBRARY
@@ -56,29 +56,26 @@ of which the return status has not been retrieved yet.
.B ENOSYS
.BR aio_return ()
is not implemented.
-.SH VERSIONS
-The
-.BR aio_return ()
-function is available since glibc 2.1.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR aio_return ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008.
+POSIX.1-2008.
+.SH HISTORY
+glibc 2.1.
+POSIX.1-2001.
.SH EXAMPLES
See
.BR aio (7).
diff --git a/man3/aio_suspend.3 b/man3/aio_suspend.3
index f3e9b0924..b532568ad 100644
--- a/man3/aio_suspend.3
+++ b/man3/aio_suspend.3
@@ -4,7 +4,7 @@
.\"
.\" SPDX-License-Identifier: GPL-2.0-or-later
.\"
-.TH aio_suspend 3 2023-02-05 "Linux man-pages 6.03"
+.TH aio_suspend 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
aio_suspend \- wait for asynchronous I/O operation or timeout
.SH LIBRARY
@@ -82,29 +82,26 @@ waiting for); see
.B ENOSYS
.BR aio_suspend ()
is not implemented.
-.SH VERSIONS
-The
-.BR aio_suspend ()
-function is available since glibc 2.1.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR aio_suspend ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008.
+POSIX.1-2008.
+.SH HISTORY
+glibc 2.1.
+POSIX.1-2001.
.PP
POSIX doesn't specify the parameters to be
.IR restrict ;
diff --git a/man3/aio_write.3 b/man3/aio_write.3
index 3200d5a7e..20b034934 100644
--- a/man3/aio_write.3
+++ b/man3/aio_write.3
@@ -3,7 +3,7 @@
.\"
.\" SPDX-License-Identifier: GPL-2.0-or-later
.\"
-.TH aio_write 3 2023-02-05 "Linux man-pages 6.03"
+.TH aio_write 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
aio_write \- asynchronous write
.SH LIBRARY
@@ -119,29 +119,26 @@ are invalid.
.B ENOSYS
.BR aio_write ()
is not implemented.
-.SH VERSIONS
-The
-.BR aio_write ()
-function is available since glibc 2.1.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR aio_write ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008.
+POSIX.1-2008.
+.SH HISTORY
+glibc 2.1.
+POSIX.1-2001.
.SH NOTES
It is a good idea to zero out the control block before use.
The control block must not be changed while the write operation
diff --git a/man3/alloca.3 b/man3/alloca.3
index 3c219c2cc..6bf17915c 100644
--- a/man3/alloca.3
+++ b/man3/alloca.3
@@ -13,7 +13,7 @@
.\" Various rewrites and additions (notes on longjmp() and SIGSEGV).
.\" Weaken warning against use of alloca() (as per Debian bug 461100).
.\"
-.TH alloca 3 2022-12-15 "Linux man-pages 6.03"
+.TH alloca 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
alloca \- allocate memory that is automatically freed
.SH LIBRARY
@@ -43,25 +43,22 @@ If the allocation causes stack overflow, program behavior is undefined.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR alloca ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-This function is not in POSIX.1.
-.PP
-.BR alloca ()
-originates from PWB and 32V, and appears in all their derivatives.
+None.
+.SH HISTORY
+PWB, 32V.
.SH NOTES
The
.BR alloca ()
diff --git a/man3/arc4random.3 b/man3/arc4random.3
index 0ffe9355e..b7e1f4da1 100644
--- a/man3/arc4random.3
+++ b/man3/arc4random.3
@@ -1,14 +1,15 @@
+'\" t
.\" Copyright (C) 2023 Alejandro Colomar <alx@kernel.org>
.\"
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
-.TH arc4random 3 2023-01-05 "Linux man-pages 6.03"
+.TH arc4random 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
arc4random, arc4random_uniform, arc4random_buf
\- cryptographically-secure pseudorandom number generator
.SH LIBRARY
Standard C library
-.RI ( libc ", " -lc )
+.RI ( libc ", " \-lc )
.SH SYNOPSIS
.nf
.B #include <stdlib.h>
@@ -62,24 +63,29 @@ is invalid.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR arc4random (),
.BR arc4random_uniform (),
.BR arc4random_buf ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-These nonstandard functions are present on several Unix systems.
+BSD.
+.SH HISTORY
+OpenBSD 2.1,
+FreeBSD 3.0,
+NetBSD 1.6,
+DragonFly 1.0,
+libbsd,
+glibc 2.36.
.SH BUGS
An
.I upper_bound
diff --git a/man3/argz_add.3 b/man3/argz_add.3
index cf401af5a..3654e7be6 100644
--- a/man3/argz_add.3
+++ b/man3/argz_add.3
@@ -6,7 +6,7 @@
.\" based on the description in glibc source and infopages
.\"
.\" Corrections and additions, aeb
-.TH argz_add 3 2023-02-05 "Linux man-pages 6.03"
+.TH argz_add 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
argz_add, argz_add_sep, argz_append, argz_count, argz_create,
argz_create_sep, argz_delete, argz_extract, argz_insert,
@@ -206,14 +206,14 @@ if an allocation error occurs.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR argz_add (),
.BR argz_add_sep (),
.BR argz_append (),
@@ -228,11 +228,9 @@ T{
.BR argz_stringify ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-These functions are a GNU extension.
+GNU.
.SH BUGS
Argz vectors without a terminating null byte may lead to
Segmentation Faults.
diff --git a/man3/asin.3 b/man3/asin.3
index 8d2f039a5..74ac283f6 100644
--- a/man3/asin.3
+++ b/man3/asin.3
@@ -13,7 +13,7 @@
.\" Modified 2002-07-25 by Walter Harms
.\" (walter.harms@informatik.uni-oldenburg.de)
.\"
-.TH asin 3 2023-02-05 "Linux man-pages 6.03"
+.TH asin 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
asin, asinf, asinl \- arc sine function
.SH LIBRARY
@@ -85,29 +85,29 @@ is raised.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR asin (),
.BR asinf (),
.BR asinl ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-C99, POSIX.1-2001, POSIX.1-2008.
+C11, POSIX.1-2008.
+.SH HISTORY
+C99, POSIX.1-2001.
.PP
The variant returning
.I double
also conforms to
-SVr4, 4.3BSD.
+SVr4, 4.3BSD, C89.
.SH SEE ALSO
.BR acos (3),
.BR atan (3),
diff --git a/man3/asinh.3 b/man3/asinh.3
index 8f46fb4ca..31973901d 100644
--- a/man3/asinh.3
+++ b/man3/asinh.3
@@ -13,7 +13,7 @@
.\" Modified 2002-07-27 by Walter Harms
.\" (walter.harms@informatik.uni-oldenburg.de)
.\"
-.TH asinh 3 2023-02-05 "Linux man-pages 6.03"
+.TH asinh 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
asinh, asinhf, asinhl \- inverse hyperbolic sine function
.SH LIBRARY
@@ -78,24 +78,24 @@ No errors occur.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR asinh (),
.BR asinhf (),
.BR asinhl ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-C99, POSIX.1-2001, POSIX.1-2008.
+C11, POSIX.1-2008.
+.SH HISTORY
+C99, POSIX.1-2001.
.PP
The variant returning
.I double
diff --git a/man3/asprintf.3 b/man3/asprintf.3
index a03328114..adc3e5b53 100644
--- a/man3/asprintf.3
+++ b/man3/asprintf.3
@@ -5,7 +5,7 @@
.\"
.\" Text fragments inspired by Martin Schulze <joey@infodrom.org>.
.\"
-.TH asprintf 3 2023-02-05 "Linux man-pages 6.03"
+.TH asprintf 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
asprintf, vasprintf \- print to allocated string
.SH LIBRARY
@@ -46,27 +46,25 @@ are undefined.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR asprintf (),
.BR vasprintf ()
T} Thread safety MT-Safe locale
.TE
-.hy
-.ad
.sp 1
-.SH STANDARDS
-These functions are GNU extensions, not in C or POSIX.
-They are also available under *BSD.
+.SH VERSIONS
The FreeBSD implementation sets
.I strp
to NULL on error.
+.SH STANDARDS
+GNU, BSD.
.SH SEE ALSO
.BR free (3),
.BR malloc (3),
diff --git a/man3/assert.3 b/man3/assert.3
index 24cdfe749..b1e8a9dc7 100644
--- a/man3/assert.3
+++ b/man3/assert.3
@@ -6,7 +6,7 @@
.\" Modified Sat Jul 24 21:42:42 1993 by Rik Faith <faith@cs.unc.edu>
.\" Modified Tue Oct 22 23:44:11 1996 by Eric S. Raymond <esr@thyrsus.com>
.\" Modified Thu Jun 2 23:44:11 2016 by Nikos Mavrogiannopoulos <nmav@redhat.com>
-.TH assert 3 2023-02-05 "Linux man-pages 6.03"
+.TH assert 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
assert \- abort the program if assertion is false
.SH LIBRARY
@@ -59,22 +59,30 @@ No value is returned.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR assert ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, C99.
+C11, POSIX.1-2008.
+.SH HISTORY
+C89, C99, POSIX.1-2001.
+.PP
+In C89,
+.I expression
+is required to be of type
+.I int
+and undefined behavior results if it is not, but in C99
+it may have any scalar type.
+.\" See Defect Report 107 for more details.
.SH BUGS
.BR assert ()
is implemented as a macro; if the expression tested has side-effects,
diff --git a/man3/assert_perror.3 b/man3/assert_perror.3
index df35b9ffb..77d70f1db 100644
--- a/man3/assert_perror.3
+++ b/man3/assert_perror.3
@@ -6,7 +6,7 @@
.\" This replaces an earlier man page written by Walter Harms
.\" <walter.harms@informatik.uni-oldenburg.de>.
.\"
-.TH assert_perror 3 2022-12-15 "Linux man-pages 6.03"
+.TH assert_perror 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
assert_perror \- test errnum and abort
.SH LIBRARY
@@ -43,22 +43,20 @@ No value is returned.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR assert_perror ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-This is a GNU extension.
+GNU.
.SH BUGS
The purpose of the assert macros is to help programmers find bugs in
their programs, things that cannot happen unless there was a coding mistake.
diff --git a/man3/atan.3 b/man3/atan.3
index 2da15cbde..5c89c62ee 100644
--- a/man3/atan.3
+++ b/man3/atan.3
@@ -13,7 +13,7 @@
.\" Modified 2002-07-27 by Walter Harms
.\" (walter.harms@informatik.uni-oldenburg.de)
.\"
-.TH atan 3 2023-02-05 "Linux man-pages 6.03"
+.TH atan 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
atan, atanf, atanl \- arc tangent function
.SH LIBRARY
@@ -70,29 +70,29 @@ No errors occur.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR atan (),
.BR atanf (),
.BR atanl ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-C99, POSIX.1-2001, POSIX.1-2008.
+C11, POSIX.1-2008.
+.SH HISTORY
+C99, POSIX.1-2001.
.PP
The variant returning
.I double
also conforms to
-SVr4, 4.3BSD.
+SVr4, 4.3BSD, C89.
.SH SEE ALSO
.BR acos (3),
.BR asin (3),
diff --git a/man3/atan2.3 b/man3/atan2.3
index 539e911cb..0532b47d3 100644
--- a/man3/atan2.3
+++ b/man3/atan2.3
@@ -13,7 +13,7 @@
.\" Modified 2002-07-27 by Walter Harms
.\" (walter.harms@informatik.uni-oldenburg.de)
.\"
-.TH atan2 3 2023-02-05 "Linux man-pages 6.03"
+.TH atan2 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
atan2, atan2f, atan2l \- arc tangent function of two variables
.SH LIBRARY
@@ -142,29 +142,29 @@ No errors occur.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR atan2 (),
.BR atan2f (),
.BR atan2l ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-C99, POSIX.1-2001, POSIX.1-2008.
+C11, POSIX.1-2008.
+.SH HISTORY
+C99, POSIX.1-2001.
.PP
The variant returning
.I double
also conforms to
-SVr4, 4.3BSD.
+SVr4, 4.3BSD, C89.
.SH SEE ALSO
.BR acos (3),
.BR asin (3),
diff --git a/man3/atanh.3 b/man3/atanh.3
index a67718450..f3a9b2e5d 100644
--- a/man3/atanh.3
+++ b/man3/atanh.3
@@ -13,7 +13,7 @@
.\" Modified 2002-07-27 by Walter Harms
.\" (walter.harms@informatik.uni-oldenburg.de)
.\"
-.TH atanh 3 2023-02-05 "Linux man-pages 6.03"
+.TH atanh 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
atanh, atanhf, atanhl \- inverse hyperbolic tangent function
.SH LIBRARY
@@ -112,24 +112,24 @@ is raised.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR atanh (),
.BR atanhf (),
.BR atanhl ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-C99, POSIX.1-2001, POSIX.1-2008.
+C11, POSIX.1-2008.
+.SH HISTORY
+C99, POSIX.1-2001.
.PP
The variant returning
.I double
@@ -137,7 +137,7 @@ also conforms to
SVr4, 4.3BSD.
.SH BUGS
In glibc 2.9 and earlier,
-.\" Bug: http://sources.redhat.com/bugzilla/show_bug.cgi?id=6759
+.\" Bug: https://www.sourceware.org/bugzilla/show_bug.cgi?id=6759
.\" This can be seen in sysdeps/ieee754/k_standard.c
when a pole error occurs,
.I errno
diff --git a/man3/atexit.3 b/man3/atexit.3
index 8122ddc32..4a57ac55a 100644
--- a/man3/atexit.3
+++ b/man3/atexit.3
@@ -11,7 +11,7 @@
.\" Modified 1993-07-24, Rik Faith (faith@cs.unc.edu)
.\" Modified 2003-10-25, Walter Harms
.\"
-.TH atexit 3 2023-02-05 "Linux man-pages 6.03"
+.TH atexit 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
atexit \- register a function to be called at normal process termination
.SH LIBRARY
@@ -61,37 +61,19 @@ it returns a nonzero value.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR atexit ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
-.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, C99, SVr4, 4.3BSD.
-.SH NOTES
-Functions registered using
-.BR atexit ()
-(and
-.BR on_exit (3))
-are not called if a process terminates abnormally because
-of the delivery of a signal.
-.PP
-If one of the registered functions calls
-.BR _exit (2),
-then any remaining functions are not invoked,
-and the other process termination steps performed by
-.BR exit (3)
-are not performed.
-.PP
+.SH VERSIONS
POSIX.1 says that the result of calling
.\" POSIX.1-2001, POSIX.1-2008
.BR exit (3)
@@ -109,6 +91,24 @@ portable programs should not invoke
.BR exit (3)
inside a function registered using
.BR atexit ().
+.SH STANDARDS
+C11, POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001, C89, C99, SVr4, 4.3BSD.
+.SH NOTES
+Functions registered using
+.BR atexit ()
+(and
+.BR on_exit (3))
+are not called if a process terminates abnormally because
+of the delivery of a signal.
+.PP
+If one of the registered functions calls
+.BR _exit (2),
+then any remaining functions are not invoked,
+and the other process termination steps performed by
+.BR exit (3)
+are not performed.
.PP
The
.BR atexit ()
@@ -137,28 +137,28 @@ that are called when the shared library is unloaded.
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
-
+\&
void
bye(void)
{
printf("That was all, folks\en");
}
-
+\&
int
main(void)
{
long a;
int i;
-
+\&
a = sysconf(_SC_ATEXIT_MAX);
printf("ATEXIT_MAX = %ld\en", a);
-
+\&
i = atexit(bye);
if (i != 0) {
fprintf(stderr, "cannot set exit function\en");
exit(EXIT_FAILURE);
}
-
+\&
exit(EXIT_SUCCESS);
}
.EE
diff --git a/man3/atof.3 b/man3/atof.3
index 035fed0b6..bb1398a45 100644
--- a/man3/atof.3
+++ b/man3/atof.3
@@ -9,7 +9,7 @@
.\" 386BSD man pages
.\" Modified Mon Mar 29 22:39:24 1993, David Metcalfe
.\" Modified Sat Jul 24 21:39:22 1993, Rik Faith (faith@cs.unc.edu)
-.TH atof 3 2022-12-29 "Linux man-pages 6.03"
+.TH atof 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
atof \- convert a string to a double
.SH LIBRARY
@@ -43,22 +43,22 @@ The converted value.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR atof ()
T} Thread safety MT-Safe locale
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, C99, SVr4, 4.3BSD.
+C11, POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001, C89, C99, SVr4, 4.3BSD.
.SH SEE ALSO
.BR atoi (3),
.BR atol (3),
diff --git a/man3/atoi.3 b/man3/atoi.3
index 27ed0ca28..d1d32f52a 100644
--- a/man3/atoi.3
+++ b/man3/atoi.3
@@ -11,7 +11,7 @@
.\" Modified Sat Jul 24 21:38:42 1993, Rik Faith (faith@cs.unc.edu)
.\" Modified Sun Dec 17 18:35:06 2000, Joseph S. Myers
.\"
-.TH atoi 3 2023-02-05 "Linux man-pages 6.03"
+.TH atoi 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
atoi, atol, atoll \- convert a string to an integer
.SH LIBRARY
@@ -67,24 +67,36 @@ The converted value or 0 on error.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR atoi (),
.BR atol (),
.BR atoll ()
T} Thread safety MT-Safe locale
.TE
-.hy
-.ad
.sp 1
+.SH VERSIONS
+POSIX.1 leaves the return value of
+.BR atoi ()
+on error unspecified.
+On glibc, musl libc, and uClibc, 0 is returned on error.
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, C99, SVr4, 4.3BSD.
+C11, POSIX.1-2008.
+.SH HISTORY
+C99, POSIX.1-2001, SVr4, 4.3BSD.
+.PP
+C89 and
+POSIX.1-1996 include the functions
+.BR atoi ()
+and
+.BR atol ()
+only.
.\" .SH NOTES
.\" Linux libc provided
.\" .BR atoq ()
@@ -96,11 +108,6 @@ POSIX.1-2001, POSIX.1-2008, C99, SVr4, 4.3BSD.
.\" .BR atoll ()
.\" function is present since glibc 2.0.2, but
.\" not in libc4 or libc5.
-.SH NOTES
-POSIX.1 leaves the return value of
-.BR atoi ()
-on error unspecified.
-On glibc, musl libc, and uClibc, 0 is returned on error.
.SH BUGS
.I errno
is not set on error so there is no way to distinguish between 0 as an
diff --git a/man3/backtrace.3 b/man3/backtrace.3
index bff6e0beb..ae970ff43 100644
--- a/man3/backtrace.3
+++ b/man3/backtrace.3
@@ -25,7 +25,7 @@
.\"
.\" References:
.\" glibc manual and source
-.TH backtrace 3 2023-02-05 "Linux man-pages 6.03"
+.TH backtrace 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
backtrace, backtrace_symbols, backtrace_symbols_fd \- support
for application self-debugging
@@ -130,33 +130,27 @@ returns a pointer to the array
.BR malloc (3)ed
by the call;
on error, NULL is returned.
-.SH VERSIONS
-.BR backtrace (),
-.BR backtrace_symbols (),
-and
-.BR backtrace_symbols_fd ()
-are provided since glibc 2.1.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR backtrace (),
.BR backtrace_symbols (),
.BR backtrace_symbols_fd ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-These functions are GNU extensions.
+GNU.
+.SH HISTORY
+glibc 2.1.
.SH NOTES
These functions make some assumptions about how a function's return
address is stored on the stack.
@@ -225,40 +219,40 @@ backtrace() returned 8 addresses
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
-
+\&
#define BT_BUF_SIZE 100
-
+\&
void
myfunc3(void)
{
int nptrs;
void *buffer[BT_BUF_SIZE];
char **strings;
-
+\&
nptrs = backtrace(buffer, BT_BUF_SIZE);
printf("backtrace() returned %d addresses\en", nptrs);
-
+\&
/* The call backtrace_symbols_fd(buffer, nptrs, STDOUT_FILENO)
would produce similar output to the following: */
-
+\&
strings = backtrace_symbols(buffer, nptrs);
if (strings == NULL) {
perror("backtrace_symbols");
exit(EXIT_FAILURE);
}
-
+\&
for (size_t j = 0; j < nptrs; j++)
printf("%s\en", strings[j]);
-
+\&
free(strings);
}
-
+\&
static void /* "static" means don\[aq]t export the symbol... */
myfunc2(void)
{
myfunc3();
}
-
+\&
void
myfunc(int ncalls)
{
@@ -267,7 +261,7 @@ myfunc(int ncalls)
else
myfunc2();
}
-
+\&
int
main(int argc, char *argv[])
{
@@ -275,7 +269,7 @@ main(int argc, char *argv[])
fprintf(stderr, "%s num\-calls\en", argv[0]);
exit(EXIT_FAILURE);
}
-
+\&
myfunc(atoi(argv[1]));
exit(EXIT_SUCCESS);
}
diff --git a/man3/basename.3 b/man3/basename.3
index 8c1ce7fad..266c49ae9 100644
--- a/man3/basename.3
+++ b/man3/basename.3
@@ -5,7 +5,7 @@
.\"
.\" Created, 14 Dec 2000 by Michael Kerrisk
.\"
-.TH basename 3 2023-02-05 "Linux man-pages 6.03"
+.TH basename 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
basename, dirname \- parse pathname components
.SH LIBRARY
@@ -113,24 +113,20 @@ return pointers to null-terminated strings.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR basename (),
.BR dirname ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
-.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008.
-.SH NOTES
+.SH VERSIONS
There are two different versions of
.BR basename ()
- the POSIX version described above, and the GNU version, which one gets
@@ -155,6 +151,10 @@ With glibc, one gets the POSIX version of
when
.I <libgen.h>
is included, and the GNU version otherwise.
+.SH STANDARDS
+POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001.
.SH BUGS
In the glibc implementation,
the POSIX versions of these functions modify the
@@ -175,7 +175,7 @@ and
.EX
char *dirc, *basec, *bname, *dname;
char *path = "/etc/passwd";
-
+\&
dirc = strdup(path);
basec = strdup(path);
dname = dirname(dirc);
diff --git a/man3/bcmp.3 b/man3/bcmp.3
index 77f44479e..d3cc49d4e 100644
--- a/man3/bcmp.3
+++ b/man3/bcmp.3
@@ -2,7 +2,7 @@
.\"
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
-.TH bcmp 3 2023-01-07 "Linux man-pages 6.03"
+.TH bcmp 3 2023-03-30 "Linux man-pages 6.05.01"
.SH NAME
bcmp \- compare byte sequences
.SH LIBRARY
@@ -21,9 +21,10 @@ is identical to
.BR memcmp (3);
use it instead.
.SH STANDARDS
+None.
+.SH HISTORY
4.3BSD.
-This function is deprecated (marked as LEGACY in POSIX.1-2001);
-POSIX.1-2008 removes the specification of
-.BR bcmp ().
+Marked as LEGACY in POSIX.1-2001;
+removed in POSIX.1-2008.
.SH SEE ALSO
.BR memcmp (3)
diff --git a/man3/bcopy.3 b/man3/bcopy.3
index e878b0037..b8892e906 100644
--- a/man3/bcopy.3
+++ b/man3/bcopy.3
@@ -11,7 +11,7 @@
.\" Modified Sun Feb 26 14:52:00 1995 by Rik Faith <faith@cs.unc.edu>
.\" Modified Tue Oct 22 23:48:10 1996 by Eric S. Raymond <esr@thyrsus.com>
.\" "
-.TH bcopy 3 2022-12-15 "Linux man-pages 6.03"
+.TH bcopy 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
bcopy \- copy byte sequence
.SH LIBRARY
@@ -39,23 +39,24 @@ None.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR bcopy ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
+None.
+.SH HISTORY
4.3BSD.
-This function is deprecated (marked as LEGACY in POSIX.1-2001): use
+.PP
+Marked as LEGACY in POSIX.1-2001: use
.BR memcpy (3)
or
.BR memmove (3)
diff --git a/man3/bindresvport.3 b/man3/bindresvport.3
index 22de0a477..d14e5805b 100644
--- a/man3/bindresvport.3
+++ b/man3/bindresvport.3
@@ -8,7 +8,7 @@
.\" 2007-05-31, mtk: Rewrite and substantial additional text.
.\" 2008-12-03, mtk: Rewrote some pieces and fixed some errors
.\"
-.TH bindresvport 3 2023-02-05 "Linux man-pages 6.03"
+.TH bindresvport 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
bindresvport \- bind a socket to a privileged IP port
.SH LIBRARY
@@ -79,31 +79,30 @@ is not
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lb lb lbx
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR bindresvport ()
T} Thread safety T{
+.na
+.nh
glibc\ >=\ 2.17: MT-Safe;
.\" commit f6da27e53695ad1cc0e2a9490358decbbfdff5e5
glibc\ <\ 2.17: MT-Unsafe
T}
.TE
-.hy
-.ad
.sp 1
.PP
The
.BR bindresvport ()
function uses a static variable that was not protected by a lock
before glibc 2.17, rendering the function MT-Unsafe.
-.SH STANDARDS
-Not in POSIX.1.
+.SH VERSIONS
Present on the BSDs, Solaris, and many other systems.
.SH NOTES
Unlike some
@@ -111,6 +110,8 @@ Unlike some
implementations,
the glibc implementation ignores any value that the caller supplies in
.IR sin\->sin_port .
+.SH STANDARDS
+BSD.
.SH SEE ALSO
.BR bind (2),
.BR getsockname (2)
diff --git a/man3/bsd_signal.3 b/man3/bsd_signal.3
index 20e58cfed..3294c5cc1 100644
--- a/man3/bsd_signal.3
+++ b/man3/bsd_signal.3
@@ -3,7 +3,7 @@
.\"
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
-.TH bsd_signal 3 2023-02-05 "Linux man-pages 6.03"
+.TH bsd_signal 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
bsd_signal \- signal handling with BSD semantics
.SH LIBRARY
@@ -62,28 +62,19 @@ As for
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR bsd_signal ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
-.SH STANDARDS
-4.2BSD, POSIX.1-2001.
-POSIX.1-2008 removes the specification of
-.BR bsd_signal (),
-recommending the use of
-.BR sigaction (2)
-instead.
-.SH NOTES
+.SH VERSIONS
Use of
.BR bsd_signal ()
should be avoided; use
@@ -107,6 +98,14 @@ is a GNU extension;
this type is defined only if the
.B _GNU_SOURCE
feature test macro is defined.
+.SH STANDARDS
+None.
+.SH HISTORY
+4.2BSD, POSIX.1-2001.
+Removed in POSIX.1-2008,
+recommending the use of
+.BR sigaction (2)
+instead.
.SH SEE ALSO
.BR sigaction (2),
.BR signal (2),
diff --git a/man3/bsearch.3 b/man3/bsearch.3
index a6ed9c55e..f73b93925 100644
--- a/man3/bsearch.3
+++ b/man3/bsearch.3
@@ -9,7 +9,7 @@
.\" 386BSD man pages
.\" Modified Mon Mar 29 22:41:16 1993, David Metcalfe
.\" Modified Sat Jul 24 21:35:16 1993, Rik Faith (faith@cs.unc.edu)
-.TH bsearch 3 2023-02-05 "Linux man-pages 6.03"
+.TH bsearch 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
bsearch \- binary search of a sorted array
.SH LIBRARY
@@ -63,22 +63,22 @@ match the key, the element returned is unspecified.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR bsearch ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, C99, SVr4, 4.3BSD.
+C11, POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001, C89, C99, SVr4, 4.3BSD.
.SH EXAMPLES
The example below first sorts an array of structures using
.BR qsort (3),
@@ -90,29 +90,29 @@ then retrieves desired elements using
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-
+\&
#define ARRAY_SIZE(arr) (sizeof((arr)) / sizeof((arr)[0]))
-
+\&
struct mi {
int nr;
const char *name;
};
-
+\&
static struct mi months[] = {
{ 1, "jan" }, { 2, "feb" }, { 3, "mar" }, { 4, "apr" },
{ 5, "may" }, { 6, "jun" }, { 7, "jul" }, { 8, "aug" },
{ 9, "sep" }, {10, "oct" }, {11, "nov" }, {12, "dec" }
};
-
+\&
static int
compmi(const void *m1, const void *m2)
{
const struct mi *mi1 = m1;
const struct mi *mi2 = m2;
-
+\&
return strcmp(mi1\->name, mi2\->name);
}
-
+\&
int
main(int argc, char *argv[])
{
@@ -120,7 +120,7 @@ main(int argc, char *argv[])
for (size_t i = 1; i < argc; i++) {
struct mi key;
struct mi *res;
-
+\&
key.name = argv[i];
res = bsearch(&key, months, ARRAY_SIZE(months),
sizeof(months[0]), compmi);
diff --git a/man3/bstring.3 b/man3/bstring.3
index e9d2f30db..87b133add 100644
--- a/man3/bstring.3
+++ b/man3/bstring.3
@@ -9,7 +9,7 @@
.\" Modified 1993-04-12, David Metcalfe
.\" Modified 1993-07-24, Rik Faith (faith@cs.unc.edu)
.\" Modified 2002-01-20, Walter Harms
-.TH bstring 3 2023-01-07 "Linux man-pages 6.03"
+.TH bstring 3 2023-01-07 "Linux man-pages 6.05.01"
.SH NAME
bcmp, bcopy, bzero, memccpy, memchr, memcmp, memcpy, memfrob, memmem,
memmove, memset \- byte string operations
diff --git a/man3/bswap.3 b/man3/bswap.3
index a1851507a..1810e9fd6 100644
--- a/man3/bswap.3
+++ b/man3/bswap.3
@@ -2,7 +2,7 @@
.\"
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
-.TH bswap 3 2023-01-07 "Linux man-pages 6.03"
+.TH bswap 3 2023-05-03 "Linux man-pages 6.05.01"
.SH NAME
bswap_16, bswap_32, bswap_64 \- reverse order of bytes
.SH LIBRARY
@@ -24,7 +24,7 @@ These functions return the value of their argument with the bytes reversed.
.SH ERRORS
These functions always succeed.
.SH STANDARDS
-These functions are GNU extensions.
+GNU.
.SH EXAMPLES
The program below swaps the bytes of the 8-byte integer supplied as
its command-line argument.
@@ -45,20 +45,20 @@ $ \fB./a.out 0x0123456789abcdef\fP
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
-
+\&
int
main(int argc, char *argv[])
{
uint64_t x;
-
+\&
if (argc != 2) {
fprintf(stderr, "Usage: %s <num>\en", argv[0]);
exit(EXIT_FAILURE);
}
-
+\&
x = strtoull(argv[1], NULL, 0);
printf("%#" PRIx64 " ==> %#" PRIx64 "\en", x, bswap_64(x));
-
+\&
exit(EXIT_SUCCESS);
}
.EE
diff --git a/man3/btowc.3 b/man3/btowc.3
index 694178eee..67e0d254b 100644
--- a/man3/btowc.3
+++ b/man3/btowc.3
@@ -9,7 +9,7 @@
.\" OpenGroup's Single UNIX specification http://www.UNIX-systems.org/online.html
.\" ISO/IEC 9899:1999
.\"
-.TH btowc 3 2022-12-15 "Linux man-pages 6.03"
+.TH btowc 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
btowc \- convert single byte to wide character
.SH LIBRARY
@@ -48,22 +48,22 @@ it returns
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR btowc ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, C99.
+C11, POSIX.1-2008.
+.SH HISTORY
+C99, POSIX.1-2001.
.SH NOTES
The behavior of
.BR btowc ()
diff --git a/man3/btree.3 b/man3/btree.3
index 43153d991..dfa8f4e06 100644
--- a/man3/btree.3
+++ b/man3/btree.3
@@ -5,7 +5,7 @@
.\"
.\" @(#)btree.3 8.4 (Berkeley) 8/18/94
.\"
-.TH btree 3 2022-12-04 "Linux man-pages 6.03"
+.TH btree 3 2022-12-04 "Linux man-pages 6.05.01"
.\".UC 7
.SH NAME
btree \- btree database access method
diff --git a/man3/byteorder.3 b/man3/byteorder.3
index 4318b54c2..7040f6357 100644
--- a/man3/byteorder.3
+++ b/man3/byteorder.3
@@ -10,7 +10,7 @@
.\" Modified Sat Jul 24 21:29:05 1993 by Rik Faith (faith@cs.unc.edu)
.\" Modified Thu Jul 26 14:06:20 2001 by Andries Brouwer (aeb@cwi.nl)
.\"
-.TH BYTEORDER 3 2022-12-15 "Linux man-pages 6.03"
+.TH BYTEORDER 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
htonl, htons, ntohl, ntohs \- convert values between host and network
byte order
@@ -58,25 +58,25 @@ Significant Byte first.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR htonl (),
.BR htons (),
.BR ntohl (),
.BR ntohs ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008.
+POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001.
.SH SEE ALSO
.BR bswap (3),
.BR endian (3),
diff --git a/man3/bzero.3 b/man3/bzero.3
index 35232e140..35abb1834 100644
--- a/man3/bzero.3
+++ b/man3/bzero.3
@@ -3,7 +3,7 @@
.\"
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
-.TH bzero 3 2023-02-05 "Linux man-pages 6.03"
+.TH bzero 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
bzero, explicit_bzero \- zero a byte string
.SH LIBRARY
@@ -38,39 +38,29 @@ in that it guarantees that compiler optimizations will not remove the
erase operation if the compiler deduces that the operation is "unnecessary".
.SH RETURN VALUE
None.
-.SH VERSIONS
-.BR explicit_bzero ()
-first appeared in glibc 2.25.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR bzero (),
.BR explicit_bzero ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-The
-.BR bzero ()
-function is deprecated (marked as LEGACY in POSIX.1-2001); use
-.BR memset (3)
-in new programs.
-POSIX.1-2008 removes the specification of
-.BR bzero ().
-The
-.BR bzero ()
-function first appeared in 4.3BSD.
-.PP
+None.
+.SH HISTORY
+.TP
+.BR explicit_bzero ()
+glibc 2.25.
+.IP
The
.BR explicit_bzero ()
function is a nonstandard extension that is also present on some of the BSDs.
@@ -78,6 +68,12 @@ Some other implementations have a similar function, such as
.BR memset_explicit ()
or
.BR memset_s ().
+.TP
+.BR bzero ()
+4.3BSD.
+.IP
+Marked as LEGACY in POSIX.1-2001.
+Removed in POSIX.1-2008.
.SH NOTES
The
.BR explicit_bzero ()
diff --git a/man3/cabs.3 b/man3/cabs.3
index fa20b6453..f0c756972 100644
--- a/man3/cabs.3
+++ b/man3/cabs.3
@@ -3,7 +3,7 @@
.\"
.\" SPDX-License-Identifier: GPL-1.0-or-later
.\"
-.TH cabs 3 2022-12-15 "Linux man-pages 6.03"
+.TH cabs 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
cabs, cabsf, cabsl \- absolute value of a complex number
.SH LIBRARY
@@ -21,29 +21,28 @@ Math library
These functions return the absolute value of the complex number
.IR z .
The result is a real number.
-.SH VERSIONS
-These functions were added in glibc 2.1.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR cabs (),
.BR cabsf (),
.BR cabsl ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-C99, POSIX.1-2001, POSIX.1-2008.
+C11, POSIX.1-2008.
+.SH HISTORY
+glibc 2.1.
+C99, POSIX.1-2001.
.SH NOTES
The function is actually an alias for
.I "hypot(a,\ b)"
diff --git a/man3/cacos.3 b/man3/cacos.3
index 0e89b9f64..aebff0fe5 100644
--- a/man3/cacos.3
+++ b/man3/cacos.3
@@ -4,7 +4,7 @@
.\"
.\" SPDX-License-Identifier: GPL-1.0-or-later
.\"
-.TH cacos 3 2022-12-15 "Linux man-pages 6.03"
+.TH cacos 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
cacos, cacosf, cacosl \- complex arc cosine
.SH LIBRARY
@@ -31,60 +31,59 @@ One has:
.nf
cacos(z) = \-i * clog(z + i * csqrt(1 \- z * z))
.fi
-.SH VERSIONS
-These functions were added in glibc 2.1.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR cacos (),
.BR cacosf (),
.BR cacosl ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-C99, POSIX.1-2001, POSIX.1-2008.
+C11, POSIX.1-2008.
+.SH HISTORY
+glibc 2.1.
+C99, POSIX.1-2001.
.SH EXAMPLES
.\" SRC BEGIN (cacos.c)
.EX
/* Link with "\-lm" */
-
+\&
#include <complex.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
-
+\&
int
main(int argc, char *argv[])
{
double complex z, c, f;
double complex i = I;
-
+\&
if (argc != 3) {
fprintf(stderr, "Usage: %s <real> <imag>\en", argv[0]);
exit(EXIT_FAILURE);
}
-
+\&
z = atof(argv[1]) + atof(argv[2]) * I;
-
+\&
c = cacos(z);
-
+\&
printf("cacos() = %6.3f %6.3f*i\en", creal(c), cimag(c));
-
+\&
f = \-i * clog(z + i * csqrt(1 \- z * z));
-
+\&
printf("formula = %6.3f %6.3f*i\en", creal(f), cimag(f));
-
+\&
exit(EXIT_SUCCESS);
}
.EE
diff --git a/man3/cacosh.3 b/man3/cacosh.3
index 4b21d8680..55d1d4769 100644
--- a/man3/cacosh.3
+++ b/man3/cacosh.3
@@ -4,7 +4,7 @@
.\"
.\" SPDX-License-Identifier: GPL-1.0-or-later
.\"
-.TH cacosh 3 2022-12-15 "Linux man-pages 6.03"
+.TH cacosh 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
cacosh, cacoshf, cacoshl \- complex arc hyperbolic cosine
.SH LIBRARY
@@ -34,57 +34,56 @@ One has:
.nf
cacosh(z) = 2 * clog(csqrt((z + 1) / 2) + csqrt((z \- 1) / 2))
.fi
-.SH VERSIONS
-These functions were added in glibc 2.1.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR cacosh (),
.BR cacoshf (),
.BR cacoshl ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-C99, POSIX.1-2001, POSIX.1-2008.
+C11, POSIX.1-2008.
+.SH HISTORY
+C99, POSIX.1-2001.
+glibc 2.1.
.SH EXAMPLES
.\" SRC BEGIN (cacosh.c)
.EX
/* Link with "\-lm" */
-
+\&
#include <complex.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
-
+\&
int
main(int argc, char *argv[])
{
double complex z, c, f;
-
+\&
if (argc != 3) {
fprintf(stderr, "Usage: %s <real> <imag>\en", argv[0]);
exit(EXIT_FAILURE);
}
-
+\&
z = atof(argv[1]) + atof(argv[2]) * I;
-
+\&
c = cacosh(z);
printf("cacosh() = %6.3f %6.3f*i\en", creal(c), cimag(c));
-
+\&
f = 2 * clog(csqrt((z + 1)/2) + csqrt((z \- 1)/2));
printf("formula = %6.3f %6.3f*i\en", creal(f), cimag(f));
-
+\&
exit(EXIT_SUCCESS);
}
.EE
diff --git a/man3/canonicalize_file_name.3 b/man3/canonicalize_file_name.3
index 64dd2e4c3..5d9e466d7 100644
--- a/man3/canonicalize_file_name.3
+++ b/man3/canonicalize_file_name.3
@@ -4,7 +4,7 @@
.\"
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
-.TH canonicalize_file_name 3 2022-12-15 "Linux man-pages 6.03"
+.TH canonicalize_file_name 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
canonicalize_file_name \- return the canonicalized absolute pathname
.SH LIBRARY
@@ -62,22 +62,20 @@ See
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR canonicalize_file_name ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-This function is a GNU extension.
+GNU.
.SH SEE ALSO
.BR readlink (2),
.BR realpath (3)
diff --git a/man3/carg.3 b/man3/carg.3
index 736ccaa57..a7e3daa19 100644
--- a/man3/carg.3
+++ b/man3/carg.3
@@ -3,7 +3,7 @@
.\"
.\" SPDX-License-Identifier: GPL-1.0-or-later
.\"
-.TH carg 3 2022-12-15 "Linux man-pages 6.03"
+.TH carg 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
carg, cargf, cargl \- calculate the complex argument
.SH LIBRARY
@@ -62,29 +62,28 @@ tan(carg(z)) = cimag(z) / creal(z)
.in
.SH RETURN VALUE
The return value is in the range of [\-pi,pi].
-.SH VERSIONS
-These functions were added in glibc 2.1.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR carg (),
.BR cargf (),
.BR cargl ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-C99, POSIX.1-2001, POSIX.1-2008.
+C11, POSIX.1-2008.
+.SH HISTORY
+glibc 2.1.
+C99, POSIX.1-2001.
.SH SEE ALSO
.BR cabs (3),
.BR complex (7)
diff --git a/man3/casin.3 b/man3/casin.3
index c9917c0f5..5cce6a462 100644
--- a/man3/casin.3
+++ b/man3/casin.3
@@ -3,7 +3,7 @@
.\"
.\" SPDX-License-Identifier: GPL-1.0-or-later
.\"
-.TH casin 3 2022-12-15 "Linux man-pages 6.03"
+.TH casin 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
casin, casinf, casinl \- complex arc sine
.SH LIBRARY
@@ -30,29 +30,28 @@ One has:
.nf
casin(z) = \-i clog(iz + csqrt(1 \- z * z))
.fi
-.SH VERSIONS
-These functions were added in glibc 2.1.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR casin (),
.BR casinf (),
.BR casinl ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-C99, POSIX.1-2001, POSIX.1-2008.
+C11, POSIX.1-2008.
+.SH HISTORY
+glibc 2.1.
+C99, POSIX.1-2001.
.SH SEE ALSO
.BR clog (3),
.BR csin (3),
diff --git a/man3/casinh.3 b/man3/casinh.3
index f99610e53..64cc89e66 100644
--- a/man3/casinh.3
+++ b/man3/casinh.3
@@ -3,7 +3,7 @@
.\"
.\" SPDX-License-Identifier: GPL-1.0-or-later
.\"
-.TH casinh 3 2022-12-15 "Linux man-pages 6.03"
+.TH casinh 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
casinh, casinhf, casinhl \- complex arc sine hyperbolic
.SH LIBRARY
@@ -32,29 +32,28 @@ One has:
casinh(z) = clog(z + csqrt(z * z + 1))
.EE
.in
-.SH VERSIONS
-These functions were added in glibc 2.1.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR casinh (),
.BR casinhf (),
.BR casinhl ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-C99, POSIX.1-2001, POSIX.1-2008.
+C11, POSIX.1-2008.
+.SH HISTORY
+glibc 2.1.
+C99, POSIX.1-2001.
.SH SEE ALSO
.BR asinh (3),
.BR cabs (3),
diff --git a/man3/catan.3 b/man3/catan.3
index 98b4871f1..ea79b40da 100644
--- a/man3/catan.3
+++ b/man3/catan.3
@@ -4,7 +4,7 @@
.\"
.\" SPDX-License-Identifier: GPL-1.0-or-later
.\"
-.TH catan 3 2022-12-15 "Linux man-pages 6.03"
+.TH catan 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
catan, catanf, catanl \- complex arc tangents
.SH LIBRARY
@@ -31,58 +31,57 @@ One has:
catan(z) = (clog(1 + i * z) \- clog(1 \- i * z)) / (2 * i)
.EE
.in
-.SH VERSIONS
-These functions were added in glibc 2.1.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR catan (),
.BR catanf (),
.BR catanl ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-C99, POSIX.1-2001, POSIX.1-2008.
+C11, POSIX.1-2008.
+.SH HISTORY
+glibc 2.1.
+C99, POSIX.1-2001.
.SH EXAMPLES
.\" SRC BEGIN (catan.c)
.EX
/* Link with "\-lm" */
-
+\&
#include <complex.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
-
+\&
int
main(int argc, char *argv[])
{
double complex z, c, f;
double complex i = I;
-
+\&
if (argc != 3) {
fprintf(stderr, "Usage: %s <real> <imag>\en", argv[0]);
exit(EXIT_FAILURE);
}
-
+\&
z = atof(argv[1]) + atof(argv[2]) * I;
-
+\&
c = catan(z);
printf("catan() = %6.3f %6.3f*i\en", creal(c), cimag(c));
-
+\&
f = (clog(1 + i * z) \- clog(1 \- i * z)) / (2 * i);
printf("formula = %6.3f %6.3f*i\en", creal(f), cimag(f));
-
+\&
exit(EXIT_SUCCESS);
}
.EE
diff --git a/man3/catanh.3 b/man3/catanh.3
index 1dc83d324..0cd8c2b28 100644
--- a/man3/catanh.3
+++ b/man3/catanh.3
@@ -4,7 +4,7 @@
.\"
.\" SPDX-License-Identifier: GPL-1.0-or-later
.\"
-.TH catanh 3 2022-12-15 "Linux man-pages 6.03"
+.TH catanh 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
catanh, catanhf, catanhl \- complex arc tangents hyperbolic
.SH LIBRARY
@@ -33,57 +33,56 @@ One has:
catanh(z) = 0.5 * (clog(1 + z) \- clog(1 \- z))
.EE
.in
-.SH VERSIONS
-These functions were added in glibc 2.1.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR catanh (),
.BR catanhf (),
.BR catanhl ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-C99, POSIX.1-2001, POSIX.1-2008.
+C11, POSIX.1-2008.
+.SH HISTORY
+glibc 2.1.
+C99, POSIX.1-2001.
.SH EXAMPLES
.\" SRC BEGIN (catanh.c)
.EX
/* Link with "\-lm" */
-
+\&
#include <complex.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
-
+\&
int
main(int argc, char *argv[])
{
double complex z, c, f;
-
+\&
if (argc != 3) {
fprintf(stderr, "Usage: %s <real> <imag>\en", argv[0]);
exit(EXIT_FAILURE);
}
-
+\&
z = atof(argv[1]) + atof(argv[2]) * I;
-
+\&
c = catanh(z);
printf("catanh() = %6.3f %6.3f*i\en", creal(c), cimag(c));
-
+\&
f = 0.5 * (clog(1 + z) \- clog(1 \- z));
printf("formula = %6.3f %6.3f*i\en", creal(f), cimag(f));
-
+\&
exit(EXIT_SUCCESS);
}
.EE
diff --git a/man3/catgets.3 b/man3/catgets.3
index a8f718f5c..2083bb33f 100644
--- a/man3/catgets.3
+++ b/man3/catgets.3
@@ -4,7 +4,7 @@
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
.\" Updated, aeb, 980809
-.TH catgets 3 2023-02-05 "Linux man-pages 6.03"
+.TH catgets 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
catgets \- get message from a message catalog
.SH LIBRARY
@@ -52,26 +52,27 @@ returns the value
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR catgets ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008.
-.SH NOTES
+POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001.
+.PP
The
.BR catgets ()
function is available only in libc.so.4.4.4c and above.
+.PP
The Jan 1987 X/Open Portability Guide specifies a more subtle
error return:
.I message
diff --git a/man3/catopen.3 b/man3/catopen.3
index 9df1b888f..b65b1f362 100644
--- a/man3/catopen.3
+++ b/man3/catopen.3
@@ -6,7 +6,7 @@
.\" Modified Thu Dec 13 22:51:19 2001 by Martin Schulze <joey@infodrom.org>
.\" Modified 2001-12-14 aeb
.\"
-.TH catopen 3 2023-02-05 "Linux man-pages 6.03"
+.TH catopen 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
catopen, catclose \- open/close a message catalog
.SH LIBRARY
@@ -131,35 +131,24 @@ is 0.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR catopen ()
T} Thread safety MT-Safe env
T{
+.na
+.nh
.BR catclose ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
-.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008.
-.\" In XPG 1987, Vol. 3 it says:
-.\" .I "The flag argument of catopen is reserved for future use"
-.\" .IR "and should be set to 0" .
-.\"
-.\" It is unclear what the source was for the constants
-.\" .B MCLoadBySet
-.\" and
-.\" .B MCLoadAll
-.\" (see below).
-.SH NOTES
+.SH VERSIONS
The above is the POSIX.1 description.
The glibc value for
.B NL_CAT_LOCALE
@@ -193,6 +182,19 @@ The default path varies, but usually looks at a number of places below
.\" .I /etc/locale
.\" and
.\" .IR /usr/lib/locale .
+.SH STANDARDS
+POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001.
+.\" In XPG 1987, Vol. 3 it says:
+.\" .I "The flag argument of catopen is reserved for future use"
+.\" .IR "and should be set to 0" .
+.\"
+.\" It is unclear what the source was for the constants
+.\" .B MCLoadBySet
+.\" and
+.\" .B MCLoadAll
+.\" (see below).
.SH SEE ALSO
.BR catgets (3),
.BR setlocale (3)
diff --git a/man3/cbrt.3 b/man3/cbrt.3
index 68e582064..106e9512b 100644
--- a/man3/cbrt.3
+++ b/man3/cbrt.3
@@ -8,7 +8,7 @@
.\" Modified 2002-07-27 Walter Harms
.\" (walter.harms@informatik.uni-oldenburg.de)
.\"
-.TH cbrt 3 2023-02-05 "Linux man-pages 6.03"
+.TH cbrt 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
cbrt, cbrtf, cbrtl \- cube root function
.SH LIBRARY
@@ -63,24 +63,24 @@ No errors occur.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR cbrt (),
.BR cbrtf (),
.BR cbrtl ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-C99, POSIX.1-2001, POSIX.1-2008.
+C11, POSIX.1-2008.
+.SH HISTORY
+C99, POSIX.1-2001.
.\" .BR cbrt ()
.\" was a GNU extension. It is now a C99 requirement.
.SH SEE ALSO
diff --git a/man3/ccos.3 b/man3/ccos.3
index e2695e47a..2e6ceabac 100644
--- a/man3/ccos.3
+++ b/man3/ccos.3
@@ -3,7 +3,7 @@
.\"
.\" SPDX-License-Identifier: GPL-1.0-or-later
.\"
-.TH ccos 3 2022-12-15 "Linux man-pages 6.03"
+.TH ccos 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
ccos, ccosf, ccosl \- complex cosine function
.SH LIBRARY
@@ -28,29 +28,28 @@ The complex cosine function is defined as:
ccos(z) = (exp(i * z) + exp(\-i * z)) / 2
.EE
.in
-.SH VERSIONS
-These functions were added in glibc 2.1.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR ccos (),
.BR ccosf (),
.BR ccosl ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-C99, POSIX.1-2001, POSIX.1-2008.
+C11, POSIX.1-2008.
+.SH HISTORY
+glibc 2.1.
+C99, POSIX.1-2001.
.SH SEE ALSO
.BR cabs (3),
.BR cacos (3),
diff --git a/man3/ccosh.3 b/man3/ccosh.3
index 43a706004..ee0c38448 100644
--- a/man3/ccosh.3
+++ b/man3/ccosh.3
@@ -2,7 +2,7 @@
.\"
.\" SPDX-License-Identifier: GPL-1.0-or-later
.\"
-.TH ccosh 3 2022-12-04 "Linux man-pages 6.03"
+.TH ccosh 3 2023-03-30 "Linux man-pages 6.05.01"
.SH NAME
ccosh, ccoshf, ccoshl \- complex hyperbolic cosine
.SH LIBRARY
@@ -27,10 +27,11 @@ The complex hyperbolic cosine function is defined as:
ccosh(z) = (exp(z)+exp(\-z))/2
.EE
.in
-.SH VERSIONS
-These functions were added in glibc 2.1.
.SH STANDARDS
-C99, POSIX.1-2001, POSIX.1-2008.
+C11, POSIX.1-2008.
+.SH HISTORY
+glibc 2.1.
+C99, POSIX.1-2001.
.SH SEE ALSO
.BR cabs (3),
.BR cacosh (3),
diff --git a/man3/ceil.3 b/man3/ceil.3
index 65628e426..d72711f0b 100644
--- a/man3/ceil.3
+++ b/man3/ceil.3
@@ -5,7 +5,7 @@
.\"
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
-.TH ceil 3 2023-02-05 "Linux man-pages 6.03"
+.TH ceil 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
ceil, ceilf, ceill \- ceiling function: smallest integral value not
less than argument
@@ -57,29 +57,29 @@ POSIX.1-2001 documents a range error for overflows, but see NOTES.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR ceil (),
.BR ceilf (),
.BR ceill ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-C99, POSIX.1-2001, POSIX.1-2008.
+C11, POSIX.1-2008.
+.SH HISTORY
+C99, POSIX.1-2001.
.PP
The variant returning
.I double
also conforms to
-SVr4, 4.3BSD.
+SVr4, 4.3BSD, C89.
.SH NOTES
SUSv2 and POSIX.1-2001 contain text about overflow (which might set
.I errno
diff --git a/man3/cexp.3 b/man3/cexp.3
index 2e374a374..30ba13f77 100644
--- a/man3/cexp.3
+++ b/man3/cexp.3
@@ -3,7 +3,7 @@
.\"
.\" SPDX-License-Identifier: GPL-1.0-or-later
.\"
-.TH cexp 3 2022-12-15 "Linux man-pages 6.03"
+.TH cexp 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
cexp, cexpf, cexpl \- complex exponential function
.SH LIBRARY
@@ -29,29 +29,28 @@ One has:
cexp(I * z) = ccos(z) + I * csin(z)
.EE
.in
-.SH VERSIONS
-These functions were added in glibc 2.1.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR cexp (),
.BR cexpf (),
.BR cexpl ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-C99, POSIX.1-2001, POSIX.1-2008.
+C11, POSIX.1-2008.
+.SH HISTORY
+glibc 2.1.
+C99, POSIX.1-2001.
.SH SEE ALSO
.BR cabs (3),
.BR cexp2 (3),
diff --git a/man3/cexp2.3 b/man3/cexp2.3
index 43b9f2970..e19f1f6ea 100644
--- a/man3/cexp2.3
+++ b/man3/cexp2.3
@@ -2,7 +2,7 @@
.\"
.\" SPDX-License-Identifier: GPL-1.0-or-later
.\"
-.TH cexp2 3 2022-12-04 "Linux man-pages 6.03"
+.TH cexp2 3 2022-12-04 "Linux man-pages 6.05.01"
.SH NAME
cexp2, cexp2f, cexp2l \- base-2 exponent of a complex number
.SH LIBRARY
diff --git a/man3/cfree.3 b/man3/cfree.3
index f2a5cb6a1..ef9771770 100644
--- a/man3/cfree.3
+++ b/man3/cfree.3
@@ -3,7 +3,7 @@
.\"
.\" SPDX-License-Identifier: GPL-2.0-or-later
.\"
-.TH cfree 3 2023-02-05 "Linux man-pages 6.03"
+.TH cfree 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
cfree \- free allocated memory
.SH LIBRARY
@@ -104,33 +104,30 @@ was not a pointer to a block previously allocated by
one of the routines in the
.BR malloc (3)
family.
-.SH VERSIONS
-The
-.BR cfree ()
-function was removed
-.\" commit 025b33ae84bb8f15b2748a1d8605dca453fce112
-in glibc 2.26.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR cfree ()
T} Thread safety MT-Safe /* In glibc */
.TE
-.hy
-.ad
.sp 1
-.SH STANDARDS
+.SH VERSIONS
The 3-argument version of
.BR cfree ()
as used by SCO conforms to the iBCSe2 standard:
Intel386 Binary Compatibility Specification, Edition 2.
+.SH STANDARDS
+None.
+.SH HISTORY
+.\" commit 025b33ae84bb8f15b2748a1d8605dca453fce112
+Removed in glibc 2.26.
.SH SEE ALSO
.BR malloc (3)
diff --git a/man3/cimag.3 b/man3/cimag.3
index 8b97af19b..4a9293e6c 100644
--- a/man3/cimag.3
+++ b/man3/cimag.3
@@ -3,7 +3,7 @@
.\"
.\" SPDX-License-Identifier: GPL-1.0-or-later
.\"
-.TH cimag 3 2022-12-15 "Linux man-pages 6.03"
+.TH cimag 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
cimag, cimagf, cimagl \- get imaginary part of a complex number
.SH LIBRARY
@@ -28,32 +28,31 @@ One has:
z = creal(z) + I * cimag(z)
.EE
.in
-.SH VERSIONS
-These functions were added in glibc 2.1.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR cimag (),
.BR cimagf (),
.BR cimagl ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
-.SH STANDARDS
-C99, POSIX.1-2001, POSIX.1-2008.
-.SH NOTES
-gcc also supports __imag__.
+.SH VERSIONS
+GCC also supports __imag__.
That is a GNU extension.
+.SH STANDARDS
+C11, POSIX.1-2008.
+.SH HISTORY
+glibc 2.1.
+C99, POSIX.1-2001.
.SH SEE ALSO
.BR cabs (3),
.BR creal (3),
diff --git a/man3/circleq.3 b/man3/circleq.3
index fb138190c..c03ab160f 100644
--- a/man3/circleq.3
+++ b/man3/circleq.3
@@ -5,7 +5,7 @@
.\" SPDX-License-Identifier: BSD-3-Clause
.\"
.\"
-.TH CIRCLEQ 3 2022-10-30 "Linux man-pages 6.03"
+.TH CIRCLEQ 3 2023-05-03 "Linux man-pages 6.05.01"
.SH NAME
CIRCLEQ_EMPTY,
CIRCLEQ_ENTRY,
@@ -238,9 +238,7 @@ they return
returns an initializer that can be assigned to the queue
.IR head .
.SH STANDARDS
-Not in POSIX.1, POSIX.1-2001, or POSIX.1-2008.
-Present on the BSDs
-(CIRCLEQ macros first appeared in 4.4BSD).
+BSD.
.SH BUGS
.BR CIRCLEQ_FOREACH ()
and
@@ -264,35 +262,35 @@ without interfering with the traversal.
#include <stdio.h>
#include <stdlib.h>
#include <sys/queue.h>
-
+\&
struct entry {
int data;
CIRCLEQ_ENTRY(entry) entries; /* Queue */
};
-
+\&
CIRCLEQ_HEAD(circlehead, entry);
-
+\&
int
main(void)
{
struct entry *n1, *n2, *n3, *np;
struct circlehead head; /* Queue head */
int i;
-
+\&
CIRCLEQ_INIT(&head); /* Initialize the queue */
-
+\&
n1 = malloc(sizeof(struct entry)); /* Insert at the head */
CIRCLEQ_INSERT_HEAD(&head, n1, entries);
-
+\&
n1 = malloc(sizeof(struct entry)); /* Insert at the tail */
CIRCLEQ_INSERT_TAIL(&head, n1, entries);
-
+\&
n2 = malloc(sizeof(struct entry)); /* Insert after */
CIRCLEQ_INSERT_AFTER(&head, n1, n2, entries);
-
+\&
n3 = malloc(sizeof(struct entry)); /* Insert before */
CIRCLEQ_INSERT_BEFORE(&head, n2, n3, entries);
-
+\&
CIRCLEQ_REMOVE(&head, n2, entries); /* Deletion */
free(n2);
/* Forward traversal */
@@ -310,7 +308,7 @@ main(void)
n1 = n2;
}
CIRCLEQ_INIT(&head);
-
+\&
exit(EXIT_SUCCESS);
}
.EE
diff --git a/man3/clearenv.3 b/man3/clearenv.3
index f4375a776..1c9140222 100644
--- a/man3/clearenv.3
+++ b/man3/clearenv.3
@@ -4,7 +4,7 @@
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
.\" Additions, aeb, 2001-10-17.
-.TH clearenv 3 2023-02-05 "Linux man-pages 6.03"
+.TH clearenv 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
clearenv \- clear the environment
.SH LIBRARY
@@ -45,26 +45,37 @@ function returns zero on success, and a nonzero
value on failure.
.\" Most versions of UNIX return -1 on error, or do not even have errors.
.\" glibc info and the Watcom C library document "a nonzero value".
-.SH VERSIONS
-Available since glibc 2.0.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR clearenv ()
T} Thread safety MT-Unsafe const:env
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
+.TP
+.BR putenv ()
+POSIX.1-2008.
+.TP
+.BR clearenv ()
+None.
+.SH HISTORY
+.TP
+.BR putenv ()
+glibc 2.0.
+POSIX.1-2001.
+.TP
+.BR clearenv ()
+glibc 2.0.
+.PP
Various UNIX variants (DG/UX, HP-UX, QNX, ...).
POSIX.9 (bindings for FORTRAN77).
POSIX.1-1996 did not accept
diff --git a/man3/clock.3 b/man3/clock.3
index 9247240b1..588209bd1 100644
--- a/man3/clock.3
+++ b/man3/clock.3
@@ -7,7 +7,7 @@
.\" Modified 14 Jun 2002, Michael Kerrisk <mtk.manpages@gmail.com>
.\" Added notes on differences from other UNIX systems with respect to
.\" waited-for children.
-.TH clock 3 2022-12-29 "Linux man-pages 6.03"
+.TH clock 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
clock \- determine processor time
.SH LIBRARY
@@ -34,37 +34,23 @@ be represented, the function returns the value
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR clock ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
-.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, C99.
+.SH VERSIONS
XSI requires that
.B CLOCKS_PER_SEC
equals 1000000 independent
of the actual resolution.
-.SH NOTES
-The C standard allows for arbitrary values at the start of the program;
-subtract the value returned from a call to
-.BR clock ()
-at the start of the program to get maximum portability.
-.PP
-Note that the time can wrap around.
-On a 32-bit system where
-.B CLOCKS_PER_SEC
-equals 1000000 this function will return the same
-value approximately every 72 minutes.
.PP
On several other implementations,
the value returned by
@@ -84,6 +70,10 @@ The
.BR times (2)
function, which explicitly returns (separate) information about the
caller and its children, may be preferable.
+.SH STANDARDS
+C11, POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001, C89.
.PP
In glibc 2.17 and earlier,
.BR clock ()
@@ -95,6 +85,17 @@ since glibc 2.18, it is implemented on top of
(using the
.B CLOCK_PROCESS_CPUTIME_ID
clock).
+.SH NOTES
+The C standard allows for arbitrary values at the start of the program;
+subtract the value returned from a call to
+.BR clock ()
+at the start of the program to get maximum portability.
+.PP
+Note that the time can wrap around.
+On a 32-bit system where
+.B CLOCKS_PER_SEC
+equals 1000000 this function will return the same
+value approximately every 72 minutes.
.SH SEE ALSO
.BR clock_gettime (2),
.BR getrusage (2),
diff --git a/man3/clock_getcpuclockid.3 b/man3/clock_getcpuclockid.3
index ba150d1d5..749fdbe07 100644
--- a/man3/clock_getcpuclockid.3
+++ b/man3/clock_getcpuclockid.3
@@ -4,7 +4,7 @@
.\"
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
-.TH clock_getcpuclockid 3 2022-12-15 "Linux man-pages 6.03"
+.TH clock_getcpuclockid 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
clock_getcpuclockid \- obtain ID of a process CPU-time clock
.SH LIBRARY
@@ -67,29 +67,26 @@ obtaining the per-process CPU-time clock of another process.)
.B ESRCH
There is no process with the ID
.IR pid .
-.SH VERSIONS
-The
-.BR clock_getcpuclockid ()
-function is available since glibc 2.2.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR clock_getcpuclockid ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008.
+POSIX.1-2008.
+.SH HISTORY
+glibc 2.2.
+POSIX.1-2001.
.SH NOTES
Calling
.BR clock_gettime (2)
@@ -124,28 +121,28 @@ CPU\-time clock for PID 1 is 2.213466748 seconds
#include <stdlib.h>
#include <time.h>
#include <unistd.h>
-
+\&
int
main(int argc, char *argv[])
{
clockid_t clockid;
struct timespec ts;
-
+\&
if (argc != 2) {
fprintf(stderr, "%s <process\-ID>\en", argv[0]);
exit(EXIT_FAILURE);
}
-
+\&
if (clock_getcpuclockid(atoi(argv[1]), &clockid) != 0) {
perror("clock_getcpuclockid");
exit(EXIT_FAILURE);
}
-
+\&
if (clock_gettime(clockid, &ts) == \-1) {
perror("clock_gettime");
exit(EXIT_FAILURE);
}
-
+\&
printf("CPU\-time clock for PID %s is %jd.%09ld seconds\en",
argv[1], (intmax_t) ts.tv_sec, ts.tv_nsec);
exit(EXIT_SUCCESS);
diff --git a/man3/clog.3 b/man3/clog.3
index 35636e6a0..5a75d36c8 100644
--- a/man3/clog.3
+++ b/man3/clog.3
@@ -3,7 +3,7 @@
.\"
.\" SPDX-License-Identifier: GPL-1.0-or-later
.\"
-.TH clog 3 2022-12-15 "Linux man-pages 6.03"
+.TH clog 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
clog, clogf, clogl \- natural logarithm of a complex number
.SH LIBRARY
@@ -42,29 +42,28 @@ clog(z) = log(cabs(z)) + I * carg(z)
Note that
.I z
close to zero will cause an overflow.
-.SH VERSIONS
-These functions were added in glibc 2.1.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR clog (),
.BR clogf (),
.BR clogl ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-C99, POSIX.1-2001, POSIX.1-2008.
+C11, POSIX.1-2008.
+.SH HISTORY
+glibc 2.1.
+C99, POSIX.1-2001.
.SH SEE ALSO
.BR cabs (3),
.BR cexp (3),
diff --git a/man3/clog10.3 b/man3/clog10.3
index 943ff4535..716d6e7a1 100644
--- a/man3/clog10.3
+++ b/man3/clog10.3
@@ -3,7 +3,7 @@
.\"
.\" SPDX-License-Identifier: GPL-1.0-or-later
.\"
-.TH clog10 3 2022-12-15 "Linux man-pages 6.03"
+.TH clog10 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
clog10, clog10f, clog10l \- base-10 logarithm of a complex number
.SH LIBRARY
@@ -45,29 +45,28 @@ and
Note that
.I z
close to zero will cause an overflow.
-.SH VERSIONS
-These functions first appeared in glibc 2.1.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR clog10 (),
.BR clog10f (),
.BR clog10l ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-These functions are GNU extensions.
+GNU.
+.SH HISTORY
+glibc 2.1.
+.PP
The identifiers are reserved for future use in C99 and C11.
.SH SEE ALSO
.BR cabs (3),
diff --git a/man3/clog2.3 b/man3/clog2.3
index d4ca0256d..06a04a902 100644
--- a/man3/clog2.3
+++ b/man3/clog2.3
@@ -2,7 +2,7 @@
.\"
.\" SPDX-License-Identifier: GPL-1.0-or-later
.\"
-.TH clog2 3 2022-12-04 "Linux man-pages 6.03"
+.TH clog2 3 2023-03-30 "Linux man-pages 6.05.01"
.SH NAME
clog2, clog2f, clog2l \- base-2 logarithm of a complex number
.SH LIBRARY
@@ -31,6 +31,8 @@ Note that
.I z
close to zero will cause an overflow.
.SH STANDARDS
+None.
+.SH HISTORY
These function names are reserved for future use in C99.
.PP
Not yet in glibc, as at glibc 2.19.
diff --git a/man3/closedir.3 b/man3/closedir.3
index f5062fb5a..e10ae9ebf 100644
--- a/man3/closedir.3
+++ b/man3/closedir.3
@@ -9,7 +9,7 @@
.\" 386BSD man pages
.\" Modified Sat Jul 24 21:25:52 1993 by Rik Faith (faith@cs.unc.edu)
.\" Modified 11 June 1995 by Andries Brouwer (aeb@cwi.nl)
-.TH closedir 3 2022-12-15 "Linux man-pages 6.03"
+.TH closedir 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
closedir \- close a directory
.SH LIBRARY
@@ -50,22 +50,22 @@ Invalid directory stream descriptor
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR closedir ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, SVr4, 4.3BSD.
+POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001, SVr4, 4.3BSD.
.SH SEE ALSO
.BR close (2),
.BR opendir (3),
diff --git a/man3/cmsg.3 b/man3/cmsg.3
index b218baf2b..3ca7d1d44 100644
--- a/man3/cmsg.3
+++ b/man3/cmsg.3
@@ -1,14 +1,9 @@
-.\" This man page is Copyright (C) 1999 Andi Kleen <ak@muc.de>.
+.\" SPDX-License-Identifier: Linux-man-pages-1-para
.\"
-.\" %%%LICENSE_START(VERBATIM_ONE_PARA)
-.\" Permission is granted to distribute possibly modified copies
-.\" of this page provided the header is included verbatim,
-.\" and in case of nontrivial modification author and date
-.\" of the modification is added to the header.
-.\" %%%LICENSE_END
+.\" This man page is Copyright (C) 1999 Andi Kleen <ak@muc.de>.
.\"
.\" $Id: cmsg.3,v 1.8 2000/12/20 18:10:31 ak Exp $
-.TH CMSG 3 2022-10-29 "Linux man-pages 6.03"
+.TH CMSG 3 2023-07-15 "Linux man-pages 6.05.01"
.SH NAME
CMSG_ALIGN, CMSG_SPACE, CMSG_NXTHDR, CMSG_FIRSTHDR \- access ancillary data
.SH LIBRARY
@@ -160,27 +155,9 @@ For more information on the
.IR msghdr ,
see
.BR recvmsg (2).
-.SH STANDARDS
-This ancillary data model conforms to the POSIX.1g draft, 4.4BSD-Lite,
-the IPv6 advanced API described in RFC\ 2292 and SUSv2.
-.BR CMSG_FIRSTHDR (),
-.BR CMSG_NXTHDR (),
-and
-.BR CMSG_DATA ()
-are specified in POSIX.1-2008.
-.BR CMSG_SPACE ()
-and
-.BR CMSG_LEN ()
-.\" https://www.austingroupbugs.net/view.php?id=978#c3242
-will be included in the next POSIX release (Issue 8).
-.PP
-.BR CMSG_ALIGN ()
-is a Linux extension.
-.SH NOTES
+.SH VERSIONS
For portability, ancillary data should be accessed using only the macros
described here.
-.BR CMSG_ALIGN ()
-is a Linux extension and should not be used in portable programs.
.PP
In Linux,
.BR CMSG_LEN (),
@@ -190,6 +167,30 @@ and
are constant expressions (assuming their argument is constant),
meaning that these values can be used to declare the size of global variables.
This may not be portable, however.
+.SH STANDARDS
+.TP
+.BR CMSG_FIRSTHDR ()
+.TQ
+.BR CMSG_NXTHDR ()
+.TQ
+.BR CMSG_DATA ()
+POSIX.1-2008.
+.TP
+.BR CMSG_SPACE ()
+.TQ
+.BR CMSG_LEN ()
+.TQ
+.BR CMSG_ALIGN ()
+Linux.
+.SH HISTORY
+This ancillary data model conforms to the POSIX.1g draft, 4.4BSD-Lite,
+the IPv6 advanced API described in RFC\ 2292 and SUSv2.
+.PP
+.BR CMSG_SPACE ()
+and
+.BR CMSG_LEN ()
+.\" https://www.austingroupbugs.net/view.php?id=978#c3242
+will be included in the next POSIX release (Issue 8).
.SH EXAMPLES
This code looks for the
.B IP_TTL
@@ -200,9 +201,9 @@ option in a received ancillary buffer:
struct msghdr msgh;
struct cmsghdr *cmsg;
int received_ttl;
-
+\&
/* Receive auxiliary data in msgh */
-
+\&
for (cmsg = CMSG_FIRSTHDR(&msgh); cmsg != NULL;
cmsg = CMSG_NXTHDR(&msgh, cmsg)) {
if (cmsg\->cmsg_level == IPPROTO_IP
@@ -211,7 +212,7 @@ for (cmsg = CMSG_FIRSTHDR(&msgh); cmsg != NULL;
break;
}
}
-
+\&
if (cmsg == NULL) {
/* Error: IP_TTL not enabled or small buffer or I/O error */
}
@@ -237,7 +238,7 @@ union { /* Ancillary data buffer, wrapped in a union
char buf[CMSG_SPACE(sizeof(myfds))];
struct cmsghdr align;
} u;
-
+\&
msg.msg_iov = &io;
msg.msg_iovlen = 1;
msg.msg_control = u.buf;
diff --git a/man3/confstr.3 b/man3/confstr.3
index 00d971ae1..5efd862e8 100644
--- a/man3/confstr.3
+++ b/man3/confstr.3
@@ -11,7 +11,7 @@
.\" These should all be added to this page.
.\" See also the POSIX.1-2001 specification of confstr()
.\"
-.TH confstr 3 2023-02-05 "Linux man-pages 6.03"
+.TH confstr 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
confstr \- get configuration dependent string variables
.SH LIBRARY
@@ -115,22 +115,22 @@ is invalid.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR confstr ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008.
+POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001.
.SH EXAMPLES
The following code fragment determines the path where to find
the POSIX.2 system utilities:
@@ -139,7 +139,7 @@ the POSIX.2 system utilities:
.EX
char *pathbuf;
size_t n;
-
+\&
n = confstr(_CS_PATH, NULL, (size_t) 0);
pathbuf = malloc(n);
if (pathbuf == NULL)
diff --git a/man3/conj.3 b/man3/conj.3
index 5b9ed7e7b..760f07924 100644
--- a/man3/conj.3
+++ b/man3/conj.3
@@ -3,7 +3,7 @@
.\"
.\" SPDX-License-Identifier: GPL-1.0-or-later
.\"
-.TH conj 3 2022-12-15 "Linux man-pages 6.03"
+.TH conj 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
conj, conjf, conjl \- calculate the complex conjugate
.SH LIBRARY
@@ -29,29 +29,28 @@ One has:
cabs(z) = csqrt(z * conj(z))
.EE
.in
-.SH VERSIONS
-These functions were added in glibc 2.1.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR conj (),
.BR conjf (),
.BR conjl ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-C99, POSIX.1-2001, POSIX.1-2008.
+C11, POSIX.1-2008.
+.SH HISTORY
+glibc 2.1.
+C99, POSIX.1-2001.
.SH SEE ALSO
.BR cabs (3),
.BR csqrt (3),
diff --git a/man3/copysign.3 b/man3/copysign.3
index 89d88e4d6..9bd7932e3 100644
--- a/man3/copysign.3
+++ b/man3/copysign.3
@@ -9,7 +9,7 @@
.\" 386BSD man pages
.\" Modified 1993-07-24 by Rik Faith (faith@cs.unc.edu)
.\" Modified 2002-08-10 by Walter Harms (walter.harms@informatik.uni-oldenburg.de)
-.TH copysign 3 2023-02-05 "Linux man-pages 6.03"
+.TH copysign 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
copysign, copysignf, copysignl \- copy sign of a number
.SH LIBRARY
@@ -65,30 +65,29 @@ No errors occur.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR copysign (),
.BR copysignf (),
.BR copysignl ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
+.SH VERSIONS
+On architectures where the floating-point formats are not IEEE 754 compliant,
+these functions may treat a negative zero as positive.
.SH STANDARDS
-C99, POSIX.1-2001, POSIX.1-2008.
-.\" 4.3BSD.
+C11, POSIX.1-2008.
+.PP
This function is defined in IEC 559 (and the appendix with
recommended functions in IEEE 754/IEEE 854).
-.SH NOTES
-On architectures where the floating-point formats are not IEEE 754 compliant,
-these
-functions may treat a negative zero as positive.
+.SH HISTORY
+C99, POSIX.1-2001, 4.3BSD.
.SH SEE ALSO
.BR signbit (3)
diff --git a/man3/cos.3 b/man3/cos.3
index d0e2f5346..44e344475 100644
--- a/man3/cos.3
+++ b/man3/cos.3
@@ -12,7 +12,7 @@
.\" Modified 1993-07-24 by Rik Faith (faith@cs.unc.edu)
.\" Modified 2002-07-27 by Walter Harms
.\" (walter.harms@informatik.uni-oldenburg.de)
-.TH cos 3 2023-02-05 "Linux man-pages 6.03"
+.TH cos 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
cos, cosf, cosl \- cosine function
.SH LIBRARY
@@ -78,24 +78,24 @@ is raised.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR cos (),
.BR cosf (),
.BR cosl ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-C99, POSIX.1-2001, POSIX.1-2008.
+C11, POSIX.1-2008.
+.SH HISTORY
+C89, POSIX.1-2001.
.PP
The variant returning
.I double
@@ -103,7 +103,7 @@ also conforms to
SVr4, 4.3BSD.
.SH BUGS
Before glibc 2.10, the glibc implementation did not set
-.\" http://sources.redhat.com/bugzilla/show_bug.cgi?id=6780
+.\" https://www.sourceware.org/bugzilla/show_bug.cgi?id=6780
.I errno
to
.B EDOM
diff --git a/man3/cosh.3 b/man3/cosh.3
index a75e0b821..358cb1f4b 100644
--- a/man3/cosh.3
+++ b/man3/cosh.3
@@ -14,7 +14,7 @@
.\" Modified 2002-07-27 by Walter Harms
.\" (walter.harms@informatik.uni-oldenburg.de)
.\"
-.TH cosh 3 2023-02-05 "Linux man-pages 6.03"
+.TH cosh 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
cosh, coshf, coshl \- hyperbolic cosine function
.SH LIBRARY
@@ -94,24 +94,24 @@ is raised.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR cosh (),
.BR coshf (),
.BR coshl ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-C99, POSIX.1-2001, POSIX.1-2008.
+C11, POSIX.1-2008.
+.SH HISTORY
+C99, POSIX.1-2001.
.PP
The variant returning
.I double
diff --git a/man3/cpow.3 b/man3/cpow.3
index f0eba03db..92dd9711e 100644
--- a/man3/cpow.3
+++ b/man3/cpow.3
@@ -3,7 +3,7 @@
.\"
.\" SPDX-License-Identifier: GPL-1.0-or-later
.\"
-.TH cpow 3 2022-12-15 "Linux man-pages 6.03"
+.TH cpow 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
cpow, cpowf, cpowl \- complex power function
.SH LIBRARY
@@ -26,29 +26,28 @@ raised to the power
(with a branch cut for
.I x
along the negative real axis).
-.SH VERSIONS
-These functions were added in glibc 2.1.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR cpow (),
.BR cpowf (),
.BR cpowl ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-C99, POSIX.1-2001, POSIX.1-2008.
+C11, POSIX.1-2008.
+.SH HISTORY
+glibc 2.1.
+C99, POSIX.1-2001.
.SH SEE ALSO
.BR cabs (3),
.BR pow (3),
diff --git a/man3/cproj.3 b/man3/cproj.3
index 35d8608ee..159998a5d 100644
--- a/man3/cproj.3
+++ b/man3/cproj.3
@@ -3,7 +3,7 @@
.\"
.\" SPDX-License-Identifier: GPL-1.0-or-later
.\"
-.TH cproj 3 2022-12-15 "Linux man-pages 6.03"
+.TH cproj 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
cproj, cprojf, cprojl \- project into Riemann Sphere
.SH LIBRARY
@@ -27,35 +27,34 @@ projects to
itself.
Every complex infinite value is projected to a single infinite value,
namely to positive infinity on the real axis.
-.SH VERSIONS
-These functions were added in glibc 2.1.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR cproj (),
.BR cprojf (),
.BR cprojl ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-C99, POSIX.1-2001, POSIX.1-2008.
-.SH NOTES
+C11, POSIX.1-2008.
+.SH HISTORY
+glibc 2.1.
+C99, POSIX.1-2001.
+.PP
In glibc 2.11 and earlier, the implementation does something different
(a
.I stereographic
projection onto a Riemann Sphere).
-.\" http://sources.redhat.com/bugzilla/show_bug.cgi?id=10401
+.\" https://www.sourceware.org/bugzilla/show_bug.cgi?id=10401
.SH SEE ALSO
.BR cabs (3),
.BR complex (7)
diff --git a/man3/creal.3 b/man3/creal.3
index 7a5ab0afe..718dc5bb4 100644
--- a/man3/creal.3
+++ b/man3/creal.3
@@ -3,7 +3,7 @@
.\"
.\" SPDX-License-Identifier: GPL-1.0-or-later
.\"
-.TH creal 3 2022-12-15 "Linux man-pages 6.03"
+.TH creal 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
creal, crealf, creall \- get real part of a complex number
.SH LIBRARY
@@ -26,32 +26,31 @@ One has:
.nf
z = creal(z) + I * cimag(z)
.fi
-.SH VERSIONS
-These functions were added in glibc 2.1.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR creal (),
.BR crealf (),
.BR creall ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
-.SH STANDARDS
-C99, POSIX.1-2001, POSIX.1-2008.
-.SH NOTES
-The gcc supports also __real__.
+.SH VERSIONS
+GCC supports also __real__.
That is a GNU extension.
+.SH STANDARDS
+C11, POSIX.1-2008.
+.SH HISTORY
+glibc 2.1.
+C99, POSIX.1-2001.
.SH SEE ALSO
.BR cabs (3),
.BR cimag (3),
diff --git a/man3/crypt.3 b/man3/crypt.3
index 2675cb9ad..c6873a52a 100644
--- a/man3/crypt.3
+++ b/man3/crypt.3
@@ -15,12 +15,12 @@
.\" added _XOPEN_SOURCE, aeb, 970705
.\" added GNU MD5 stuff, aeb, 011223
.\"
-.TH crypt 3 2023-02-05 "Linux man-pages 6.03"
+.TH crypt 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
-crypt, crypt_r \- password and data encryption
+crypt, crypt_r \- password hashing
.SH LIBRARY
-Encryption and decryption library
-.RI ( libcrypto ", " \-lcrypto )
+Password hashing library
+.RI ( libcrypt ", " \-lcrypt )
.SH SYNOPSIS
.nf
.B #include <unistd.h>
@@ -52,7 +52,7 @@ Feature Test Macro Requirements for glibc (see
.fi
.SH DESCRIPTION
.BR crypt ()
-is the password encryption function.
+is the password hashing function.
It is based on the Data Encryption
Standard algorithm with variations intended (among other things) to
discourage use of hardware implementations of a key search.
@@ -72,7 +72,7 @@ a 56-bit key is obtained.
This 56-bit key is used to encrypt repeatedly a
constant string (usually a string consisting of all zeros).
The returned
-value points to the encrypted password, a series of 13 printable ASCII
+value points to the hashed password, a series of 13 printable ASCII
characters (the first two characters represent the salt itself).
The return value points to static data whose content is
overwritten by each call.
@@ -115,7 +115,7 @@ the only thing that the caller should do with this structure is to set
to zero before the first call to
.BR crypt_r ().
.SH RETURN VALUE
-On success, a pointer to the encrypted password is returned.
+On success, a pointer to the hashed password is returned.
On error, NULL is returned.
.SH ERRORS
.TP
@@ -165,33 +165,38 @@ function was not implemented, probably because of U.S.A. export restrictions.
.B EPERM
.I /proc/sys/crypto/fips_enabled
has a nonzero value,
-and an attempt was made to use a weak encryption type, such as DES.
+and an attempt was made to use a weak hashing type, such as DES.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR crypt ()
T} Thread safety MT-Unsafe race:crypt
T{
+.na
+.nh
.BR crypt_r ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-.BR crypt ():
-POSIX.1-2001, POSIX.1-2008, SVr4, 4.3BSD.
+.TP
+.BR crypt ()
+POSIX.1-2008.
+.TP
.BR crypt_r ()
-is a GNU extension.
-.SH NOTES
+GNU.
+.SH HISTORY
+.TP
+.BR crypt ()
+POSIX.1-2001, SVr4, 4.3BSD.
.SS Availability in glibc
The
.BR crypt (),
@@ -217,9 +222,10 @@ for the function prototypes;
otherwise
.I libxcrypt
is an ABI-compatible drop-in replacement.
+.SH NOTES
.SS Features in glibc
The glibc version of this function supports additional
-encryption algorithms.
+hashing algorithms.
.PP
If
.I salt
@@ -228,11 +234,11 @@ followed by a string optionally terminated by "$",
then the result has the form:
.RS
.PP
-$\fIid\fP$\fIsalt\fP$\fIencrypted\fP
+$\fIid\fP$\fIsalt\fP$\fIhashed\fP
.RE
.PP
.I id
-identifies the encryption method used instead of DES and this
+identifies the hashing method used instead of DES and this
then determines how the rest of the password string is interpreted.
The following values of
.I id
@@ -259,13 +265,13 @@ T}
.TE
.RE
.PP
-Thus, $5$\fIsalt\fP$\fIencrypted\fP and $6$\fIsalt\fP$\fIencrypted\fP
-contain the password encrypted with, respectively, functions
+Thus, $5$\fIsalt\fP$\fIhashed\fP and $6$\fIsalt\fP$\fIhashed\fP
+contain the password hashed with, respectively, functions
based on SHA-256 and SHA-512.
.PP
"\fIsalt\fP" stands for the up to 16 characters
following "$\fIid\fP$" in the salt.
-The "\fIencrypted\fP"
+The "\fIhashed\fP"
part of the password string is the actual computed password.
The size of this string is fixed:
.RS
@@ -277,7 +283,7 @@ SHA-512 86 characters
.TE
.RE
.PP
-The characters in "\fIsalt\fP" and "\fIencrypted\fP" are drawn from the set
+The characters in "\fIsalt\fP" and "\fIhashed\fP" are drawn from the set
[\fBa\-zA\-Z0\-9./\fP].
In the MD5 and SHA implementations the entire
.I key
@@ -293,7 +299,7 @@ followed by "rounds=\fIxxx\fP$", where \fIxxx\fP is an integer, then the
result has the form
.RS
.PP
-$\fIid\fP$\fIrounds=yyy\fP$\fIsalt\fP$\fIencrypted\fP
+$\fIid\fP$\fIrounds=yyy\fP$\fIsalt\fP$\fIhashed\fP
.RE
.PP
where \fIyyy\fP is the number of hashing rounds actually used.
diff --git a/man3/csin.3 b/man3/csin.3
index 615b60ab4..bc1095147 100644
--- a/man3/csin.3
+++ b/man3/csin.3
@@ -3,7 +3,7 @@
.\"
.\" SPDX-License-Identifier: GPL-1.0-or-later
.\"
-.TH csin 3 2022-12-15 "Linux man-pages 6.03"
+.TH csin 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
csin, csinf, csinl \- complex sine function
.SH LIBRARY
@@ -28,29 +28,28 @@ The complex sine function is defined as:
csin(z) = (exp(i * z) \- exp(\-i * z)) / (2 * i)
.EE
.in
-.SH VERSIONS
-These functions were added in glibc 2.1.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR csin (),
.BR csinf (),
.BR csinl ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-C99, POSIX.1-2001, POSIX.1-2008.
+C11, POSIX.1-2008.
+.SH HISTORY
+glibc 2.1.
+C99, POSIX.1-2001.
.SH SEE ALSO
.BR cabs (3),
.BR casin (3),
diff --git a/man3/csinh.3 b/man3/csinh.3
index 65b8cccad..b7a735059 100644
--- a/man3/csinh.3
+++ b/man3/csinh.3
@@ -3,7 +3,7 @@
.\"
.\" SPDX-License-Identifier: GPL-1.0-or-later
.\"
-.TH csinh 3 2022-12-15 "Linux man-pages 6.03"
+.TH csinh 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
csinh, csinhf, csinhl \- complex hyperbolic sine
.SH LIBRARY
@@ -28,29 +28,28 @@ The complex hyperbolic sine function is defined as:
csinh(z) = (exp(z)\-exp(\-z))/2
.EE
.in
-.SH VERSIONS
-These functions were added in glibc 2.1.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR csinh (),
.BR csinhf (),
.BR csinhl ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-C99, POSIX.1-2001, POSIX.1-2008.
+C11, POSIX.1-2008.
+.SH HISTORY
+glibc 2.1.
+C99, POSIX.1-2001.
.SH SEE ALSO
.BR cabs (3),
.BR casinh (3),
diff --git a/man3/csqrt.3 b/man3/csqrt.3
index 95ea62b4a..319bbd137 100644
--- a/man3/csqrt.3
+++ b/man3/csqrt.3
@@ -3,7 +3,7 @@
.\"
.\" SPDX-License-Identifier: GPL-1.0-or-later
.\"
-.TH csqrt 3 2022-12-15 "Linux man-pages 6.03"
+.TH csqrt 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
csqrt, csqrtf, csqrtl \- complex square root
.SH LIBRARY
@@ -24,29 +24,28 @@ with a branch cut along the negative real axis.
(That means that \fIcsqrt(\-1+eps*I)\fP will be close to I while
\fIcsqrt(\-1\-eps*I)\fP will be close to \-I, \fIif eps\fP is a small positive
real number.)
-.SH VERSIONS
-These functions were added in glibc 2.1.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR csqrt (),
.BR csqrtf (),
.BR csqrtl ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-C99, POSIX.1-2001, POSIX.1-2008.
+C11, POSIX.1-2008.
+.SH HISTORY
+glibc 2.1.
+C99, POSIX.1-2001.
.SH SEE ALSO
.BR cabs (3),
.BR cexp (3),
diff --git a/man3/ctan.3 b/man3/ctan.3
index 370661601..e47f11d33 100644
--- a/man3/ctan.3
+++ b/man3/ctan.3
@@ -3,7 +3,7 @@
.\"
.\" SPDX-License-Identifier: GPL-1.0-or-later
.\"
-.TH ctan 3 2022-12-15 "Linux man-pages 6.03"
+.TH ctan 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
ctan, ctanf, ctanl \- complex tangent function
.SH LIBRARY
@@ -28,29 +28,28 @@ The complex tangent function is defined as:
ctan(z) = csin(z) / ccos(z)
.EE
.in
-.SH VERSIONS
-These functions were added in glibc 2.1.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR ctan (),
.BR ctanf (),
.BR ctanl ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-C99, POSIX.1-2001, POSIX.1-2008.
+C11, POSIX.1-2008.
+.SH HISTORY
+glibc 2.1.
+C99, POSIX.1-2001.
.SH SEE ALSO
.BR cabs (3),
.BR catan (3),
diff --git a/man3/ctanh.3 b/man3/ctanh.3
index 068ff8bcb..a9b7b34ea 100644
--- a/man3/ctanh.3
+++ b/man3/ctanh.3
@@ -3,7 +3,7 @@
.\"
.\" SPDX-License-Identifier: GPL-1.0-or-later
.\"
-.TH ctanh 3 2022-12-15 "Linux man-pages 6.03"
+.TH ctanh 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
ctanh, ctanhf, ctanhl \- complex hyperbolic tangent
.SH LIBRARY
@@ -29,29 +29,28 @@ mathematically as:
ctanh(z) = csinh(z) / ccosh(z)
.EE
.in
-.SH VERSIONS
-These functions were added in glibc 2.1.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR ctanh (),
.BR ctanhf (),
.BR ctanhl ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-C99, POSIX.1-2001, POSIX.1-2008.
+C11, POSIX.1-2008.
+.SH HISTORY
+glibc 2.1.
+C99, POSIX.1-2001.
.SH SEE ALSO
.BR cabs (3),
.BR catanh (3),
diff --git a/man3/ctermid.3 b/man3/ctermid.3
index c74e7022b..0a2ab6644 100644
--- a/man3/ctermid.3
+++ b/man3/ctermid.3
@@ -4,7 +4,7 @@
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
.\" Modified Sat Jul 24 19:51:06 1993 by Rik Faith (faith@cs.unc.edu)
-.TH ctermid 3 2022-12-15 "Linux man-pages 6.03"
+.TH ctermid 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
ctermid \- get controlling terminal name
.SH LIBRARY
@@ -46,22 +46,22 @@ The pointer to the pathname.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR ctermid ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, Svr4.
+POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001, Svr4.
.SH BUGS
The returned pathname may not uniquely identify the controlling
terminal; it may, for example, be
diff --git a/man3/ctime.3 b/man3/ctime.3
index 487264c7f..4dc72f270 100644
--- a/man3/ctime.3
+++ b/man3/ctime.3
@@ -13,7 +13,7 @@
.\" Modified 2001-12-13, joey, aeb
.\" Modified 2004-11-16, mtk
.\"
-.TH ctime 3 2023-02-05 "Linux man-pages 6.03"
+.TH ctime 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
asctime, ctime, gmtime, localtime, mktime, asctime_r, ctime_r, gmtime_r,
localtime_r \- transform date and time to broken-down time or ASCII
@@ -259,72 +259,134 @@ The result cannot be represented.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lb lb lbx
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR asctime ()
T} Thread safety T{
+.na
+.nh
MT-Unsafe race:asctime locale
T}
T{
+.na
+.nh
.BR asctime_r ()
T} Thread safety T{
+.na
+.nh
MT-Safe locale
T}
T{
+.na
+.nh
.BR ctime ()
T} Thread safety T{
+.na
+.nh
MT-Unsafe race:tmbuf
race:asctime env locale
T}
T{
+.na
+.nh
.BR ctime_r (),
.BR gmtime_r (),
.BR localtime_r (),
.BR mktime ()
T} Thread safety T{
+.na
+.nh
MT-Safe env locale
T}
T{
+.na
+.nh
.BR gmtime (),
.BR localtime ()
T} Thread safety T{
+.na
+.nh
MT-Unsafe race:tmbuf env locale
T}
.TE
-.hy
-.ad
.sp 1
-.SH STANDARDS
-POSIX.1-2001.
-C99 specifies
-.BR asctime (),
-.BR ctime (),
-.BR gmtime (),
-.BR localtime (),
-and
-.BR mktime ().
-POSIX.1-2008 marks
-.BR asctime (),
-.BR asctime_r (),
-.BR ctime (),
-and
-.BR ctime_r ()
-as obsolete,
-recommending the use of
-.BR strftime (3)
-instead.
-.PP
+.SH VERSIONS
POSIX doesn't specify the parameters of
.BR ctime_r ()
to be
.IR restrict ;
that is specific to glibc.
+.PP
+In many implementations, including glibc, a 0 in
+.I tm_mday
+is interpreted as meaning the last day of the preceding month.
+.PP
+According to POSIX.1-2001,
+.BR localtime ()
+is required to behave as though
+.BR tzset (3)
+was called, while
+.BR localtime_r ()
+does not have this requirement.
+.\" See http://thread.gmane.org/gmane.comp.time.tz/2034/
+For portable code,
+.BR tzset (3)
+should be called before
+.BR localtime_r ().
+.SH STANDARDS
+.TP
+.BR asctime ()
+.TQ
+.BR ctime ()
+.TQ
+.BR gmtime ()
+.TQ
+.BR localtime ()
+.TQ
+.BR mktime ()
+C11, POSIX.1-2008.
+.TP
+.BR asctime_r ()
+.TQ
+.BR ctime_r ()
+.TQ
+.BR gmtime_r ()
+.TQ
+.BR localtime_r ()
+POSIX.1-2008.
+.SH HISTORY
+.TP
+.BR gmtime ()
+.TQ
+.BR localtime ()
+.TQ
+.BR mktime ()
+C89, POSIX.1-2001.
+.TP
+.BR asctime ()
+.TQ
+.BR ctime ()
+C89, POSIX.1-2001.
+Marked obsolete in POSIX.1-2008 (recommending
+.BR strftime (3)).
+.TP
+.BR gmtime_r ()
+.TQ
+.BR localtime_r ()
+POSIX.1-2001.
+.TP
+.BR asctime_r ()
+.TQ
+.BR ctime_r ()
+POSIX.1-2001.
+Marked obsolete in POSIX.1-2008 (recommending
+.BR strftime (3)).
.SH NOTES
The four functions
.BR asctime (),
@@ -354,23 +416,6 @@ a broken-down time structure and an array of type
Execution of any of the functions may overwrite the information returned
in either of these objects by any of the other functions."
This can occur in the glibc implementation.
-.PP
-In many implementations, including glibc, a 0 in
-.I tm_mday
-is interpreted as meaning the last day of the preceding month.
-.PP
-According to POSIX.1-2001,
-.BR localtime ()
-is required to behave as though
-.BR tzset (3)
-was called, while
-.BR localtime_r ()
-does not have this requirement.
-.\" See http://thread.gmane.org/gmane.comp.time.tz/2034/
-For portable code,
-.BR tzset (3)
-should be called before
-.BR localtime_r ().
.SH SEE ALSO
.BR date (1),
.BR gettimeofday (2),
diff --git a/man3/daemon.3 b/man3/daemon.3
index 2abc37737..a44263c95 100644
--- a/man3/daemon.3
+++ b/man3/daemon.3
@@ -6,7 +6,7 @@
.\"
.\" @(#)daemon.3 8.1 (Berkeley) 6/9/93
.\" Added mentioning of glibc weirdness wrt unistd.h. 5/11/98, Al Viro
-.TH daemon 3 2022-12-15 "Linux man-pages 6.03"
+.TH daemon 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
daemon \- run in the background
.SH LIBRARY
@@ -77,27 +77,21 @@ and
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR daemon ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
-.SH STANDARDS
-Not in POSIX.1.
+.SH VERSIONS
A similar function appears on the BSDs.
-The
-.BR daemon ()
-function first appeared in 4.4BSD.
-.SH NOTES
+.PP
The glibc implementation can also return \-1 when
.I /dev/null
exists but is not a character device with the expected
@@ -105,6 +99,10 @@ major and minor numbers.
In this case,
.I errno
need not be set.
+.SH STANDARDS
+None.
+.SH HISTORY
+4.4BSD.
.SH BUGS
The GNU C library implementation of this function was taken from BSD,
and does not employ the double-fork technique (i.e.,
diff --git a/man3/dbopen.3 b/man3/dbopen.3
index 523836963..a6d418acc 100644
--- a/man3/dbopen.3
+++ b/man3/dbopen.3
@@ -5,7 +5,7 @@
.\"
.\" @(#)dbopen.3 8.5 (Berkeley) 1/2/94
.\"
-.TH dbopen 3 2022-12-04 "Linux man-pages 6.03"
+.TH dbopen 3 2022-12-04 "Linux man-pages 6.05.01"
.UC 7
.SH NAME
dbopen \- database access methods
diff --git a/man3/des_crypt.3 b/man3/des_crypt.3
index eb83f50ef..41afe0473 100644
--- a/man3/des_crypt.3
+++ b/man3/des_crypt.3
@@ -10,7 +10,7 @@
.\"
.\" SPDX-License-Identifier: GPL-1.0-or-later
.\"
-.TH des_crypt 3 2022-12-15 "Linux man-pages 6.03"
+.TH des_crypt 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
des_crypt, ecb_crypt, cbc_crypt, des_setparity, DES_FAILED \- fast
DES encryption
@@ -23,16 +23,17 @@ Standard C library
.\" .B #include <des_crypt.h>
.B #include <rpc/des_crypt.h>
.PP
-.BI "int ecb_crypt(char *" key ", char " data [. datalen "], \
-unsigned int " datalen ,
-.BI " unsigned int " mode );
-.BI "int cbc_crypt(char *" key ", char " data [. datalen "], \
-unsigned int " datalen ,
-.BI " unsigned int " mode ", char *" ivec );
+.BI "[[deprecated]] int ecb_crypt(char *" key ", char " data [. datalen ],
+.BI " unsigned int " datalen ", \
+unsigned int " mode );
+.BI "[[deprecated]] int cbc_crypt(char *" key ", char " data [. datalen ],
+.BI " unsigned int " datalen ", \
+unsigned int " mode ,
+.BI " char *" ivec );
.PP
-.BI "void des_setparity(char *" key );
+.BI "[[deprecated]] void des_setparity(char *" key );
.PP
-.BI "int DES_FAILED(int " status );
+.BI "[[deprecated]] int DES_FAILED(int " status );
.fi
.SH DESCRIPTION
.BR ecb_crypt ()
@@ -129,41 +130,35 @@ the macro
is false only for the first two statuses.
.\" So far the Sun page
.\" Some additions - aeb
-.SH VERSIONS
-These functions were added in glibc 2.1.
-.PP
-Because they employ the DES block cipher,
-which is no longer considered secure,
-.BR ecb_crypt (),
-.BR ecb_crypt (),
-.BR crypt_r (),
-and
-.BR des_setparity ()
-were removed in glibc 2.28.
-Applications should switch to a modern cryptography library, such as
-.BR libgcrypt .
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR ecb_crypt (),
.BR cbc_crypt (),
.BR des_setparity ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
+None.
+.SH HISTORY
4.3BSD.
-Not in POSIX.1.
+glibc 2.1.
+Removed in glibc 2.28.
+.PP
+Because they employ the DES block cipher,
+which is no longer considered secure,
+these functions were removed.
+Applications should switch to a modern cryptography library, such as
+.BR libgcrypt .
.SH SEE ALSO
.BR des (1),
.BR crypt (3),
diff --git a/man3/difftime.3 b/man3/difftime.3
index 2773f384d..e1cd34fc6 100644
--- a/man3/difftime.3
+++ b/man3/difftime.3
@@ -8,7 +8,7 @@
.\" Lewine's _POSIX Programmer's Guide_ (O'Reilly & Associates, 1991)
.\" 386BSD man pages
.\" Modified Sat Jul 24 19:48:17 1993 by Rik Faith (faith@cs.unc.edu)
-.TH difftime 3 2022-12-29 "Linux man-pages 6.03"
+.TH difftime 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
difftime \- calculate time difference
.SH LIBRARY
@@ -32,22 +32,22 @@ Epoch, 1970-01-01 00:00:00 +0000 (UTC).
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR difftime ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, C99, SVr4, 4.3BSD.
+C11, POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001, C89, SVr4, 4.3BSD.
.SH NOTES
On a POSIX system,
.I time_t
@@ -56,7 +56,7 @@ define
.PP
.in +4n
.EX
-#define difftime(t1,t0) (double)(t1 \- t0)
+#define my_difftime(t1,t0) (double)(t1 \- t0)
.EE
.in
.PP
diff --git a/man3/dirfd.3 b/man3/dirfd.3
index 0e15acd85..4fa622cdf 100644
--- a/man3/dirfd.3
+++ b/man3/dirfd.3
@@ -3,7 +3,7 @@
.\"
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
-.TH dirfd 3 2023-02-05 "Linux man-pages 6.03"
+.TH dirfd 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
dirfd \- get directory stream file descriptor
.SH LIBRARY
@@ -65,23 +65,22 @@ descriptor with a directory.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR dirfd ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
POSIX.1-2008.
-This function was a BSD extension, present in 4.3BSD-Reno, not in 4.2BSD.
+.SH HISTORY
+4.3BSD-Reno (not in 4.2BSD).
.\" It is present in libc5 (since 5.1.2) and in glibc 2.
.SH SEE ALSO
.BR open (2),
diff --git a/man3/div.3 b/man3/div.3
index 8ad9a3f49..fa2e5389f 100644
--- a/man3/div.3
+++ b/man3/div.3
@@ -12,7 +12,7 @@
.\" Modified 1993-07-24, Rik Faith (faith@cs.unc.edu)
.\" Modified 2002-08-10, 2003-11-01 Walter Harms, aeb
.\"
-.TH div 3 2022-12-29 "Linux man-pages 6.03"
+.TH div 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
div, ldiv, lldiv, imaxdiv \- compute quotient and remainder of
an integer division
@@ -67,26 +67,26 @@ The \fIdiv_t\fP (etc.) structure.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR div (),
.BR ldiv (),
.BR lldiv (),
.BR imaxdiv ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, C99, SVr4, 4.3BSD.
-The functions
+C11, POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001, C89, C99, SVr4, 4.3BSD.
+.PP
.BR lldiv ()
and
.BR imaxdiv ()
diff --git a/man3/dl_iterate_phdr.3 b/man3/dl_iterate_phdr.3
index 978f9c853..dc157589b 100644
--- a/man3/dl_iterate_phdr.3
+++ b/man3/dl_iterate_phdr.3
@@ -3,7 +3,7 @@
.\"
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
-.TH dl_iterate_phdr 3 2023-02-05 "Linux man-pages 6.03"
+.TH dl_iterate_phdr 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
dl_iterate_phdr \- walk through list of shared objects
.SH LIBRARY
@@ -67,12 +67,12 @@ struct dl_phdr_info {
ELF program headers
for this object */
ElfW(Half) dlpi_phnum; /* # of items in \fIdlpi_phdr\fP */
-
+\&
/* The following fields were added in glibc 2.4, after the first
version of this structure was available. Check the \fIsize\fP
argument passed to the dl_iterate_phdr callback to determine
whether or not each later member is available. */
-
+\&
unsigned long long dlpi_adds;
/* Incremented when a new object may
have been added */
@@ -182,30 +182,22 @@ The
.BR dl_iterate_phdr ()
function returns whatever value was returned by the last call to
.IR callback .
-.SH VERSIONS
-.BR dl_iterate_phdr ()
-has been supported since glibc 2.2.4.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR dl_iterate_phdr ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
-.SH STANDARDS
-The
-.BR dl_iterate_phdr ()
-function is not specified in any standard.
+.SH VERSIONS
Various other systems provide a version of this function,
although details of the returned
.I dl_phdr_info
@@ -217,14 +209,18 @@ On the BSDs and Solaris, the structure includes the fields
and
.I dlpi_phnum
in addition to other implementation-specific fields.
-.SH NOTES
+.PP
Future versions of the C library may add further fields to the
.I dl_phdr_info
structure; in that event, the
.I size
argument provides a mechanism for the callback function to discover
whether it is running on a system with added fields.
-.PP
+.SH STANDARDS
+None.
+.SH HISTORY
+glibc 2.2.4.
+.SH NOTES
The first object visited by
.I callback
is the main program.
@@ -292,47 +288,47 @@ Name: "/lib64/ld\-linux\-x86\-64.so.2" (7 segments)
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
-
+\&
static int
callback(struct dl_phdr_info *info, size_t size, void *data)
{
char *type;
int p_type;
-
+\&
printf("Name: \e"%s\e" (%d segments)\en", info\->dlpi_name,
- info\->dlpi_phnum);
-
+ info\->dlpi_phnum);
+\&
for (size_t j = 0; j < info\->dlpi_phnum; j++) {
p_type = info\->dlpi_phdr[j].p_type;
- type = (p_type == PT_LOAD) ? "PT_LOAD" :
- (p_type == PT_DYNAMIC) ? "PT_DYNAMIC" :
- (p_type == PT_INTERP) ? "PT_INTERP" :
- (p_type == PT_NOTE) ? "PT_NOTE" :
- (p_type == PT_INTERP) ? "PT_INTERP" :
- (p_type == PT_PHDR) ? "PT_PHDR" :
- (p_type == PT_TLS) ? "PT_TLS" :
- (p_type == PT_GNU_EH_FRAME) ? "PT_GNU_EH_FRAME" :
- (p_type == PT_GNU_STACK) ? "PT_GNU_STACK" :
- (p_type == PT_GNU_RELRO) ? "PT_GNU_RELRO" : NULL;
-
+ type = (p_type == PT_LOAD) ? "PT_LOAD" :
+ (p_type == PT_DYNAMIC) ? "PT_DYNAMIC" :
+ (p_type == PT_INTERP) ? "PT_INTERP" :
+ (p_type == PT_NOTE) ? "PT_NOTE" :
+ (p_type == PT_INTERP) ? "PT_INTERP" :
+ (p_type == PT_PHDR) ? "PT_PHDR" :
+ (p_type == PT_TLS) ? "PT_TLS" :
+ (p_type == PT_GNU_EH_FRAME) ? "PT_GNU_EH_FRAME" :
+ (p_type == PT_GNU_STACK) ? "PT_GNU_STACK" :
+ (p_type == PT_GNU_RELRO) ? "PT_GNU_RELRO" : NULL;
+\&
printf(" %2zu: [%14p; memsz:%7jx] flags: %#jx; ", j,
- (void *) (info\->dlpi_addr + info\->dlpi_phdr[j].p_vaddr),
- (uintmax_t) info\->dlpi_phdr[j].p_memsz,
- (uintmax_t) info\->dlpi_phdr[j].p_flags);
+ (void *) (info\->dlpi_addr + info\->dlpi_phdr[j].p_vaddr),
+ (uintmax_t) info\->dlpi_phdr[j].p_memsz,
+ (uintmax_t) info\->dlpi_phdr[j].p_flags);
if (type != NULL)
printf("%s\en", type);
else
printf("[other (%#x)]\en", p_type);
}
-
+\&
return 0;
}
-
+\&
int
main(void)
{
dl_iterate_phdr(callback, NULL);
-
+\&
exit(EXIT_SUCCESS);
}
.EE
diff --git a/man3/dladdr.3 b/man3/dladdr.3
index db117b48a..4571e67d1 100644
--- a/man3/dladdr.3
+++ b/man3/dladdr.3
@@ -4,7 +4,7 @@
.\"
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
-.TH dladdr 3 2023-01-07 "Linux man-pages 6.03"
+.TH dladdr 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
dladdr, dladdr1 \- translate address to symbolic information
.SH LIBRARY
@@ -90,7 +90,7 @@ struct link_map {
shared object */
struct link_map *l_next, *l_prev;
/* Chain of loaded objects */
-
+\&
/* Plus additional fields private to the
implementation */
};
@@ -213,32 +213,33 @@ In this case, an error message is
.\" error via dlerror() for this case.
available via
.BR dlerror (3).
-.SH VERSIONS
-.BR dladdr ()
-is present in glibc 2.0 and later.
-.BR dladdr1 ()
-first appeared in glibc 2.3.3.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR dladdr (),
.BR dladdr1 ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-These functions are nonstandard GNU extensions
-that are also present on Solaris.
+GNU.
+.SH HISTORY
+.TP
+.BR dladdr ()
+glibc 2.0.
+.TP
+.BR dladdr1 ()
+glibc 2.3.3.
+.PP
+Solaris.
.SH BUGS
Sometimes, the function pointers you pass to
.BR dladdr ()
diff --git a/man3/dlerror.3 b/man3/dlerror.3
index a49221639..14baeeaac 100644
--- a/man3/dlerror.3
+++ b/man3/dlerror.3
@@ -4,7 +4,7 @@
.\"
.\" SPDX-License-Identifier: GPL-2.0-or-later
.\"
-.TH dlerror 3 2022-12-15 "Linux man-pages 6.03"
+.TH dlerror 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
dlerror \- obtain error diagnostic for functions in the dlopen API
.SH LIBRARY
@@ -31,28 +31,28 @@ include a trailing newline.
.BR dlerror ()
returns NULL if no errors have occurred since initialization or since
it was last called.
-.SH VERSIONS
-.BR dlerror ()
-is present in glibc 2.0 and later.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR dlerror ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
+POSIX.1-2008.
+.SH HISTORY
+glibc 2.0.
POSIX.1-2001.
+.PP
+SunOS.
.SH NOTES
The message returned by
.BR dlerror ()
@@ -69,8 +69,6 @@ calls.
.\" .in +5
.\" .B "const char *dlerror(void);"
.\" .in
-.SS History
-This function is part of the dlopen API, derived from SunOS.
.SH EXAMPLES
See
.BR dlopen (3).
diff --git a/man3/dlinfo.3 b/man3/dlinfo.3
index be6516aaf..586663d98 100644
--- a/man3/dlinfo.3
+++ b/man3/dlinfo.3
@@ -3,7 +3,7 @@
.\"
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
-.TH dlinfo 3 2023-02-05 "Linux man-pages 6.03"
+.TH dlinfo 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
dlinfo \- obtain information about a dynamically loaded object
.SH LIBRARY
@@ -73,7 +73,7 @@ struct link_map {
shared object */
struct link_map *l_next, *l_prev;
/* Chain of loaded objects */
-
+\&
/* Plus additional fields private to the
implementation */
};
@@ -200,33 +200,29 @@ On success,
returns 0.
On failure, it returns \-1; the cause of the error can be diagnosed using
.BR dlerror (3).
-.SH VERSIONS
-.BR dlinfo ()
-first appeared in glibc 2.3.3.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR dlinfo ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
-.SH STANDARDS
-This function is a nonstandard GNU extension.
-.SH NOTES
-This function derives from the Solaris function of the same name
-and also appears on some other systems.
+.SH VERSIONS
The sets of requests supported by the various implementations
overlaps only partially.
+.SH STANDARDS
+GNU.
+.SH HISTORY
+glibc 2.3.3.
+Solaris.
.SH EXAMPLES
The program below opens a shared objects using
.BR dlopen (3)
@@ -253,62 +249,62 @@ dls_serpath[1].dls_name = /usr/lib64
#include <link.h>
#include <stdio.h>
#include <stdlib.h>
-
+\&
int
main(int argc, char *argv[])
{
void *handle;
Dl_serinfo serinfo;
Dl_serinfo *sip;
-
+\&
if (argc != 2) {
fprintf(stderr, "Usage: %s <libpath>\en", argv[0]);
exit(EXIT_FAILURE);
}
-
+\&
/* Obtain a handle for shared object specified on command line. */
-
+\&
handle = dlopen(argv[1], RTLD_NOW);
if (handle == NULL) {
fprintf(stderr, "dlopen() failed: %s\en", dlerror());
exit(EXIT_FAILURE);
}
-
+\&
/* Discover the size of the buffer that we must pass to
RTLD_DI_SERINFO. */
-
+\&
if (dlinfo(handle, RTLD_DI_SERINFOSIZE, &serinfo) == \-1) {
fprintf(stderr, "RTLD_DI_SERINFOSIZE failed: %s\en", dlerror());
exit(EXIT_FAILURE);
}
-
+\&
/* Allocate the buffer for use with RTLD_DI_SERINFO. */
-
+\&
sip = malloc(serinfo.dls_size);
if (sip == NULL) {
perror("malloc");
exit(EXIT_FAILURE);
}
-
+\&
/* Initialize the \[aq]dls_size\[aq] and \[aq]dls_cnt\[aq] fields in the newly
allocated buffer. */
-
+\&
if (dlinfo(handle, RTLD_DI_SERINFOSIZE, sip) == \-1) {
fprintf(stderr, "RTLD_DI_SERINFOSIZE failed: %s\en", dlerror());
exit(EXIT_FAILURE);
}
-
+\&
/* Fetch and print library search list. */
-
+\&
if (dlinfo(handle, RTLD_DI_SERINFO, sip) == \-1) {
fprintf(stderr, "RTLD_DI_SERINFO failed: %s\en", dlerror());
exit(EXIT_FAILURE);
}
-
+\&
for (size_t j = 0; j < serinfo.dls_cnt; j++)
printf("dls_serpath[%zu].dls_name = %s\en",
j, sip\->dls_serpath[j].dls_name);
-
+\&
exit(EXIT_SUCCESS);
}
.EE
diff --git a/man3/dlopen.3 b/man3/dlopen.3
index cf1ad4384..3774e9ebc 100644
--- a/man3/dlopen.3
+++ b/man3/dlopen.3
@@ -14,7 +14,7 @@
.\" Modified by Walter Harms: dladdr, dlvsym
.\" Modified by Petr Baudis <pasky@suse.cz>, 2008-12-04: dladdr caveat
.\"
-.TH dlopen 3 2023-02-05 "Linux man-pages 6.03"
+.TH dlopen 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
dlclose, dlopen, dlmopen \-
open and close a shared object
@@ -346,48 +346,49 @@ returns 0; on error, it returns a nonzero value.
.PP
Errors from these functions can be diagnosed using
.BR dlerror (3).
-.SH VERSIONS
-.BR dlopen ()
-and
-.BR dlclose ()
-are present in glibc 2.0 and later.
-.BR dlmopen ()
-first appeared in glibc 2.3.4.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR dlopen (),
.BR dlmopen (),
.BR dlclose ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-POSIX.1-2001 describes
+.TP
+.BR dlopen ()
+.TQ
.BR dlclose ()
-and
-.BR dlopen ().
-The
+POSIX.1-2008.
+.TP
.BR dlmopen ()
-function is a GNU extension.
-.PP
-The
-.BR RTLD_NOLOAD ,
-.BR RTLD_NODELETE ,
-and
+.TQ
+.B RTLD_NOLOAD
+.TQ
+.B RTLD_NODELETE
+GNU.
+.TP
.B RTLD_DEEPBIND
-flags are GNU extensions;
-the first two of these flags are also present on Solaris.
+Solaris.
+.SH HISTORY
+.TP
+.BR dlopen ()
+.TQ
+.BR dlclose ()
+glibc 2.0.
+POSIX.1-2001.
+.TP
+.BR dlmopen ()
+glibc 2.3.4.
.SH NOTES
.SS dlmopen() and namespaces
A link-map list defines an isolated namespace for the
@@ -557,7 +558,7 @@ $ \fB./a.out\fP
#include <dlfcn.h>
#include <stdio.h>
#include <stdlib.h>
-
+\&
#include <gnu/lib\-names.h> /* Defines LIBM_SO (which will be a
string such as "libm.so.6") */
int
@@ -566,27 +567,27 @@ main(void)
void *handle;
double (*cosine)(double);
char *error;
-
+\&
handle = dlopen(LIBM_SO, RTLD_LAZY);
if (!handle) {
fprintf(stderr, "%s\en", dlerror());
exit(EXIT_FAILURE);
}
-
+\&
dlerror(); /* Clear any existing error */
-
+\&
cosine = (double (*)(double)) dlsym(handle, "cos");
-
+\&
/* According to the ISO C standard, casting between function
pointers and \[aq]void *\[aq], as done above, produces undefined results.
POSIX.1\-2001 and POSIX.1\-2008 accepted this state of affairs and
proposed the following workaround:
-
+\&
*(void **) (&cosine) = dlsym(handle, "cos");
-
+\&
This (clumsy) cast conforms with the ISO C standard and will
avoid any compiler warnings.
-
+\&
The 2013 Technical Corrigendum 1 to POSIX.1\-2008 improved matters
by requiring that conforming implementations support casting
\[aq]void *\[aq] to a function pointer. Nevertheless, some compilers
@@ -595,13 +596,13 @@ main(void)
.\" http://pubs.opengroup.org/onlinepubs/009695399/functions/dlsym.html#tag_03_112_08
.\" http://pubs.opengroup.org/onlinepubs/9699919799/functions/dlsym.html#tag_16_96_07
.\" http://austingroupbugs.net/view.php?id=74
-
+\&
error = dlerror();
if (error != NULL) {
fprintf(stderr, "%s\en", error);
exit(EXIT_FAILURE);
}
-
+\&
printf("%f\en", (*cosine)(2.0));
dlclose(handle);
exit(EXIT_SUCCESS);
diff --git a/man3/dlsym.3 b/man3/dlsym.3
index e4d5d5b56..499e29c3e 100644
--- a/man3/dlsym.3
+++ b/man3/dlsym.3
@@ -4,7 +4,7 @@
.\"
.\" SPDX-License-Identifier: GPL-2.0-or-later
.\"
-.TH dlsym 3 2023-01-07 "Linux man-pages 6.03"
+.TH dlsym 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
dlsym, dlvsym \- obtain address of a symbol in a shared object or executable
.SH LIBRARY
@@ -102,35 +102,37 @@ these functions return the address associated with
On failure, they return NULL;
the cause of the error can be diagnosed using
.BR dlerror (3).
-.SH VERSIONS
-.BR dlsym ()
-is present in glibc 2.0 and later.
-.BR dlvsym ()
-first appeared in glibc 2.1.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR dlsym (),
.BR dlvsym ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-POSIX.1-2001 describes
-.BR dlsym ().
-The
+.TP
+.BR dlsym ()
+POSIX.1-2008.
+.TP
+.BR dlvsym ()
+GNU.
+.SH HISTORY
+.TP
+.BR dlsym ()
+glibc 2.0.
+POSIX.1-2001.
+.TP
.BR dlvsym ()
-function is a GNU extension.
+glibc 2.1.
.SH NOTES
There are several scenarios when the address of a global symbol is NULL.
For example, a symbol can be placed at zero address by the linker, via
diff --git a/man3/drand48.3 b/man3/drand48.3
index 93381cfd6..b768d0d76 100644
--- a/man3/drand48.3
+++ b/man3/drand48.3
@@ -8,7 +8,7 @@
.\" Lewine's _POSIX Programmer's Guide_ (O'Reilly & Associates, 1991)
.\" 386BSD man pages
.\" Modified Sat Jul 24 19:46:03 1993 by Rik Faith (faith@cs.unc.edu)
-.TH drand48 3 2023-02-10 "Linux man-pages 6.03"
+.TH drand48 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
drand48, erand48, lrand48, nrand48, mrand48, jrand48, srand48, seed48,
lcong48 \- generate uniformly distributed pseudo-random numbers
@@ -226,14 +226,14 @@ and
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR drand48 (),
.BR erand48 (),
.BR lrand48 (),
@@ -244,18 +244,20 @@ T{
.BR seed48 (),
.BR lcong48 ()
T} Thread safety T{
+.na
+.nh
MT-Unsafe race:drand48
T}
.TE
-.hy
-.ad
.sp 1
.PP
The above
functions record global state information for the random number generator,
so they are not thread-safe.
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, SVr4.
+POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001, SVr4.
.SH SEE ALSO
.BR rand (3),
.BR random (3)
diff --git a/man3/drand48_r.3 b/man3/drand48_r.3
index fc436de37..146fed4cc 100644
--- a/man3/drand48_r.3
+++ b/man3/drand48_r.3
@@ -5,7 +5,7 @@
.\"
.\" Created 2004-10-31. Text taken from a page by Walter Harms, 2003-09-08
.\"
-.TH drand48_r 3 2023-02-05 "Linux man-pages 6.03"
+.TH drand48_r 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
drand48_r, erand48_r, lrand48_r, nrand48_r, mrand48_r, jrand48_r,
srand48_r, seed48_r, lcong48_r
@@ -77,14 +77,14 @@ The return value is 0.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR drand48_r (),
.BR erand48_r (),
.BR lrand48_r (),
@@ -96,11 +96,9 @@ T{
.BR lcong48_r ()
T} Thread safety MT-Safe race:buffer
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-These functions are GNU extensions and are not portable.
+GNU.
.SH SEE ALSO
.BR drand48 (3),
.BR rand (3),
diff --git a/man3/duplocale.3 b/man3/duplocale.3
index 259a57163..7b1bff8ab 100644
--- a/man3/duplocale.3
+++ b/man3/duplocale.3
@@ -2,7 +2,7 @@
.\"
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
-.TH duplocale 3 2023-02-05 "Linux man-pages 6.03"
+.TH duplocale 3 2023-05-03 "Linux man-pages 6.05.01"
.SH NAME
duplocale \- duplicate a locale object
.SH LIBRARY
@@ -54,12 +54,10 @@ to indicate the error.
.TP
.B ENOMEM
Insufficient memory to create the duplicate locale object.
-.SH VERSIONS
-The
-.BR duplocale ()
-function were added in glibc 2.3.
.SH STANDARDS
POSIX.1-2008.
+.SH HISTORY
+glibc 2.3.
.SH NOTES
Duplicating a locale can serve the following purposes:
.IP \[bu] 3
@@ -124,39 +122,39 @@ ABC
#include <locale.h>
#include <stdio.h>
#include <stdlib.h>
-
+\&
#define errExit(msg) do { perror(msg); exit(EXIT_FAILURE); \e
} while (0)
-
+\&
int
main(int argc, char *argv[])
{
locale_t loc, nloc;
-
+\&
if (argc != 2) {
fprintf(stderr, "Usage: %s string\en", argv[0]);
exit(EXIT_FAILURE);
}
-
+\&
/* This sequence is necessary, because uselocale() might return
the value LC_GLOBAL_LOCALE, which can\[aq]t be passed as an
argument to toupper_l(). */
-
+\&
loc = uselocale((locale_t) 0);
if (loc == (locale_t) 0)
errExit("uselocale");
-
+\&
nloc = duplocale(loc);
if (nloc == (locale_t) 0)
errExit("duplocale");
-
+\&
for (char *p = argv[1]; *p; p++)
putchar(toupper_l(*p, nloc));
-
+\&
printf("\en");
-
+\&
freelocale(nloc);
-
+\&
exit(EXIT_SUCCESS);
}
.EE
diff --git a/man3/dysize.3 b/man3/dysize.3
index a95e13e5c..7e2d32854 100644
--- a/man3/dysize.3
+++ b/man3/dysize.3
@@ -4,7 +4,7 @@
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
.\" aeb: some corrections
-.TH dysize 3 2023-02-05 "Linux man-pages 6.03"
+.TH dysize 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
dysize \- get number of days for a given year
.SH LIBRARY
@@ -46,23 +46,23 @@ also found in
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR dysize ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-This function occurs in SunOS 4.x.
-.SH NOTES
+None.
+.SH HISTORY
+SunOS 4.x.
+.PP
This is a compatibility function only.
Don't use it in new programs.
.\" The SCO version of this function had a year-2000 problem.
diff --git a/man3/ecvt.3 b/man3/ecvt.3
index 1949e8953..f207948d4 100644
--- a/man3/ecvt.3
+++ b/man3/ecvt.3
@@ -10,7 +10,7 @@
.\" Modified Sat Jul 24 19:40:39 1993 by Rik Faith (faith@cs.unc.edu)
.\" Modified Fri Jun 25 12:10:47 1999 by Andries Brouwer (aeb@cwi.nl)
.\"
-.TH ecvt 3 2023-02-05 "Linux man-pages 6.03"
+.TH ecvt 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
ecvt, fcvt \- convert a floating-point number to a string
.SH LIBRARY
@@ -89,24 +89,26 @@ or
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR ecvt ()
T} Thread safety MT-Unsafe race:ecvt
T{
+.na
+.nh
.BR fcvt ()
T} Thread safety MT-Unsafe race:fcvt
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
+None.
+.SH HISTORY
SVr2;
marked as LEGACY in POSIX.1-2001.
POSIX.1-2008 removes the specifications of
diff --git a/man3/ecvt_r.3 b/man3/ecvt_r.3
index abcfdfb91..39eafa9cb 100644
--- a/man3/ecvt_r.3
+++ b/man3/ecvt_r.3
@@ -8,7 +8,7 @@
.\"
.\" Corrected return types; from Fabian; 2004-10-05
.\"
-.TH ecvt_r 3 2023-02-05 "Linux man-pages 6.03"
+.TH ecvt_r 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
ecvt_r, fcvt_r, qecvt_r, qfcvt_r \- convert a floating-point number to a string
.SH LIBRARY
@@ -73,25 +73,23 @@ These functions return 0 on success, and \-1 otherwise.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR ecvt_r (),
.BR fcvt_r (),
.BR qecvt_r (),
.BR qfcvt_r ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-These functions are GNU extensions.
+GNU.
.SH NOTES
These functions are obsolete.
Instead,
diff --git a/man3/encrypt.3 b/man3/encrypt.3
index 0ff57911e..a3fae2f30 100644
--- a/man3/encrypt.3
+++ b/man3/encrypt.3
@@ -9,12 +9,12 @@
.\"
.\" Modified 2003-04-04, aeb
.\"
-.TH encrypt 3 2023-02-05 "Linux man-pages 6.03"
+.TH encrypt 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
encrypt, setkey, encrypt_r, setkey_r \- encrypt 64-bit messages
.SH LIBRARY
-Encryption and decryption library
-.RI ( libcrypto ", " \-lcrypto )
+Password hashing library
+.RI ( libcrypt ", " \-lcrypt )
.SH SYNOPSIS
.nf
.BR "#define _XOPEN_SOURCE" " /* See feature_test_macros(7) */"
@@ -104,50 +104,52 @@ is unchanged.
.B ENOSYS
The function is not provided.
(For example because of former USA export restrictions.)
-.SH VERSIONS
-Because they employ the DES block cipher,
-which is no longer considered secure,
-.BR encrypt (),
-.BR encrypt_r (),
-.BR setkey (),
-and
-.BR setkey_r ()
-were removed in glibc 2.28.
-Applications should switch to a modern cryptography library, such as
-.BR libgcrypt .
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR encrypt (),
.BR setkey ()
T} Thread safety MT-Unsafe race:crypt
T{
+.na
+.nh
.BR encrypt_r (),
.BR setkey_r ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-.BR encrypt (),
-.BR setkey ():
-POSIX.1-2001, POSIX.1-2008, SUS, SVr4.
-.PP
-The functions
+.TP
+.BR encrypt ()
+.TQ
+.BR setkey ()
+POSIX.1-2008.
+.TP
.BR encrypt_r ()
-and
+.TQ
.BR setkey_r ()
-are GNU extensions.
-.SH NOTES
+None.
+.SH HISTORY
+Removed in glibc 2.28.
+.PP
+Because they employ the DES block cipher,
+which is no longer considered secure,
+these functions were removed from glibc.
+Applications should switch to a modern cryptography library, such as
+.BR libgcrypt .
+.TP
+.BR encrypt ()
+.TQ
+.BR setkey ()
+POSIX.1-2001, SUS, SVr4.
.SS Availability in glibc
See
.BR crypt (3).
@@ -161,7 +163,7 @@ In glibc 2.2, these functions use the DES algorithm.
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
-
+\&
int
main(void)
{
@@ -169,11 +171,11 @@ main(void)
char orig[9] = "eggplant";
char buf[64];
char txt[9];
-
+\&
for (size_t i = 0; i < 64; i++) {
key[i] = rand() & 1;
}
-
+\&
for (size_t i = 0; i < 8; i++) {
for (size_t j = 0; j < 8; j++) {
buf[i * 8 + j] = orig[i] >> j & 1;
@@ -181,7 +183,7 @@ main(void)
setkey(key);
}
printf("Before encrypting: %s\en", orig);
-
+\&
encrypt(buf, 0);
for (size_t i = 0; i < 8; i++) {
for (size_t j = 0, txt[i] = \[aq]\e0\[aq]; j < 8; j++) {
@@ -190,7 +192,7 @@ main(void)
txt[8] = \[aq]\e0\[aq];
}
printf("After encrypting: %s\en", txt);
-
+\&
encrypt(buf, 1);
for (size_t i = 0; i < 8; i++) {
for (size_t j = 0, txt[i] = \[aq]\e0\[aq]; j < 8; j++) {
diff --git a/man3/end.3 b/man3/end.3
index c99fa15e5..a0691d6a1 100644
--- a/man3/end.3
+++ b/man3/end.3
@@ -3,7 +3,7 @@
.\"
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
-.TH end 3 2022-10-30 "Linux man-pages 6.03"
+.TH end 3 2023-05-03 "Linux man-pages 6.05.01"
.SH NAME
etext, edata, end \- end of program segments
.SH SYNOPSIS
@@ -28,6 +28,8 @@ initialized data segment.
This is the first address past the end of the
uninitialized data segment (also known as the BSS segment).
.SH STANDARDS
+None.
+.SH HISTORY
Although these symbols have long been provided on most UNIX systems,
they are not standardized; use with caution.
.SH NOTES
@@ -71,10 +73,10 @@ First address past:
.EX
#include <stdio.h>
#include <stdlib.h>
-
+\&
extern char etext, edata, end; /* The symbols must have some type,
or "gcc \-Wall" complains */
-
+\&
int
main(void)
{
@@ -82,7 +84,7 @@ main(void)
printf(" program text (etext) %10p\en", &etext);
printf(" initialized data (edata) %10p\en", &edata);
printf(" uninitialized data (end) %10p\en", &end);
-
+\&
exit(EXIT_SUCCESS);
}
.EE
diff --git a/man3/endian.3 b/man3/endian.3
index 6e572390d..fa7b9fd80 100644
--- a/man3/endian.3
+++ b/man3/endian.3
@@ -5,7 +5,7 @@
.\"
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
-.TH endian 3 2023-01-07 "Linux man-pages 6.03"
+.TH endian 3 2023-05-03 "Linux man-pages 6.05.01"
.SH NAME
htobe16, htole16, be16toh, le16toh, htobe32, htole32, be32toh, le32toh,
htobe64, htole64, be64toh, le64toh \-
@@ -80,9 +80,6 @@ from big-endian order to host byte order.
The functions with names of the form "le\fInn\fPtoh" convert
from little-endian order to host byte order.
.SH VERSIONS
-These functions were added in glibc 2.9.
-.SH STANDARDS
-These functions are nonstandard.
Similar functions are present on the BSDs,
where the required header file is
.I <sys/endian.h>
@@ -96,7 +93,11 @@ whereby the
component always appears at the end of the function name
(thus, for example, in NetBSD, FreeBSD, and glibc,
the equivalent of OpenBSDs "betoh32" is "be32toh").
-.SH NOTES
+.SH STANDARDS
+None.
+.SH HISTORY
+glibc 2.9.
+.PP
These functions are similar to the older
.BR byteorder (3)
family of functions.
@@ -136,7 +137,7 @@ htobe32(x.u32) = 0x11223344
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
-
+\&
int
main(void)
{
@@ -144,16 +145,16 @@ main(void)
uint32_t u32;
uint8_t arr[4];
} x;
-
+\&
x.arr[0] = 0x11; /* Lowest\-address byte */
x.arr[1] = 0x22;
x.arr[2] = 0x33;
x.arr[3] = 0x44; /* Highest\-address byte */
-
+\&
printf("x.u32 = %#x\en", x.u32);
printf("htole32(x.u32) = %#x\en", htole32(x.u32));
printf("htobe32(x.u32) = %#x\en", htobe32(x.u32));
-
+\&
exit(EXIT_SUCCESS);
}
.EE
diff --git a/man3/envz_add.3 b/man3/envz_add.3
index 274dda727..fcb5ca3fc 100644
--- a/man3/envz_add.3
+++ b/man3/envz_add.3
@@ -6,7 +6,7 @@
.\" based on the description in glibc source and infopages
.\"
.\" Corrections and additions, aeb
-.TH envz_add 3 2023-02-05 "Linux man-pages 6.03"
+.TH envz_add 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
envz_add, envz_entry, envz_get, envz_merge,
envz_remove, envz_strip \- environment string support
@@ -122,14 +122,14 @@ if an allocation error occurs.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR envz_add (),
.BR envz_entry (),
.BR envz_get (),
@@ -138,27 +138,25 @@ T{
.BR envz_strip ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-These functions are a GNU extension.
+GNU.
.SH EXAMPLES
.\" SRC BEGIN (envz_add.c)
.EX
#include <envz.h>
#include <stdio.h>
#include <stdlib.h>
-
+\&
int
main(int argc, char *argv[], char *envp[])
{
char *str;
size_t e_len = 0;
-
+\&
for (size_t i = 0; envp[i] != NULL; i++)
e_len += strlen(envp[i]) + 1;
-
+\&
str = envz_entry(*envp, e_len, "HOME");
printf("%s\en", str);
str = envz_get(*envp, e_len, "HOME");
diff --git a/man3/erf.3 b/man3/erf.3
index 55daaf3d9..ed7f7f0d4 100644
--- a/man3/erf.3
+++ b/man3/erf.3
@@ -13,7 +13,7 @@
.\" Modified 2002-07-27 by Walter Harms
.\" (walter.harms@informatik.uni-oldenburg.de)
.\"
-.TH erf 3 2023-02-05 "Linux man-pages 6.03"
+.TH erf 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
erf, erff, erfl \- error function
.SH LIBRARY
@@ -99,28 +99,28 @@ is raised.
These functions do not set
.IR errno .
.\" It is intentional that these functions do not set errno for this case
-.\" see http://sources.redhat.com/bugzilla/show_bug.cgi?id=6785
+.\" see https://www.sourceware.org/bugzilla/show_bug.cgi?id=6785
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR erf (),
.BR erff (),
.BR erfl ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-C99, POSIX.1-2001, POSIX.1-2008.
+C11, POSIX.1-2008.
+.SH HISTORY
+C99, POSIX.1-2001.
.PP
The variant returning
.I double
diff --git a/man3/erfc.3 b/man3/erfc.3
index 6f27b36db..92d6293e2 100644
--- a/man3/erfc.3
+++ b/man3/erfc.3
@@ -4,7 +4,7 @@
.\"
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
-.TH erfc 3 2023-02-05 "Linux man-pages 6.03"
+.TH erfc 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
erfc, erfcf, erfcl \- complementary error function
.SH LIBRARY
@@ -92,28 +92,28 @@ is raised.
These functions do not set
.IR errno .
.\" It is intentional that these functions do not set errno for this case
-.\" see http://sources.redhat.com/bugzilla/show_bug.cgi?id=6785
+.\" see https://www.sourceware.org/bugzilla/show_bug.cgi?id=6785
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR erfc (),
.BR erfcf (),
.BR erfcl ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-C99, POSIX.1-2001, POSIX.1-2008.
+C11, POSIX.1-2008.
+.SH HISTORY
+C99, POSIX.1-2001.
.PP
The variant returning
.I double
diff --git a/man3/err.3 b/man3/err.3
index c306430ed..87f45a329 100644
--- a/man3/err.3
+++ b/man3/err.3
@@ -9,7 +9,7 @@
.\"
.\" 2011-09-10, mtk, Converted from mdoc to man macros
.\"
-.TH err 3 2022-12-15 "Linux man-pages 6.03"
+.TH err 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
err, verr, errx, verrx, warn, vwarn, warnx, vwarnx \- formatted error messages
.SH LIBRARY
@@ -81,14 +81,14 @@ functions do not return, but exit with the value of the argument
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR err (),
.BR errx (),
.BR warn (),
@@ -99,18 +99,15 @@ T{
.BR vwarnx ()
T} Thread safety MT-Safe locale
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-These functions are nonstandard BSD extensions.
-.\" .SH HISTORY
-.\" The
-.\" .BR err ()
-.\" and
-.\" .BR warn ()
-.\" functions first appeared in
-.\" 4.4BSD.
+BSD.
+.SH HISTORY
+.TP
+.BR err ()
+.TQ
+.BR warn ()
+4.4BSD.
.SH EXAMPLES
Display the current
.I errno
diff --git a/man3/errno.3 b/man3/errno.3
index 990c13484..f3ffee5d0 100644
--- a/man3/errno.3
+++ b/man3/errno.3
@@ -9,7 +9,7 @@
.\" 2006-02-09 Kurt Wall, mtk
.\" Added non-POSIX errors
.\"
-.TH errno 3 2022-12-04 "Linux man-pages 6.03"
+.TH errno 3 2022-12-04 "Linux man-pages 6.05.01"
.SH NAME
errno \- number of last error
.SH LIBRARY
diff --git a/man3/error.3 b/man3/error.3
index 0c8f56472..1b12a60a9 100644
--- a/man3/error.3
+++ b/man3/error.3
@@ -25,7 +25,7 @@
.\"
.\" References:
.\" glibc manual and source
-.TH error 3 2022-12-15 "Linux man-pages 6.03"
+.TH error 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
error, error_at_line, error_message_count, error_one_per_line,
error_print_progname \- glibc error reporting functions
@@ -124,24 +124,26 @@ The function should print a suitable string to
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lb lb lbx
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR error ()
T} Thread safety MT-Safe locale
T{
+.na
+.nh
.BR error_at_line ()
T} Thread safety T{
+.na
+.nh
MT-Unsafe\ race: error_at_line/\:error_one_per_line locale
T}
.TE
-.hy
-.ad
.sp 1
.PP
The internal
@@ -160,8 +162,7 @@ After that,
is very much like
.BR error ().
.SH STANDARDS
-These functions and variables are GNU extensions, and should not be
-used in programs intended to be portable.
+GNU.
.SH SEE ALSO
.BR err (3),
.BR errno (3),
diff --git a/man3/ether_aton.3 b/man3/ether_aton.3
index 890933241..973566b1b 100644
--- a/man3/ether_aton.3
+++ b/man3/ether_aton.3
@@ -9,7 +9,7 @@
.\"
.\" Minor additions, aeb, 2013-06-21
.\"
-.TH ether_aton 3 2023-02-05 "Linux man-pages 6.03"
+.TH ether_aton 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
ether_aton, ether_ntoa, ether_ntohost, ether_hostton, ether_line,
ether_ntoa_r, ether_aton_r \- Ethernet address manipulation routines
@@ -108,18 +108,20 @@ struct ether_addr {
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR ether_aton (),
.BR ether_ntoa ()
T} Thread safety MT-Unsafe
T{
+.na
+.nh
.BR ether_ntohost (),
.BR ether_hostton (),
.BR ether_line (),
@@ -127,10 +129,10 @@ T{
.BR ether_aton_r ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
+None.
+.SH HISTORY
4.3BSD, SunOS.
.SH BUGS
In glibc 2.2.5 and earlier, the implementation of
diff --git a/man3/euidaccess.3 b/man3/euidaccess.3
index f06cb3d62..a8d12189c 100644
--- a/man3/euidaccess.3
+++ b/man3/euidaccess.3
@@ -3,7 +3,7 @@
.\"
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
-.TH euidaccess 3 2022-12-15 "Linux man-pages 6.03"
+.TH euidaccess 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
euidaccess, eaccess \- check effective user's permissions for a file
.SH LIBRARY
@@ -50,34 +50,33 @@ is set to indicate the error.
.SH ERRORS
As for
.BR access (2).
-.SH VERSIONS
-The
-.BR eaccess ()
-function was added in glibc 2.4.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR euidaccess (),
.BR eaccess ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
-.SH STANDARDS
-These functions are nonstandard.
+.SH VERSIONS
Some other systems have an
.\" e.g., FreeBSD 6.1.
.BR eaccess ()
function.
+.SH STANDARDS
+None.
+.SH HISTORY
+.TP
+.BR eaccess ()
+glibc 2.4.
.SH NOTES
.IR Warning :
Using this function to check a process's permissions on a file before
diff --git a/man3/exec.3 b/man3/exec.3
index 23945814b..0f60f57bc 100644
--- a/man3/exec.3
+++ b/man3/exec.3
@@ -11,7 +11,7 @@
.\" Modified, 24 Jun 2004, Michael Kerrisk <mtk.manpages@gmail.com>
.\" Added note on casting NULL
.\"
-.TH exec 3 2023-01-07 "Linux man-pages 6.03"
+.TH exec 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
execl, execlp, execle, execv, execvp, execvpe \- execute a file
.SH LIBRARY
@@ -172,41 +172,31 @@ All of these functions may fail and set
.I errno
for any of the errors specified for
.BR execve (2).
-.SH VERSIONS
-The
-.BR execvpe ()
-function first appeared in glibc 2.11.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR execl (),
.BR execle (),
.BR execv ()
T} Thread safety MT-Safe
T{
+.na
+.nh
.BR execlp (),
.BR execvp (),
.BR execvpe ()
T} Thread safety MT-Safe env
.TE
-.hy
-.ad
.sp 1
-.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008.
-.PP
-The
-.BR execvpe ()
-function is a GNU extension.
-.SH NOTES
+.SH VERSIONS
The default search path (used when the environment
does not contain the variable \fBPATH\fR)
shows some variation across systems.
@@ -254,6 +244,40 @@ and
upon which they returned.
They now return if any error other than the ones
described above occurs.
+.SH STANDARDS
+.TP
+.B environ
+.TQ
+.BR execl ()
+.TQ
+.BR execlp ()
+.TQ
+.BR execle ()
+.TQ
+.BR execv ()
+.TQ
+.BR execvp ()
+POSIX.1-2008.
+.TP
+.BR execvpe ()
+GNU.
+.SH HISTORY
+.TP
+.B environ
+.TQ
+.BR execl ()
+.TQ
+.BR execlp ()
+.TQ
+.BR execle ()
+.TQ
+.BR execv ()
+.TQ
+.BR execvp ()
+POSIX.1-2001.
+.TP
+.BR execvpe ()
+glibc 2.11.
.SH BUGS
Before glibc 2.24,
.BR execl ()
diff --git a/man3/exit.3 b/man3/exit.3
index bd702d4c8..f51c55798 100644
--- a/man3/exit.3
+++ b/man3/exit.3
@@ -7,7 +7,7 @@
.\" could be listed on this page. See, for example, the list in the
.\" POSIX exit(3p) page.
.\"
-.TH exit 3 2023-02-05 "Linux man-pages 6.03"
+.TH exit 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
exit \- cause normal process termination
.SH LIBRARY
@@ -74,19 +74,17 @@ function does not return.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR exit ()
T} Thread safety MT-Unsafe race:exit
.TE
-.hy
-.ad
.sp 1
.PP
The
@@ -94,7 +92,9 @@ The
function uses a global variable that is not protected,
so it is not thread-safe.
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, C99, SVr4, 4.3BSD.
+C11, POSIX.1-2008.
+.SH HISTORY
+C89, POSIX.1-2001, SVr4, 4.3BSD.
.SH NOTES
The behavior is undefined if one of the functions registered using
.BR atexit (3)
diff --git a/man3/exp.3 b/man3/exp.3
index 0906ee0d0..8736d1267 100644
--- a/man3/exp.3
+++ b/man3/exp.3
@@ -14,7 +14,7 @@
.\" Modified 2002-07-27 by Walter Harms
.\" (walter.harms@informatik.uni-oldenburg.de)
.\"
-.TH exp 3 2023-02-05 "Linux man-pages 6.03"
+.TH exp 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
exp, expf, expl \- base-e exponential function
.SH LIBRARY
@@ -102,29 +102,29 @@ is raised.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR exp (),
.BR expf (),
.BR expl ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-C99, POSIX.1-2001, POSIX.1-2008.
+C11, POSIX.1-2008.
+.SH HISTORY
+C99, POSIX.1-2001.
.PP
The variant returning
.I double
also conforms to
-SVr4, 4.3BSD.
+SVr4, 4.3BSD, C89.
.SH SEE ALSO
.BR cbrt (3),
.BR cexp (3),
diff --git a/man3/exp10.3 b/man3/exp10.3
index 58f27ff6d..88b0ea619 100644
--- a/man3/exp10.3
+++ b/man3/exp10.3
@@ -13,7 +13,7 @@
.\" Modified 1995-08-14 by Arnt Gulbrandsen <agulbra@troll.no>
.\" Modified 2002-07-27 by Walter Harms
.\" (walter.harms@informatik.uni-oldenburg.de)
-.TH exp10 3 2022-12-15 "Linux man-pages 6.03"
+.TH exp10 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
exp10, exp10f, exp10l \- base-10 exponential function
.SH LIBRARY
@@ -47,36 +47,34 @@ when calling these functions.
.PP
For a discussion of the errors that can occur for these functions, see
.BR exp (3).
-.SH VERSIONS
-These functions first appeared in glibc 2.1.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR exp10 (),
.BR exp10f (),
.BR exp10l ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-These functions are GNU extensions.
+GNU.
+.SH HISTORY
+glibc 2.1.
.SH BUGS
Before glibc 2.19, the glibc implementation of these functions did not set
.I errno
to
.B ERANGE
when an underflow error occurred.
-.\" http://sources.redhat.com/bugzilla/show_bug.cgi?id=6787
+.\" https://www.sourceware.org/bugzilla/show_bug.cgi?id=6787
.SH SEE ALSO
.BR cbrt (3),
.BR exp (3),
diff --git a/man3/exp2.3 b/man3/exp2.3
index 15639b79a..9b3d99c6f 100644
--- a/man3/exp2.3
+++ b/man3/exp2.3
@@ -14,7 +14,7 @@
.\" Modified 2002-07-27 by Walter Harms
.\" (walter.harms@informatik.uni-oldenburg.de)
.\"
-.TH exp2 3 2022-12-15 "Linux man-pages 6.03"
+.TH exp2 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
exp2, exp2f, exp2l \- base-2 exponential function
.SH LIBRARY
@@ -58,29 +58,28 @@ when calling these functions.
.PP
For a discussion of the errors that can occur for these functions, see
.BR exp (3).
-.SH VERSIONS
-These functions were added in glibc 2.1.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR exp2 (),
.BR exp2f (),
.BR exp2l ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-C99, POSIX.1-2001, POSIX.1-2008.
+C11, POSIX.1-2008.
+.SH HISTORY
+glibc 2.1.
+C99, POSIX.1-2001.
.PP
The variant returning
.I double
diff --git a/man3/expm1.3 b/man3/expm1.3
index dd2c71a90..dd99ac18b 100644
--- a/man3/expm1.3
+++ b/man3/expm1.3
@@ -8,7 +8,7 @@
.\" Modified 2002-07-27 Walter Harms
.\" (walter.harms@informatik.uni-oldenburg.de)
.\"
-.TH expm1 3 2023-02-05 "Linux man-pages 6.03"
+.TH expm1 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
expm1, expm1f, expm1l \- exponential minus 1
.SH LIBRARY
@@ -109,28 +109,28 @@ is raised.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR expm1 (),
.BR expm1f (),
.BR expm1l ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-C99, POSIX.1-2001, POSIX.1-2008.
-.\" BSD.
+C11, POSIX.1-2008.
+.SH HISTORY
+C99, POSIX.1-2001.
+BSD.
.SH BUGS
Before glibc 2.17,
-.\" http://sources.redhat.com/bugzilla/show_bug.cgi?id=6778
+.\" https://www.sourceware.org/bugzilla/show_bug.cgi?id=6778
on certain architectures (e.g., x86, but not x86_64)
.BR expm1 ()
raised a bogus underflow floating-point exception
@@ -139,7 +139,7 @@ for some large negative
values (where the function result approaches \-1).
.PP
Before approximately glibc 2.11,
-.\" http://sources.redhat.com/bugzilla/show_bug.cgi?id=6814
+.\" https://www.sourceware.org/bugzilla/show_bug.cgi?id=6814
.\" e.g., expm1(1e5) through expm1(1.00199970127e5),
.\" but not expm1(1.00199970128e5) and beyond.
.BR expm1 ()
@@ -155,7 +155,7 @@ Before glibc 2.11,
.\" From the source (sysdeps/i386/fpu/s_expm1.S) it looks
.\" like the changes were in glibc 2.11.
the glibc implementation did not set
-.\" http://sources.redhat.com/bugzilla/show_bug.cgi?id=6788
+.\" https://www.sourceware.org/bugzilla/show_bug.cgi?id=6788
.I errno
to
.B ERANGE
diff --git a/man3/fabs.3 b/man3/fabs.3
index 018165f70..37097d1d5 100644
--- a/man3/fabs.3
+++ b/man3/fabs.3
@@ -10,7 +10,7 @@
.\" Modified Sat Jul 24 19:42:04 1993 by Rik Faith (faith@cs.unc.edu)
.\" Added fabsl, fabsf, aeb, 2001-06-07
.\"
-.TH fabs 3 2023-02-05 "Linux man-pages 6.03"
+.TH fabs 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
fabs, fabsf, fabsl \- absolute value of floating-point number
.SH LIBRARY
@@ -61,29 +61,29 @@ No errors occur.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR fabs (),
.BR fabsf (),
.BR fabsl ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-C99, POSIX.1-2001, POSIX.1-2008.
+C11, POSIX.1-2008.
+.SH HISTORY
+C99, POSIX.1-2001.
.PP
The variant returning
.I double
also conforms to
-SVr4, 4.3BSD.
+SVr4, 4.3BSD, C89.
.SH SEE ALSO
.BR abs (3),
.BR cabs (3),
diff --git a/man3/fclose.3 b/man3/fclose.3
index 9e1e25a62..3694d546d 100644
--- a/man3/fclose.3
+++ b/man3/fclose.3
@@ -14,7 +14,7 @@
.\"
.\" Modified 2000-07-22 by Nicolás Lichtmaier <nick@debian.org>
.\"
-.TH fclose 3 2022-12-29 "Linux man-pages 6.03"
+.TH fclose 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
fclose \- close a stream
.SH LIBRARY
@@ -68,22 +68,22 @@ or
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR fclose ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, C99.
+C11, POSIX.1-2008.
+.SH HISTORY
+C89, POSIX.1-2001.
.SH NOTES
Note that
.BR fclose ()
diff --git a/man3/fcloseall.3 b/man3/fcloseall.3
index df30f95df..7fc02c015 100644
--- a/man3/fcloseall.3
+++ b/man3/fcloseall.3
@@ -3,7 +3,7 @@
.\"
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
-.TH fcloseall 3 2022-12-15 "Linux man-pages 6.03"
+.TH fcloseall 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
fcloseall \- close all open streams
.SH LIBRARY
@@ -39,26 +39,24 @@ is returned.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR fcloseall ()
T} Thread safety MT-Unsafe race:streams
.TE
-.hy
-.ad
.sp 1
.PP
The
.BR fcloseall ()
function does not lock the streams, so it is not thread-safe.
.SH STANDARDS
-This function is a GNU extension.
+GNU.
.SH SEE ALSO
.BR close (2),
.BR fclose (3),
diff --git a/man3/fdim.3 b/man3/fdim.3
index e09d0e4fa..98c396158 100644
--- a/man3/fdim.3
+++ b/man3/fdim.3
@@ -5,7 +5,7 @@
.\"
.\" SPDX-License-Identifier: GPL-1.0-or-later
.\"
-.TH fdim 3 2023-01-07 "Linux man-pages 6.03"
+.TH fdim 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
fdim, fdimf, fdiml \- positive difference
.SH LIBRARY
@@ -65,29 +65,28 @@ is set to
An overflow floating-point exception
.RB ( FE_OVERFLOW )
is raised.
-.SH VERSIONS
-These functions were added in glibc 2.1.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR fdim (),
.BR fdimf (),
.BR fdiml ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-C99, POSIX.1-2001, POSIX.1-2008.
+C11, POSIX.1-2008.
+.SH HISTORY
+glibc 2.1.
+C99, POSIX.1-2001.
.SH BUGS
Before glibc 2.24
.\" https://www.sourceware.org/bugzilla/show_bug.cgi?id=6796
diff --git a/man3/fenv.3 b/man3/fenv.3
index 9335169e4..653ba0381 100644
--- a/man3/fenv.3
+++ b/man3/fenv.3
@@ -6,7 +6,7 @@
.\" 2000-08-14 added GNU additions from Andreas Jaeger
.\" 2000-12-05 some changes inspired by acahalan's remarks
.\"
-.TH fenv 3 2023-02-05 "Linux man-pages 6.03"
+.TH fenv 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
feclearexcept, fegetexceptflag, feraiseexcept, fesetexceptflag,
fetestexcept, fegetenv, fegetround, feholdexcept, fesetround,
@@ -240,20 +240,18 @@ These functions return zero on success and nonzero if an error occurred.
.\" Earlier seven of these functions were listed as returning void.
.\" This was corrected in Corrigendum 1 (ISO/IEC 9899:1999/Cor.1:2001(E))
.\" of the C99 Standard.
-.SH VERSIONS
-These functions were added in glibc 2.1.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
.nh
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR feclearexcept (),
.BR fegetexceptflag (),
.BR feraiseexcept (),
@@ -269,15 +267,18 @@ T{
.BR fedisableexcept (),
.BR fegetexcept ()
T} Thread safety T{
+.na
+.nh
MT-Safe
T}
.TE
-.hy
-.ad
.sp 1
.hy
.SH STANDARDS
-IEC 60559 (IEC 559:1989), ANSI/IEEE 854, C99, POSIX.1-2001.
+C11, POSIX.1-2008, IEC 60559 (IEC 559:1989), ANSI/IEEE 854.
+.SH HISTORY
+C99, POSIX.1-2001.
+glibc 2.1.
.SH NOTES
.SS glibc notes
If possible, the GNU C Library defines a macro
diff --git a/man3/ferror.3 b/man3/ferror.3
index 773907610..68791f172 100644
--- a/man3/ferror.3
+++ b/man3/ferror.3
@@ -14,7 +14,7 @@
.\"
.\" Converted for Linux, Mon Nov 29 14:24:40 1993, faith@cs.unc.edu
.\"
-.TH ferror 3 2022-12-29 "Linux man-pages 6.03"
+.TH ferror 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
clearerr, feof, ferror \- check and reset stream status
.SH LIBRARY
@@ -71,29 +71,24 @@ These functions should not fail and do not set
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR clearerr (),
.BR feof (),
.BR ferror ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-The functions
-.BR clearerr (),
-.BR feof (),
-and
-.BR ferror ()
-conform to C99, POSIX.1-2001, and POSIX.1-2008.
+C11, POSIX.1-2008.
+.SH HISTORY
+C89, POSIX.1-2001.
.SH NOTES
POSIX.1-2008 specifies
.\"https://www.austingroupbugs.net/view.php?id=401
diff --git a/man3/fexecve.3 b/man3/fexecve.3
index 1c259eaa5..2ffe5c386 100644
--- a/man3/fexecve.3
+++ b/man3/fexecve.3
@@ -3,7 +3,7 @@
.\"
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
-.TH fexecve 3 2022-12-15 "Linux man-pages 6.03"
+.TH fexecve 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
fexecve \- execute program specified via file descriptor
.SH LIBRARY
@@ -78,32 +78,26 @@ The kernel does not provide the
system call, and the
.I /proc
filesystem could not be accessed.
-.SH VERSIONS
-.BR fexecve ()
-is implemented since glibc 2.3.2.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR fexecve ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
POSIX.1-2008.
-This function is not specified in POSIX.1-2001,
-and is not widely available on other systems.
-It is specified in POSIX.1-2008.
-.SH NOTES
+.SH HISTORY
+glibc 2.3.2.
+.PP
On Linux with glibc versions 2.26 and earlier,
.BR fexecve ()
is implemented using the
@@ -120,7 +114,7 @@ system call, then
is implemented using that system call, with the benefit that
.I /proc
does not need to be mounted.
-.PP
+.SH NOTES
The idea behind
.BR fexecve ()
is to allow the caller to verify (checksum) the contents of
diff --git a/man3/fflush.3 b/man3/fflush.3
index dcbda7978..a26c3e87c 100644
--- a/man3/fflush.3
+++ b/man3/fflush.3
@@ -15,7 +15,7 @@
.\" Modified 2000-07-22 by Nicolás Lichtmaier <nick@debian.org>
.\" Modified 2001-10-16 by John Levon <moz@compsoc.man.ac.uk>
.\"
-.TH fflush 3 2022-12-29 "Linux man-pages 6.03"
+.TH fflush 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
fflush \- flush a stream
.SH LIBRARY
@@ -25,7 +25,7 @@ Standard C library
.nf
.B #include <stdio.h>
.PP
-.BI "int fflush(FILE *" stream );
+.BI "int fflush(FILE *_Nullable " stream );
.fi
.SH DESCRIPTION
For output streams,
@@ -76,22 +76,22 @@ for any of the errors specified for
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR fflush ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-C99, POSIX.1-2001, POSIX.1-2008.
+C11, POSIX.1-2008.
+.SH HISTORY
+C89, POSIX.1-2001, POSIX.1-2008.
.PP
POSIX.1-2001 did not specify the behavior for flushing of input streams,
but the behavior is specified in POSIX.1-2008.
diff --git a/man3/ffs.3 b/man3/ffs.3
index 7a17abb4b..b092438b4 100644
--- a/man3/ffs.3
+++ b/man3/ffs.3
@@ -11,7 +11,7 @@
.\"
.\" Modified 2003 Walter Harms (walter.harms@informatik.uni-oldenburg.de)
.\"
-.TH ffs 3 2023-02-05 "Linux man-pages 6.03"
+.TH ffs 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
ffs, ffsl, ffsll \- find first bit set in a word
.SH LIBRARY
@@ -74,33 +74,31 @@ or 0 if no bits are set in
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR ffs (),
.BR ffsl (),
.BR ffsll ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
+.SH VERSIONS
+BSD systems have a prototype in
+.IR <string.h> .
.SH STANDARDS
-.BR ffs ():
+.TP
+.BR ffs ()
POSIX.1-2001, POSIX.1-2008, 4.3BSD.
-.PP
-The
+.TP
.BR ffsl ()
-and
+.TQ
.BR ffsll ()
-functions are glibc extensions.
-.SH NOTES
-BSD systems have a prototype in
-.IR <string.h> .
+GNU.
.SH SEE ALSO
.BR memchr (3)
diff --git a/man3/fgetc.3 b/man3/fgetc.3
index 89d951707..1b13d6118 100644
--- a/man3/fgetc.3
+++ b/man3/fgetc.3
@@ -5,7 +5,7 @@
.\"
.\" Modified Wed Jul 28 11:12:07 1993 by Rik Faith (faith@cs.unc.edu)
.\" Modified Fri Sep 8 15:48:13 1995 by Andries Brouwer (aeb@cwi.nl)
-.TH fgetc 3 2023-02-05 "Linux man-pages 6.03"
+.TH fgetc 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
fgetc, fgets, getc, getchar, ungetc \- input of characters and strings
.SH LIBRARY
@@ -107,14 +107,14 @@ on error.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR fgetc (),
.BR fgets (),
.BR getc (),
@@ -122,12 +122,12 @@ T{
.BR ungetc ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, C99.
-.PP
+C11, POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001, C89.
+.SH NOTES
It is not advisable to mix calls to input functions from the
.I stdio
library with low-level calls to
diff --git a/man3/fgetgrent.3 b/man3/fgetgrent.3
index 4a8526911..71926a19c 100644
--- a/man3/fgetgrent.3
+++ b/man3/fgetgrent.3
@@ -8,7 +8,7 @@
.\" Lewine's _POSIX Programmer's Guide_ (O'Reilly & Associates, 1991)
.\" 386BSD man pages
.\" Modified Sat Jul 24 19:38:44 1993 by Rik Faith (faith@cs.unc.edu)
-.TH fgetgrent 3 2023-02-05 "Linux man-pages 6.03"
+.TH fgetgrent 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
fgetgrent \- get group file entry
.SH LIBRARY
@@ -82,19 +82,17 @@ structure.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR fgetgrent ()
T} Thread safety MT-Unsafe race:fgetgrent
.TE
-.hy
-.ad
.sp 1
.\" FIXME The marking is different from that in the glibc manual,
.\" which has:
@@ -106,6 +104,8 @@ T} Thread safety MT-Unsafe race:fgetgrent
.\" race:fgetgrent, however, something about the copyright impeded the
.\" progress.
.SH STANDARDS
+None.
+.SH HISTORY
SVr4.
.SH SEE ALSO
.BR endgrent (3),
diff --git a/man3/fgetpwent.3 b/man3/fgetpwent.3
index a5ee43447..676fe2643 100644
--- a/man3/fgetpwent.3
+++ b/man3/fgetpwent.3
@@ -11,7 +11,7 @@
.\" Modified Sat Jul 24 19:37:37 1993 by Rik Faith (faith@cs.unc.edu)
.\" Modified Mon May 27 22:40:48 1996 by Martin Schulze (joey@linux.de)
.\"
-.TH fgetpwent 3 2023-02-05 "Linux man-pages 6.03"
+.TH fgetpwent 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
fgetpwent \- get password file entry
.SH LIBRARY
@@ -90,19 +90,17 @@ password database file
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR fgetpwent ()
T} Thread safety MT-Unsafe race:fgetpwent
.TE
-.hy
-.ad
.sp 1
.\" FIXME: The marking is different from that in the glibc manual,
.\" which has:
@@ -114,6 +112,8 @@ T} Thread safety MT-Unsafe race:fgetpwent
.\" race:fgetpwent, however, something about the copyright impeded the
.\" progress.
.SH STANDARDS
+None.
+.SH HISTORY
SVr4.
.SH SEE ALSO
.BR endpwent (3),
diff --git a/man3/fgetwc.3 b/man3/fgetwc.3
index 67dc004c8..b66b01856 100644
--- a/man3/fgetwc.3
+++ b/man3/fgetwc.3
@@ -11,7 +11,7 @@
.\" ISO/IEC 9899:1999
.\"
.\" Modified Tue Oct 16 23:18:40 BST 2001 by John Levon <moz@compsoc.man.ac.uk>
-.TH fgetwc 3 2022-12-15 "Linux man-pages 6.03"
+.TH fgetwc 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
fgetwc, getwc \- read a wide character from a FILE stream
.SH LIBRARY
@@ -68,23 +68,23 @@ form a valid character.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR fgetwc (),
.BR getwc ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, C99.
+C11, POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001, C99.
.SH NOTES
The behavior of
.BR fgetwc ()
diff --git a/man3/fgetws.3 b/man3/fgetws.3
index 37beae3a0..fa2a2085d 100644
--- a/man3/fgetws.3
+++ b/man3/fgetws.3
@@ -11,7 +11,7 @@
.\" ISO/IEC 9899:1999
.\"
.\" Modified Tue Oct 16 23:18:40 BST 2001 by John Levon <moz@compsoc.man.ac.uk>
-.TH fgetws 3 2023-02-05 "Linux man-pages 6.03"
+.TH fgetws 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
fgetws \- read a wide-character string from a FILE stream
.SH LIBRARY
@@ -52,22 +52,22 @@ was already reached or if an error occurred, it returns NULL.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR fgetws ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, C99.
+C11, POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001, C99.
.SH NOTES
The behavior of
.BR fgetws ()
diff --git a/man3/fileno.3 b/man3/fileno.3
index 674394ceb..642948b3e 100644
--- a/man3/fileno.3
+++ b/man3/fileno.3
@@ -12,7 +12,7 @@
.\" Converted for Linux, Mon Nov 29 14:24:40 1993, faith@cs.unc.edu
.\" Added remark on EBADF for fileno, aeb, 2001-03-22
.\"
-.TH fileno 3 2022-12-15 "Linux man-pages 6.03"
+.TH fileno 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
fileno \- obtain file descriptor of a stdio stream
.SH LIBRARY
@@ -67,24 +67,22 @@ is not associated with a file.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR fileno ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-The function
-.BR fileno ()
-conforms to POSIX.1-2001 and POSIX.1-2008.
+POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001.
.SH SEE ALSO
.BR open (2),
.BR fdopen (3),
diff --git a/man3/finite.3 b/man3/finite.3
index 13f2f76f7..11a1581ac 100644
--- a/man3/finite.3
+++ b/man3/finite.3
@@ -3,7 +3,7 @@
.\"
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
-.TH finite 3 2023-02-05 "Linux man-pages 6.03"
+.TH finite 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
finite, finitef, finitel, isinf, isinff, isinfl, isnan, isnanf, isnanl \-
BSD floating-point classification functions
@@ -100,14 +100,14 @@ is negative infinity, and 0 otherwise.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR finite (),
.BR finitef (),
.BR finitel (),
@@ -119,8 +119,6 @@ T{
.BR isnanl ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
.SH NOTES
Note that these functions are obsolete.
diff --git a/man3/flockfile.3 b/man3/flockfile.3
index 2edc70753..c2a18a426 100644
--- a/man3/flockfile.3
+++ b/man3/flockfile.3
@@ -3,7 +3,7 @@
.\"
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
-.TH flockfile 3 2023-02-05 "Linux man-pages 6.03"
+.TH flockfile 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
flockfile, ftrylockfile, funlockfile \- lock FILE for stdio
.SH LIBRARY
@@ -108,24 +108,24 @@ None.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR flockfile (),
.BR ftrylockfile (),
.BR funlockfile ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008.
+POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001.
.PP
These functions are available when
.B _POSIX_THREAD_SAFE_FUNCTIONS
diff --git a/man3/floor.3 b/man3/floor.3
index 66f277e5a..604060777 100644
--- a/man3/floor.3
+++ b/man3/floor.3
@@ -5,7 +5,7 @@
.\"
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
-.TH floor 3 2023-02-05 "Linux man-pages 6.03"
+.TH floor 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
floor, floorf, floorl \- largest integral value not greater than argument
.SH LIBRARY
@@ -56,30 +56,30 @@ POSIX.1-2001 documents a range error for overflows, but see NOTES.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR floor (),
.BR floorf (),
.BR floorl ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-C99, POSIX.1-2001, POSIX.1-2008.
+C11, POSIX.1-2008.
+.SH HISTORY
+C99, POSIX.1-2001.
.PP
The variant returning
.I double
also conforms to
-SVr4, 4.3BSD.
-.SH NOTES
+SVr4, 4.3BSD, C89.
+.PP
SUSv2 and POSIX.1-2001 contain text about overflow (which might set
.I errno
to
diff --git a/man3/fma.3 b/man3/fma.3
index 5b313569a..e9a3313c6 100644
--- a/man3/fma.3
+++ b/man3/fma.3
@@ -8,7 +8,7 @@
.\" Modified 2004-11-15, Added further text on FLT_ROUNDS
.\" as suggested by AEB and Fabian Kreutz
.\"
-.TH fma 3 2022-12-15 "Linux man-pages 6.03"
+.TH fma 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
fma, fmaf, fmal \- floating-point multiply and add
.SH LIBRARY
@@ -140,30 +140,29 @@ is raised.
These functions do not set
.IR errno .
.\" FIXME . Is it intentional that these functions do not set errno?
-.\" Bug raised: http://sources.redhat.com/bugzilla/show_bug.cgi?id=6801
-.SH VERSIONS
-These functions were added in glibc 2.1.
+.\" Bug raised: https://www.sourceware.org/bugzilla/show_bug.cgi?id=6801
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR fma (),
.BR fmaf (),
.BR fmal ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-C99, POSIX.1-2001, POSIX.1-2008.
+C11, POSIX.1-2008.
+.SH HISTORY
+glibc 2.1.
+C99, POSIX.1-2001.
.SH SEE ALSO
.BR remainder (3),
.BR remquo (3)
diff --git a/man3/fmax.3 b/man3/fmax.3
index ff39d852b..11334328a 100644
--- a/man3/fmax.3
+++ b/man3/fmax.3
@@ -5,7 +5,7 @@
.\"
.\" SPDX-License-Identifier: GPL-1.0-or-later
.\"
-.TH fmax 3 2022-12-15 "Linux man-pages 6.03"
+.TH fmax 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
fmax, fmaxf, fmaxl \- determine maximum of two floating-point numbers
.SH LIBRARY
@@ -47,29 +47,28 @@ If one argument is a NaN, the other argument is returned.
If both arguments are NaN, a NaN is returned.
.SH ERRORS
No errors occur.
-.SH VERSIONS
-These functions were added in glibc 2.1.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR fmax (),
.BR fmaxf (),
.BR fmaxl ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-C99, POSIX.1-2001, POSIX.1-2008.
+C11, POSIX.1-2008.
+.SH HISTORY
+glibc 2.1.
+C99, POSIX.1-2001.
.SH SEE ALSO
.BR fdim (3),
.BR fmin (3)
diff --git a/man3/fmemopen.3 b/man3/fmemopen.3
index 5f5020d24..081a33f03 100644
--- a/man3/fmemopen.3
+++ b/man3/fmemopen.3
@@ -3,7 +3,7 @@
.\"
.\" SPDX-License-Identifier: GPL-1.0-or-later
.\"
-.TH fmemopen 3 2023-02-05 "Linux man-pages 6.03"
+.TH fmemopen 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
fmemopen \- open memory as stream
.SH LIBRARY
@@ -147,30 +147,26 @@ pointer.
Otherwise, NULL is returned and
.I errno
is set to indicate the error.
-.SH VERSIONS
-.BR fmemopen ()
-was already available in glibc 1.0.x.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR fmemopen (),
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
POSIX.1-2008.
-This function is not specified in POSIX.1-2001,
-and is not widely available on other systems.
+.SH HISTORY
+glibc 1.0.x.
+POSIX.1-2008.
.PP
POSIX.1-2008 specifies that \[aq]b\[aq] in
.I mode
@@ -179,12 +175,6 @@ However, Technical Corrigendum 1
.\" http://austingroupbugs.net/view.php?id=396
adjusts the standard to allow implementation-specific treatment for this case,
thus permitting the glibc treatment of \[aq]b\[aq].
-.SH NOTES
-There is no file descriptor associated with the file stream
-returned by this function
-(i.e.,
-.BR fileno (3)
-will return an error if called on the returned stream).
.PP
With glibc 2.22, binary mode (see below) was removed,
many longstanding bugs in the implementation of
@@ -220,6 +210,12 @@ by
Binary mode was removed in glibc 2.22; a \[aq]b\[aq] specified in
.I mode
has no effect.
+.SH NOTES
+There is no file descriptor associated with the file stream
+returned by this function
+(i.e.,
+.BR fileno (3)
+will return an error if called on the returned stream).
.SH BUGS
Before glibc 2.22, if
.I size
@@ -309,7 +305,7 @@ size=11; ptr=1 529 1849
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-
+\&
int
main(int argc, char *argv[])
{
@@ -317,35 +313,35 @@ main(int argc, char *argv[])
int v, s;
size_t size;
char *ptr;
-
+\&
if (argc != 2) {
fprintf(stderr, "Usage: %s \[aq]<num>...\[aq]\en", argv[0]);
exit(EXIT_FAILURE);
}
-
+\&
in = fmemopen(argv[1], strlen(argv[1]), "r");
if (in == NULL)
err(EXIT_FAILURE, "fmemopen");
-
+\&
out = open_memstream(&ptr, &size);
if (out == NULL)
err(EXIT_FAILURE, "open_memstream");
-
+\&
for (;;) {
s = fscanf(in, "%d", &v);
if (s <= 0)
break;
-
+\&
s = fprintf(out, "%d ", v * v);
if (s == \-1)
err(EXIT_FAILURE, "fprintf");
}
-
+\&
fclose(in);
fclose(out);
-
+\&
printf("size=%zu; ptr=%s\en", size, ptr);
-
+\&
free(ptr);
exit(EXIT_SUCCESS);
}
diff --git a/man3/fmin.3 b/man3/fmin.3
index 75a30565e..c6fbb9dfc 100644
--- a/man3/fmin.3
+++ b/man3/fmin.3
@@ -5,7 +5,7 @@
.\"
.\" SPDX-License-Identifier: GPL-1.0-or-later
.\"
-.TH fmin 3 2022-12-15 "Linux man-pages 6.03"
+.TH fmin 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
fmin, fminf, fminl \- determine minimum of two floating-point numbers
.SH LIBRARY
@@ -47,29 +47,28 @@ If one argument is a NaN, the other argument is returned.
If both arguments are NaN, a NaN is returned.
.SH ERRORS
No errors occur.
-.SH VERSIONS
-These functions were added in glibc 2.1.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR fmin (),
.BR fminf (),
.BR fminl ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-C99, POSIX.1-2001, POSIX.1-2008.
+C11, POSIX.1-2008.
+.SH HISTORY
+glibc 2.1.
+C99, POSIX.1-2001.
.SH SEE ALSO
.BR fdim (3),
.BR fmax (3)
diff --git a/man3/fmod.3 b/man3/fmod.3
index bc012b4ca..e52451402 100644
--- a/man3/fmod.3
+++ b/man3/fmod.3
@@ -13,7 +13,7 @@
.\" Modified 2002-07-27 by Walter Harms
.\" (walter.harms@informatik.uni-oldenburg.de)
.\"
-.TH fmod 3 2023-02-05 "Linux man-pages 6.03"
+.TH fmod 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
fmod, fmodf, fmodl \- floating-point remainder function
.SH LIBRARY
@@ -120,32 +120,32 @@ is raised.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR fmod (),
.BR fmodf (),
.BR fmodl ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-C99, POSIX.1-2001, POSIX.1-2008.
+C11, POSIX.1-2008.
+.SH HISTORY
+C99, POSIX.1-2001.
.PP
The variant returning
.I double
also conforms to
-SVr4, 4.3BSD.
+SVr4, 4.3BSD, C89.
.SH BUGS
Before glibc 2.10, the glibc implementation did not set
-.\" http://sources.redhat.com/bugzilla/show_bug.cgi?id=6784
+.\" https://www.sourceware.org/bugzilla/show_bug.cgi?id=6784
.I errno
to
.B EDOM
diff --git a/man3/fmtmsg.3 b/man3/fmtmsg.3
index e497c98d3..1ed982487 100644
--- a/man3/fmtmsg.3
+++ b/man3/fmtmsg.3
@@ -9,7 +9,7 @@
.\" The function is quite complex and deserves an example
.\"
.\" Polished, aeb, 2003-11-01
-.TH fmtmsg 3 2023-02-05 "Linux man-pages 6.03"
+.TH fmtmsg 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
fmtmsg \- print formatted error messages
.SH LIBRARY
@@ -218,28 +218,25 @@ any of the predefined classes.
The printstring
is the string printed when a message of this class is processed by
.BR fmtmsg ().
-.SH VERSIONS
-.BR fmtmsg ()
-is provided since glibc 2.1.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lb lb lbx
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR fmtmsg ()
T} Thread safety T{
+.na
+.nh
glibc\ >=\ 2.16: MT-Safe;
glibc\ <\ 2.16: MT-Unsafe
T}
.TE
-.hy
-.ad
.sp 1
.PP
Before glibc 2.16, the
@@ -253,22 +250,25 @@ the
.BR fmtmsg ()
function uses a lock to protect the static variable, so it is thread-safe.
.SH STANDARDS
-The functions
+.TP
.BR fmtmsg ()
-and
-.BR addseverity (3),
-and environment variables
+.TQ
.B MSGVERB
-and
-.B SEV_LEVEL
-come from System V.
-.PP
-The function
+POSIX.1-2008.
+.SH HISTORY
+.TP
.BR fmtmsg ()
-and the environment variable
+System V.
+POSIX.1-2001 and POSIX.1-2008.
+glibc 2.1.
+.TP
.B MSGVERB
-are described in POSIX.1-2001 and POSIX.1-2008.
-.SH NOTES
+System V.
+POSIX.1-2001 and POSIX.1-2008.
+.TP
+.B SEV_LEVEL
+System V.
+.PP
System V and UnixWare man pages tell us that these functions
have been replaced by "pfmt() and addsev()" or by "pfmt(),
vpfmt(), lfmt(), and vlfmt()", and will be removed later.
@@ -278,13 +278,13 @@ vpfmt(), lfmt(), and vlfmt()", and will be removed later.
#include <fmtmsg.h>
#include <stdio.h>
#include <stdlib.h>
-
+\&
int
main(void)
{
long class = MM_PRINT | MM_SOFT | MM_OPSYS | MM_RECOVER;
int err;
-
+\&
err = fmtmsg(class, "util\-linux:mount", MM_ERROR,
"unknown mount option", "See mount(8).",
"util\-linux:mount:017");
diff --git a/man3/fnmatch.3 b/man3/fnmatch.3
index 80c708f8e..3de811780 100644
--- a/man3/fnmatch.3
+++ b/man3/fnmatch.3
@@ -6,7 +6,7 @@
.\" Modified Sat Jul 24 19:35:54 1993 by Rik Faith (faith@cs.unc.edu)
.\" Modified Mon Oct 16 00:16:29 2000 following Joseph S. Myers
.\"
-.TH fnmatch 3 2022-12-15 "Linux man-pages 6.03"
+.TH fnmatch 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
fnmatch \- match filename or pathname
.SH LIBRARY
@@ -107,25 +107,33 @@ if there is no match or another nonzero value if there is an error.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR fnmatch ()
T} Thread safety MT-Safe env locale
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, POSIX.2.
-The
-.BR FNM_FILE_NAME ", " FNM_LEADING_DIR ", and " FNM_CASEFOLD
-flags are GNU extensions.
+.TP
+.BR fnmatch ()
+POSIX.1-2008.
+.TP
+.B FNM_FILE_NAME
+.TQ
+.B FNM_LEADING_DIR
+.TQ
+.B FNM_CASEFOLD
+GNU.
+.SH HISTORY
+.TP
+.BR fnmatch ()
+POSIX.1-2001, POSIX.2.
.SH SEE ALSO
.BR sh (1),
.BR glob (3),
diff --git a/man3/fopen.3 b/man3/fopen.3
index a66bfe0f1..e96303c96 100644
--- a/man3/fopen.3
+++ b/man3/fopen.3
@@ -14,7 +14,7 @@
.\" Modified, aeb, 960421, 970806
.\" Modified, joey, aeb, 2002-01-03
.\"
-.TH fopen 3 2023-02-05 "Linux man-pages 6.03"
+.TH fopen 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
fopen, fdopen, freopen \- stream open functions
.SH LIBRARY
@@ -272,29 +272,38 @@ and
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR fopen (),
.BR fdopen (),
.BR freopen ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-.BR fopen (),
-.BR freopen ():
-POSIX.1-2001, POSIX.1-2008, C99.
-.PP
-.BR fdopen ():
-POSIX.1-2001, POSIX.1-2008.
+.TP
+.BR fopen ()
+.TQ
+.BR freopen ()
+C11, POSIX.1-2008.
+.TP
+.BR fdopen ()
+POSIX.1-2008.
+.SH HISTORY
+.TP
+.BR fopen ()
+.TQ
+.BR freopen ()
+POSIX.1-2001, C89.
+.TP
+.BR fdopen ()
+POSIX.1-2001.
.SH NOTES
.SS glibc notes
The GNU C library allows the following extensions for the string specified in
diff --git a/man3/fopencookie.3 b/man3/fopencookie.3
index e5b2936b5..61f77bc3c 100644
--- a/man3/fopencookie.3
+++ b/man3/fopencookie.3
@@ -4,7 +4,7 @@
.\"
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
-.TH fopencookie 3 2023-02-05 "Linux man-pages 6.03"
+.TH fopencookie 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
fopencookie \- opening a custom stream
.SH LIBRARY
@@ -13,6 +13,7 @@ Standard C library
.SH SYNOPSIS
.nf
.BR "#define _GNU_SOURCE" " /* See feature_test_macros(7) */"
+.B #define _FILE_OFFSET_BITS 64
.B #include <stdio.h>
.PP
.BI "FILE *fopencookie(void *restrict " cookie ", const char *restrict " mode ,
@@ -169,7 +170,7 @@ When called, it receives three arguments:
.IP
.in +4n
.EX
-int seek(void *cookie, off64_t *offset, int whence);
+int seek(void *cookie, off_t *offset, int whence);
.EE
.in
.IP
@@ -245,22 +246,20 @@ On error, NULL is returned.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR fopencookie ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-This function is a nonstandard GNU extension.
+GNU.
.SH EXAMPLES
The program below implements a custom stream whose functionality
is similar (but not identical) to that available via
@@ -295,24 +294,24 @@ closing a stream that has already been closed).
#include <string.h>
#include <sys/types.h>
#include <unistd.h>
-
+\&
#define INIT_BUF_SIZE 4
-
+\&
struct memfile_cookie {
char *buf; /* Dynamically sized buffer for data */
size_t allocated; /* Size of buf */
size_t endpos; /* Number of characters in buf */
off_t offset; /* Current file offset in buf */
};
-
+\&
ssize_t
memfile_write(void *c, const char *buf, size_t size)
{
char *new_buff;
struct memfile_cookie *cookie = c;
-
+\&
/* Buffer too small? Keep doubling size until big enough. */
-
+\&
while (size + cookie\->offset > cookie\->allocated) {
new_buff = realloc(cookie\->buf, cookie\->allocated * 2);
if (new_buff == NULL)
@@ -320,42 +319,42 @@ memfile_write(void *c, const char *buf, size_t size)
cookie\->allocated *= 2;
cookie\->buf = new_buff;
}
-
+\&
memcpy(cookie\->buf + cookie\->offset, buf, size);
-
+\&
cookie\->offset += size;
if (cookie\->offset > cookie\->endpos)
cookie\->endpos = cookie\->offset;
-
+\&
return size;
}
-
+\&
ssize_t
memfile_read(void *c, char *buf, size_t size)
{
ssize_t xbytes;
struct memfile_cookie *cookie = c;
-
+\&
/* Fetch minimum of bytes requested and bytes available. */
-
+\&
xbytes = size;
if (cookie\->offset + size > cookie\->endpos)
xbytes = cookie\->endpos \- cookie\->offset;
if (xbytes < 0) /* offset may be past endpos */
xbytes = 0;
-
+\&
memcpy(buf, cookie\->buf + cookie\->offset, xbytes);
-
+\&
cookie\->offset += xbytes;
return xbytes;
}
-
+\&
int
-memfile_seek(void *c, off64_t *offset, int whence)
+memfile_seek(void *c, off_t *offset, int whence)
{
- off64_t new_offset;
+ off_t new_offset;
struct memfile_cookie *cookie = c;
-
+\&
if (whence == SEEK_SET)
new_offset = *offset;
else if (whence == SEEK_END)
@@ -364,27 +363,27 @@ memfile_seek(void *c, off64_t *offset, int whence)
new_offset = cookie\->offset + *offset;
else
return \-1;
-
+\&
if (new_offset < 0)
return \-1;
-
+\&
cookie\->offset = new_offset;
*offset = new_offset;
return 0;
}
-
+\&
int
memfile_close(void *c)
{
struct memfile_cookie *cookie = c;
-
+\&
free(cookie\->buf);
cookie\->allocated = 0;
cookie\->buf = NULL;
-
+\&
return 0;
}
-
+\&
int
main(int argc, char *argv[])
{
@@ -398,35 +397,35 @@ main(int argc, char *argv[])
struct memfile_cookie mycookie;
size_t nread;
char buf[1000];
-
+\&
/* Set up the cookie before calling fopencookie(). */
-
+\&
mycookie.buf = malloc(INIT_BUF_SIZE);
if (mycookie.buf == NULL) {
perror("malloc");
exit(EXIT_FAILURE);
}
-
+\&
mycookie.allocated = INIT_BUF_SIZE;
mycookie.offset = 0;
mycookie.endpos = 0;
-
+\&
stream = fopencookie(&mycookie, "w+", memfile_func);
if (stream == NULL) {
perror("fopencookie");
exit(EXIT_FAILURE);
}
-
+\&
/* Write command\-line arguments to our file. */
-
+\&
for (size_t j = 1; j < argc; j++)
if (fputs(argv[j], stream) == EOF) {
perror("fputs");
exit(EXIT_FAILURE);
}
-
+\&
/* Read two bytes out of every five, until EOF. */
-
+\&
for (long p = 0; ; p += 5) {
if (fseek(stream, p, SEEK_SET) == \-1) {
perror("fseek");
@@ -441,16 +440,26 @@ main(int argc, char *argv[])
printf("Reached end of file\en");
break;
}
-
+\&
printf("/%.*s/\en", (int) nread, buf);
}
-
+\&
free(mycookie.buf);
-
+\&
exit(EXIT_SUCCESS);
}
.EE
.\" SRC END
+.SH NOTES
+.B _FILE_OFFSET_BITS
+should be defined to be 64 in code that uses non-null
+.I seek
+or that takes the address of
+.BR fopencookie ,
+if the code is intended to be portable
+to traditional 32-bit x86 and ARM platforms where
+.BR off_t 's
+width defaults to 32 bits.
.SH SEE ALSO
.BR fclose (3),
.BR fmemopen (3),
diff --git a/man3/fpathconf.3 b/man3/fpathconf.3
index a80cc49d5..619519721 100644
--- a/man3/fpathconf.3
+++ b/man3/fpathconf.3
@@ -20,7 +20,7 @@
.\" _PC_SYMLINK_MAX,
.\" _PC_2_SYMLINKS
.\"
-.TH fpathconf 3 2023-02-05 "Linux man-pages 6.03"
+.TH fpathconf 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
fpathconf, pathconf \- get configuration values for files
.SH LIBRARY
@@ -240,23 +240,23 @@ is not in fact a directory.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR fpathconf (),
.BR pathconf ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008.
+POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001.
.SH NOTES
Files with name lengths longer than the value returned for
.I name
diff --git a/man3/fpclassify.3 b/man3/fpclassify.3
index 3ae17dda6..cfb16be18 100644
--- a/man3/fpclassify.3
+++ b/man3/fpclassify.3
@@ -6,7 +6,7 @@
.\" This was done with the help of the glibc manual.
.\"
.\" 2004-10-31, aeb, corrected
-.TH fpclassify 3 2023-02-05 "Linux man-pages 6.03"
+.TH fpclassify 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
fpclassify, isfinite, isnormal, isnan, isinf \- floating-point
classification macros
@@ -107,14 +107,14 @@ is negative infinity.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR fpclassify (),
.BR isfinite (),
.BR isnormal (),
@@ -122,23 +122,23 @@ T{
.BR isinf ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, C99.
+C11, POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001, C99.
.PP
-For
-.BR isinf (),
-the standards merely say that the return value is nonzero
-if and only if the argument has an infinite value.
-.SH NOTES
In glibc 2.01 and earlier,
.BR isinf ()
returns a nonzero value (actually: 1) if
.I x
is positive infinity or negative infinity.
(This is all that C99 requires.)
+.SH NOTES
+For
+.BR isinf (),
+the standards merely say that the return value is nonzero
+if and only if the argument has an infinite value.
.SH SEE ALSO
.BR finite (3),
.BR INFINITY (3),
diff --git a/man3/fpurge.3 b/man3/fpurge.3
index 0f8ecf96b..545af2073 100644
--- a/man3/fpurge.3
+++ b/man3/fpurge.3
@@ -3,7 +3,7 @@
.\"
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
-.TH fpurge 3 2022-12-15 "Linux man-pages 6.03"
+.TH fpurge 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
fpurge, __fpurge \- purge a stream
.SH LIBRARY
@@ -53,28 +53,28 @@ is not an open stream.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR __fpurge ()
T} Thread safety MT-Safe race:stream
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-These functions are nonstandard and not portable.
-The function
+None.
+.SH HISTORY
+.TP
.BR fpurge ()
-was introduced in 4.4BSD and is not available under Linux.
-The function
+4.4BSD.
+Not available under Linux.
+.TP
.BR __fpurge ()
-was introduced in Solaris, and is present in glibc 2.1.95 and later.
+Solaris, glibc 2.1.95.
.SH NOTES
Usually it is a mistake to want to discard input buffers.
.SH SEE ALSO
diff --git a/man3/fputwc.3 b/man3/fputwc.3
index 38f1c4c7f..ce5ad42f1 100644
--- a/man3/fputwc.3
+++ b/man3/fputwc.3
@@ -9,7 +9,7 @@
.\" OpenGroup's Single UNIX specification http://www.UNIX-systems.org/online.html
.\" ISO/IEC 9899:1999
.\"
-.TH fputwc 3 2022-12-15 "Linux man-pages 6.03"
+.TH fputwc 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
fputwc, putwc \- write a wide character to a FILE stream
.SH LIBRARY
@@ -67,23 +67,23 @@ Conversion of \fIwc\fP to the stream's encoding fails.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR fputwc (),
.BR putwc ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, C99.
+C11, POSIX.1-2008.
+.SH HISTORY
+C99, POSIX.1-2001.
.SH NOTES
The behavior of
.BR fputwc ()
diff --git a/man3/fputws.3 b/man3/fputws.3
index ee8ec8324..dd549327f 100644
--- a/man3/fputws.3
+++ b/man3/fputws.3
@@ -9,7 +9,7 @@
.\" OpenGroup's Single UNIX specification http://www.UNIX-systems.org/online.html
.\" ISO/IEC 9899:1999
.\"
-.TH fputws 3 2023-02-05 "Linux man-pages 6.03"
+.TH fputws 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
fputws \- write a wide-character string to a FILE stream
.SH LIBRARY
@@ -43,22 +43,22 @@ successful, or \-1 to indicate an error.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR fputws ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, C99.
+C11, POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001, C99.
.SH NOTES
The behavior of
.BR fputws ()
diff --git a/man3/fread.3 b/man3/fread.3
index fbfd4f60f..2874d4332 100644
--- a/man3/fread.3
+++ b/man3/fread.3
@@ -16,7 +16,7 @@
.\" Modified Thu Apr 20 20:43:53 1995 by Jim Van Zandt <jrv@vanzandt.mv.com>
.\" Modified Fri May 17 10:21:51 1996 by Martin Schulze <joey@infodrom.north.de>
.\"
-.TH fread 3 2022-12-29 "Linux man-pages 6.03"
+.TH fread 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
fread, fwrite \- binary stream input/output
.SH LIBRARY
@@ -82,23 +82,23 @@ to determine which occurred.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR fread (),
.BR fwrite ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, C99.
+C11, POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001, C89.
.SH EXAMPLES
The program below demonstrates the use of
.BR fread ()
@@ -118,41 +118,41 @@ Class: 0x02
.EX
#include <stdio.h>
#include <stdlib.h>
-
+\&
#define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]))
-
+\&
int
main(void)
{
FILE *fp;
size_t ret;
unsigned char buffer[4];
-
+\&
fp = fopen("/bin/sh", "rb");
if (!fp) {
perror("fopen");
return EXIT_FAILURE;
}
-
+\&
ret = fread(buffer, sizeof(*buffer), ARRAY_SIZE(buffer), fp);
if (ret != ARRAY_SIZE(buffer)) {
fprintf(stderr, "fread() failed: %zu\en", ret);
exit(EXIT_FAILURE);
}
-
+\&
printf("ELF magic: %#04x%02x%02x%02x\en", buffer[0], buffer[1],
buffer[2], buffer[3]);
-
+\&
ret = fread(buffer, 1, 1, fp);
if (ret != 1) {
fprintf(stderr, "fread() failed: %zu\en", ret);
exit(EXIT_FAILURE);
}
-
+\&
printf("Class: %#04x\en", buffer[0]);
-
+\&
fclose(fp);
-
+\&
exit(EXIT_SUCCESS);
}
.EE
diff --git a/man3/frexp.3 b/man3/frexp.3
index e41b09777..c3c838a78 100644
--- a/man3/frexp.3
+++ b/man3/frexp.3
@@ -11,7 +11,7 @@
.\" Modified 2002-07-27 by Walter Harms
.\" (walter.harms@informatik.uni-oldenburg.de)
.\"
-.TH frexp 3 2023-02-05 "Linux man-pages 6.03"
+.TH frexp 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
frexp, frexpf, frexpl \- convert floating-point number to fractional
and integral components
@@ -80,29 +80,29 @@ No errors occur.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR frexp (),
.BR frexpf (),
.BR frexpl ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-C99, POSIX.1-2001, POSIX.1-2008.
+C11, POSIX.1-2008.
+.SH HISTORY
+C99, POSIX.1-2001.
.PP
The variant returning
.I double
also conforms to
-SVr4, 4.3BSD.
+SVr4, 4.3BSD, C89.
.SH EXAMPLES
The program below produces results such as the following:
.PP
@@ -122,16 +122,16 @@ frexp(\-4, &e) = \-0.5: \-0.5 * 2\[ha]3 = \-4
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
-
+\&
int
main(int argc, char *argv[])
{
double x, r;
int exp;
-
+\&
x = strtod(argv[1], NULL);
r = frexp(x, &exp);
-
+\&
printf("frexp(%g, &e) = %g: %g * %d\[ha]%d = %g\en",
x, r, r, FLT_RADIX, exp, x);
exit(EXIT_SUCCESS);
diff --git a/man3/fseek.3 b/man3/fseek.3
index fda61d292..4b7a9af56 100644
--- a/man3/fseek.3
+++ b/man3/fseek.3
@@ -12,7 +12,7 @@
.\"
.\" Converted for Linux, Mon Nov 29 15:22:01 1993, faith@cs.unc.edu
.\"
-.TH fseek 3 2022-12-29 "Linux man-pages 6.03"
+.TH fseek 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
fgetpos, fseek, fsetpos, ftell, rewind \- reposition a stream
.SH LIBRARY
@@ -153,14 +153,14 @@ and
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR fseek (),
.BR ftell (),
.BR rewind (),
@@ -168,11 +168,11 @@ T{
.BR fsetpos ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, C99.
+C11, POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001, C89.
.SH SEE ALSO
.BR lseek (2),
.BR fseeko (3)
diff --git a/man3/fseeko.3 b/man3/fseeko.3
index bc9428773..3625fe2d6 100644
--- a/man3/fseeko.3
+++ b/man3/fseeko.3
@@ -3,7 +3,7 @@
.\"
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
-.TH fseeko 3 2022-12-15 "Linux man-pages 6.03"
+.TH fseeko 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
fseeko, ftello \- seek to or report file position
.SH LIBRARY
@@ -73,28 +73,27 @@ is set to indicate the error.
.SH ERRORS
See the ERRORS in
.BR fseek (3).
-.SH VERSIONS
-These functions are available since glibc 2.1.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR fseeko (),
.BR ftello ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, SUSv2.
+POSIX.1-2008.
+.SH HISTORY
+glibc 2.1.
+POSIX.1-2001, SUSv2.
.SH NOTES
The declarations of these functions can also be obtained by defining
the obsolete
diff --git a/man3/ftime.3 b/man3/ftime.3
index df4bcf5fa..cfa6ad93d 100644
--- a/man3/ftime.3
+++ b/man3/ftime.3
@@ -9,7 +9,7 @@
.\" Modified Sun Oct 18 17:31:43 1998 by Andries Brouwer (aeb@cwi.nl)
.\" 2008-06-23, mtk, minor rewrites, added some details
.\"
-.TH ftime 3 2022-12-15 "Linux man-pages 6.03"
+.TH ftime 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
ftime \- return date and time
.SH LIBRARY
@@ -60,36 +60,27 @@ fields are unspecified; avoid relying on them.
.SH RETURN VALUE
This function always returns 0.
(POSIX.1-2001 specifies, and some systems document, a \-1 error return.)
-.SH VERSIONS
-Starting with glibc 2.33, the
-.BR ftime ()
-function and the
-.I <sys/timeb.h>
-header have been removed.
-To support old binaries,
-glibc continues to provide a compatibility symbol for
-applications linked against glibc 2.32 and earlier.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR ftime ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
+None.
+.SH HISTORY
+Removed in glibc 2.33.
4.2BSD, POSIX.1-2001.
-POSIX.1-2008 removes the specification of
-.BR ftime ().
+Removed in POSIX.1-2008.
.PP
This function is obsolete.
Don't use it.
diff --git a/man3/ftok.3 b/man3/ftok.3
index dc51d65bb..3b7d8ecaa 100644
--- a/man3/ftok.3
+++ b/man3/ftok.3
@@ -7,7 +7,7 @@
.\" Changed data type of proj_id; minor fixes
.\" aeb: further fixes; added notes.
.\"
-.TH ftok 3 2022-12-15 "Linux man-pages 6.03"
+.TH ftok 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
ftok \- convert a pathname and a project identifier to a System V IPC key
.SH LIBRARY
@@ -53,22 +53,22 @@ system call.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR ftok ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008.
+POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001.
.SH NOTES
On some ancient systems, the prototype was:
.PP
diff --git a/man3/fts.3 b/man3/fts.3
index 1d1fe8528..2a2745c0b 100644
--- a/man3/fts.3
+++ b/man3/fts.3
@@ -10,7 +10,7 @@
.\"
.\" 2007-12-08, mtk, Converted from mdoc to man macros
.\"
-.TH fts 3 2022-12-15 "Linux man-pages 6.03"
+.TH fts 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
fts, fts_open, fts_read, fts_children, fts_set, fts_close \- \
traverse a file hierarchy
@@ -23,8 +23,8 @@ Standard C library
.B #include <sys/stat.h>
.B #include <fts.h>
.PP
-.BI "FTS *fts_open(char * const *" path_argv ", int " options ,
-.BI " int (*" compar ")(const FTSENT **, const FTSENT **));"
+.BI "FTS *fts_open(char *const *" path_argv ", int " options ,
+.BI " int (*_Nullable " compar ")(const FTSENT **, const FTSENT **));"
.PP
.BI "FTSENT *fts_read(FTS *" ftsp );
.PP
@@ -722,6 +722,17 @@ for any of the errors specified for
and
.BR malloc (3).
.PP
+In addition,
+.BR fts_open ()
+may fail and set
+.I errno
+as follows:
+.TP
+.B ENOENT
+Any element of
+.I path_argv
+was an empty string.
+.PP
The function
.BR fts_close ()
may fail and set
@@ -759,32 +770,33 @@ as follows:
or
.I instr
was invalid.
-.SH VERSIONS
-These functions are available in Linux since glibc2.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR fts_open (),
.BR fts_set (),
.BR fts_close ()
T} Thread safety MT-Safe
T{
+.na
+.nh
.BR fts_read (),
.BR fts_children ()
T} Thread safety MT-Unsafe
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
+None.
+.SH HISTORY
+glibc 2.
4.4BSD.
.SH BUGS
Before glibc 2.23,
diff --git a/man3/ftw.3 b/man3/ftw.3
index a8a395e45..b23113576 100644
--- a/man3/ftw.3
+++ b/man3/ftw.3
@@ -15,7 +15,7 @@
.\" 2006-05-24, Michael Kerrisk <mtk.manpages@gmail.com>
.\" Added an example program.
.\"
-.TH ftw 3 2023-02-05 "Linux man-pages 6.03"
+.TH ftw 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
ftw, nftw \- file tree walk
.SH LIBRARY
@@ -350,49 +350,31 @@ then the only nonzero value that should be used by \fIfn\fP()
to terminate the tree walk is \fBFTW_STOP\fP,
and that value is returned as the result of
.BR nftw ().
-.SH VERSIONS
-.BR nftw ()
-is available since glibc 2.1.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR nftw ()
T} Thread safety MT-Safe cwd
T{
+.na
+.nh
.BR ftw ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
-.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, SVr4, SUSv1.
-POSIX.1-2008 marks
-.BR ftw ()
-as obsolete.
-.SH NOTES
-POSIX.1-2008 notes that the results are unspecified if
-.I fn
-does not preserve the current working directory.
-.PP
-The function
-.BR nftw ()
-and the use of \fBFTW_SL\fP with
-.BR ftw ()
-were introduced in SUSv1.
-.PP
+.SH VERSIONS
In some implementations (e.g., glibc),
.BR ftw ()
-will never use \fBFTW_SL\fP, on other systems \fBFTW_SL\fP occurs only
-for symbolic links that do not point to an existing file,
+will never use \fBFTW_SL\fP; on other systems \fBFTW_SL\fP occurs only
+for symbolic links that do not point to an existing file;
and again on other systems
.BR ftw ()
will use \fBFTW_SL\fP for each symbolic link.
@@ -406,6 +388,24 @@ is passed in
.IR typeflag .
For predictable results, use
.BR nftw ().
+.SH STANDARDS
+POSIX.1-2008.
+.SH HISTORY
+.TP
+.BR ftw ()
+POSIX.1-2001, SVr4, SUSv1.
+POSIX.1-2008 marks it as obsolete.
+.TP
+.BR nftw ()
+glibc 2.1.
+POSIX.1-2001, SUSv1.
+.TP
+.B FTW_SL
+POSIX.1-2001, SUSv1.
+.SH NOTES
+POSIX.1-2008 notes that the results are unspecified if
+.I fn
+does not preserve the current working directory.
.SH BUGS
According to POSIX.1-2008, when the
.I typeflag
@@ -453,7 +453,7 @@ argument when calling
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-
+\&
static int
display_info(const char *fpath, const struct stat *sb,
int tflag, struct FTW *ftwbuf)
@@ -464,35 +464,35 @@ display_info(const char *fpath, const struct stat *sb,
(tflag == FTW_NS) ? "ns" : (tflag == FTW_SL) ? "sl" :
(tflag == FTW_SLN) ? "sln" : "???",
ftwbuf\->level);
-
+\&
if (tflag == FTW_NS)
printf("\-\-\-\-\-\-\-");
else
printf("%7jd", (intmax_t) sb\->st_size);
-
+\&
printf(" %\-40s %d %s\en",
fpath, ftwbuf\->base, fpath + ftwbuf\->base);
-
+\&
return 0; /* To tell nftw() to continue */
}
-
+\&
int
main(int argc, char *argv[])
{
int flags = 0;
-
+\&
if (argc > 2 && strchr(argv[2], \[aq]d\[aq]) != NULL)
flags |= FTW_DEPTH;
if (argc > 2 && strchr(argv[2], \[aq]p\[aq]) != NULL)
flags |= FTW_PHYS;
-
+\&
if (nftw((argc < 2) ? "." : argv[1], display_info, 20, flags)
== \-1)
{
perror("nftw");
exit(EXIT_FAILURE);
}
-
+\&
exit(EXIT_SUCCESS);
}
.EE
diff --git a/man3/futimes.3 b/man3/futimes.3
index 55c63fb6d..0f57891c3 100644
--- a/man3/futimes.3
+++ b/man3/futimes.3
@@ -3,7 +3,7 @@
.\"
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
-.TH futimes 3 2023-02-05 "Linux man-pages 6.03"
+.TH futimes 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
futimes, lutimes \- change file timestamps
.SH LIBRARY
@@ -71,34 +71,36 @@ The following additional error may occur for
.TP
.B ENOSYS
The kernel does not support this call; Linux 2.6.22 or later is required.
-.SH VERSIONS
-.BR futimes ()
-is available since glibc 2.3.
-.BR lutimes ()
-is available since glibc 2.6, and is implemented using the
-.BR utimensat (2)
-system call, which is supported since Linux 2.6.22.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR futimes (),
.BR lutimes ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-These functions are not specified in any standard.
-Other than Linux, they are available only on the BSDs.
+Linux, BSD.
+.SH HISTORY
+.TP
+.BR futimes ()
+glibc 2.3.
+.TP
+.BR lutimes ()
+glibc 2.6.
+.SH NOTES
+.BR lutimes ()
+is implemented using the
+.BR utimensat (2)
+system call.
.SH SEE ALSO
.BR utime (2),
.BR utimensat (2),
diff --git a/man3/fwide.3 b/man3/fwide.3
index eda3bea56..6b33de0ee 100644
--- a/man3/fwide.3
+++ b/man3/fwide.3
@@ -8,7 +8,7 @@
.\" OpenGroup's Single UNIX specification http://www.UNIX-systems.org/online.html
.\" ISO/IEC 9899:1999
.\"
-.TH fwide 3 2023-02-05 "Linux man-pages 6.03"
+.TH fwide 3 2023-03-30 "Linux man-pages 6.05.01"
.SH NAME
fwide \- set and determine the orientation of a FILE stream
.SH LIBRARY
@@ -67,7 +67,9 @@ A positive return value means wide-character oriented.
A negative return value means byte oriented.
A return value of zero means undecided.
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, C99.
+C11, POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001, C99.
.SH NOTES
Wide-character output to a byte oriented stream can be performed through the
.BR fprintf (3)
diff --git a/man3/gamma.3 b/man3/gamma.3
index 1aef0c10a..2dc9075e4 100644
--- a/man3/gamma.3
+++ b/man3/gamma.3
@@ -5,7 +5,7 @@
.\"
.\" Modified 2003-11-18, aeb: historical remarks
.\"
-.TH gamma 3 2023-02-05 "Linux man-pages 6.03"
+.TH gamma 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
gamma, gammaf, gammal \- (logarithm of the) gamma function
.SH LIBRARY
@@ -67,28 +67,28 @@ See
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR gamma (),
.BR gammaf (),
.BR gammal ()
T} Thread safety MT-Unsafe race:signgam
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
+None.
+.SH HISTORY
+SVID 2.
+.PP
Because of historical variations in behavior across systems,
this function is not specified in any recent standard.
-It was documented in SVID 2.
-.SH NOTES
-.SS History
+.PP
4.2BSD had a
.BR gamma ()
that computed
diff --git a/man3/gcvt.3 b/man3/gcvt.3
index b8b174a50..a43ade7c1 100644
--- a/man3/gcvt.3
+++ b/man3/gcvt.3
@@ -8,7 +8,7 @@
.\" Lewine's _POSIX Programmer's Guide_ (O'Reilly & Associates, 1991)
.\" 386BSD man pages
.\" Modified Sat Jul 24 19:32:25 1993 by Rik Faith (faith@cs.unc.edu)
-.TH gcvt 3 2023-02-05 "Linux man-pages 6.03"
+.TH gcvt 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
gcvt \- convert a floating-point number to a string
.SH LIBRARY
@@ -55,24 +55,23 @@ function returns
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR gcvt ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
+None.
+.SH HISTORY
Marked as LEGACY in POSIX.1-2001.
-POSIX.1-2008 removes the specification of
-.BR gcvt (),
+POSIX.1-2008 removed it,
recommending the use of
.BR sprintf (3)
instead (though
diff --git a/man3/get_nprocs.3 b/man3/get_nprocs.3
index 4aab90802..583054d1f 100644
--- a/man3/get_nprocs.3
+++ b/man3/get_nprocs.3
@@ -4,7 +4,7 @@
.\"
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
-.TH get_nprocs 3 2022-12-15 "Linux man-pages 6.03"
+.TH get_nprocs 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
get_nprocs, get_nprocs_conf \- get number of processors
.SH LIBRARY
@@ -33,23 +33,21 @@ As given in DESCRIPTION.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR get_nprocs (),
.BR get_nprocs_conf ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-These functions are GNU extensions.
+GNU.
.SH NOTES
The current
.\" glibc 2.15
@@ -81,7 +79,7 @@ can be used.
#include <stdio.h>
#include <stdlib.h>
#include <sys/sysinfo.h>
-
+\&
int
main(void)
{
diff --git a/man3/get_phys_pages.3 b/man3/get_phys_pages.3
index b734efb4d..71cd4c96b 100644
--- a/man3/get_phys_pages.3
+++ b/man3/get_phys_pages.3
@@ -2,7 +2,7 @@
.\"
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
-.TH get_phys_pages 3 2022-10-30 "Linux man-pages 6.03"
+.TH get_phys_pages 3 2023-05-03 "Linux man-pages 6.05.01"
.SH NAME
get_phys_pages, get_avphys_pages \- get total and available physical
page counts
@@ -39,8 +39,8 @@ The system could not provide the required information
.I /proc
filesystem was not mounted).
.SH STANDARDS
-These functions are GNU extensions.
-.SH NOTES
+GNU.
+.SH HISTORY
Before glibc 2.23,
these functions obtained the required information by scanning the
.I MemTotal
@@ -51,7 +51,7 @@ fields of
Since glibc 2.23,
these functions obtain the required information by calling
.BR sysinfo (2).
-.PP
+.SH NOTES
The following
.BR sysconf (3)
calls provide a portable means of obtaining the same information as the
@@ -75,7 +75,7 @@ can be used.
#include <stdio.h>
#include <stdlib.h>
#include <sys/sysinfo.h>
-
+\&
int
main(void)
{
diff --git a/man3/getaddrinfo.3 b/man3/getaddrinfo.3
index 6d4295f71..1bbbb23a6 100644
--- a/man3/getaddrinfo.3
+++ b/man3/getaddrinfo.3
@@ -22,7 +22,7 @@
.\" FIXME . glibc's 2.9 NEWS file documents DCCP and UDP-lite support
.\" and is SCTP support now also there?
.\"
-.TH getaddrinfo 3 2023-02-05 "Linux man-pages 6.03"
+.TH getaddrinfo 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
getaddrinfo, freeaddrinfo, gai_strerror \- network address and
service translation
@@ -580,43 +580,25 @@ suitable for error reporting.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR getaddrinfo ()
T} Thread safety MT-Safe env locale
T{
+.na
+.nh
.BR freeaddrinfo (),
.BR gai_strerror ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
-.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008.
-The
-.BR getaddrinfo ()
-function is documented in RFC\ 2553.
-.SH NOTES
-.BR getaddrinfo ()
-supports the
-.IB address % scope-id
-notation for specifying the IPv6 scope-ID.
-.PP
-.BR AI_ADDRCONFIG ,
-.BR AI_ALL ,
-and
-.B AI_V4MAPPED
-are available since glibc 2.3.3.
-.B AI_NUMERICSERV
-is available since glibc 2.3.4.
-.PP
+.SH VERSIONS
According to POSIX.1, specifying
.\" POSIX.1-2001, POSIX.1-2008
.I hints
@@ -627,6 +609,28 @@ The GNU C library instead assumes a value of
.B (AI_V4MAPPED\~|\~AI_ADDRCONFIG)
for this case,
since this value is considered an improvement on the specification.
+.SH STANDARDS
+POSIX.1-2008.
+.TP
+.BR getaddrinfo ()
+RFC\ 2553.
+.SH HISTORY
+POSIX.1-2001.
+.TP
+.B AI_ADDRCONFIG
+.TQ
+.B AI_ALL
+.TQ
+.B AI_V4MAPPED
+glibc 2.3.3.
+.TP
+.B AI_NUMERICSERV
+glibc 2.3.4.
+.SH NOTES
+.BR getaddrinfo ()
+supports the
+.IB address % scope-id
+notation for specifying the IPv6 scope-ID.
.SH EXAMPLES
.\" getnameinfo.3 refers to this example
.\" socket.2 refers to this example
@@ -652,9 +656,9 @@ The programs are an echo server and client for UDP datagrams.
#include <sys/socket.h>
#include <sys/types.h>
#include <unistd.h>
-
+\&
#define BUF_SIZE 500
-
+\&
int
main(int argc, char *argv[])
{
@@ -665,12 +669,12 @@ main(int argc, char *argv[])
struct addrinfo hints;
struct addrinfo *result, *rp;
struct sockaddr_storage peer_addr;
-
+\&
if (argc != 2) {
fprintf(stderr, "Usage: %s port\en", argv[0]);
exit(EXIT_FAILURE);
}
-
+\&
memset(&hints, 0, sizeof(hints));
hints.ai_family = AF_UNSPEC; /* Allow IPv4 or IPv6 */
hints.ai_socktype = SOCK_DGRAM; /* Datagram socket */
@@ -679,48 +683,48 @@ main(int argc, char *argv[])
hints.ai_canonname = NULL;
hints.ai_addr = NULL;
hints.ai_next = NULL;
-
+\&
s = getaddrinfo(NULL, argv[1], &hints, &result);
if (s != 0) {
fprintf(stderr, "getaddrinfo: %s\en", gai_strerror(s));
exit(EXIT_FAILURE);
}
-
+\&
/* getaddrinfo() returns a list of address structures.
Try each address until we successfully bind(2).
If socket(2) (or bind(2)) fails, we (close the socket
and) try the next address. */
-
+\&
for (rp = result; rp != NULL; rp = rp\->ai_next) {
sfd = socket(rp\->ai_family, rp\->ai_socktype,
rp\->ai_protocol);
if (sfd == \-1)
continue;
-
+\&
if (bind(sfd, rp\->ai_addr, rp\->ai_addrlen) == 0)
break; /* Success */
-
+\&
close(sfd);
}
-
+\&
freeaddrinfo(result); /* No longer needed */
-
+\&
if (rp == NULL) { /* No address succeeded */
fprintf(stderr, "Could not bind\en");
exit(EXIT_FAILURE);
}
-
+\&
/* Read datagrams and echo them back to sender. */
-
+\&
for (;;) {
char host[NI_MAXHOST], service[NI_MAXSERV];
-
+\&
peer_addrlen = sizeof(peer_addr);
nread = recvfrom(sfd, buf, BUF_SIZE, 0,
(struct sockaddr *) &peer_addr, &peer_addrlen);
if (nread == \-1)
continue; /* Ignore failed request */
-
+\&
s = getnameinfo((struct sockaddr *) &peer_addr,
peer_addrlen, host, NI_MAXHOST,
service, NI_MAXSERV, NI_NUMERICSERV);
@@ -729,7 +733,7 @@ main(int argc, char *argv[])
nread, host, service);
else
fprintf(stderr, "getnameinfo: %s\en", gai_strerror(s));
-
+\&
if (sendto(sfd, buf, nread, 0, (struct sockaddr *) &peer_addr,
peer_addrlen) != nread)
{
@@ -750,9 +754,9 @@ main(int argc, char *argv[])
#include <sys/socket.h>
#include <sys/types.h>
#include <unistd.h>
-
+\&
#define BUF_SIZE 500
-
+\&
int
main(int argc, char *argv[])
{
@@ -762,77 +766,77 @@ main(int argc, char *argv[])
ssize_t nread;
struct addrinfo hints;
struct addrinfo *result, *rp;
-
+\&
if (argc < 3) {
fprintf(stderr, "Usage: %s host port msg...\en", argv[0]);
exit(EXIT_FAILURE);
}
-
+\&
/* Obtain address(es) matching host/port. */
-
+\&
memset(&hints, 0, sizeof(hints));
hints.ai_family = AF_UNSPEC; /* Allow IPv4 or IPv6 */
hints.ai_socktype = SOCK_DGRAM; /* Datagram socket */
hints.ai_flags = 0;
hints.ai_protocol = 0; /* Any protocol */
-
+\&
s = getaddrinfo(argv[1], argv[2], &hints, &result);
if (s != 0) {
fprintf(stderr, "getaddrinfo: %s\en", gai_strerror(s));
exit(EXIT_FAILURE);
}
-
+\&
/* getaddrinfo() returns a list of address structures.
Try each address until we successfully connect(2).
If socket(2) (or connect(2)) fails, we (close the socket
and) try the next address. */
-
+\&
for (rp = result; rp != NULL; rp = rp\->ai_next) {
sfd = socket(rp\->ai_family, rp\->ai_socktype,
rp\->ai_protocol);
if (sfd == \-1)
continue;
-
+\&
if (connect(sfd, rp\->ai_addr, rp\->ai_addrlen) != \-1)
break; /* Success */
-
+\&
close(sfd);
}
-
+\&
freeaddrinfo(result); /* No longer needed */
-
+\&
if (rp == NULL) { /* No address succeeded */
fprintf(stderr, "Could not connect\en");
exit(EXIT_FAILURE);
}
-
+\&
/* Send remaining command\-line arguments as separate
datagrams, and read responses from server. */
-
+\&
for (size_t j = 3; j < argc; j++) {
len = strlen(argv[j]) + 1;
/* +1 for terminating null byte */
-
+\&
if (len > BUF_SIZE) {
fprintf(stderr,
"Ignoring long message in argument %zu\en", j);
continue;
}
-
+\&
if (write(sfd, argv[j], len) != len) {
fprintf(stderr, "partial/failed write\en");
exit(EXIT_FAILURE);
}
-
+\&
nread = read(sfd, buf, BUF_SIZE);
if (nread == \-1) {
perror("read");
exit(EXIT_FAILURE);
}
-
+\&
printf("Received %zd bytes: %s\en", nread, buf);
}
-
+\&
exit(EXIT_SUCCESS);
}
.EE
diff --git a/man3/getaddrinfo_a.3 b/man3/getaddrinfo_a.3
index 64e0d044f..4b891ab6e 100644
--- a/man3/getaddrinfo_a.3
+++ b/man3/getaddrinfo_a.3
@@ -8,7 +8,7 @@
.\" References: http://people.redhat.com/drepper/asynchnl.pdf,
.\" http://www.imperialviolet.org/2005/06/01/asynchronous-dns-lookups-with-glibc.html
.\"
-.TH getaddrinfo_a 3 2023-02-05 "Linux man-pages 6.03"
+.TH getaddrinfo_a 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
getaddrinfo_a, gai_suspend, gai_error, gai_cancel \- asynchronous
network address and service translation
@@ -286,27 +286,26 @@ suitable for error reporting.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR getaddrinfo_a (),
.BR gai_suspend (),
.BR gai_error (),
.BR gai_cancel ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-These functions are GNU extensions;
-they first appeared in glibc 2.2.3.
-.SH NOTES
+GNU.
+.SH HISTORY
+glibc 2.2.3.
+.PP
The interface of
.BR getaddrinfo_a ()
was modeled after the
@@ -340,7 +339,7 @@ Here is the program source code
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-
+\&
int
main(int argc, char *argv[])
{
@@ -348,12 +347,12 @@ main(int argc, char *argv[])
struct gaicb *reqs[argc \- 1];
char host[NI_MAXHOST];
struct addrinfo *res;
-
+\&
if (argc < 2) {
fprintf(stderr, "Usage: %s HOST...\en", argv[0]);
exit(EXIT_FAILURE);
}
-
+\&
for (size_t i = 0; i < argc \- 1; i++) {
reqs[i] = malloc(sizeof(*reqs[0]));
if (reqs[i] == NULL) {
@@ -363,20 +362,20 @@ main(int argc, char *argv[])
memset(reqs[i], 0, sizeof(*reqs[0]));
reqs[i]\->ar_name = argv[i + 1];
}
-
+\&
ret = getaddrinfo_a(GAI_WAIT, reqs, argc \- 1, NULL);
if (ret != 0) {
fprintf(stderr, "getaddrinfo_a() failed: %s\en",
gai_strerror(ret));
exit(EXIT_FAILURE);
}
-
+\&
for (size_t i = 0; i < argc \- 1; i++) {
printf("%s: ", reqs[i]\->ar_name);
ret = gai_error(reqs[i]);
if (ret == 0) {
res = reqs[i]\->ar_result;
-
+\&
ret = getnameinfo(res\->ai_addr, res\->ai_addrlen,
host, sizeof(host),
NULL, 0, NI_NUMERICHOST);
@@ -386,7 +385,7 @@ main(int argc, char *argv[])
exit(EXIT_FAILURE);
}
puts(host);
-
+\&
} else {
puts(gai_strerror(ret));
}
@@ -431,25 +430,25 @@ The program source is as follows:
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-
+\&
static struct gaicb **reqs = NULL;
static size_t nreqs = 0;
-
+\&
static char *
getcmd(void)
{
static char buf[256];
-
+\&
fputs("> ", stdout); fflush(stdout);
if (fgets(buf, sizeof(buf), stdin) == NULL)
return NULL;
-
+\&
if (buf[strlen(buf) \- 1] == \[aq]\en\[aq])
buf[strlen(buf) \- 1] = 0;
-
+\&
return buf;
}
-
+\&
/* Add requests for specified hostnames. */
static void
add_requests(void)
@@ -457,17 +456,17 @@ add_requests(void)
size_t nreqs_base = nreqs;
char *host;
int ret;
-
+\&
while ((host = strtok(NULL, " "))) {
nreqs++;
reqs = realloc(reqs, sizeof(reqs[0]) * nreqs);
-
+\&
reqs[nreqs \- 1] = calloc(1, sizeof(*reqs[0]));
reqs[nreqs \- 1]\->ar_name = strdup(host);
}
-
+\&
/* Queue nreqs_base..nreqs requests. */
-
+\&
ret = getaddrinfo_a(GAI_NOWAIT, &reqs[nreqs_base],
nreqs \- nreqs_base, NULL);
if (ret) {
@@ -476,7 +475,7 @@ add_requests(void)
exit(EXIT_FAILURE);
}
}
-
+\&
/* Wait until at least one of specified requests completes. */
static void
wait_requests(void)
@@ -486,37 +485,37 @@ wait_requests(void)
size_t n;
struct gaicb const **wait_reqs = calloc(nreqs, sizeof(*wait_reqs));
/* NULL elements are ignored by gai_suspend(). */
-
+\&
while ((id = strtok(NULL, " ")) != NULL) {
n = atoi(id);
-
+\&
if (n >= nreqs) {
printf("Bad request number: %s\en", id);
return;
}
-
+\&
wait_reqs[n] = reqs[n];
}
-
+\&
ret = gai_suspend(wait_reqs, nreqs, NULL);
if (ret) {
printf("gai_suspend(): %s\en", gai_strerror(ret));
return;
}
-
+\&
for (size_t i = 0; i < nreqs; i++) {
if (wait_reqs[i] == NULL)
continue;
-
+\&
ret = gai_error(reqs[i]);
if (ret == EAI_INPROGRESS)
continue;
-
+\&
printf("[%02zu] %s: %s\en", i, reqs[i]\->ar_name,
ret == 0 ? "Finished" : gai_strerror(ret));
}
}
-
+\&
/* Cancel specified requests. */
static void
cancel_requests(void)
@@ -524,21 +523,21 @@ cancel_requests(void)
char *id;
int ret;
size_t n;
-
+\&
while ((id = strtok(NULL, " ")) != NULL) {
n = atoi(id);
-
+\&
if (n >= nreqs) {
printf("Bad request number: %s\en", id);
return;
}
-
+\&
ret = gai_cancel(reqs[n]);
printf("[%s] %s: %s\en", id, reqs[atoi(id)]\->ar_name,
gai_strerror(ret));
}
}
-
+\&
/* List all requests. */
static void
list_requests(void)
@@ -546,14 +545,14 @@ list_requests(void)
int ret;
char host[NI_MAXHOST];
struct addrinfo *res;
-
+\&
for (size_t i = 0; i < nreqs; i++) {
printf("[%02zu] %s: ", i, reqs[i]\->ar_name);
ret = gai_error(reqs[i]);
-
+\&
if (!ret) {
res = reqs[i]\->ar_result;
-
+\&
ret = getnameinfo(res\->ai_addr, res\->ai_addrlen,
host, sizeof(host),
NULL, 0, NI_NUMERICHOST);
@@ -568,16 +567,16 @@ list_requests(void)
}
}
}
-
+\&
int
main(void)
{
char *cmdline;
char *cmd;
-
+\&
while ((cmdline = getcmd()) != NULL) {
cmd = strtok(cmdline, " ");
-
+\&
if (cmd == NULL) {
list_requests();
} else {
diff --git a/man3/getauxval.3 b/man3/getauxval.3
index 6c5bcf479..8e7d5e4a6 100644
--- a/man3/getauxval.3
+++ b/man3/getauxval.3
@@ -5,7 +5,7 @@
.\"
.\" See also https://lwn.net/Articles/519085/
.\"
-.TH getauxval 3 2023-01-07 "Linux man-pages 6.03"
+.TH getauxval 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
getauxval \- retrieve a value from the auxiliary vector
.SH LIBRARY
@@ -210,29 +210,25 @@ is not found, 0 is returned.
No entry corresponding to
.I type
could be found in the auxiliary vector.
-.SH VERSIONS
-The
-.BR getauxval ()
-function was added in glibc 2.16.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR getauxval ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-This function is a nonstandard glibc extension.
+GNU.
+.SH HISTORY
+glibc 2.16.
.SH NOTES
The primary consumer of the information in the auxiliary vector
is the dynamic linker,
@@ -257,7 +253,7 @@ $ LD_SHOW_AUXV=1 sleep 1
.PP
The auxiliary vector of any process can (subject to file permissions)
be obtained via
-.IR /proc/[pid]/auxv ;
+.IR /proc/ pid /auxv ;
see
.BR proc (5)
for more information.
diff --git a/man3/getcontext.3 b/man3/getcontext.3
index 5d341db8b..4cd604c68 100644
--- a/man3/getcontext.3
+++ b/man3/getcontext.3
@@ -3,7 +3,7 @@
.\"
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
-.TH getcontext 3 2022-12-15 "Linux man-pages 6.03"
+.TH getcontext 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
getcontext, setcontext \- get or set the user context
.SH LIBRARY
@@ -141,25 +141,25 @@ None defined.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR getcontext (),
.BR setcontext ()
T} Thread safety MT-Safe race:ucp
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
+None.
+.SH HISTORY
SUSv2, POSIX.1-2001.
-POSIX.1-2008 removes the specification of
-.BR getcontext (),
+.PP
+POSIX.1-2008 removes these functions,
citing portability issues, and
recommending that applications be rewritten to use POSIX threads instead.
.SH NOTES
diff --git a/man3/getcwd.3 b/man3/getcwd.3
index 412d4007a..7149581c9 100644
--- a/man3/getcwd.3
+++ b/man3/getcwd.3
@@ -10,7 +10,7 @@
.\" Modified Mon Dec 11 13:32:51 MET 2000 by aeb
.\" Modified Thu Apr 22 03:49:15 CEST 2002 by Roger Luethi <rl@hellgate.ch>
.\"
-.TH getcwd 3 2023-02-05 "Linux man-pages 6.03"
+.TH getcwd 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
getcwd, getwd, get_current_dir_name \- get current working directory
.SH LIBRARY
@@ -185,66 +185,35 @@ You need to allocate a bigger array and try again.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR getcwd (),
.BR getwd ()
T} Thread safety MT-Safe
T{
+.na
+.nh
.BR get_current_dir_name ()
T} Thread safety MT-Safe env
.TE
-.hy
-.ad
.sp 1
-.SH STANDARDS
-.BR getcwd ()
-conforms to POSIX.1-2001.
-Note however that POSIX.1-2001 leaves the behavior of
+.SH VERSIONS
+POSIX.1-2001 leaves the behavior of
.BR getcwd ()
unspecified if
.I buf
is NULL.
.PP
-.BR getwd ()
-is present in POSIX.1-2001, but marked LEGACY.
-POSIX.1-2008 removes the specification of
-.BR getwd ().
-Use
-.BR getcwd ()
-instead.
POSIX.1-2001
does not define any errors for
.BR getwd ().
-.PP
-.BR get_current_dir_name ()
-is a GNU extension.
-.SH NOTES
-Under Linux, these functions make use of the
-.BR getcwd ()
-system call (available since Linux 2.1.92).
-On older systems they would query
-.IR /proc/self/cwd .
-If both system call and proc filesystem are missing, a
-generic implementation is called.
-Only in that case can
-these calls fail under Linux with
-.BR EACCES .
-.PP
-These functions are often used to save the location of the current working
-directory for the purpose of returning to it later.
-Opening the current
-directory (".") and calling
-.BR fchdir (2)
-to return is usually a faster and more reliable alternative when sufficiently
-many file descriptors are available, especially on platforms other than Linux.
-.\"
+.SH VERSIONS
.SS C library/kernel differences
On Linux, the kernel provides a
.BR getcwd ()
@@ -282,6 +251,46 @@ functions described in this page
should consider checking whether the returned pathname starts
with '/' or '(' to avoid misinterpreting an unreachable path
as a relative pathname.
+.SH STANDARDS
+.TP
+.BR getcwd ()
+POSIX.1-2008.
+.TP
+.BR get_current_dir_name ()
+GNU.
+.TP
+.BR getwd ()
+None.
+.SH HISTORY
+.TP
+.BR getcwd ()
+POSIX.1-2001.
+.TP
+.BR getwd ()
+POSIX.1-2001, but marked LEGACY.
+Removed in POSIX.1-2008.
+Use
+.BR getcwd ()
+instead.
+.PP
+Under Linux, these functions make use of the
+.BR getcwd ()
+system call (available since Linux 2.1.92).
+On older systems they would query
+.IR /proc/self/cwd .
+If both system call and proc filesystem are missing, a
+generic implementation is called.
+Only in that case can
+these calls fail under Linux with
+.BR EACCES .
+.SH NOTES
+These functions are often used to save the location of the current working
+directory for the purpose of returning to it later.
+Opening the current
+directory (".") and calling
+.BR fchdir (2)
+to return is usually a faster and more reliable alternative when sufficiently
+many file descriptors are available, especially on platforms other than Linux.
.SH BUGS
Since the Linux 2.6.36 change that added "(unreachable)" in the
circumstances described above, the glibc implementation of
diff --git a/man3/getdate.3 b/man3/getdate.3
index 266202704..fefc37086 100644
--- a/man3/getdate.3
+++ b/man3/getdate.3
@@ -8,7 +8,7 @@
.\" Modified, 2001-12-26, aeb
.\" 2008-09-07, mtk, Various rewrites; added an example program.
.\"
-.TH getdate 3 2023-02-05 "Linux man-pages 6.03"
+.TH getdate 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
getdate, getdate_r \- convert a date-plus-time string to broken-down time
.SH LIBRARY
@@ -180,30 +180,32 @@ Variables used by
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lb lb lbx
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR getdate ()
T} Thread safety T{
+.na
+.nh
MT-Unsafe race:getdate env locale
T}
T{
+.na
+.nh
.BR getdate_r ()
T} Thread safety T{
+.na
+.nh
MT-Safe env locale
T}
.TE
-.hy
-.ad
.sp 1
-.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008.
-.SH NOTES
+.SH VERSIONS
The POSIX.1 specification for
.BR strptime (3)
contains conversion specifications using the
@@ -217,6 +219,10 @@ In glibc,
is implemented using
.BR strptime (3),
so that precisely the same conversions are supported by both.
+.SH STANDARDS
+POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001.
.SH EXAMPLES
The program below calls
.BR getdate ()
@@ -276,21 +282,21 @@ Call 3 ("12:22:33") succeeded:
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
-
+\&
int
main(int argc, char *argv[])
{
struct tm *tmp;
-
+\&
for (size_t j = 1; j < argc; j++) {
tmp = getdate(argv[j]);
-
+\&
if (tmp == NULL) {
printf("Call %zu failed; getdate_err = %d\en",
j, getdate_err);
continue;
}
-
+\&
printf("Call %zu (\e"%s\e") succeeded:\en", j, argv[j]);
printf(" tm_sec = %d\en", tmp\->tm_sec);
printf(" tm_min = %d\en", tmp\->tm_min);
@@ -302,7 +308,7 @@ main(int argc, char *argv[])
printf(" tm_yday = %d\en", tmp\->tm_yday);
printf(" tm_isdst = %d\en", tmp\->tm_isdst);
}
-
+\&
exit(EXIT_SUCCESS);
}
.EE
diff --git a/man3/getdirentries.3 b/man3/getdirentries.3
index 47087fe1a..67d6da160 100644
--- a/man3/getdirentries.3
+++ b/man3/getdirentries.3
@@ -5,7 +5,7 @@
.\"
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
-.TH getdirentries 3 2023-02-05 "Linux man-pages 6.03"
+.TH getdirentries 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
getdirentries \- get directory entries in a filesystem-independent format
.SH LIBRARY
@@ -56,23 +56,21 @@ See the Linux library source code for details.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR getdirentries ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-Not in POSIX.1.
-Present on the BSDs, and a few other systems.
+BSD.
+.SH NOTES
Use
.BR opendir (3)
and
diff --git a/man3/getdtablesize.3 b/man3/getdtablesize.3
index b49a977f2..40b940fbb 100644
--- a/man3/getdtablesize.3
+++ b/man3/getdtablesize.3
@@ -5,7 +5,7 @@
.\"
.\" Modified 2002-04-15 by Roger Luethi <rl@hellgate.ch> and aeb
.\"
-.TH getdtablesize 3 2023-02-05 "Linux man-pages 6.03"
+.TH getdtablesize 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
getdtablesize \- get file descriptor table size
.SH LIBRARY
@@ -48,29 +48,19 @@ see NOTES below.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR getdtablesize ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
-.SH STANDARDS
-SVr4, 4.4BSD (the
-.BR getdtablesize ()
-function first appeared in 4.2BSD).
-It is not specified in POSIX.1;
-portable applications should employ
-.I sysconf(_SC_OPEN_MAX)
-instead of this call.
-.SH NOTES
+.SH VERSIONS
The glibc version of
.BR getdtablesize ()
calls
@@ -83,6 +73,15 @@ when that fails.
.\" The libc4 and libc5 versions return
.\" .B OPEN_MAX
.\" (set to 256 since Linux 0.98.4).
+.PP
+Portable applications should employ
+.I sysconf(_SC_OPEN_MAX)
+instead of this call.
+.SH STANDARDS
+None.
+.SH HISTORY
+SVr4, 4.4BSD
+(first appeared in 4.2BSD).
.SH SEE ALSO
.BR close (2),
.BR dup (2),
diff --git a/man3/getentropy.3 b/man3/getentropy.3
index ecdac4c36..f09a209bb 100644
--- a/man3/getentropy.3
+++ b/man3/getentropy.3
@@ -2,7 +2,7 @@
.\"
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
-.TH getentropy 3 2022-11-10 "Linux man-pages 6.03"
+.TH getentropy 3 2023-03-30 "Linux man-pages 6.05.01"
.SH NAME
getentropy \- fill a buffer with random bytes
.SH LIBRARY
@@ -66,13 +66,11 @@ with random data.
This kernel version does not implement the
.BR getrandom (2)
system call required to implement this function.
-.SH VERSIONS
-The
-.BR getentropy ()
-function first appeared in glibc 2.25.
.SH STANDARDS
-This function is nonstandard.
-It is also present on OpenBSD.
+None.
+.SH HISTORY
+glibc 2.25.
+OpenBSD.
.SH NOTES
The
.BR getentropy ()
diff --git a/man3/getenv.3 b/man3/getenv.3
index afe15962b..705eb43e9 100644
--- a/man3/getenv.3
+++ b/man3/getenv.3
@@ -11,7 +11,7 @@
.\" Modified Sat Jul 24 19:30:29 1993 by Rik Faith (faith@cs.unc.edu)
.\" Modified Fri Feb 14 21:47:50 1997 by Andries Brouwer (aeb@cwi.nl)
.\"
-.TH getenv 3 2023-02-05 "Linux man-pages 6.03"
+.TH getenv 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
getenv, secure_getenv \- get an environment variable
.SH LIBRARY
@@ -75,33 +75,36 @@ The
.BR getenv ()
function returns a pointer to the value in the
environment, or NULL if there is no match.
-.SH VERSIONS
-.BR secure_getenv ()
-first appeared in glibc 2.17.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR getenv (),
.BR secure_getenv ()
T} Thread safety MT-Safe env
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-.BR getenv ():
-POSIX.1-2001, POSIX.1-2008, C99, SVr4, 4.3BSD.
-.PP
+.TP
+.BR getenv ()
+C11, POSIX.1-2008.
+.TP
+.BR secure_getenv ()
+GNU.
+.SH HISTORY
+.TP
+.BR getenv ()
+POSIX.1-2001, C89, C99, SVr4, 4.3BSD.
+.TP
.BR secure_getenv ()
-is a GNU extension.
+glibc 2.17.
.SH NOTES
The strings in the environment list are of the form \fIname=value\fP.
.PP
diff --git a/man3/getfsent.3 b/man3/getfsent.3
index ff000c079..5a03bd98f 100644
--- a/man3/getfsent.3
+++ b/man3/getfsent.3
@@ -5,7 +5,7 @@
.\"
.\" Inspired by a page written by Walter Harms.
.\"
-.TH getfsent 3 2022-12-15 "Linux man-pages 6.03"
+.TH getfsent 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
getfsent, getfsspec, getfsfile, setfsent, endfsent \- handle fstab entries
.SH LIBRARY
@@ -91,40 +91,39 @@ while
.BR setfsent ()
returns 1.
Upon failure or end-of-file, these functions return NULL and 0, respectively.
-.\" .SH HISTORY
-.\" The
-.\" .BR getfsent ()
-.\" function appeared in 4.0BSD; the other four functions appeared in 4.3BSD.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lb lb lbx
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR endfsent (),
.BR setfsent ()
T} Thread safety T{
+.na
+.nh
MT-Unsafe race:fsent
T}
T{
+.na
+.nh
.BR getfsent (),
.BR getfsspec (),
.BR getfsfile ()
T} Thread safety T{
+.na
+.nh
MT-Unsafe race:fsent locale
T}
.TE
-.hy
-.ad
.sp 1
-.SH STANDARDS
-These functions are not in POSIX.1.
-Several operating systems have them, for example,
+.SH VERSIONS
+Several operating systems have these functions, for example,
*BSD, SunOS, Digital UNIX, AIX (which also has a
.BR getfstype ()).
HP-UX has functions of the same names,
@@ -134,6 +133,12 @@ instead of a
.IR "struct fstab" ,
and calls these functions obsolete, superseded by
.BR getmntent (3).
+.SH STANDARDS
+None.
+.SH HISTORY
+The
+.BR getfsent ()
+function appeared in 4.0BSD; the other four functions appeared in 4.3BSD.
.SH NOTES
These functions are not thread-safe.
.PP
diff --git a/man3/getgrent.3 b/man3/getgrent.3
index 254d1b85a..cd5beda62 100644
--- a/man3/getgrent.3
+++ b/man3/getgrent.3
@@ -8,7 +8,7 @@
.\" Lewine's _POSIX Programmer's Guide_ (O'Reilly & Associates, 1991)
.\" 386BSD man pages
.\" Modified Sat Jul 24 19:29:54 1993 by Rik Faith (faith@cs.unc.edu)
-.TH getgrent 3 2023-02-05 "Linux man-pages 6.03"
+.TH getgrent 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
getgrent, setgrent, endgrent \- get group file entry
.SH LIBRARY
@@ -154,28 +154,32 @@ local group database file
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lb lb lbx
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR getgrent ()
T} Thread safety T{
+.na
+.nh
MT-Unsafe race:grent
race:grentbuf locale
T}
T{
+.na
+.nh
.BR setgrent (),
.BR endgrent ()
T} Thread safety T{
+.na
+.nh
MT-Unsafe race:grent locale
T}
.TE
-.hy
-.ad
.sp 1
.PP
In the above table,
@@ -190,7 +194,9 @@ or
are used in parallel in different threads of a program,
then data races could occur.
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, SVr4, 4.3BSD.
+POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001, SVr4, 4.3BSD.
.SH SEE ALSO
.BR fgetgrent (3),
.BR getgrent_r (3),
diff --git a/man3/getgrent_r.3 b/man3/getgrent_r.3
index 1d648bee9..b70c36eae 100644
--- a/man3/getgrent_r.3
+++ b/man3/getgrent_r.3
@@ -3,7 +3,7 @@
.\"
.\" SPDX-License-Identifier: GPL-2.0-or-later
.\"
-.TH getgrent_r 3 2023-02-05 "Linux man-pages 6.03"
+.TH getgrent_r 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
getgrent_r, fgetgrent_r \- get group file entry reentrantly
.SH LIBRARY
@@ -108,26 +108,30 @@ Try again with larger buffer.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lb lb lbx
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR getgrent_r ()
T} Thread safety T{
+.na
+.nh
MT-Unsafe race:grent locale
T}
T{
+.na
+.nh
.BR fgetgrent_r ()
T} Thread safety T{
+.na
+.nh
MT-Safe
T}
.TE
-.hy
-.ad
.sp 1
In the above table,
.I grent
@@ -141,10 +145,7 @@ or
.BR getgrent_r ()
are used in parallel in different threads of a program,
then data races could occur.
-.SH STANDARDS
-These functions are GNU extensions, done in a style resembling
-the POSIX version of functions like
-.BR getpwnam_r (3).
+.SH VERSIONS
Other systems use the prototype
.PP
.in +4n
@@ -162,6 +163,12 @@ int getgrent_r(struct group *grp, char *buf, int buflen,
FILE **gr_fp);
.EE
.in
+.SH STANDARDS
+GNU.
+.SH HISTORY
+These functions are done in a style resembling
+the POSIX version of functions like
+.BR getpwnam_r (3).
.SH NOTES
The function
.BR getgrent_r ()
@@ -176,7 +183,7 @@ in the stream with all other threads.
#include <stdio.h>
#include <stdlib.h>
#define BUFLEN 4096
-
+\&
int
main(void)
{
@@ -184,7 +191,7 @@ main(void)
struct group *grpp;
char buf[BUFLEN];
int i;
-
+\&
setgrent();
while (1) {
i = getgrent_r(&grp, buf, sizeof(buf), &grpp);
diff --git a/man3/getgrnam.3 b/man3/getgrnam.3
index c29e04f29..b79e15f86 100644
--- a/man3/getgrnam.3
+++ b/man3/getgrnam.3
@@ -11,7 +11,7 @@
.\" Modified 1993-07-24 by Rik Faith (faith@cs.unc.edu)
.\" Modified 2003-11-15 by aeb
.\"
-.TH getgrnam 3 2023-02-05 "Linux man-pages 6.03"
+.TH getgrnam 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
getgrnam, getgrnam_r, getgrgid, getgrgid_r \- get group file entry
.SH LIBRARY
@@ -195,34 +195,38 @@ local group database file
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lb lb lbx
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR getgrnam ()
T} Thread safety T{
+.na
+.nh
MT-Unsafe race:grnam locale
T}
T{
+.na
+.nh
.BR getgrgid ()
T} Thread safety T{
+.na
+.nh
MT-Unsafe race:grgid locale
T}
T{
+.na
+.nh
.BR getgrnam_r (),
.BR getgrgid_r ()
T} Thread safety MT-Safe locale
.TE
-.hy
-.ad
.sp 1
-.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, SVr4, 4.3BSD.
-.SH NOTES
+.SH VERSIONS
The formulation given above under "RETURN VALUE" is from POSIX.1.
.\" POSIX.1-2001, POSIX.1-2008
It does not call "not found" an error, hence does not specify what value
@@ -244,6 +248,10 @@ situation: 0, ENOENT, EBADF, ESRCH, EWOULDBLOCK, EPERM, and probably others.
.\" FreeBSD 4.8, OpenBSD 3.2, NetBSD 1.6 - give EPERM
.\" SunOS 5.8 - gives EBADF
.\" Tru64 5.1b, HP-UX-11i, SunOS 5.7 - give 0
+.SH STANDARDS
+POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001, SVr4, 4.3BSD.
.SH SEE ALSO
.BR endgrent (3),
.BR fgetgrent (3),
diff --git a/man3/getgrouplist.3 b/man3/getgrouplist.3
index 4b514e0aa..0fe3690b7 100644
--- a/man3/getgrouplist.3
+++ b/man3/getgrouplist.3
@@ -7,7 +7,7 @@
.\"
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
-.TH getgrouplist 3 2023-02-05 "Linux man-pages 6.03"
+.TH getgrouplist 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
getgrouplist \- get list of groups to which a user belongs
.SH LIBRARY
@@ -83,27 +83,25 @@ In this case, the value returned in
.I *ngroups
can be used to resize the buffer passed to a further call to
.BR getgrouplist ().
-.SH VERSIONS
-This function is present since glibc 2.2.4.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR getgrouplist ()
T} Thread safety MT-Safe locale
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-This function is nonstandard; it appears on most BSDs.
+None.
+.SH HISTORY
+glibc 2.2.4.
.SH BUGS
Before glibc 2.3.3,
the implementation of this function contains a buffer-overrun bug:
@@ -141,7 +139,7 @@ ngroups = 3
#include <pwd.h>
#include <stdio.h>
#include <stdlib.h>
-
+\&
int
main(int argc, char *argv[])
{
@@ -149,38 +147,38 @@ main(int argc, char *argv[])
struct passwd *pw;
struct group *gr;
gid_t *groups;
-
+\&
if (argc != 3) {
fprintf(stderr, "Usage: %s <user> <ngroups>\en", argv[0]);
exit(EXIT_FAILURE);
}
-
+\&
ngroups = atoi(argv[2]);
-
+\&
groups = malloc(sizeof(*groups) * ngroups);
if (groups == NULL) {
perror("malloc");
exit(EXIT_FAILURE);
}
-
+\&
/* Fetch passwd structure (contains first group ID for user). */
-
+\&
pw = getpwnam(argv[1]);
if (pw == NULL) {
perror("getpwnam");
exit(EXIT_SUCCESS);
}
-
+\&
/* Retrieve group list. */
-
+\&
if (getgrouplist(argv[1], pw\->pw_gid, groups, &ngroups) == \-1) {
fprintf(stderr, "getgrouplist() returned \-1; ngroups = %d\en",
ngroups);
exit(EXIT_FAILURE);
}
-
+\&
/* Display list of retrieved groups, along with group names. */
-
+\&
fprintf(stderr, "ngroups = %d\en", ngroups);
for (size_t j = 0; j < ngroups; j++) {
printf("%d", groups[j]);
@@ -189,7 +187,7 @@ main(int argc, char *argv[])
printf(" (%s)", gr\->gr_name);
printf("\en");
}
-
+\&
exit(EXIT_SUCCESS);
}
.EE
diff --git a/man3/gethostbyname.3 b/man3/gethostbyname.3
index 9b1f6aacb..620d492c9 100644
--- a/man3/gethostbyname.3
+++ b/man3/gethostbyname.3
@@ -16,7 +16,7 @@
.\" Modified 2002-08-05, Michael Kerrisk
.\" Modified 2004-10-31, Andries Brouwer
.\"
-.TH gethostbyname 3 2023-02-05 "Linux man-pages 6.03"
+.TH gethostbyname 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
gethostbyname, gethostbyaddr, sethostent, gethostent, endhostent,
h_errno,
@@ -316,57 +316,77 @@ name service switch configuration
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lb lb lbx
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR gethostbyname ()
T} Thread safety T{
+.na
+.nh
MT-Unsafe race:hostbyname env
locale
T}
T{
+.na
+.nh
.BR gethostbyaddr ()
T} Thread safety T{
+.na
+.nh
MT-Unsafe race:hostbyaddr env
locale
T}
T{
+.na
+.nh
.BR sethostent (),
.BR endhostent (),
.BR gethostent_r ()
T} Thread safety T{
+.na
+.nh
MT-Unsafe race:hostent env
locale
T}
T{
+.na
+.nh
.BR herror (),
.BR hstrerror ()
T} Thread safety MT-Safe
T{
+.na
+.nh
.BR gethostent ()
T} Thread safety T{
+.na
+.nh
MT-Unsafe race:hostent
race:hostentbuf env locale
T}
T{
+.na
+.nh
.BR gethostbyname2 ()
T} Thread safety T{
+.na
+.nh
MT-Unsafe race:hostbyname2
env locale
T}
T{
+.na
+.nh
.BR gethostbyaddr_r (),
.BR gethostbyname_r (),
.BR gethostbyname2_r ()
T} Thread safety MT-Safe env locale
.TE
-.hy
-.ad
.sp 1
In the above table,
.I hostent
@@ -377,28 +397,39 @@ signifies that if any of the functions
.BR gethostent (),
.BR gethostent_r (),
or
-.BR endhostent ()
+.BR \%endhostent ()
are used in parallel in different threads of a program,
then data races could occur.
.SH STANDARDS
-POSIX.1-2001 specifies
-.BR gethostbyname (),
-.BR gethostbyaddr (),
-.BR sethostent (),
-.BR endhostent (),
-.BR gethostent (),
-and
-.IR h_errno ;
-.BR gethostbyname (),
-.BR gethostbyaddr (),
-and
+.TP
+.BR sethostent ()
+.TQ
+.BR endhostent ()
+.TQ
+.BR gethostent ()
+POSIX.1-2008.
+.TP
+.BR gethostent_r ()
+GNU.
+.TP
+Others:
+None.
+.SH HISTORY
+.TP
+.BR sethostent ()
+.TQ
+.BR endhostent ()
+.TQ
+.BR gethostent ()
+POSIX.1-2001.
+.TP
+.BR gethostbyname ()
+.TQ
+.BR gethostbyaddr ()
+.TQ
.I h_errno
-are marked obsolescent in that standard.
-POSIX.1-2008 removes the specifications of
-.BR gethostbyname (),
-.BR gethostbyaddr (),
-and
-.IR h_errno ,
+Marked obsolescent in POSIX.1-2001.
+Removed in POSIX.1-2008,
recommending the use of
.BR getaddrinfo (3)
and
diff --git a/man3/gethostid.3 b/man3/gethostid.3
index 4b1b16ae5..02a97d720 100644
--- a/man3/gethostid.3
+++ b/man3/gethostid.3
@@ -7,7 +7,7 @@
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
.\" Modified Tue Oct 22 00:22:35 EDT 1996 by Eric S. Raymond <esr@thyrsus.com>
-.TH gethostid 3 2022-12-15 "Linux man-pages 6.03"
+.TH gethostid 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
gethostid, sethostid \- get or set the unique identifier of the current host
.SH LIBRARY
@@ -85,39 +85,32 @@ as its corresponding real ID.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lb lb lbx
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR gethostid ()
T} Thread safety T{
+.na
+.nh
MT-Safe hostid env locale
T}
T{
+.na
+.nh
.BR sethostid ()
T} Thread safety T{
+.na
+.nh
MT-Unsafe const:hostid
T}
.TE
-.hy
-.ad
.sp 1
-.SH STANDARDS
-4.2BSD; these functions were dropped in 4.4BSD.
-SVr4 includes
-.BR gethostid ()
-but not
-.BR sethostid ().
-.PP
-POSIX.1-2001 and POSIX.1-2008 specify
-.BR gethostid ()
-but not
-.BR sethostid ().
-.SH NOTES
+.SH VERSIONS
In the glibc implementation, the
.I hostid
is stored in the file
@@ -137,6 +130,19 @@ passes that hostname to
in order to obtain the host's IPv4 address,
and returns a value obtained by bit-twiddling the IPv4 address.
(This value may not be unique.)
+.SH STANDARDS
+.TP
+.BR gethostid ()
+POSIX.1-2008.
+.TP
+.BR sethostid ()
+None.
+.SH HISTORY
+4.2BSD; dropped in 4.4BSD.
+SVr4 and POSIX.1-2001 include
+.BR gethostid ()
+but not
+.BR sethostid ().
.SH BUGS
It is impossible to ensure that the identifier is globally unique.
.SH SEE ALSO
diff --git a/man3/getifaddrs.3 b/man3/getifaddrs.3
index c814dc2d8..3f82c9350 100644
--- a/man3/getifaddrs.3
+++ b/man3/getifaddrs.3
@@ -14,7 +14,7 @@
.\" for glibc specificities, provide an example.
.\" 2009-01-14 mtk, many edits and changes, rewrote example program.
.\"
-.TH getifaddrs 3 2023-02-05 "Linux man-pages 6.03"
+.TH getifaddrs 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
getifaddrs, freeifaddrs \- get interface addresses
.SH LIBRARY
@@ -142,34 +142,25 @@ for any of the errors specified for
.BR malloc (3),
or
.BR realloc (3).
-.SH VERSIONS
-The
-.BR getifaddrs ()
-function first appeared in glibc 2.3, but before glibc 2.3.3,
-the implementation supported only IPv4 addresses;
-IPv6 support was added in glibc 2.3.3.
-Support of address families other than IPv4 is available only
-on kernels that support netlink.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR getifaddrs (),
.BR freeifaddrs ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-Not in POSIX.1.
+None.
+.SH HISTORY
This function first appeared in BSDi and is
present on the BSD systems, but with slightly different
semantics documented\[em]returning one entry per interface,
@@ -188,6 +179,13 @@ differs on various systems.
.\" appears to be confused and obsolete on this point.
.\" i.e., commonly it still says one of them will be NULL, even if
.\" the ifa_ifu union is already present
+.PP
+.BR getifaddrs ()
+first appeared in glibc 2.3, but before glibc 2.3.3,
+the implementation supported only IPv4 addresses;
+IPv6 support was added in glibc 2.3.3.
+Support of address families other than IPv4 is available only
+on kernels that support netlink.
.SH NOTES
The addresses returned on Linux will usually be the IPv4 and IPv6 addresses
assigned to the interface, but also one
@@ -247,40 +245,40 @@ wlp3s0 AF_INET6 (10)
#include <stdlib.h>
#include <unistd.h>
#include <linux/if_link.h>
-
+\&
int main(int argc, char *argv[])
{
struct ifaddrs *ifaddr;
int family, s;
char host[NI_MAXHOST];
-
+\&
if (getifaddrs(&ifaddr) == \-1) {
perror("getifaddrs");
exit(EXIT_FAILURE);
}
-
+\&
/* Walk through linked list, maintaining head pointer so we
can free list later. */
-
+\&
for (struct ifaddrs *ifa = ifaddr; ifa != NULL;
ifa = ifa\->ifa_next) {
if (ifa\->ifa_addr == NULL)
continue;
-
+\&
family = ifa\->ifa_addr\->sa_family;
-
+\&
/* Display interface name and family (including symbolic
form of the latter for the common families). */
-
+\&
printf("%\-8s %s (%d)\en",
ifa\->ifa_name,
(family == AF_PACKET) ? "AF_PACKET" :
(family == AF_INET) ? "AF_INET" :
(family == AF_INET6) ? "AF_INET6" : "???",
family);
-
+\&
/* For an AF_INET* interface address, display the address. */
-
+\&
if (family == AF_INET || family == AF_INET6) {
s = getnameinfo(ifa\->ifa_addr,
(family == AF_INET) ? sizeof(struct sockaddr_in) :
@@ -291,19 +289,19 @@ int main(int argc, char *argv[])
printf("getnameinfo() failed: %s\en", gai_strerror(s));
exit(EXIT_FAILURE);
}
-
+\&
printf("\et\etaddress: <%s>\en", host);
-
+\&
} else if (family == AF_PACKET && ifa\->ifa_data != NULL) {
struct rtnl_link_stats *stats = ifa\->ifa_data;
-
+\&
printf("\et\ettx_packets = %10u; rx_packets = %10u\en"
"\et\ettx_bytes = %10u; rx_bytes = %10u\en",
stats\->tx_packets, stats\->rx_packets,
stats\->tx_bytes, stats\->rx_bytes);
}
}
-
+\&
freeifaddrs(ifaddr);
exit(EXIT_SUCCESS);
}
diff --git a/man3/getipnodebyname.3 b/man3/getipnodebyname.3
index d5414a63d..5babfeb37 100644
--- a/man3/getipnodebyname.3
+++ b/man3/getipnodebyname.3
@@ -3,7 +3,7 @@
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
.\" References: RFC 2553
-.TH getipnodebyname 3 2022-11-10 "Linux man-pages 6.03"
+.TH getipnodebyname 3 2023-03-30 "Linux man-pages 6.05.01"
.SH NAME
getipnodebyname, getipnodebyaddr, freehostent \- get network
hostnames and addresses
@@ -238,11 +238,12 @@ This is an array of one or more pointers to network address structures for the
network host.
The array is terminated by a null pointer.
.SH STANDARDS
-RFC\ 2553.
+None.
+.SH HISTORY
.\" Not in POSIX.1-2001.
-.SH NOTES
-These functions were present in glibc 2.1.91-95, but were
-removed again.
+RFC\ 2553.
+.PP
+Present in glibc 2.1.91-95, but removed again.
Several UNIX-like systems support them, but all
call them deprecated.
.SH SEE ALSO
diff --git a/man3/getline.3 b/man3/getline.3
index 3ad4c4392..2b9d74a2f 100644
--- a/man3/getline.3
+++ b/man3/getline.3
@@ -4,7 +4,7 @@
.\"
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
-.TH getline 3 2023-02-05 "Linux man-pages 6.03"
+.TH getline 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
getline, getdelim \- delimited string input
.SH LIBRARY
@@ -121,35 +121,30 @@ Allocation or reallocation of the line buffer failed.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR getline (),
.BR getdelim ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-Both
-.BR getline ()
-and
-.BR getdelim ()
-were originally GNU extensions.
-They were standardized in POSIX.1-2008.
+POSIX.1-2008.
+.SH HISTORY
+GNU, POSIX.1-2008.
.SH EXAMPLES
.\" SRC BEGIN (getline.c)
.EX
#define _GNU_SOURCE
#include <stdio.h>
#include <stdlib.h>
-
+\&
int
main(int argc, char *argv[])
{
@@ -157,23 +152,23 @@ main(int argc, char *argv[])
char *line = NULL;
size_t len = 0;
ssize_t nread;
-
+\&
if (argc != 2) {
fprintf(stderr, "Usage: %s <file>\en", argv[0]);
exit(EXIT_FAILURE);
}
-
+\&
stream = fopen(argv[1], "r");
if (stream == NULL) {
perror("fopen");
exit(EXIT_FAILURE);
}
-
+\&
while ((nread = getline(&line, &len, stream)) != \-1) {
printf("Retrieved line of length %zd:\en", nread);
fwrite(line, nread, 1, stdout);
}
-
+\&
free(line);
fclose(stream);
exit(EXIT_SUCCESS);
diff --git a/man3/getloadavg.3 b/man3/getloadavg.3
index 1cdef1ce3..5be1ab96f 100644
--- a/man3/getloadavg.3
+++ b/man3/getloadavg.3
@@ -8,7 +8,7 @@
.\"
.\" 2007-12-08, mtk, Converted from mdoc to man macros
.\"
-.TH getloadavg 3 2022-12-15 "Linux man-pages 6.03"
+.TH getloadavg 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
getloadavg \- get system load averages
.SH LIBRARY
@@ -47,34 +47,26 @@ over the last 1, 5, and 15 minutes, respectively.
.SH RETURN VALUE
If the load average was unobtainable, \-1 is returned; otherwise,
the number of samples actually retrieved is returned.
-.\" .SH HISTORY
-.\" The
-.\" BR getloadavg ()
-.\" function appeared in
-.\" 4.3BSD Reno .
-.SH VERSIONS
-This function is available since glibc 2.2.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR getloadavg ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-Not in POSIX.1.
-Present on the BSDs and Solaris.
-.\" mdoc seems to have a bug - there must be no newline here
+BSD.
+.SH HISTORY
+4.3BSD-Reno, Solaris.
+glibc 2.2.
.SH SEE ALSO
.BR uptime (1),
.BR proc (5)
diff --git a/man3/getlogin.3 b/man3/getlogin.3
index 4932fbadd..5b88d77ee 100644
--- a/man3/getlogin.3
+++ b/man3/getlogin.3
@@ -6,7 +6,7 @@
.\" Changed Tue Sep 19 01:49:29 1995, aeb: moved from man2 to man3
.\" added ref to /etc/utmp, added BUGS section, etc.
.\" modified 2003 Walter Harms, aeb - added getlogin_r, note on stdin use
-.TH getlogin 3 2023-02-05 "Linux man-pages 6.03"
+.TH getlogin 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
getlogin, getlogin_r, cuserid \- get username
.SH LIBRARY
@@ -134,33 +134,41 @@ some libc versions used \fI/var/adm/utmp\fP)
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lb lb lbx
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR getlogin ()
T} Thread safety T{
+.na
+.nh
MT-Unsafe race:getlogin race:utent
sig:ALRM timer locale
T}
T{
+.na
+.nh
.BR getlogin_r ()
T} Thread safety T{
+.na
+.nh
MT-Unsafe race:utent sig:ALRM timer
locale
T}
T{
+.na
+.nh
.BR cuserid ()
T} Thread safety T{
+.na
+.nh
MT-Unsafe race:cuserid/!string locale
T}
.TE
-.hy
-.ad
.sp 1
In the above table,
.I utent
@@ -178,29 +186,40 @@ and
.BR getlogin_r ()
call those functions,
so we use race:utent to remind users.
-.SH STANDARDS
+.SH VERSIONS
+OpenBSD has
.BR getlogin ()
and
+.BR setlogin (),
+and a username
+associated with a session, even if it has no controlling terminal.
+.SH STANDARDS
+.TP
+.BR getlogin ()
+.TQ
+.BR getlogin_r ()
+POSIX.1-2008.
+.TP
+.BR cuserid ()
+None.
+.SH STANDARDS
+.TP
+.BR getlogin ()
+.TQ
.BR getlogin_r ():
-POSIX.1-2001, POSIX.1-2008.
-.PP
+POSIX.1-2001.
+OpenBSD.
+.TP
+.BR cuserid ()
+System V, POSIX.1-1988.
+Removed in POSIX.1-1990.
+SUSv2.
+Removed in POSIX.1-2001.
+.IP
System V has a
.BR cuserid ()
function which uses the real
user ID rather than the effective user ID.
-The
-.BR cuserid ()
-function
-was included in the 1988 version of POSIX,
-but removed from the 1990 version.
-It was present in SUSv2, but removed in POSIX.1-2001.
-.PP
-OpenBSD has
-.BR getlogin ()
-and
-.BR setlogin (),
-and a username
-associated with a session, even if it has no controlling terminal.
.SH BUGS
Unfortunately, it is often rather easy to fool
.BR getlogin ().
diff --git a/man3/getmntent.3 b/man3/getmntent.3
index c930e4a4d..9bfa29647 100644
--- a/man3/getmntent.3
+++ b/man3/getmntent.3
@@ -10,7 +10,7 @@
.\" Modified Sat Jul 24 21:46:57 1993 by Rik Faith (faith@cs.unc.edu)
.\" Modified 961109, 031115, aeb
.\"
-.TH getmntent 3 2023-02-05 "Linux man-pages 6.03"
+.TH getmntent 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
getmntent, setmntent, addmntent, endmntent, hasmntopt,
getmntent_r \- get filesystem descriptor file entry
@@ -202,43 +202,53 @@ mounted filesystem description file
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lb lb lbx
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR setmntent (),
.BR endmntent (),
.BR hasmntopt ()
T} Thread safety MT-Safe
T{
+.na
+.nh
.BR getmntent ()
T} Thread safety T{
+.na
+.nh
MT-Unsafe race:mntentbuf locale
T}
T{
+.na
+.nh
.BR addmntent ()
T} Thread safety T{
+.na
+.nh
MT-Safe race:stream locale
T}
T{
+.na
+.nh
.BR getmntent_r ()
T} Thread safety MT-Safe locale
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
+None.
+.SH HISTORY
The nonreentrant functions are from SunOS 4.1.3.
A routine
.BR getmntent_r ()
was introduced in HP-UX 10, but it returns an
.IR int .
The prototype shown above is glibc-only.
-.SH NOTES
+.PP
System V also has a
.BR getmntent ()
function but the calling sequence
@@ -247,7 +257,7 @@ Under System V
.I /etc/mnttab
is used.
4.4BSD and Digital UNIX have a routine
-.BR getmntinfo (),
+.BR \%getmntinfo (),
a wrapper around the system call
.BR getfsstat ().
.SH SEE ALSO
diff --git a/man3/getnameinfo.3 b/man3/getnameinfo.3
index cc2ac9a16..580a2650b 100644
--- a/man3/getnameinfo.3
+++ b/man3/getnameinfo.3
@@ -8,7 +8,7 @@
.\" 2004-12-14, mtk, Added EAI_OVERFLOW error
.\" 2004-12-14 Fixed description of error return
.\"
-.TH getnameinfo 3 2023-02-05 "Linux man-pages 6.03"
+.TH getnameinfo 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
getnameinfo \- address-to-name translation in protocol-independent manner
.SH LIBRARY
@@ -211,28 +211,34 @@ suitable for error reporting.
.I /etc/nsswitch.conf
.br
.I /etc/resolv.conf
-.SH VERSIONS
-.BR getnameinfo ()
-is provided since glibc 2.1.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR getnameinfo ()
T} Thread safety MT-Safe env locale
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, RFC\ 2553.
+POSIX.1-2008.
+RFC\ 2553.
+.SH HISTORY
+glibc 2.1.
+POSIX.1-2001.
+.PP
+Before glibc 2.2, the
+.I hostlen
+and
+.I servlen
+arguments were typed as
+.IR size_t .
.SH NOTES
In order to assist the programmer in choosing reasonable sizes
for the supplied buffers,
@@ -264,13 +270,6 @@ in recent versions of BIND's
header file.
The latter is a guess based on the services listed
in the current Assigned Numbers RFC.
-.PP
-Before glibc 2.2, the
-.I hostlen
-and
-.I servlen
-arguments were typed as
-.IR size_t .
.SH EXAMPLES
The following code tries to get the numeric hostname and service name,
for a given socket address.
@@ -282,7 +281,7 @@ a particular address family.
struct sockaddr *addr; /* input */
socklen_t addrlen; /* input */
char hbuf[NI_MAXHOST], sbuf[NI_MAXSERV];
-
+\&
if (getnameinfo(addr, addrlen, hbuf, sizeof(hbuf), sbuf,
sizeof(sbuf), NI_NUMERICHOST | NI_NUMERICSERV) == 0)
printf("host=%s, serv=%s\en", hbuf, sbuf);
@@ -297,7 +296,7 @@ reverse address mapping.
struct sockaddr *addr; /* input */
socklen_t addrlen; /* input */
char hbuf[NI_MAXHOST];
-
+\&
if (getnameinfo(addr, addrlen, hbuf, sizeof(hbuf),
NULL, 0, NI_NAMEREQD))
printf("could not resolve hostname");
diff --git a/man3/getnetent.3 b/man3/getnetent.3
index e553b87f4..9a584583e 100644
--- a/man3/getnetent.3
+++ b/man3/getnetent.3
@@ -8,7 +8,7 @@
.\" Lewine's _POSIX Programmer's Guide_ (O'Reilly & Associates, 1991)
.\" 386BSD man pages
.\" Modified Sat Jul 24 21:48:06 1993 by Rik Faith (faith@cs.unc.edu)
-.TH getnetent 3 2022-12-15 "Linux man-pages 6.03"
+.TH getnetent 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
getnetent, getnetbyname, getnetbyaddr, setnetent, endnetent \-
get network entry
@@ -127,41 +127,53 @@ networks database file
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lb lb lbx
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR getnetent ()
T} Thread safety T{
+.na
+.nh
MT-Unsafe race:netent
race:netentbuf env locale
T}
T{
+.na
+.nh
.BR getnetbyname ()
T} Thread safety T{
+.na
+.nh
MT-Unsafe race:netbyname
env locale
T}
T{
+.na
+.nh
.BR getnetbyaddr ()
T} Thread safety T{
+.na
+.nh
MT-Unsafe race:netbyaddr
locale
T}
T{
+.na
+.nh
.BR setnetent (),
.BR endnetent ()
T} Thread safety T{
+.na
+.nh
MT-Unsafe race:netent env
locale
T}
.TE
-.hy
-.ad
.sp 1
In the above table,
.I netent
@@ -175,8 +187,10 @@ or
are used in parallel in different threads of a program,
then data races could occur.
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, 4.3BSD.
-.SH NOTES
+POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001, 4.3BSD.
+.PP
Before glibc 2.2, the
.I net
argument of
diff --git a/man3/getnetent_r.3 b/man3/getnetent_r.3
index 5ba672424..eda9652d4 100644
--- a/man3/getnetent_r.3
+++ b/man3/getnetent_r.3
@@ -4,7 +4,7 @@
.\"
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
-.TH getnetent_r 3 2023-02-05 "Linux man-pages 6.03"
+.TH getnetent_r 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
getnetent_r, getnetbyname_r, getnetbyaddr_r \- get
network entry (reentrant)
@@ -127,26 +127,25 @@ Try again with a larger buffer
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR getnetent_r (),
.BR getnetbyname_r (),
.BR getnetbyaddr_r ()
T} Thread safety MT-Safe locale
.TE
-.hy
-.ad
.sp 1
-.SH STANDARDS
-These functions are GNU extensions.
+.SH VERSIONS
Functions with similar names exist on some other systems,
though typically with different calling signatures.
+.SH STANDARDS
+GNU.
.SH SEE ALSO
.BR getnetent (3),
.BR networks (5)
diff --git a/man3/getopt.3 b/man3/getopt.3
index 6b2fcf5f4..88fd167b5 100644
--- a/man3/getopt.3
+++ b/man3/getopt.3
@@ -20,7 +20,7 @@
.\" the start of optstring
.\" Modified 2006-12-15, mtk, Added getopt() example program.
.\"
-.TH getopt 3 2023-02-05 "Linux man-pages 6.03"
+.TH getopt 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
getopt, getopt_long, getopt_long_only,
optarg, optind, opterr, optopt \- Parse command-line options
@@ -31,7 +31,7 @@ Standard C library
.nf
.B #include <unistd.h>
.PP
-.BI "int getopt(int " argc ", char *const " argv [],
+.BI "int getopt(int " argc ", char *" argv [],
.BI " const char *" optstring );
.PP
.BI "extern char *" optarg ;
@@ -39,10 +39,10 @@ Standard C library
.PP
.B #include <getopt.h>
.PP
-.BI "int getopt_long(int " argc ", char *const " argv [],
+.BI "int getopt_long(int " argc ", char *" argv [],
.BI " const char *" optstring ,
.BI " const struct option *" longopts ", int *" longindex );
-.BI "int getopt_long_only(int " argc ", char *const " argv [],
+.BI "int getopt_long_only(int " argc ", char *" argv [],
.BI " const char *" optstring ,
.BI " const struct option *" longopts ", int *" longindex );
.fi
@@ -299,7 +299,8 @@ If
encounters an option with a missing argument,
then the return value depends on the first character in
.IR optstring :
-if it is \[aq]:\[aq], then \[aq]:\[aq] is returned; otherwise \[aq]?\[aq] is returned.
+if it is \[aq]:\[aq], then \[aq]:\[aq] is returned;
+otherwise \[aq]?\[aq] is returned.
.PP
.BR getopt_long ()
and
@@ -329,42 +330,55 @@ This behavior was removed in
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lb lb lbx
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR getopt (),
.BR getopt_long (),
.BR getopt_long_only ()
T} Thread safety T{
+.na
+.nh
MT-Unsafe race:getopt env
T}
.TE
-.hy
-.ad
.sp 1
-.SH STANDARDS
-.TP
-.BR getopt ():
-POSIX.1-2001, POSIX.1-2008, and POSIX.2,
-provided the environment variable
+.SH VERSIONS
+POSIX specifies that the
+.I argv
+array argument should be
+.IR const ,
+but these functions permute its elements
+unless the environment variable
.B POSIXLY_CORRECT
is set.
-Otherwise, the elements of \fIargv\fP aren't really
-.IR const ,
-because these functions permute them.
-Nevertheless,
.I const
-is used in the prototype to be compatible with other systems.
+is used in the actual prototype to be compatible with other systems;
+however, this page doesn't show the qualifier,
+to avoid confusing readers.
+.SH STANDARDS
+.TP
+.BR getopt ()
+POSIX.1-2008.
+.TP
+.BR getopt_long ()
+.TQ
+.BR getopt_long_only ()
+GNU.
.IP
The use of \[aq]+\[aq] and \[aq]\-\[aq] in
.I optstring
is a GNU extension.
-.IP
+.SH HISTORY
+.TP
+.BR getopt ()
+POSIX.1-2001, and POSIX.2.
+.PP
On some older implementations,
.BR getopt ()
was declared in
@@ -378,9 +392,6 @@ POSIX.1-1996 marked the use of
for this purpose as LEGACY.
POSIX.1-2001 does not require the declaration to appear in
.IR <stdio.h> .
-.TP
-.BR getopt_long "() and " getopt_long_only ():
-These functions are GNU extensions.
.SH NOTES
A program that scans multiple argument vectors,
or rescans the same vector more than once,
@@ -433,13 +444,13 @@ which expects an associated value.
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
-
+\&
int
main(int argc, char *argv[])
{
int flags, opt;
int nsecs, tfnd;
-
+\&
nsecs = 0;
tfnd = 0;
flags = 0;
@@ -458,19 +469,19 @@ main(int argc, char *argv[])
exit(EXIT_FAILURE);
}
}
-
+\&
printf("flags=%d; tfnd=%d; nsecs=%d; optind=%d\en",
flags, tfnd, nsecs, optind);
-
+\&
if (optind >= argc) {
fprintf(stderr, "Expected argument after options\en");
exit(EXIT_FAILURE);
}
-
+\&
printf("name argument = %s\en", argv[optind]);
-
+\&
/* Other code omitted */
-
+\&
exit(EXIT_SUCCESS);
}
.EE
@@ -485,13 +496,13 @@ with most of its features.
#include <getopt.h>
#include <stdio.h> /* for printf */
#include <stdlib.h> /* for exit */
-
+\&
int
main(int argc, char *argv[])
{
int c;
int digit_optind = 0;
-
+\&
while (1) {
int this_option_optind = optind ? optind : 1;
int option_index = 0;
@@ -504,12 +515,12 @@ main(int argc, char *argv[])
{"file", required_argument, 0, 0 },
{0, 0, 0, 0 }
};
-
+\&
c = getopt_long(argc, argv, "abc:d:012",
long_options, &option_index);
if (c == \-1)
break;
-
+\&
switch (c) {
case 0:
printf("option %s", long_options[option_index].name);
@@ -517,7 +528,7 @@ main(int argc, char *argv[])
printf(" with arg %s", optarg);
printf("\en");
break;
-
+\&
case \[aq]0\[aq]:
case \[aq]1\[aq]:
case \[aq]2\[aq]:
@@ -526,38 +537,38 @@ main(int argc, char *argv[])
digit_optind = this_option_optind;
printf("option %c\en", c);
break;
-
+\&
case \[aq]a\[aq]:
printf("option a\en");
break;
-
+\&
case \[aq]b\[aq]:
printf("option b\en");
break;
-
+\&
case \[aq]c\[aq]:
printf("option c with value \[aq]%s\[aq]\en", optarg);
break;
-
+\&
case \[aq]d\[aq]:
printf("option d with value \[aq]%s\[aq]\en", optarg);
break;
-
+\&
case \[aq]?\[aq]:
break;
-
+\&
default:
printf("?? getopt returned character code 0%o ??\en", c);
}
}
-
+\&
if (optind < argc) {
printf("non\-option ARGV\-elements: ");
while (optind < argc)
printf("%s ", argv[optind++]);
printf("\en");
}
-
+\&
exit(EXIT_SUCCESS);
}
.EE
diff --git a/man3/getpass.3 b/man3/getpass.3
index 7af6fee07..359ebd452 100644
--- a/man3/getpass.3
+++ b/man3/getpass.3
@@ -3,7 +3,7 @@
.\"
.\" SPDX-License-Identifier: GPL-2.0-or-later
.\"
-.TH getpass 3 2023-02-05 "Linux man-pages 6.03"
+.TH getpass 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
getpass \- get a password
.SH LIBRARY
@@ -67,28 +67,25 @@ is set to indicate the error, and NULL is returned.
The process does not have a controlling terminal.
.SH FILES
.I /dev/tty
-.\" .SH HISTORY
-.\" A
-.\" .BR getpass ()
-.\" function appeared in Version 7 AT&T UNIX.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR getpass ()
T} Thread safety MT-Unsafe term
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
+None.
+.SH HISTORY
+Version 7 AT&T UNIX.
Present in SUSv2, but marked LEGACY.
Removed in POSIX.1-2001.
.SH NOTES
diff --git a/man3/getprotoent.3 b/man3/getprotoent.3
index 2420c331b..8aad2d3c8 100644
--- a/man3/getprotoent.3
+++ b/man3/getprotoent.3
@@ -8,7 +8,7 @@
.\" Lewine's _POSIX Programmer's Guide_ (O'Reilly & Associates, 1991)
.\" 386BSD man pages
.\" Modified Sat Jul 24 19:26:03 1993 by Rik Faith (faith@cs.unc.edu)
-.TH getprotoent 3 2022-12-15 "Linux man-pages 6.03"
+.TH getprotoent 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
getprotoent, getprotobyname, getprotobynumber, setprotoent,
endprotoent \- get protocol entry
@@ -122,41 +122,53 @@ protocol database file
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lb lb lbx
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR getprotoent ()
T} Thread safety T{
+.na
+.nh
MT-Unsafe race:protoent
race:protoentbuf locale
T}
T{
+.na
+.nh
.BR getprotobyname ()
T} Thread safety T{
+.na
+.nh
MT-Unsafe race:protobyname
locale
T}
T{
+.na
+.nh
.BR getprotobynumber ()
T} Thread safety T{
+.na
+.nh
MT-Unsafe race:protobynumber
locale
T}
T{
+.na
+.nh
.BR setprotoent (),
.BR endprotoent ()
T} Thread safety T{
+.na
+.nh
MT-Unsafe race:protoent
locale
T}
.TE
-.hy
-.ad
.sp 1
In the above table,
.I protoent
@@ -170,7 +182,9 @@ or
are used in parallel in different threads of a program,
then data races could occur.
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, 4.3BSD.
+POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001, 4.3BSD.
.SH SEE ALSO
.BR getnetent (3),
.BR getprotoent_r (3),
diff --git a/man3/getprotoent_r.3 b/man3/getprotoent_r.3
index 438d1dcad..5028e4f62 100644
--- a/man3/getprotoent_r.3
+++ b/man3/getprotoent_r.3
@@ -4,7 +4,7 @@
.\"
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
-.TH getprotoent_r 3 2023-02-05 "Linux man-pages 6.03"
+.TH getprotoent_r 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
getprotoent_r, getprotobyname_r, getprotobynumber_r \- get
protocol entry (reentrant)
@@ -117,26 +117,25 @@ Try again with a larger buffer
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR getprotoent_r (),
.BR getprotobyname_r (),
.BR getprotobynumber_r ()
T} Thread safety MT-Safe locale
.TE
-.hy
-.ad
.sp 1
-.SH STANDARDS
-These functions are GNU extensions.
+.SH VERSIONS
Functions with similar names exist on some other systems,
though typically with different calling signatures.
+.SH STANDARDS
+GNU.
.SH EXAMPLES
The program below uses
.BR getprotobyname_r ()
@@ -175,9 +174,9 @@ Call failed/record not found
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-
+\&
#define MAX_BUF 10000
-
+\&
int
main(int argc, char *argv[])
{
@@ -185,21 +184,21 @@ main(int argc, char *argv[])
struct protoent result_buf;
struct protoent *result;
char buf[MAX_BUF];
-
+\&
if (argc < 2) {
printf("Usage: %s proto\-name [buflen]\en", argv[0]);
exit(EXIT_FAILURE);
}
-
+\&
buflen = 1024;
if (argc > 2)
buflen = atoi(argv[2]);
-
+\&
if (buflen > MAX_BUF) {
printf("Exceeded buffer limit (%d)\en", MAX_BUF);
exit(EXIT_FAILURE);
}
-
+\&
erange_cnt = 0;
do {
s = getprotobyname_r(argv[1], &result_buf,
@@ -208,34 +207,34 @@ main(int argc, char *argv[])
if (erange_cnt == 0)
printf("ERANGE! Retrying with larger buffer\en");
erange_cnt++;
-
+\&
/* Increment a byte at a time so we can see exactly
what size buffer was required. */
-
+\&
buflen++;
-
+\&
if (buflen > MAX_BUF) {
printf("Exceeded buffer limit (%d)\en", MAX_BUF);
exit(EXIT_FAILURE);
}
}
} while (s == ERANGE);
-
+\&
printf("getprotobyname_r() returned: %s (buflen=%d)\en",
(s == 0) ? "0 (success)" : (s == ENOENT) ? "ENOENT" :
strerror(s), buflen);
-
+\&
if (s != 0 || result == NULL) {
printf("Call failed/record not found\en");
exit(EXIT_FAILURE);
}
-
+\&
printf("p_name=%s; p_proto=%d; aliases=",
result_buf.p_name, result_buf.p_proto);
for (char **p = result_buf.p_aliases; *p != NULL; p++)
printf("%s ", *p);
printf("\en");
-
+\&
exit(EXIT_SUCCESS);
}
.EE
diff --git a/man3/getpt.3 b/man3/getpt.3
index c22316318..6434f9026 100644
--- a/man3/getpt.3
+++ b/man3/getpt.3
@@ -5,7 +5,7 @@
.\" Redistribute and modify at will.
.\" %%%LICENSE_END
.\"
-.TH getpt 3 2022-12-15 "Linux man-pages 6.03"
+.TH getpt 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
getpt \- open a new pseudoterminal master
.SH LIBRARY
@@ -43,32 +43,29 @@ to indicate the error.
.BR getpt ()
can fail with various errors described in
.BR open (2).
-.SH VERSIONS
-.BR getpt ()
-is provided since glibc 2.1.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR getpt ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
-.SH STANDARDS
-.BR getpt ()
-is glibc-specific;
-use
+.SH VERSIONS
+Use
.BR posix_openpt (3)
instead.
+.SH STANDARDS
+GNU.
+.SH HISTORY
+glibc 2.1.
.SH SEE ALSO
.BR grantpt (3),
.BR posix_openpt (3),
diff --git a/man3/getpw.3 b/man3/getpw.3
index 6f199e53a..b94e1179a 100644
--- a/man3/getpw.3
+++ b/man3/getpw.3
@@ -10,7 +10,7 @@
.\" Modified Sat Jul 24 19:23:25 1993 by Rik Faith (faith@cs.unc.edu)
.\" Modified Mon May 27 21:37:47 1996 by Martin Schulze (joey@linux.de)
.\"
-.TH getpw 3 2022-12-15 "Linux man-pages 6.03"
+.TH getpw 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
getpw \- reconstruct password line entry
.SH LIBRARY
@@ -92,21 +92,21 @@ password database file
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR getpw ()
T} Thread safety MT-Safe locale
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
+None.
+.SH HISTORY
SVr2.
.SH BUGS
The
diff --git a/man3/getpwent.3 b/man3/getpwent.3
index e93d596fa..c46af2012 100644
--- a/man3/getpwent.3
+++ b/man3/getpwent.3
@@ -11,7 +11,7 @@
.\" Modified Sat Jul 24 19:22:14 1993 by Rik Faith (faith@cs.unc.edu)
.\" Modified Mon May 27 21:37:47 1996 by Martin Schulze (joey@linux.de)
.\"
-.TH getpwent 3 2023-02-05 "Linux man-pages 6.03"
+.TH getpwent 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
getpwent, setpwent, endpwent \- get password file entry
.SH LIBRARY
@@ -135,28 +135,32 @@ local password database file
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lb lb lbx
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR getpwent ()
T} Thread safety T{
+.na
+.nh
MT-Unsafe race:pwent
race:pwentbuf locale
T}
T{
+.na
+.nh
.BR setpwent (),
.BR endpwent ()
T} Thread safety T{
+.na
+.nh
MT-Unsafe race:pwent locale
T}
.TE
-.hy
-.ad
.sp 1
In the above table,
.I pwent
@@ -169,11 +173,14 @@ or
.BR endpwent ()
are used in parallel in different threads of a program,
then data races could occur.
-.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, SVr4, 4.3BSD.
+.SH VERSIONS
The
.I pw_gecos
field is not specified in POSIX, but is present on most implementations.
+.SH STANDARDS
+POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001, SVr4, 4.3BSD.
.SH SEE ALSO
.BR fgetpwent (3),
.BR getpw (3),
diff --git a/man3/getpwent_r.3 b/man3/getpwent_r.3
index b9bbc54e8..1cefc5793 100644
--- a/man3/getpwent_r.3
+++ b/man3/getpwent_r.3
@@ -3,7 +3,7 @@
.\"
.\" SPDX-License-Identifier: GPL-2.0-or-later
.\"
-.TH getpwent_r 3 2023-02-05 "Linux man-pages 6.03"
+.TH getpwent_r 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
getpwent_r, fgetpwent_r \- get passwd file entry reentrantly
.SH LIBRARY
@@ -113,24 +113,26 @@ Try again with larger buffer.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lb lb lbx
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR getpwent_r ()
T} Thread safety T{
+.na
+.nh
MT-Unsafe race:pwent locale
T}
T{
+.na
+.nh
.BR fgetpwent_r ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
In the above table,
.I pwent
@@ -144,10 +146,7 @@ or
.BR getpwent_r ()
are used in parallel in different threads of a program,
then data races could occur.
-.SH STANDARDS
-These functions are GNU extensions, done in a style resembling
-the POSIX version of functions like
-.BR getpwnam_r (3).
+.SH VERSIONS
Other systems use the prototype
.PP
.in +4n
@@ -166,6 +165,12 @@ getpwent_r(struct passwd *pwd, char *buf, int buflen,
FILE **pw_fp);
.EE
.in
+.SH STANDARDS
+None.
+.SH HISTORY
+These functions are done in a style resembling
+the POSIX version of functions like
+.BR getpwnam_r (3).
.SH NOTES
The function
.BR getpwent_r ()
@@ -179,9 +184,9 @@ in the stream with all other threads.
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
-
+\&
#define BUFLEN 4096
-
+\&
int
main(void)
{
@@ -189,7 +194,7 @@ main(void)
struct passwd *pwp;
char buf[BUFLEN];
int i;
-
+\&
setpwent();
while (1) {
i = getpwent_r(&pw, buf, sizeof(buf), &pwp);
diff --git a/man3/getpwnam.3 b/man3/getpwnam.3
index 2557f8b31..3e6af831d 100644
--- a/man3/getpwnam.3
+++ b/man3/getpwnam.3
@@ -15,7 +15,7 @@
.\" Modified 2003-11-15 by aeb
.\" 2008-11-07, mtk, Added an example program for getpwnam_r().
.\"
-.TH getpwnam 3 2023-02-05 "Linux man-pages 6.03"
+.TH getpwnam 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
getpwnam, getpwnam_r, getpwuid, getpwuid_r \- get password file entry
.SH LIBRARY
@@ -201,38 +201,49 @@ local password database file
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lb lb lbx
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR getpwnam ()
T} Thread safety T{
+.na
+.nh
MT-Unsafe race:pwnam locale
T}
T{
+.na
+.nh
.BR getpwuid ()
T} Thread safety T{
+.na
+.nh
MT-Unsafe race:pwuid locale
T}
T{
+.na
+.nh
.BR getpwnam_r (),
.BR getpwuid_r ()
T} Thread safety T{
+.na
+.nh
MT-Safe locale
T}
.TE
-.hy
-.ad
.sp 1
-.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, SVr4, 4.3BSD.
+.SH VERSIONS
The
.I pw_gecos
field is not specified in POSIX, but is present on most implementations.
+.SH STANDARDS
+POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001, SVr4, 4.3BSD.
.SH NOTES
The formulation given above under "RETURN VALUE" is from POSIX.1-2001.
It does not call "not found" an error, and hence does not specify what value
@@ -286,7 +297,7 @@ supplied as a command-line argument.
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
-
+\&
int
main(int argc, char *argv[])
{
@@ -295,22 +306,22 @@ main(int argc, char *argv[])
char *buf;
long bufsize;
int s;
-
+\&
if (argc != 2) {
fprintf(stderr, "Usage: %s username\en", argv[0]);
exit(EXIT_FAILURE);
}
-
+\&
bufsize = sysconf(_SC_GETPW_R_SIZE_MAX);
if (bufsize == \-1) /* Value was indeterminate */
bufsize = 16384; /* Should be more than enough */
-
+\&
buf = malloc(bufsize);
if (buf == NULL) {
perror("malloc");
exit(EXIT_FAILURE);
}
-
+\&
s = getpwnam_r(argv[1], &pwd, buf, bufsize, &result);
if (result == NULL) {
if (s == 0)
@@ -321,7 +332,7 @@ main(int argc, char *argv[])
}
exit(EXIT_FAILURE);
}
-
+\&
printf("Name: %s; UID: %jd\en", pwd.pw_gecos,
(intmax_t) pwd.pw_uid);
exit(EXIT_SUCCESS);
diff --git a/man3/getrpcent.3 b/man3/getrpcent.3
index d28704a20..be94a0e05 100644
--- a/man3/getrpcent.3
+++ b/man3/getrpcent.3
@@ -6,7 +6,7 @@
.\" %%%LICENSE_END
.\"
.\" @(#)getrpcent.3n 2.2 88/08/02 4.0 RPCSRC; from 1.11 88/03/14 SMI
-.TH getrpcent 3 2022-12-15 "Linux man-pages 6.03"
+.TH getrpcent 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
getrpcent, getrpcbyname, getrpcbynumber, setrpcent, endrpcent \- get
RPC entry
@@ -101,29 +101,30 @@ RPC program number database.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR getrpcent (),
.BR getrpcbyname (),
.BR getrpcbynumber ()
T} Thread safety MT-Unsafe
T{
+.na
+.nh
.BR setrpcent (),
.BR endrpcent ()
T} Thread safety MT-Safe locale
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-Not in POSIX.1.
-Present on the BSDs, Solaris, and many other systems.
+BSD.
+.SH HISTORY
+BSD, Solaris.
.SH BUGS
All information
is contained in a static area
diff --git a/man3/getrpcent_r.3 b/man3/getrpcent_r.3
index c3298d54e..fd58a9f04 100644
--- a/man3/getrpcent_r.3
+++ b/man3/getrpcent_r.3
@@ -4,7 +4,7 @@
.\"
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
-.TH getrpcent_r 3 2023-02-05 "Linux man-pages 6.03"
+.TH getrpcent_r 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
getrpcent_r, getrpcbyname_r, getrpcbynumber_r \- get
RPC entry (reentrant)
@@ -113,26 +113,25 @@ Try again with a larger buffer
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR getrpcent_r (),
.BR getrpcbyname_r (),
.BR getrpcbynumber_r ()
T} Thread safety MT-Safe locale
.TE
-.hy
-.ad
.sp 1
-.SH STANDARDS
-These functions are GNU extensions.
+.SH VERSIONS
Functions with similar names exist on some other systems,
though typically with different calling signatures.
+.SH STANDARDS
+GNU.
.SH SEE ALSO
.BR getrpcent (3),
.BR rpc (5)
diff --git a/man3/getrpcport.3 b/man3/getrpcport.3
index 043df378c..56b6188ba 100644
--- a/man3/getrpcport.3
+++ b/man3/getrpcport.3
@@ -6,7 +6,7 @@
.\" %%%LICENSE_END
.\"
.\" @(#)getrpcport.3r 2.2 88/08/02 4.0 RPCSRC; from 1.12 88/02/26 SMI
-.TH getrpcport 3 2022-12-15 "Linux man-pages 6.03"
+.TH getrpcport 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
getrpcport \- get RPC port number
.SH LIBRARY
@@ -42,20 +42,19 @@ The version mismatch will be detected upon the first call to the service.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR getrpcport ()
T} Thread safety MT-Safe env locale
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-Not in POSIX.1.
-Present on the BSDs, Solaris, and many other systems.
+BSD.
+.SH HISTORY
+BSD, Solaris.
diff --git a/man3/gets.3 b/man3/gets.3
index 49c67f65b..9bf383aed 100644
--- a/man3/gets.3
+++ b/man3/gets.3
@@ -7,7 +7,7 @@
.\" Modified Fri Sep 8 15:48:13 1995 by Andries Brouwer (aeb@cwi.nl)
.\" Modified 2013-12-31, David Malcolm <dmalcolm@redhat.com>
.\" Split gets(3) into its own page; fgetc() et al. move to fgetc(3)
-.TH gets 3 2023-02-05 "Linux man-pages 6.03"
+.TH gets 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
gets \- get a string from standard input (DEPRECATED)
.SH LIBRARY
@@ -42,22 +42,22 @@ guarantees that the function will even return.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR gets ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-C99, POSIX.1-2001.
+POSIX.1-2008.
+.SH HISTORY
+C89, POSIX.1-2001.
.PP
LSB deprecates
.BR gets ().
diff --git a/man3/getservent.3 b/man3/getservent.3
index 819b28bf2..fdd5d91cb 100644
--- a/man3/getservent.3
+++ b/man3/getservent.3
@@ -12,7 +12,7 @@
.\" Modified Mon Apr 22 01:50:54 1996 by Martin Schulze <joey@infodrom.north.de>
.\" 2001-07-25 added a clause about NULL proto (Martin Michlmayr or David N. Welton)
.\"
-.TH getservent 3 2022-12-15 "Linux man-pages 6.03"
+.TH getservent 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
getservent, getservbyname, getservbyport, setservent, endservent \-
get service entry
@@ -139,41 +139,53 @@ services database file
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lb lb lbx
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR getservent ()
T} Thread safety T{
+.na
+.nh
MT-Unsafe race:servent
race:serventbuf locale
T}
T{
+.na
+.nh
.BR getservbyname ()
T} Thread safety T{
+.na
+.nh
MT-Unsafe race:servbyname
locale
T}
T{
+.na
+.nh
.BR getservbyport ()
T} Thread safety T{
+.na
+.nh
MT-Unsafe race:servbyport
locale
T}
T{
+.na
+.nh
.BR setservent (),
.BR endservent ()
T} Thread safety T{
+.na
+.nh
MT-Unsafe race:servent
locale
T}
.TE
-.hy
-.ad
.sp 1
In the above table,
.I servent
@@ -187,7 +199,9 @@ or
are used in parallel in different threads of a program,
then data races could occur.
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, 4.3BSD.
+POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001, 4.3BSD.
.SH SEE ALSO
.BR getnetent (3),
.BR getprotoent (3),
diff --git a/man3/getservent_r.3 b/man3/getservent_r.3
index d46d3d8c1..04397ee83 100644
--- a/man3/getservent_r.3
+++ b/man3/getservent_r.3
@@ -4,7 +4,7 @@
.\"
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
-.TH getservent_r 3 2023-02-05 "Linux man-pages 6.03"
+.TH getservent_r 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
getservent_r, getservbyname_r, getservbyport_r \- get
service entry (reentrant)
@@ -118,26 +118,25 @@ Try again with a larger buffer
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR getservent_r (),
.BR getservbyname_r (),
.BR getservbyport_r ()
T} Thread safety MT-Safe locale
.TE
-.hy
-.ad
.sp 1
-.SH STANDARDS
-These functions are GNU extensions.
+.SH VERSIONS
Functions with similar names exist on some other systems,
though typically with different calling signatures.
+.SH STANDARDS
+GNU.
.SH EXAMPLES
The program below uses
.BR getservbyport_r ()
@@ -175,9 +174,9 @@ Call failed/record not found
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-
+\&
#define MAX_BUF 10000
-
+\&
int
main(int argc, char *argv[])
{
@@ -186,25 +185,25 @@ main(int argc, char *argv[])
struct servent *result;
char buf[MAX_BUF];
char *protop;
-
+\&
if (argc < 3) {
printf("Usage: %s port\-num proto\-name [buflen]\en", argv[0]);
exit(EXIT_FAILURE);
}
-
+\&
port = htons(atoi(argv[1]));
protop = (strcmp(argv[2], "null") == 0 ||
strcmp(argv[2], "NULL") == 0) ? NULL : argv[2];
-
+\&
buflen = 1024;
if (argc > 3)
buflen = atoi(argv[3]);
-
+\&
if (buflen > MAX_BUF) {
printf("Exceeded buffer limit (%d)\en", MAX_BUF);
exit(EXIT_FAILURE);
}
-
+\&
erange_cnt = 0;
do {
s = getservbyport_r(port, protop, &result_buf,
@@ -213,35 +212,35 @@ main(int argc, char *argv[])
if (erange_cnt == 0)
printf("ERANGE! Retrying with larger buffer\en");
erange_cnt++;
-
+\&
/* Increment a byte at a time so we can see exactly
what size buffer was required. */
-
+\&
buflen++;
-
+\&
if (buflen > MAX_BUF) {
printf("Exceeded buffer limit (%d)\en", MAX_BUF);
exit(EXIT_FAILURE);
}
}
} while (s == ERANGE);
-
+\&
printf("getservbyport_r() returned: %s (buflen=%d)\en",
(s == 0) ? "0 (success)" : (s == ENOENT) ? "ENOENT" :
strerror(s), buflen);
-
+\&
if (s != 0 || result == NULL) {
printf("Call failed/record not found\en");
exit(EXIT_FAILURE);
}
-
+\&
printf("s_name=%s; s_proto=%s; s_port=%d; aliases=",
result_buf.s_name, result_buf.s_proto,
ntohs(result_buf.s_port));
for (char **p = result_buf.s_aliases; *p != NULL; p++)
printf("%s ", *p);
printf("\en");
-
+\&
exit(EXIT_SUCCESS);
}
.EE
diff --git a/man3/getspnam.3 b/man3/getspnam.3
index 8ae1517e0..f0752cb63 100644
--- a/man3/getspnam.3
+++ b/man3/getspnam.3
@@ -4,7 +4,7 @@
.\"
.\" SPDX-License-Identifier: GPL-1.0-or-later
.\"
-.TH getspnam 3 2023-02-05 "Linux man-pages 6.03"
+.TH getspnam 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
getspnam, getspnam_r, getspent, getspent_r, setspent, endspent,
fgetspent, fgetspent_r, sgetspent, sgetspent_r, putspent,
@@ -244,58 +244,82 @@ to the pathname of the shadow password file.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lb lb lbx
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR getspnam ()
T} Thread safety T{
+.na
+.nh
MT-Unsafe race:getspnam locale
T}
T{
+.na
+.nh
.BR getspent ()
T} Thread safety T{
+.na
+.nh
MT-Unsafe race:getspent
race:spentbuf locale
T}
T{
+.na
+.nh
.BR setspent (),
.BR endspent (),
.BR getspent_r ()
T} Thread safety T{
+.na
+.nh
MT-Unsafe race:getspent locale
T}
T{
+.na
+.nh
.BR fgetspent ()
T} Thread safety T{
+.na
+.nh
MT-Unsafe race:fgetspent
T}
T{
+.na
+.nh
.BR sgetspent ()
T} Thread safety T{
+.na
+.nh
MT-Unsafe race:sgetspent
T}
T{
+.na
+.nh
.BR putspent (),
.BR getspnam_r (),
.BR sgetspent_r ()
T} Thread safety T{
+.na
+.nh
MT-Safe locale
T}
T{
+.na
+.nh
.BR lckpwdf (),
.BR ulckpwdf (),
.BR fgetspent_r ()
T} Thread safety T{
+.na
+.nh
MT-Safe
T}
.TE
-.hy
-.ad
.sp 1
In the above table,
.I getspent
@@ -309,10 +333,10 @@ or
.BR endspent ()
are used in parallel in different threads of a program,
then data races could occur.
+.SH VERSIONS
+Many other systems provide a similar API.
.SH STANDARDS
-The shadow password database and its associated API are
-not specified in POSIX.1.
-However, many other systems provide a similar API.
+None.
.SH SEE ALSO
.BR getgrnam (3),
.BR getpwnam (3),
diff --git a/man3/getsubopt.3 b/man3/getsubopt.3
index 6688d2a73..8cbccb04c 100644
--- a/man3/getsubopt.3
+++ b/man3/getsubopt.3
@@ -23,7 +23,7 @@
.\" SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
.\" %%%LICENSE_END
.\"
-.TH getsubopt 3 2023-02-05 "Linux man-pages 6.03"
+.TH getsubopt 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
getsubopt \- parse suboption arguments from a string
.SH LIBRARY
@@ -132,22 +132,22 @@ is not (necessarily) the same as the first suboption after
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR getsubopt ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008.
+POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001.
.SH NOTES
Since
.BR getsubopt ()
@@ -162,9 +162,9 @@ The following program expects suboptions following a "\-o" option.
#define _XOPEN_SOURCE 500
#include <stdio.h>
#include <stdlib.h>
-
+\&
#include <assert.h>
-
+\&
int
main(int argc, char *argv[])
{
@@ -182,27 +182,27 @@ main(int argc, char *argv[])
char *subopts;
char *value;
int opt;
-
+\&
int readonly = 0;
int readwrite = 0;
char *name = NULL;
int errfnd = 0;
-
+\&
while ((opt = getopt(argc, argv, "o:")) != \-1) {
switch (opt) {
case \[aq]o\[aq]:
subopts = optarg;
while (*subopts != \[aq]\e0\[aq] && !errfnd) {
-
+\&
switch (getsubopt(&subopts, token, &value)) {
case RO_OPT:
readonly = 1;
break;
-
+\&
case RW_OPT:
readwrite = 1;
break;
-
+\&
case NAME_OPT:
if (value == NULL) {
fprintf(stderr,
@@ -211,10 +211,10 @@ main(int argc, char *argv[])
errfnd = 1;
continue;
}
-
+\&
name = value;
break;
-
+\&
default:
fprintf(stderr,
"No match found for token: /%s/\en", value);
@@ -229,21 +229,21 @@ main(int argc, char *argv[])
errfnd = 1;
}
break;
-
+\&
default:
errfnd = 1;
}
}
-
+\&
if (errfnd || argc == 1) {
fprintf(stderr, "\enUsage: %s \-o <suboptstring>\en", argv[0]);
fprintf(stderr,
"suboptions are \[aq]ro\[aq], \[aq]rw\[aq], and \[aq]name=<value>\[aq]\en");
exit(EXIT_FAILURE);
}
-
+\&
/* Remainder of program... */
-
+\&
exit(EXIT_SUCCESS);
}
.EE
diff --git a/man3/getttyent.3 b/man3/getttyent.3
index bcab90958..81c4c4c4a 100644
--- a/man3/getttyent.3
+++ b/man3/getttyent.3
@@ -3,7 +3,7 @@
.\"
.\" SPDX-License-Identifier: GPL-1.0-or-later
.\"
-.TH getttyent 3 2022-12-15 "Linux man-pages 6.03"
+.TH getttyent 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
getttyent, getttynam, setttyent, endttyent \- get ttys file entry
.SH LIBRARY
@@ -75,26 +75,23 @@ can be:
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR getttyent (),
.BR setttyent (),
.BR endttyent (),
.BR getttynam ()
T} Thread safety MT-Unsafe race:ttyent
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-Not in POSIX.1.
-Present on the BSDs, and perhaps other systems.
+BSD.
.SH NOTES
Under Linux, the file
.IR /etc/ttys ,
diff --git a/man3/getusershell.3 b/man3/getusershell.3
index 53a56d594..cbd1d1ac8 100644
--- a/man3/getusershell.3
+++ b/man3/getusershell.3
@@ -8,7 +8,7 @@
.\" Lewine's _POSIX Programmer's Guide_ (O'Reilly & Associates, 1991)
.\" 386BSD man pages
.\" Modified Sat Jul 24 19:17:53 1993 by Rik Faith (faith@cs.unc.edu)
-.TH getusershell 3 2022-12-15 "Linux man-pages 6.03"
+.TH getusershell 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
getusershell, setusershell, endusershell \- get permitted user shells
.SH LIBRARY
@@ -77,23 +77,23 @@ function returns NULL on end-of-file.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR getusershell (),
.BR setusershell (),
.BR endusershell ()
T} Thread safety MT-Unsafe
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
+None.
+.SH HISTORY
4.3BSD.
.SH SEE ALSO
.BR shells (5)
diff --git a/man3/getutent.3 b/man3/getutent.3
index bd0369db4..d2aefcfb0 100644
--- a/man3/getutent.3
+++ b/man3/getutent.3
@@ -10,7 +10,7 @@
.\" Modified Thu Jul 25 14:43:46 MET DST 1996 by Michael Haardt
.\" <michael@cantor.informatik.rwth-aachen.de>
.\"
-.TH getutent 3 2023-02-05 "Linux man-pages 6.03"
+.TH getutent 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
getutent, getutid, getutline, pututline, setutent, endutent,
utmpname \- access utmp file entries
@@ -145,40 +145,50 @@ database of past user logins
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lb lb lbx
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR getutent ()
T} Thread safety T{
+.na
+.nh
MT-Unsafe init race:utent
race:utentbuf sig:ALRM timer
T}
T{
+.na
+.nh
.BR getutid (),
.BR getutline ()
T} Thread safety T{
+.na
+.nh
MT-Unsafe init race:utent
sig:ALRM timer
T}
T{
+.na
+.nh
.BR pututline ()
T} Thread safety T{
+.na
+.nh
MT-Unsafe race:utent
sig:ALRM timer
T}
T{
+.na
+.nh
.BR setutent (),
.BR endutent (),
.BR utmpname ()
T} Thread safety MT-Unsafe race:utent
.TE
-.hy
-.ad
.sp 1
In the above table,
.I utent
@@ -196,6 +206,8 @@ or
are used in parallel in different threads of a program,
then data races could occur.
.SH STANDARDS
+None.
+.SH HISTORY
XPG2, SVr4.
.PP
In XPG2 and SVID 2 the function
@@ -302,14 +314,14 @@ and
#include <time.h>
#include <unistd.h>
#include <utmp.h>
-
+\&
int
main(void)
{
struct utmp entry;
-
+\&
system("echo before adding entry:;who");
-
+\&
entry.ut_type = USER_PROCESS;
entry.ut_pid = getpid();
strcpy(entry.ut_line, ttyname(STDIN_FILENO) + strlen("/dev/"));
@@ -321,18 +333,18 @@ main(void)
entry.ut_addr = 0;
setutent();
pututline(&entry);
-
+\&
system("echo after adding entry:;who");
-
+\&
entry.ut_type = DEAD_PROCESS;
memset(entry.ut_line, 0, UT_LINESIZE);
entry.ut_time = 0;
memset(entry.ut_user, 0, UT_NAMESIZE);
setutent();
pututline(&entry);
-
+\&
system("echo after removing entry:;who");
-
+\&
endutent();
exit(EXIT_SUCCESS);
}
diff --git a/man3/getutmp.3 b/man3/getutmp.3
index d6e4df7b0..04cf0ad6b 100644
--- a/man3/getutmp.3
+++ b/man3/getutmp.3
@@ -4,7 +4,7 @@
.\"
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
-.TH getutmp 3 2022-12-15 "Linux man-pages 6.03"
+.TH getutmp 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
getutmp, getutmpx \- copy utmp structure to utmpx, and vice versa
.SH LIBRARY
@@ -34,29 +34,27 @@ The
function performs the converse operation.
.SH RETURN VALUE
These functions do not return a value.
-.SH VERSIONS
-These functions were added in glibc 2.1.1.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR getutmp (),
.BR getutmpx ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-These functions are nonstandard, but appear on a few other systems,
-such as Solaris and NetBSD.
+None.
+.SH HISTORY
+glibc 2.1.1.
+Solaris, NetBSD.
.SH NOTES
These functions exist primarily for compatibility with other
systems where the
diff --git a/man3/getw.3 b/man3/getw.3
index 0223f1729..f96512f9b 100644
--- a/man3/getw.3
+++ b/man3/getw.3
@@ -3,7 +3,7 @@
.\"
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
-.TH getw 3 2023-02-05 "Linux man-pages 6.03"
+.TH getw 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
getw, putw \- input and output of words (ints)
.SH LIBRARY
@@ -56,24 +56,23 @@ On error, they return \fBEOF\fP.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR getw (),
.BR putw ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
+None.
+.SH HISTORY
SVr4, SUSv2.
-Not present in POSIX.1.
.SH BUGS
The value returned on error is also a legitimate data value.
.BR ferror (3)
diff --git a/man3/getwchar.3 b/man3/getwchar.3
index 6378479a4..0ce51ce86 100644
--- a/man3/getwchar.3
+++ b/man3/getwchar.3
@@ -10,7 +10,7 @@
.\" http://www.UNIX-systems.org/online.html
.\" ISO/IEC 9899:1999
.\"
-.TH getwchar 3 2022-12-15 "Linux man-pages 6.03"
+.TH getwchar 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
getwchar \- read a wide character from standard input
.SH LIBRARY
@@ -54,22 +54,22 @@ standard input, or
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR getwchar ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, C99.
+C11, POSIX.1-2008.
+.SH HISTORY
+C99, POSIX.1-2001.
.SH NOTES
The behavior of
.BR getwchar ()
diff --git a/man3/glob.3 b/man3/glob.3
index 5887c3420..34a2745ee 100644
--- a/man3/glob.3
+++ b/man3/glob.3
@@ -12,7 +12,7 @@
.\" Expanded the description of various flags
.\" Various wording fixes.
.\"
-.TH glob 3 2023-02-05 "Linux man-pages 6.03"
+.TH glob 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
glob, globfree \- find pathnames matching a pattern, free memory from glob()
.SH LIBRARY
@@ -257,25 +257,27 @@ for no found matches.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lb lb lbx
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR glob ()
T} Thread safety T{
+.na
+.nh
MT-Unsafe race:utent env
sig:ALRM timer locale
T}
T{
+.na
+.nh
.BR globfree ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
In the above table,
.I utent
@@ -292,7 +294,9 @@ then data races could occur.
calls those functions,
so we use race:utent to remind users.
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, POSIX.2.
+POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001, POSIX.2.
.SH NOTES
The structure elements
.I gl_pathc
@@ -327,7 +331,7 @@ in the shell:
.in +4n
.EX
glob_t globbuf;
-
+\&
globbuf.gl_offs = 2;
glob("*.c", GLOB_DOOFFS, NULL, &globbuf);
glob("../*.c", GLOB_DOOFFS | GLOB_APPEND, NULL, &globbuf);
diff --git a/man3/gnu_get_libc_version.3 b/man3/gnu_get_libc_version.3
index 0b610d30d..a1af9d1f9 100644
--- a/man3/gnu_get_libc_version.3
+++ b/man3/gnu_get_libc_version.3
@@ -4,7 +4,7 @@
.\"
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
-.TH gnu_get_libc_version 3 2022-12-15 "Linux man-pages 6.03"
+.TH gnu_get_libc_version 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
gnu_get_libc_version, gnu_get_libc_release \- get glibc version and release
.SH LIBRARY
@@ -28,28 +28,26 @@ returns a string indicates the release status of the glibc version
available on the system.
This will be a string such as
.IR "stable" .
-.SH VERSIONS
-These functions first appeared in glibc 2.1.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR gnu_get_libc_version (),
.BR gnu_get_libc_release ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-These functions are glibc-specific.
+GNU.
+.SH HISTORY
+glibc 2.1.
.SH EXAMPLES
When run, the program below will produce output such as the following:
.PP
@@ -66,9 +64,9 @@ GNU libc release: stable
.EX
#include <stdio.h>
#include <stdlib.h>
-
+\&
#include <gnu/libc\-version.h>
-
+\&
int
main(void)
{
diff --git a/man3/grantpt.3 b/man3/grantpt.3
index b33fdc452..174c5c949 100644
--- a/man3/grantpt.3
+++ b/man3/grantpt.3
@@ -3,7 +3,7 @@
.\" This page is in the public domain. - aeb
.\" %%%LICENSE_END
.\"
-.TH grantpt 3 2023-02-05 "Linux man-pages 6.03"
+.TH grantpt 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
grantpt \- grant access to the slave pseudoterminal
.SH LIBRARY
@@ -66,43 +66,39 @@ argument is not a valid open file descriptor.
The
.I fd
argument is valid but not associated with a master pseudoterminal.
-.SH VERSIONS
-.BR grantpt ()
-is provided since glibc 2.1.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR grantpt ()
T} Thread safety MT-Safe locale
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008.
-.SH NOTES
+POSIX.1-2008.
+.SH HISTORY
+glibc 2.1.
+POSIX.1-2001.
+.PP
This is part of the UNIX 98 pseudoterminal support, see
.BR pts (4).
.PP
-Many systems implement this function via a set-user-ID helper binary
+Historical systems implemented this function via a set-user-ID helper binary
called "pt_chown".
-On Linux systems with a devpts filesystem (present since Linux 2.2),
-the kernel normally sets the correct ownership and permissions
-for the pseudoterminal slave when the master is opened
-.RB ( posix_openpt (3)),
-so that nothing must be done by
-.BR grantpt ().
-Thus, no such helper binary is required
-(and indeed it is configured to be absent during the
-glibc build that is typical on many systems).
+glibc on Linux before glibc 2.33 could do so as well,
+in order to support configurations with only BSD pseudoterminals;
+this support has been removed.
+On modern systems this is either a no-op
+\[em]with permissions configured on pty allocation, as is the case on Linux\[em]
+or an
+.BR ioctl (2).
.SH SEE ALSO
.BR open (2),
.BR posix_openpt (3),
diff --git a/man3/group_member.3 b/man3/group_member.3
index 42e9af9d4..620b59ff2 100644
--- a/man3/group_member.3
+++ b/man3/group_member.3
@@ -2,7 +2,7 @@
.\"
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
-.TH group_member 3 2022-10-30 "Linux man-pages 6.03"
+.TH group_member 3 2023-03-30 "Linux man-pages 6.05.01"
.SH NAME
group_member \- test whether a process is in a group
.SH LIBRARY
@@ -40,7 +40,7 @@ supplementary group IDs matches
.IR gid ,
and zero otherwise.
.SH STANDARDS
-This function is a nonstandard GNU extension.
+GNU.
.SH SEE ALSO
.BR getgid (2),
.BR getgroups (2),
diff --git a/man3/gsignal.3 b/man3/gsignal.3
index f1b50cf99..458765033 100644
--- a/man3/gsignal.3
+++ b/man3/gsignal.3
@@ -5,7 +5,7 @@
.\"
.\" This replaces an earlier man page written by Walter Harms
.\" <walter.harms@informatik.uni-oldenburg.de>.
-.TH gsignal 3 2023-02-05 "Linux man-pages 6.03"
+.TH gsignal 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
gsignal, ssignal \- software signal facility
.SH LIBRARY
@@ -84,25 +84,27 @@ varies (often 1\[en]15 or 1\[en]17).
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR gsignal ()
T} Thread safety MT-Safe
T{
+.na
+.nh
.BR ssignal ()
T} Thread safety MT-Safe sigintr
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-These functions are available under AIX, DG/UX, HP-UX, SCO, Solaris, Tru64.
+None.
+.SH HISTORY
+AIX, DG/UX, HP-UX, SCO, Solaris, Tru64.
They are called obsolete under most of these systems, and are
broken under
.\" Linux libc and
diff --git a/man3/hash.3 b/man3/hash.3
index a2ccff238..ed99fe100 100644
--- a/man3/hash.3
+++ b/man3/hash.3
@@ -5,7 +5,7 @@
.\"
.\" @(#)hash.3 8.6 (Berkeley) 8/18/94
.\"
-.TH hash 3 2022-12-04 "Linux man-pages 6.03"
+.TH hash 3 2022-12-04 "Linux man-pages 6.05.01"
.UC 7
.SH NAME
hash \- hash database access method
diff --git a/man3/hsearch.3 b/man3/hsearch.3
index 72ae4a7e2..dd801dfa3 100644
--- a/man3/hsearch.3
+++ b/man3/hsearch.3
@@ -14,7 +14,7 @@
.\" 2008-09-03, mtk, restructured somewhat, in part after suggestions from
.\" Timothy S. Nelson <wayland@wayland.id.au>
.\"
-.TH hsearch 3 2022-12-15 "Linux man-pages 6.03"
+.TH hsearch 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
hcreate, hdestroy, hsearch, hcreate_r, hdestroy_r,
hsearch_r \- hash table management
@@ -213,41 +213,57 @@ error.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR hcreate (),
.BR hsearch (),
.BR hdestroy ()
T} Thread safety MT-Unsafe race:hsearch
T{
+.na
+.nh
.BR hcreate_r (),
.BR hsearch_r (),
.BR hdestroy_r ()
T} Thread safety MT-Safe race:htab
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-The functions
-.BR hcreate (),
-.BR hsearch (),
-and
+.TP
+.BR hcreate ()
+.TQ
+.BR hsearch ()
+.TQ
.BR hdestroy ()
-are from SVr4, and are described in POSIX.1-2001 and POSIX.1-2008.
-.PP
-The functions
-.BR hcreate_r (),
-.BR hsearch_r (),
-and
+POSIX.1-2008.
+.TP
+.BR hcreate_r ()
+.TQ
+.BR hsearch_r ()
+.TQ
+.BR hdestroy_r ()
+GNU.
+.SH HISTORY
+.TP
+.BR hcreate ()
+.TQ
+.BR hsearch ()
+.TQ
+.BR hdestroy ()
+SVr4, POSIX.1-2001.
+.TP
+.BR hcreate_r ()
+.TQ
+.BR hsearch_r ()
+.TQ
.BR hdestroy_r ()
-are GNU extensions.
+GNU.
.SH NOTES
Hash table implementations are usually more efficient when the
table contains enough free space to minimize collisions.
@@ -291,22 +307,22 @@ some of them.
#include <search.h>
#include <stdio.h>
#include <stdlib.h>
-
+\&
static char *data[] = { "alpha", "bravo", "charlie", "delta",
"echo", "foxtrot", "golf", "hotel", "india", "juliet",
"kilo", "lima", "mike", "november", "oscar", "papa",
"quebec", "romeo", "sierra", "tango", "uniform",
"victor", "whisky", "x\-ray", "yankee", "zulu"
};
-
+\&
int
main(void)
{
ENTRY e;
ENTRY *ep;
-
+\&
hcreate(30);
-
+\&
for (size_t i = 0; i < 24; i++) {
e.key = data[i];
/* data is just an integer, instead of a
@@ -319,7 +335,7 @@ main(void)
exit(EXIT_FAILURE);
}
}
-
+\&
for (size_t i = 22; i < 26; i++) {
/* print two entries from the table, and
show that two are not in the table */
diff --git a/man3/hypot.3 b/man3/hypot.3
index 9c64e6ce5..5f106c652 100644
--- a/man3/hypot.3
+++ b/man3/hypot.3
@@ -11,7 +11,7 @@
.\" Modified 2002-07-27 by Walter Harms
.\" (walter.harms@informatik.uni-oldenburg.de)
.\"
-.TH hypot 3 2023-02-05 "Linux man-pages 6.03"
+.TH hypot 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
hypot, hypotf, hypotl \- Euclidean distance function
.SH LIBRARY
@@ -128,24 +128,24 @@ for this case.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR hypot (),
.BR hypotf (),
.BR hypotl ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-C99, POSIX.1-2001, POSIX.1-2008.
+C11, POSIX.1-2008.
+.SH HISTORY
+C99, POSIX.1-2001.
.PP
The variant returning
.I double
diff --git a/man3/iconv.3 b/man3/iconv.3
index d035603e3..6e4a091f9 100644
--- a/man3/iconv.3
+++ b/man3/iconv.3
@@ -11,7 +11,7 @@
.\" 2000-06-30 correction by Yuichi SATO <sato@complex.eng.hokudai.ac.jp>
.\" 2000-11-15 aeb, fixed prototype
.\"
-.TH iconv 3 2023-02-05 "Linux man-pages 6.03"
+.TH iconv 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
iconv \- perform character set conversion
.SH LIBRARY
@@ -71,7 +71,7 @@ If the character encoding of the input is stateful, the
function can also convert a sequence of input bytes
to an update to the conversion state without producing any output bytes;
such input is called a \fIshift sequence\fP.
-The conversion can stop for four reasons:
+The conversion can stop for five reasons:
.IP \[bu] 3
An invalid multibyte sequence is encountered in the input.
In this case,
@@ -80,6 +80,42 @@ it sets \fIerrno\fP to \fBEILSEQ\fP and returns
\fI*inbuf\fP
is left pointing to the beginning of the invalid multibyte sequence.
.IP \[bu]
+A multibyte sequence is encountered that is valid but that
+cannot be translated to the character encoding of the output.
+This condition depends on the implementation and on the conversion descriptor.
+In the GNU C library and GNU libiconv, if
+.I cd
+was created without the suffix
+.B //TRANSLIT
+or
+.BR //IGNORE ,
+the conversion is strict:
+lossy conversions produce this condition.
+If the suffix
+.B //TRANSLIT
+was specified,
+transliteration can avoid this condition in some cases.
+In the musl C library,
+this condition cannot occur because a conversion to
+.B \[aq]*\[aq]
+is used as a fallback.
+In the FreeBSD, NetBSD, and Solaris implementations of
+.BR iconv (),
+this condition cannot occur either,
+because a conversion to
+.B \[aq]?\[aq]
+is used as a fallback.
+When this condition is met,
+.BR iconv ()
+sets
+.I errno
+to
+.B EILSEQ
+and returns
+.IR (size_t)\ \-1 .
+.I *inbuf
+is left pointing to the beginning of the unconvertible multibyte sequence.
+.IP \[bu]
The input byte sequence has been entirely converted,
that is, \fI*inbytesleft\fP has gone down to 0.
In this case,
@@ -141,24 +177,20 @@ An invalid multibyte sequence has been encountered in the input.
.TP
.B EINVAL
An incomplete multibyte sequence has been encountered in the input.
-.SH VERSIONS
-This function is available since glibc 2.1.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR iconv ()
T} Thread safety MT-Safe race:cd
.TE
-.hy
-.ad
.sp 1
.PP
The
@@ -168,7 +200,10 @@ mutual exclusion on the
.I cd
argument.
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008.
+POSIX.1-2008.
+.SH HISTORY
+glibc 2.1.
+POSIX.1-2001.
.SH NOTES
In each series of calls to
.BR iconv (),
diff --git a/man3/iconv_close.3 b/man3/iconv_close.3
index 7698a2f85..089843cf0 100644
--- a/man3/iconv_close.3
+++ b/man3/iconv_close.3
@@ -7,7 +7,7 @@
.\" GNU glibc-2 source code and manual
.\" OpenGroup's Single UNIX specification http://www.UNIX-systems.org/online.html
.\"
-.TH iconv_close 3 2022-12-15 "Linux man-pages 6.03"
+.TH iconv_close 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
iconv_close \- deallocate descriptor for character set conversion
.SH LIBRARY
@@ -32,27 +32,26 @@ On success,
returns 0; otherwise, it returns \-1 and sets
.I errno
to indicate the error.
-.SH VERSIONS
-This function is available since glibc 2.1.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR iconv_close ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, SUSv2.
+POSIX.1-2008.
+.SH HISTORY
+glibc 2.1.
+POSIX.1-2001.
.SH SEE ALSO
.BR iconv (3),
.BR iconv_open (3)
diff --git a/man3/iconv_open.3 b/man3/iconv_open.3
index a33369a20..13ae7789c 100644
--- a/man3/iconv_open.3
+++ b/man3/iconv_open.3
@@ -11,7 +11,7 @@
.\" 2007-03-31 Bruno Haible, Describe the glibc/libiconv //TRANSLIT
.\" and //IGNORE extensions for 'tocode'.
.\"
-.TH iconv_open 3 2022-12-15 "Linux man-pages 6.03"
+.TH iconv_open 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
iconv_open \- allocate descriptor for character set conversion
.SH LIBRARY
@@ -100,27 +100,26 @@ to
.I tocode
is not supported by the
implementation.
-.SH VERSIONS
-This function is available since glibc 2.1.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR iconv_open ()
T} Thread safety MT-Safe locale
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, SUSv2.
+POSIX.1-2008.
+.SH HISTORY
+glibc 2.1.
+POSIX.1-2001, SUSv2.
.SH SEE ALSO
.BR iconv (1),
.BR iconv (3),
diff --git a/man3/if_nameindex.3 b/man3/if_nameindex.3
index 9021eee3c..39b72a045 100644
--- a/man3/if_nameindex.3
+++ b/man3/if_nameindex.3
@@ -4,7 +4,7 @@
.\"
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
-.TH if_nameindex 3 2022-12-15 "Linux man-pages 6.03"
+.TH if_nameindex 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
if_nameindex, if_freenameindex \- get network interface names and indexes
.SH LIBRARY
@@ -78,35 +78,33 @@ may also fail for any of the errors specified for
.BR sendto (2),
or
.BR malloc (3).
-.SH VERSIONS
-The
-.BR if_nameindex ()
-function first appeared in glibc 2.1, but before glibc 2.3.4,
-the implementation supported only interfaces with IPv4 addresses.
-Support of interfaces that don't have IPv4 addresses is available only
-on kernels that support netlink.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR if_nameindex (),
.BR if_freenameindex ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, RFC\ 3493.
+POSIX.1-2008, RFC\ 3493.
+.SH HISTORY
+glibc 2.1.
+POSIX.1-2001.
+BSDi.
.PP
-This function first appeared in BSDi.
+Before glibc 2.3.4,
+the implementation supported only interfaces with IPv4 addresses.
+Support of interfaces that don't have IPv4 addresses is available only
+on kernels that support netlink.
.SH EXAMPLES
The program below demonstrates the use of the functions described
on this page.
@@ -127,23 +125,23 @@ $ \fB./a.out\fI
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
-
+\&
int
main(void)
{
struct if_nameindex *if_ni, *i;
-
+\&
if_ni = if_nameindex();
if (if_ni == NULL) {
perror("if_nameindex");
exit(EXIT_FAILURE);
}
-
+\&
for (i = if_ni; !(i\->if_index == 0 && i\->if_name == NULL); i++)
printf("%u: %s\en", i\->if_index, i\->if_name);
-
+\&
if_freenameindex(if_ni);
-
+\&
exit(EXIT_SUCCESS);
}
.EE
diff --git a/man3/if_nametoindex.3 b/man3/if_nametoindex.3
index d25ef93ce..ebbd2577a 100644
--- a/man3/if_nametoindex.3
+++ b/man3/if_nametoindex.3
@@ -3,7 +3,7 @@
.\"
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
-.TH if_nametoindex 3 2022-12-15 "Linux man-pages 6.03"
+.TH if_nametoindex 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
if_nametoindex, if_indextoname \- mappings between network interface
names and indexes
@@ -76,25 +76,24 @@ or
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR if_nametoindex (),
.BR if_indextoname ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, RFC\ 3493.
-.PP
-This function first appeared in BSDi.
+POSIX.1-2008, RFC\ 3493.
+.SH HISTORY
+POSIX.1-2001.
+BSDi.
.SH SEE ALSO
.BR getifaddrs (3),
.BR if_nameindex (3),
diff --git a/man3/ilogb.3 b/man3/ilogb.3
index a825d5766..100b0c8cf 100644
--- a/man3/ilogb.3
+++ b/man3/ilogb.3
@@ -7,7 +7,7 @@
.\"
.\" Inspired by a page by Walter Harms created 2002-08-10
.\"
-.TH ilogb 3 2023-02-05 "Linux man-pages 6.03"
+.TH ilogb 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
ilogb, ilogbf, ilogbl \- get integer exponent of a floating-point value
.SH LIBRARY
@@ -111,26 +111,26 @@ is set to
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR ilogb (),
.BR ilogbf (),
.BR ilogbl ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-C99, POSIX.1-2001, POSIX.1-2008.
+C11, POSIX.1-2008.
+.SH HISTORY
+C99, POSIX.1-2001.
.SH BUGS
-.\" Bug raised: http://sources.redhat.com/bugzilla/show_bug.cgi?id=6794
+.\" Bug raised: https://www.sourceware.org/bugzilla/show_bug.cgi?id=6794
Before glibc 2.16, the following bugs existed in the
glibc implementation of these functions:
.IP \[bu] 3
diff --git a/man3/index.3 b/man3/index.3
index 5a852c3fb..56c2bb3dc 100644
--- a/man3/index.3
+++ b/man3/index.3
@@ -1,9 +1,8 @@
-'\" t
.\" Copyright 2022 Alejandro Colomar <alx@kernel.org>
.\"
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
-.TH index 3 2023-01-05 "Linux man-pages 6.03"
+.TH index 3 2023-03-30 "Linux man-pages 6.05.01"
.SH NAME
index, rindex \- locate character in string
.SH LIBRARY
@@ -31,11 +30,10 @@ and
.BR strrchr (3)
instead of these functions.
.SH STANDARDS
+None.
+.SH HISTORY
4.3BSD; marked as LEGACY in POSIX.1-2001.
-POSIX.1-2008 removes the specifications of
-.BR index ()
-and
-.BR rindex (),
+Removed in POSIX.1-2008,
recommending
.BR strchr (3)
and
diff --git a/man3/inet.3 b/man3/inet.3
index e0afe9d44..557bb2d3b 100644
--- a/man3/inet.3
+++ b/man3/inet.3
@@ -20,7 +20,7 @@
.\" Add discussion of Classful Addressing, noting that it is obsolete.
.\" Added an EXAMPLE program.
.\"
-.TH inet 3 2023-01-07 "Linux man-pages 6.03"
+.TH inet 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
inet_aton, inet_addr, inet_network, inet_ntoa, inet_makeaddr, inet_lnaof,
inet_netof \- Internet address manipulation routines
@@ -40,10 +40,11 @@ Standard C library
.PP
.BI "[[deprecated]] char *inet_ntoa(struct in_addr " in );
.PP
-.BI "struct in_addr inet_makeaddr(in_addr_t " net ", in_addr_t " host );
+.BI "[[deprecated]] struct in_addr inet_makeaddr(in_addr_t " net ,
+.BI " in_addr_t " host );
.PP
-.BI "in_addr_t inet_lnaof(struct in_addr " in );
-.BI "in_addr_t inet_netof(struct in_addr " in );
+.BI "[[deprecated]] in_addr_t inet_lnaof(struct in_addr " in );
+.BI "[[deprecated]] in_addr_t inet_netof(struct in_addr " in );
.fi
.PP
.RS -4
@@ -196,7 +197,7 @@ as:
.in +4n
.EX
typedef uint32_t in_addr_t;
-
+\&
struct in_addr {
in_addr_t s_addr;
};
@@ -205,39 +206,43 @@ struct in_addr {
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR inet_aton (),
.BR inet_addr (),
.BR inet_network (),
.BR inet_ntoa ()
T} Thread safety MT-Safe locale
T{
+.na
+.nh
.BR inet_makeaddr (),
.BR inet_lnaof (),
.BR inet_netof ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-.BR inet_addr (),
-.BR inet_ntoa ():
-POSIX.1-2001, POSIX.1-2008, 4.3BSD.
-.PP
+.TP
+.BR inet_addr ()
+.TQ
+.BR inet_ntoa ()
+POSIX.1-2008.
+.TP
.BR inet_aton ()
-is not specified in POSIX.1, but is available on most systems.
-.SH NOTES
-On x86 architectures, the host byte order is Least Significant Byte
-first (little endian), whereas the network byte order, as used on the
-Internet, is Most Significant Byte first (big endian).
+None.
+.SH STANDARDS
+.TP
+.BR inet_addr ()
+.TQ
+.BR inet_ntoa ()
+POSIX.1-2001, 4.3BSD.
.PP
.BR inet_lnaof (),
.BR inet_netof (),
@@ -270,6 +275,10 @@ Classful network addresses are now obsolete,
having been superseded by Classless Inter-Domain Routing (CIDR),
which divides addresses into network and host components at
arbitrary bit (rather than byte) boundaries.
+.SH NOTES
+On x86 architectures, the host byte order is Least Significant Byte
+first (little endian), whereas the network byte order, as used on the
+Internet, is Most Significant Byte first (big endian).
.SH EXAMPLES
An example of the use of
.BR inet_aton ()
@@ -294,22 +303,22 @@ Here are some example runs:
#include <arpa/inet.h>
#include <stdio.h>
#include <stdlib.h>
-
+\&
int
main(int argc, char *argv[])
{
struct in_addr addr;
-
+\&
if (argc != 2) {
fprintf(stderr, "%s <dotted\-address>\en", argv[0]);
exit(EXIT_FAILURE);
}
-
+\&
if (inet_aton(argv[1], &addr) == 0) {
fprintf(stderr, "Invalid address\en");
exit(EXIT_FAILURE);
}
-
+\&
printf("%s\en", inet_ntoa(addr));
exit(EXIT_SUCCESS);
}
diff --git a/man3/inet_net_pton.3 b/man3/inet_net_pton.3
index bffa27b71..2a744419b 100644
--- a/man3/inet_net_pton.3
+++ b/man3/inet_net_pton.3
@@ -2,7 +2,7 @@
.\"
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
-.TH inet_net_pton 3 2023-02-05 "Linux man-pages 6.03"
+.TH inet_net_pton 3 2023-05-03 "Linux man-pages 6.05.01"
.SH NAME
inet_net_pton, inet_net_ntop \- Internet network number conversion
.SH LIBRARY
@@ -132,11 +132,7 @@ The size of the output buffer was insufficient.
.I pres
was not in correct presentation format.
.SH STANDARDS
-The
-.BR inet_net_pton ()
-and
-.BR inet_net_ntop ()
-functions are nonstandard, but widely available.
+None.
.SH NOTES
.SS Input presentation format for inet_net_pton()
The network number may be specified either
@@ -311,59 +307,59 @@ Raw address: c1a80180
.\" SRC BEGIN (inet_net_pton.c)
.EX
/* Link with "\-lresolv" */
-
+\&
#include <arpa/inet.h>
#include <stdio.h>
#include <stdlib.h>
-
+\&
#define errExit(msg) do { perror(msg); exit(EXIT_FAILURE); \e
} while (0)
-
+\&
int
main(int argc, char *argv[])
{
char buf[100];
struct in_addr addr;
int bits;
-
+\&
if (argc < 2) {
fprintf(stderr,
"Usage: %s presentation\-form [addr\-init\-value]\en",
argv[0]);
exit(EXIT_FAILURE);
}
-
+\&
/* If argv[2] is supplied (a numeric value), use it to initialize
the output buffer given to inet_net_pton(), so that we can see
that inet_net_pton() initializes only those bytes needed for
the network number. If argv[2] is not supplied, then initialize
the buffer to zero (as is recommended practice). */
-
+\&
addr.s_addr = (argc > 2) ? strtod(argv[2], NULL) : 0;
-
+\&
/* Convert presentation network number in argv[1] to binary. */
-
+\&
bits = inet_net_pton(AF_INET, argv[1], &addr, sizeof(addr));
if (bits == \-1)
errExit("inet_net_ntop");
-
+\&
printf("inet_net_pton() returned: %d\en", bits);
-
+\&
/* Convert binary format back to presentation, using \[aq]bits\[aq]
returned by inet_net_pton(). */
-
+\&
if (inet_net_ntop(AF_INET, &addr, bits, buf, sizeof(buf)) == NULL)
errExit("inet_net_ntop");
-
+\&
printf("inet_net_ntop() yielded: %s\en", buf);
-
+\&
/* Display \[aq]addr\[aq] in raw form (in network byte order), so we can
see bytes not displayed by inet_net_ntop(); some of those bytes
may not have been touched by inet_net_ntop(), and so will still
have any initial value that was specified in argv[2]. */
-
+\&
printf("Raw address: %x\en", htonl(addr.s_addr));
-
+\&
exit(EXIT_SUCCESS);
}
.EE
diff --git a/man3/inet_ntop.3 b/man3/inet_ntop.3
index 960510950..6f6d8536f 100644
--- a/man3/inet_ntop.3
+++ b/man3/inet_ntop.3
@@ -4,7 +4,7 @@
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
.\" References: RFC 2553
-.TH inet_ntop 3 2023-02-05 "Linux man-pages 6.03"
+.TH inet_ntop 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
inet_ntop \- convert IPv4 and IPv6 addresses from binary to text form
.SH LIBRARY
@@ -84,22 +84,23 @@ The converted address string would exceed the size given by
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR inet_ntop ()
T} Thread safety MT-Safe locale
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008.
+POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001.
+.PP
Note that RFC\ 2553 defines a prototype where the last argument
.I size
is of type
diff --git a/man3/inet_pton.3 b/man3/inet_pton.3
index 2c9630110..420a64251 100644
--- a/man3/inet_pton.3
+++ b/man3/inet_pton.3
@@ -5,7 +5,7 @@
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
.\" References: RFC 2553
-.TH inet_pton 3 2023-02-05 "Linux man-pages 6.03"
+.TH inet_pton 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
inet_pton \- convert IPv4 and IPv6 addresses from text to binary form
.SH LIBRARY
@@ -116,23 +116,19 @@ is set to
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR inet_pton ()
T} Thread safety MT-Safe locale
.TE
-.hy
-.ad
.sp 1
-.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008.
-.SH NOTES
+.SH VERSIONS
Unlike
.BR inet_aton (3)
and
@@ -151,6 +147,10 @@ four bytes to be explicitly written).
For an interface that handles both IPv6 addresses, and IPv4
addresses in numbers-and-dots notation, see
.BR getaddrinfo (3).
+.SH STANDARDS
+POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001.
.SH BUGS
.B AF_INET6
does not recognize IPv4 addresses.
@@ -182,22 +182,22 @@ Here are some example runs:
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-
+\&
int
main(int argc, char *argv[])
{
unsigned char buf[sizeof(struct in6_addr)];
int domain, s;
char str[INET6_ADDRSTRLEN];
-
+\&
if (argc != 3) {
fprintf(stderr, "Usage: %s {i4|i6|<num>} string\en", argv[0]);
exit(EXIT_FAILURE);
}
-
+\&
domain = (strcmp(argv[1], "i4") == 0) ? AF_INET :
(strcmp(argv[1], "i6") == 0) ? AF_INET6 : atoi(argv[1]);
-
+\&
s = inet_pton(domain, argv[2], buf);
if (s <= 0) {
if (s == 0)
@@ -206,14 +206,14 @@ main(int argc, char *argv[])
perror("inet_pton");
exit(EXIT_FAILURE);
}
-
+\&
if (inet_ntop(domain, buf, str, INET6_ADDRSTRLEN) == NULL) {
perror("inet_ntop");
exit(EXIT_FAILURE);
}
-
+\&
printf("%s\en", str);
-
+\&
exit(EXIT_SUCCESS);
}
.EE
diff --git a/man3/initgroups.3 b/man3/initgroups.3
index 883e1bf1f..81505cbff 100644
--- a/man3/initgroups.3
+++ b/man3/initgroups.3
@@ -10,7 +10,7 @@
.\" Modified 1993-07-24 by Rik Faith <faith@cs.unc.edu>
.\" Modified 2004-10-10 by aeb
.\"
-.TH initgroups 3 2023-02-05 "Linux man-pages 6.03"
+.TH initgroups 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
initgroups \- initialize the supplementary group access list
.SH LIBRARY
@@ -77,21 +77,21 @@ group database file
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR initgroups ()
T} Thread safety MT-Safe locale
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
+None.
+.SH HISTORY
SVr4, 4.3BSD.
.SH SEE ALSO
.BR getgroups (2),
diff --git a/man3/insque.3 b/man3/insque.3
index 337ff87d7..d3444ce41 100644
--- a/man3/insque.3
+++ b/man3/insque.3
@@ -14,7 +14,7 @@
.\" mtk, 2010-09-09: Noted glibc 2.4 bug, added info on circular
.\" lists, added example program
.\"
-.TH insque 3 2023-02-05 "Linux man-pages 6.03"
+.TH insque 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
insque, remque \- insert/remove an item from a queue
.SH LIBRARY
@@ -82,24 +82,20 @@ doubly linked list.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR insque (),
.BR remque ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
-.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008.
-.SH NOTES
+.SH VERSIONS
On ancient systems,
.\" e.g., SunOS, Linux libc4 and libc5
the arguments of these functions were of type \fIstruct qelem *\fP,
@@ -126,6 +122,10 @@ The above is the POSIX version.
Some systems place them in \fI<string.h>\fP.
.\" Linux libc4 and libc 5 placed them
.\" in \fI<stdlib.h>\fP.
+.SH STANDARDS
+POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001.
.SH BUGS
In glibc 2.4 and earlier, it was not possible to specify
.I prev
@@ -156,36 +156,36 @@ That was a circular list
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
-
+\&
struct element {
struct element *forward;
struct element *backward;
char *name;
};
-
+\&
static struct element *
new_element(void)
{
struct element *e;
-
+\&
e = malloc(sizeof(*e));
if (e == NULL) {
fprintf(stderr, "malloc() failed\en");
exit(EXIT_FAILURE);
}
-
+\&
return e;
}
-
+\&
int
main(int argc, char *argv[])
{
struct element *first, *elem, *prev;
int circular, opt, errfnd;
-
+\&
/* The "\-c" command\-line option can be used to specify that the
list is circular. */
-
+\&
errfnd = 0;
circular = 0;
while ((opt = getopt(argc, argv, "c")) != \-1) {
@@ -198,19 +198,19 @@ main(int argc, char *argv[])
break;
}
}
-
+\&
if (errfnd || optind >= argc) {
fprintf(stderr, "Usage: %s [\-c] string...\en", argv[0]);
exit(EXIT_FAILURE);
}
-
+\&
/* Create first element and place it in the linked list. */
-
+\&
elem = new_element();
first = elem;
-
+\&
elem\->name = argv[optind];
-
+\&
if (circular) {
elem\->forward = elem;
elem\->backward = elem;
@@ -218,29 +218,29 @@ main(int argc, char *argv[])
} else {
insque(elem, NULL);
}
-
+\&
/* Add remaining command\-line arguments as list elements. */
-
+\&
while (++optind < argc) {
prev = elem;
-
+\&
elem = new_element();
elem\->name = argv[optind];
insque(elem, prev);
}
-
+\&
/* Traverse the list from the start, printing element names. */
-
+\&
printf("Traversing completed list:\en");
elem = first;
do {
printf(" %s\en", elem\->name);
elem = elem\->forward;
} while (elem != NULL && elem != first);
-
+\&
if (elem == first)
printf("That was a circular list\en");
-
+\&
exit(EXIT_SUCCESS);
}
.EE
diff --git a/man3/intro.3 b/man3/intro.3
index 8f0559dfe..7f72ae66b 100644
--- a/man3/intro.3
+++ b/man3/intro.3
@@ -3,7 +3,7 @@
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
.\" 2007-10-23 mtk, Nearly a complete rewrite of the earlier page.
-.TH intro 3 2023-02-05 "Linux man-pages 6.03"
+.TH intro 3 2023-02-05 "Linux man-pages 6.05.01"
.SH NAME
intro \- introduction to library functions
.SH DESCRIPTION
diff --git a/man3/isalpha.3 b/man3/isalpha.3
index ef264dfa0..cf0d54ae5 100644
--- a/man3/isalpha.3
+++ b/man3/isalpha.3
@@ -8,7 +8,7 @@
.\" Modified Sat Sep 2 21:52:01 1995 by Jim Van Zandt <jrv@vanzandt.mv.com>
.\" Modified Mon May 27 22:55:26 1996 by Martin Schulze (joey@linux.de)
.\"
-.TH isalpha 3 2023-02-05 "Linux man-pages 6.03"
+.TH isalpha 3 2023-07-30 "Linux man-pages 6.05.01"
.SH NAME
isalnum, isalpha, isascii, isblank, iscntrl, isdigit, isgraph, islower,
isprint, ispunct, isspace, isupper, isxdigit,
@@ -71,21 +71,19 @@ Feature Test Macro Requirements for glibc (see
.nf
_ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L
.fi
-.nh
.PP
-.BR isalnum_l (),
-.BR isalpha_l (),
-.BR isblank_l (),
-.BR iscntrl_l (),
-.BR isdigit_l (),
-.BR isgraph_l (),
-.BR islower_l (),
-.BR isprint_l (),
-.BR ispunct_l (),
-.BR isspace_l (),
-.BR isupper_l (),
-.BR isxdigit_l ():
-.hy
+.BR \%salnum_l (),
+.BR \%salpha_l (),
+.BR \%sblank_l (),
+.BR \%scntrl_l (),
+.BR \%sdigit_l (),
+.BR \%sgraph_l (),
+.BR \%slower_l (),
+.BR \%sprint_l (),
+.BR \%spunct_l (),
+.BR \%sspace_l (),
+.BR \%supper_l (),
+.BR \%sxdigit_l ():
.nf
Since glibc 2.10:
_XOPEN_SOURCE >= 700
@@ -197,33 +195,17 @@ checks for hexadecimal digits, that is, one of
The values returned are nonzero if the character
.I c
falls into the tested class, and zero if not.
-.SH VERSIONS
-.BR isalnum_l (),
-.BR isalpha_l (),
-.BR isblank_l (),
-.BR iscntrl_l (),
-.BR isdigit_l (),
-.BR isgraph_l (),
-.BR islower_l (),
-.BR isprint_l (),
-.BR ispunct_l (),
-.BR isspace_l (),
-.BR isupper_l (),
-.BR isxdigit_l (),
-and
-.BR isascii_l ()
-are available since glibc 2.3.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR isalnum (),
.BR isalpha (),
.BR isascii (),
@@ -239,60 +221,135 @@ T{
.BR isxdigit ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
.\" FIXME: need a thread-safety statement about the *_l functions
.SH STANDARDS
-POSIX.1-2001 specifies
-.BR isalnum (),
-.BR isalpha (),
-.BR isblank (),
-.BR iscntrl (),
-.BR isdigit (),
-.BR isgraph (),
-.BR islower (),
-.BR isprint (),
-.BR ispunct (),
-.BR isspace (),
-.BR isupper (),
-and
-.BR isxdigit (),
-and also
+.TP
+.BR isalnum ()
+.TQ
+.BR isalpha ()
+.TQ
+.BR iscntrl ()
+.TQ
+.BR isdigit ()
+.TQ
+.BR isgraph ()
+.TQ
+.BR islower ()
+.TQ
+.BR isprint ()
+.TQ
+.BR ispunct ()
+.TQ
+.BR isspace ()
+.TQ
+.BR isupper ()
+.TQ
+.BR isxdigit ()
+.TQ
+.BR isblank ()
+C11, POSIX.1-2008.
+.TP
.BR isascii ()
-(as an XSI extension).
-C99 specifies all of the preceding functions, except
-.BR isascii ().
-.PP
-POSIX.1-2008 marks
+.TQ
+.BR isalnum_l ()
+.TQ
+.BR isalpha_l ()
+.TQ
+.BR isblank_l ()
+.TQ
+.BR iscntrl_l ()
+.TQ
+.BR isdigit_l ()
+.TQ
+.BR isgraph_l ()
+.TQ
+.BR islower_l ()
+.TQ
+.BR isprint_l ()
+.TQ
+.BR ispunct_l ()
+.TQ
+.BR isspace_l ()
+.TQ
+.BR isupper_l ()
+.TQ
+.BR isxdigit_l ()
+POSIX.1-2008.
+.TP
+.BR isascii_l ()
+GNU.
+.SH HISTORY
+.TP
+.BR isalnum ()
+.TQ
+.BR isalpha ()
+.TQ
+.BR iscntrl ()
+.TQ
+.BR isdigit ()
+.TQ
+.BR isgraph ()
+.TQ
+.BR islower ()
+.TQ
+.BR isprint ()
+.TQ
+.BR ispunct ()
+.TQ
+.BR isspace ()
+.TQ
+.BR isupper ()
+.TQ
+.BR isxdigit ()
+C89, POSIX.1-2001.
+.TP
+.BR isblank ()
+C99, POSIX.1-2001.
+.TP
.BR isascii ()
-as obsolete,
+POSIX.1-2001 (XSI).
+.IP
+POSIX.1-2008 marks it as obsolete,
noting that it cannot be used portably in a localized application.
-.PP
-POSIX.1-2008 specifies
-.BR isalnum_l (),
-.BR isalpha_l (),
-.BR isblank_l (),
-.BR iscntrl_l (),
-.BR isdigit_l (),
-.BR isgraph_l (),
-.BR islower_l (),
-.BR isprint_l (),
-.BR ispunct_l (),
-.BR isspace_l (),
-.BR isupper_l (),
-and
-.BR isxdigit_l ().
-.PP
+.TP
+.BR isalnum_l ()
+.TQ
+.BR isalpha_l ()
+.TQ
+.BR isblank_l ()
+.TQ
+.BR iscntrl_l ()
+.TQ
+.BR isdigit_l ()
+.TQ
+.BR isgraph_l ()
+.TQ
+.BR islower_l ()
+.TQ
+.BR isprint_l ()
+.TQ
+.BR ispunct_l ()
+.TQ
+.BR isspace_l ()
+.TQ
+.BR isupper_l ()
+.TQ
+.BR isxdigit_l ()
+glibc 2.3.
+POSIX.1-2008.
+.TP
.BR isascii_l ()
-is a GNU extension.
-.SH NOTES
+glibc 2.3.
+.SH CAVEATS
The standards require that the argument
.I c
for these functions is either
.B EOF
or a value that is representable in the type
-.IR "unsigned char" .
+.IR "unsigned char" ;
+otherwise,
+the behavior is undefined.
If the argument
.I c
is of type
diff --git a/man3/isatty.3 b/man3/isatty.3
index a059000a5..fe44c8885 100644
--- a/man3/isatty.3
+++ b/man3/isatty.3
@@ -4,7 +4,7 @@
.\"
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
-.TH isatty 3 2022-12-15 "Linux man-pages 6.03"
+.TH isatty 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
isatty \- test whether a file descriptor refers to a terminal
.SH LIBRARY
@@ -48,22 +48,22 @@ in this case (which is a violation of POSIX, which specifies the error
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR isatty ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, SVr4, 4.3BSD.
+POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001, SVr4, 4.3BSD.
.SH SEE ALSO
.BR fstat (2),
.BR ttyname (3)
diff --git a/man3/isfdtype.3 b/man3/isfdtype.3
index 66b81b942..e8eb1f49f 100644
--- a/man3/isfdtype.3
+++ b/man3/isfdtype.3
@@ -2,7 +2,7 @@
.\"
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
-.TH isfdtype 3 2022-10-30 "Linux man-pages 6.03"
+.TH isfdtype 3 2023-03-30 "Linux man-pages 6.05.01"
.SH NAME
isfdtype \- test file type of a file descriptor
.SH LIBRARY
@@ -61,19 +61,17 @@ The
.BR isfdtype ()
function can fail with any of the same errors as
.BR fstat (2).
+.SH VERSIONS
+Portable applications should use
+.BR fstat (2)
+instead.
.SH STANDARDS
-The
-.BR isfdtype ()
-function is not specified in any standard,
-but did appear in the draft POSIX.1g standard.
+None.
+.SH HISTORY
+It appeared in the draft POSIX.1g standard.
It is present on OpenBSD and Tru64 UNIX
(where the required header file in both cases is just
.IR <sys/stat.h> ,
-as shown in the POSIX.1g draft),
-and possibly other systems.
-.SH NOTES
-Portable applications should use
-.BR fstat (2)
-instead.
+as shown in the POSIX.1g draft).
.SH SEE ALSO
.BR fstat (2)
diff --git a/man3/isgreater.3 b/man3/isgreater.3
index 7b897e729..b5c30d5c4 100644
--- a/man3/isgreater.3
+++ b/man3/isgreater.3
@@ -6,7 +6,7 @@
.\" 2002-07-27 Walter Harms
.\" this was done with the help of the glibc manual
.\"
-.TH isgreater 3 2022-12-15 "Linux man-pages 6.03"
+.TH isgreater 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
isgreater, isgreaterequal, isless, islessequal, islessgreater,
isunordered \- floating-point relational tests without exception for NaN
@@ -114,14 +114,14 @@ No errors occur.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR isgreater (),
.BR isgreaterequal (),
.BR isless (),
@@ -130,16 +130,16 @@ T{
.BR isunordered ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
-.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, C99.
-.SH NOTES
+.SH VERSIONS
Not all hardware supports these functions,
and where hardware support isn't provided, they will be emulated by macros.
This will result in a performance penalty.
Don't use these functions if NaN is of no concern for you.
+.SH STANDARDS
+C11, POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001, C99.
.SH SEE ALSO
.BR fpclassify (3),
.BR isnan (3)
diff --git a/man3/iswalnum.3 b/man3/iswalnum.3
index 6112daa27..9d5bb246e 100644
--- a/man3/iswalnum.3
+++ b/man3/iswalnum.3
@@ -9,7 +9,7 @@
.\" OpenGroup's Single UNIX specification http://www.UNIX-systems.org/online.html
.\" ISO/IEC 9899:1999
.\"
-.TH iswalnum 3 2023-02-05 "Linux man-pages 6.03"
+.TH iswalnum 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
iswalnum \- test for alphanumeric wide character
.SH LIBRARY
@@ -51,8 +51,11 @@ The wide-character class "alnum" is the union of the wide-character classes
As such, it also contains the wide-character class
"xdigit".
.PP
-The wide-character class "alnum" always contains at least the letters \[aq]A\[aq]
-to \[aq]Z\[aq], \[aq]a\[aq] to \[aq]z\[aq] and the digits \[aq]0\[aq] to \[aq]9\[aq].
+The wide-character class "alnum"
+always contains at least the letters
+\[aq]A\[aq] to \[aq]Z\[aq],
+\[aq]a\[aq] to \[aq]z\[aq],
+and the digits \[aq]0\[aq] to \[aq]9\[aq].
.SH RETURN VALUE
The
.BR iswalnum ()
@@ -65,22 +68,22 @@ Otherwise, it returns zero.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR iswalnum ()
T} Thread safety MT-Safe locale
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, C99.
+C11, POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001, C99.
.SH NOTES
The behavior of
.BR iswalnum ()
diff --git a/man3/iswalpha.3 b/man3/iswalpha.3
index 6e256630d..a05dfe973 100644
--- a/man3/iswalpha.3
+++ b/man3/iswalpha.3
@@ -9,7 +9,7 @@
.\" OpenGroup's Single UNIX specification http://www.UNIX-systems.org/online.html
.\" ISO/IEC 9899:1999
.\"
-.TH iswalpha 3 2023-02-05 "Linux man-pages 6.03"
+.TH iswalpha 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
iswalpha \- test for alphabetic wide character
.SH LIBRARY
@@ -69,22 +69,22 @@ Otherwise, it returns zero.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR iswalpha ()
T} Thread safety MT-Safe locale
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, C99.
+C11, POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001, C99.
.SH NOTES
The behavior of
.BR iswalpha ()
diff --git a/man3/iswblank.3 b/man3/iswblank.3
index 71d8aeeb3..84599abe5 100644
--- a/man3/iswblank.3
+++ b/man3/iswblank.3
@@ -9,7 +9,7 @@
.\" OpenGroup's Single UNIX specification http://www.UNIX-systems.org/online.html
.\" ISO/IEC 9899:1999
.\"
-.TH iswblank 3 2023-02-05 "Linux man-pages 6.03"
+.TH iswblank 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
iswblank \- test for whitespace wide character
.SH LIBRARY
@@ -62,22 +62,22 @@ Otherwise, it returns zero.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR iswblank ()
T} Thread safety MT-Safe locale
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008.
+POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001.
.SH NOTES
The behavior of
.BR iswblank ()
diff --git a/man3/iswcntrl.3 b/man3/iswcntrl.3
index ecaea8af1..40d78e8bf 100644
--- a/man3/iswcntrl.3
+++ b/man3/iswcntrl.3
@@ -9,7 +9,7 @@
.\" OpenGroup's Single UNIX specification http://www.UNIX-systems.org/online.html
.\" ISO/IEC 9899:1999
.\"
-.TH iswcntrl 3 2022-12-15 "Linux man-pages 6.03"
+.TH iswcntrl 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
iswcntrl \- test for control wide character
.SH LIBRARY
@@ -53,22 +53,22 @@ Otherwise, it returns zero.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR iswcntrl ()
T} Thread safety MT-Safe locale
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, C99.
+C11, POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001, C99.
.SH NOTES
The behavior of
.BR iswcntrl ()
diff --git a/man3/iswctype.3 b/man3/iswctype.3
index 07c3079eb..632634583 100644
--- a/man3/iswctype.3
+++ b/man3/iswctype.3
@@ -9,7 +9,7 @@
.\" OpenGroup's Single UNIX specification http://www.UNIX-systems.org/online.html
.\" ISO/IEC 9899:1999
.\"
-.TH iswctype 3 2022-12-15 "Linux man-pages 6.03"
+.TH iswctype 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
iswctype \- wide-character classification
.SH LIBRARY
@@ -56,22 +56,22 @@ Otherwise, it returns 0.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR iswctype ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, C99.
+C11, POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001, C99.
.SH NOTES
The behavior of
.BR iswctype ()
diff --git a/man3/iswdigit.3 b/man3/iswdigit.3
index 1c6d97ceb..b4d187d92 100644
--- a/man3/iswdigit.3
+++ b/man3/iswdigit.3
@@ -9,7 +9,7 @@
.\" OpenGroup's Single UNIX specification http://www.UNIX-systems.org/online.html
.\" ISO/IEC 9899:1999
.\"
-.TH iswdigit 3 2023-02-05 "Linux man-pages 6.03"
+.TH iswdigit 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
iswdigit \- test for decimal digit wide character
.SH LIBRARY
@@ -68,22 +68,22 @@ Otherwise, it returns zero.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR iswdigit ()
T} Thread safety MT-Safe locale
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, C99.
+C11, POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001, C99.
.SH NOTES
The behavior of
.BR iswdigit ()
diff --git a/man3/iswgraph.3 b/man3/iswgraph.3
index 03ea186d7..3af1b76df 100644
--- a/man3/iswgraph.3
+++ b/man3/iswgraph.3
@@ -9,7 +9,7 @@
.\" OpenGroup's Single UNIX specification http://www.UNIX-systems.org/online.html
.\" ISO/IEC 9899:1999
.\"
-.TH iswgraph 3 2022-12-15 "Linux man-pages 6.03"
+.TH iswgraph 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
iswgraph \- test for graphic wide character
.SH LIBRARY
@@ -61,22 +61,22 @@ Otherwise, it returns zero.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR iswgraph ()
T} Thread safety MT-Safe locale
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, C99.
+C11, POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001, C99.
.SH NOTES
The behavior of
.BR iswgraph ()
diff --git a/man3/iswlower.3 b/man3/iswlower.3
index ec67ca190..1115275ca 100644
--- a/man3/iswlower.3
+++ b/man3/iswlower.3
@@ -9,7 +9,7 @@
.\" OpenGroup's Single UNIX specification http://www.UNIX-systems.org/online.html
.\" ISO/IEC 9899:1999
.\"
-.TH iswlower 3 2023-02-05 "Linux man-pages 6.03"
+.TH iswlower 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
iswlower \- test for lowercase wide character
.SH LIBRARY
@@ -75,22 +75,22 @@ Otherwise, it returns zero.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR iswlower ()
T} Thread safety MT-Safe locale
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, C99.
+C11, POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001, C99.
.SH NOTES
The behavior of
.BR iswlower ()
diff --git a/man3/iswprint.3 b/man3/iswprint.3
index cd75dab4c..cfd1e9446 100644
--- a/man3/iswprint.3
+++ b/man3/iswprint.3
@@ -9,7 +9,7 @@
.\" OpenGroup's Single UNIX specification http://www.UNIX-systems.org/online.html
.\" ISO/IEC 9899:1999
.\"
-.TH iswprint 3 2022-12-15 "Linux man-pages 6.03"
+.TH iswprint 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
iswprint \- test for printing wide character
.SH LIBRARY
@@ -47,22 +47,22 @@ Otherwise, it returns zero.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR iswprint ()
T} Thread safety MT-Safe locale
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, C99.
+C11, POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001, C99.
.SH NOTES
The behavior of
.BR iswprint ()
diff --git a/man3/iswpunct.3 b/man3/iswpunct.3
index 6744ef3cc..b3b9f57b5 100644
--- a/man3/iswpunct.3
+++ b/man3/iswpunct.3
@@ -9,7 +9,7 @@
.\" OpenGroup's Single UNIX specification http://www.UNIX-systems.org/online.html
.\" ISO/IEC 9899:1999
.\"
-.TH iswpunct 3 2022-12-15 "Linux man-pages 6.03"
+.TH iswpunct 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
iswpunct \- test for punctuation or symbolic wide character
.SH LIBRARY
@@ -59,22 +59,22 @@ Otherwise, it returns zero.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR iswpunct ()
T} Thread safety MT-Safe locale
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, C99.
+C11, POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001, C99.
.SH NOTES
The behavior of
.BR iswpunct ()
diff --git a/man3/iswspace.3 b/man3/iswspace.3
index 684440b79..fce481d26 100644
--- a/man3/iswspace.3
+++ b/man3/iswspace.3
@@ -9,7 +9,7 @@
.\" OpenGroup's Single UNIX specification http://www.UNIX-systems.org/online.html
.\" ISO/IEC 9899:1999
.\"
-.TH iswspace 3 2023-02-05 "Linux man-pages 6.03"
+.TH iswspace 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
iswspace \- test for whitespace wide character
.SH LIBRARY
@@ -41,9 +41,10 @@ The wide-character class "space" is disjoint from the wide-character class
.PP
The wide-character class "space" contains the wide-character class "blank".
.PP
-The wide-character class "space" always contains at least the space character
-and the control
-characters \[aq]\ef\[aq], \[aq]\en\[aq], \[aq]\er\[aq], \[aq]\et\[aq], \[aq]\ev\[aq].
+The wide-character class "space"
+always contains at least the space character
+and the control characters
+\[aq]\ef\[aq], \[aq]\en\[aq], \[aq]\er\[aq], \[aq]\et\[aq], and \[aq]\ev\[aq].
.SH RETURN VALUE
The
.BR iswspace ()
@@ -55,22 +56,22 @@ Otherwise, it returns zero.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR iswspace ()
T} Thread safety MT-Safe locale
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, C99.
+C11, POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001, C99.
.SH NOTES
The behavior of
.BR iswspace ()
diff --git a/man3/iswupper.3 b/man3/iswupper.3
index 9a3203149..64bc4f054 100644
--- a/man3/iswupper.3
+++ b/man3/iswupper.3
@@ -9,7 +9,7 @@
.\" OpenGroup's Single UNIX specification http://www.UNIX-systems.org/online.html
.\" ISO/IEC 9899:1999
.\"
-.TH iswupper 3 2023-02-05 "Linux man-pages 6.03"
+.TH iswupper 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
iswupper \- test for uppercase wide character
.SH LIBRARY
@@ -69,22 +69,22 @@ Otherwise, it returns zero.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR iswupper ()
T} Thread safety MT-Safe locale
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, C99.
+C11, POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001, C99.
.SH NOTES
The behavior of
.BR iswupper ()
diff --git a/man3/iswxdigit.3 b/man3/iswxdigit.3
index 89065602d..7be65b5ad 100644
--- a/man3/iswxdigit.3
+++ b/man3/iswxdigit.3
@@ -9,7 +9,7 @@
.\" OpenGroup's Single UNIX specification http://www.UNIX-systems.org/online.html
.\" ISO/IEC 9899:1999
.\"
-.TH iswxdigit 3 2023-02-05 "Linux man-pages 6.03"
+.TH iswxdigit 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
iswxdigit \- test for hexadecimal digit wide character
.SH LIBRARY
@@ -60,22 +60,22 @@ Otherwise, it returns zero.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR iswxdigit ()
T} Thread safety MT-Safe locale
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, C99.
+C11, POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001, C99.
.SH NOTES
The behavior of
.BR iswxdigit ()
diff --git a/man3/j0.3 b/man3/j0.3
index e9d43bd13..1ca739b99 100644
--- a/man3/j0.3
+++ b/man3/j0.3
@@ -14,7 +14,7 @@
.\" Modified 2004-11-12 as per suggestion by Fabian Kreutz/AEB
.\" 2008-07-24, mtk, moved yxx() material into separate y0.3 page
.\"
-.TH j0 3 2023-02-05 "Linux man-pages 6.03"
+.TH j0 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
j0, j0f, j0l, j1, j1f, j1l, jn, jnf, jnl \-
Bessel functions of the first kind
@@ -128,42 +128,61 @@ These functions do not raise exceptions for
.BR fetestexcept (3).
.\" e.g., j0(1.5e16)
.\" This is intentional.
-.\" See http://sources.redhat.com/bugzilla/show_bug.cgi?id=6805
+.\" See https://www.sourceware.org/bugzilla/show_bug.cgi?id=6805
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR j0 (),
.BR j0f (),
.BR j0l ()
T} Thread safety MT-Safe
T{
+.na
+.nh
.BR j1 (),
.BR j1f (),
.BR j1l ()
T} Thread safety MT-Safe
T{
+.na
+.nh
.BR jn (),
.BR jnf (),
.BR jnl ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-The functions returning
-.I double
-conform to SVr4, 4.3BSD,
-POSIX.1-2001, and POSIX.1-2008.
-The others are nonstandard functions that also exist on the BSDs.
+.TP
+.BR j0 ()
+.TQ
+.BR j1 ()
+.TQ
+.BR jn ()
+POSIX.1-2008.
+.TP
+Others:
+BSD.
+.SH HISTORY
+.TP
+.BR j0 ()
+.TQ
+.BR j1 ()
+.TQ
+.BR jn ()
+SVr4, 4.3BSD,
+POSIX.1-2001, POSIX.1-2008.
+.TP
+Others:
+BSD.
.SH BUGS
There are errors of up to 2e\-16 in the values returned by
.BR j0 (),
diff --git a/man3/key_setsecret.3 b/man3/key_setsecret.3
index d19c2b25d..13e8051fe 100644
--- a/man3/key_setsecret.3
+++ b/man3/key_setsecret.3
@@ -5,7 +5,7 @@
.\"
.\" I had no way the check the functions out
.\" be careful
-.TH key_setsecret 3 2022-12-15 "Linux man-pages 6.03"
+.TH key_setsecret 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
key_decryptsession, key_encryptsession, key_setsecret, key_gendes,
key_secretkey_is_set \- interfaces to rpc keyserver daemon
@@ -61,14 +61,14 @@ These functions return 1 on success and 0 on failure.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR key_decryptsession (),
.BR key_encryptsession (),
.BR key_gendes (),
@@ -76,8 +76,6 @@ T{
.BR key_secretkey_is_set ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
.SH NOTES
Note that we talk about two types of encryption here.
diff --git a/man3/killpg.3 b/man3/killpg.3
index 83e2d9cdf..a14631678 100644
--- a/man3/killpg.3
+++ b/man3/killpg.3
@@ -11,7 +11,7 @@
.\" Added notes on CAP_KILL
.\" Modified 2004-06-21 by aeb
.\"
-.TH killpg 3 2023-02-05 "Linux man-pages 6.03"
+.TH killpg 3 2023-03-30 "Linux man-pages 6.05.01"
.SH NAME
killpg \- send signal to a process group
.SH LIBRARY
@@ -81,11 +81,7 @@ No process can be found in the process group specified by
.B ESRCH
The process group was given as 0 but the sending process does not
have a process group.
-.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, SVr4, 4.4BSD
-.RB ( killpg ()
-first appeared in 4BSD).
-.SH NOTES
+.SH VERSIONS
There are various differences between the permission checking
in BSD-type systems and System\ V-type systems.
See the POSIX rationale for
@@ -104,6 +100,11 @@ On Linux,
.BR killpg ()
is implemented as a library function that makes the call
.IR "kill(\-pgrp,\ sig)" .
+.SH STANDARDS
+POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001, SVr4, 4.4BSD
+(first appeared in 4BSD).
.SH SEE ALSO
.BR getpgrp (2),
.BR kill (2),
diff --git a/man3/ldexp.3 b/man3/ldexp.3
index adab68d7f..e1fb88cd5 100644
--- a/man3/ldexp.3
+++ b/man3/ldexp.3
@@ -12,7 +12,7 @@
.\" Modified 1993-07-24 by Rik Faith (faith@cs.unc.edu)
.\" Modified 2004-10-31 by aeb
.\"
-.TH ldexp 3 2023-02-10 "Linux man-pages 6.03"
+.TH ldexp 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
ldexp, ldexpf, ldexpl \- multiply floating-point number by integral power of 2
.SH LIBRARY
@@ -103,29 +103,29 @@ is raised.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR ldexp (),
.BR ldexpf (),
.BR ldexpl ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-C99, POSIX.1-2001, POSIX.1-2008.
+C11, POSIX.1-2008.
+.SH HISTORY
+C99, POSIX.1-2001.
.PP
The variant returning
.I double
also conforms to
-SVr4, 4.3BSD.
+SVr4, 4.3BSD, C89.
.SH SEE ALSO
.BR frexp (3),
.BR modf (3),
diff --git a/man3/lgamma.3 b/man3/lgamma.3
index d051c9843..cbcf363a0 100644
--- a/man3/lgamma.3
+++ b/man3/lgamma.3
@@ -6,7 +6,7 @@
.\"
.\" based on glibc infopages
.\"
-.TH lgamma 3 2023-02-05 "Linux man-pages 6.03"
+.TH lgamma 3 2023-03-30 "Linux man-pages 6.05.01"
.SH NAME
lgamma, lgammaf, lgammal, lgamma_r, lgammaf_r, lgammal_r, signgam \-
log gamma function
@@ -153,17 +153,44 @@ is raised.
.\" glibc (as at 2.8) also supports an inexact
.\" exception for various cases.
.SH STANDARDS
-The
+.TP
.BR lgamma ()
-functions are specified in C99, POSIX.1-2001, and POSIX.1-2008.
+.TQ
+.BR lgammaf ()
+.TQ
+.BR lgammal ()
+C11, POSIX.1-2008.
+.TP
.I signgam
-is specified in POSIX.1-2001 and POSIX.1-2008, but not in C99.
-The
+POSIX.1-2008.
+.TP
.BR lgamma_r ()
-functions are nonstandard, but present on several other systems.
+.TQ
+.BR lgammaf_r ()
+.TQ
+.BR lgammal_r ()
+None.
+.SH HISTORY
+.TP
+.BR lgamma ()
+.TQ
+.BR lgammaf ()
+.TQ
+.BR lgammal ()
+C99, POSIX.1-2001.
+.TP
+.I signgam
+POSIX.1-2001.
+.TP
+.BR lgamma_r ()
+.TQ
+.BR lgammaf_r ()
+.TQ
+.BR lgammal_r ()
+None.
.SH BUGS
In glibc 2.9 and earlier,
-.\" http://sources.redhat.com/bugzilla/show_bug.cgi?id=6777
+.\" https://www.sourceware.org/bugzilla/show_bug.cgi?id=6777
when a pole error occurs,
.I errno
is set to
diff --git a/man3/lio_listio.3 b/man3/lio_listio.3
index 694c4b2b8..0cca6e43b 100644
--- a/man3/lio_listio.3
+++ b/man3/lio_listio.3
@@ -3,7 +3,7 @@
.\"
.\" SPDX-License-Identifier: GPL-2.0-or-later
.\"
-.TH lio_listio 3 2022-12-15 "Linux man-pages 6.03"
+.TH lio_listio 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
lio_listio \- initiate a list of I/O requests
.SH LIBRARY
@@ -183,29 +183,26 @@ If
.BR lio_listio ()
fails for any other reason,
then none of the I/O operations has been initiated.
-.SH VERSIONS
-The
-.BR lio_listio ()
-function is available since glibc 2.1.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR lio_listio ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008.
+POSIX.1-2008.
+.SH HISTORY
+glibc 2.1.
+POSIX.1-2001.
.SH NOTES
It is a good idea to zero out the control blocks before use.
The control blocks must not be changed while the I/O operations
diff --git a/man3/list.3 b/man3/list.3
index 1b95dc13b..270d5e6f3 100644
--- a/man3/list.3
+++ b/man3/list.3
@@ -5,7 +5,7 @@
.\" SPDX-License-Identifier: BSD-3-Clause
.\"
.\"
-.TH LIST 3 2022-10-30 "Linux man-pages 6.03"
+.TH LIST 3 2023-05-03 "Linux man-pages 6.05.01"
.SH NAME
LIST_EMPTY,
LIST_ENTRY,
@@ -233,9 +233,9 @@ structure, respectively.
returns an initializer that can be assigned to the list
.IR head .
.SH STANDARDS
-Not in POSIX.1, POSIX.1-2001, or POSIX.1-2008.
-Present on the BSDs
-(LIST macros first appeared in 4.4BSD).
+BSD.
+.SH HISTORY
+4.4BSD.
.SH BUGS
.BR LIST_FOREACH ()
doesn't allow
@@ -255,36 +255,36 @@ without interfering with the traversal.
#include <stdio.h>
#include <stdlib.h>
#include <sys/queue.h>
-
+\&
struct entry {
int data;
LIST_ENTRY(entry) entries; /* List */
};
-
+\&
LIST_HEAD(listhead, entry);
-
+\&
int
main(void)
{
struct entry *n1, *n2, *n3, *np;
struct listhead head; /* List head */
int i;
-
+\&
LIST_INIT(&head); /* Initialize the list */
-
+\&
n1 = malloc(sizeof(struct entry)); /* Insert at the head */
LIST_INSERT_HEAD(&head, n1, entries);
-
+\&
n2 = malloc(sizeof(struct entry)); /* Insert after */
LIST_INSERT_AFTER(n1, n2, entries);
-
+\&
n3 = malloc(sizeof(struct entry)); /* Insert before */
LIST_INSERT_BEFORE(n2, n3, entries);
-
+\&
i = 0; /* Forward traversal */
LIST_FOREACH(np, &head, entries)
np\->data = i++;
-
+\&
LIST_REMOVE(n2, entries); /* Deletion */
free(n2);
/* Forward traversal */
@@ -298,7 +298,7 @@ main(void)
n1 = n2;
}
LIST_INIT(&head);
-
+\&
exit(EXIT_SUCCESS);
}
.EE
diff --git a/man3/localeconv.3 b/man3/localeconv.3
index fd1e28200..063fe1148 100644
--- a/man3/localeconv.3
+++ b/man3/localeconv.3
@@ -4,7 +4,7 @@
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
.\" Modified Sat Jul 24 19:01:20 1993 by Rik Faith (faith@cs.unc.edu)
-.TH localeconv 3 2022-12-29 "Linux man-pages 6.03"
+.TH localeconv 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
localeconv \- get numeric formatting information
.SH LIBRARY
@@ -49,24 +49,26 @@ function always succeeds.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lb lb lbx
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR localeconv ()
T} Thread safety T{
+.na
+.nh
MT-Unsafe race:localeconv locale
T}
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-C99.
+C11.
+.SH HISTORY
+C89.
.SH BUGS
The
.BR printf (3)
diff --git a/man3/lockf.3 b/man3/lockf.3
index dad5ce95a..a4043ba58 100644
--- a/man3/lockf.3
+++ b/man3/lockf.3
@@ -7,7 +7,7 @@
.\" Added section stuff, aeb, 2002-04-22.
.\" Corrected include file, drepper, 2003-06-15.
.\"
-.TH lockf 3 2023-02-05 "Linux man-pages 6.03"
+.TH lockf 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
lockf \- apply, test or remove a POSIX lock on an open file
.SH LIBRARY
@@ -146,22 +146,22 @@ Too many segment locks open, lock table is full.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR lockf ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, SVr4.
+POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001, SVr4.
.SH SEE ALSO
.BR fcntl (2),
.BR flock (2)
diff --git a/man3/log.3 b/man3/log.3
index fa04e1826..23ad8f9bd 100644
--- a/man3/log.3
+++ b/man3/log.3
@@ -14,7 +14,7 @@
.\" Modified 2002-07-27 by Walter Harms
.\" (walter.harms@informatik.uni-oldenburg.de)
.\"
-.TH log 3 2023-02-05 "Linux man-pages 6.03"
+.TH log 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
log, logf, logl \- natural logarithmic function
.SH LIBRARY
@@ -102,29 +102,29 @@ is raised.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR log (),
.BR logf (),
.BR logl ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-C99, POSIX.1-2001, POSIX.1-2008.
+C11, POSIX.1-2008.
+.SH HISTORY
+C99, POSIX.1-2001.
.PP
The variant returning
.I double
also conforms to
-SVr4, 4.3BSD.
+SVr4, 4.3BSD, C89.
.SH BUGS
In glibc 2.5 and earlier,
taking the
diff --git a/man3/log10.3 b/man3/log10.3
index e834b584b..9d3a0bb47 100644
--- a/man3/log10.3
+++ b/man3/log10.3
@@ -14,7 +14,7 @@
.\" Modified 2002-07-27 by Walter Harms
.\" (walter.harms@informatik.uni-oldenburg.de)
.\"
-.TH log10 3 2023-02-05 "Linux man-pages 6.03"
+.TH log10 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
log10, log10f, log10l \- base-10 logarithmic function
.SH LIBRARY
@@ -63,29 +63,29 @@ For a discussion of the errors that can occur for these functions, see
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR log10 (),
.BR log10f (),
.BR log10l ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-C99, POSIX.1-2001, POSIX.1-2008.
+C11, POSIX.1-2008.
+.SH HISTORY
+C99, POSIX.1-2001.
.PP
The variant returning
.I double
also conforms to
-SVr4, 4.3BSD.
+SVr4, 4.3BSD, C89.
.SH SEE ALSO
.BR cbrt (3),
.BR clog10 (3),
diff --git a/man3/log1p.3 b/man3/log1p.3
index 3fc85cef9..c3285a9a7 100644
--- a/man3/log1p.3
+++ b/man3/log1p.3
@@ -7,7 +7,7 @@
.\"
.\" Modified 2002-07-27 by Walter Harms
.\" (walter.harms@informatik.uni-oldenburg.de)
-.TH log1p 3 2023-02-05 "Linux man-pages 6.03"
+.TH log1p 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
log1p, log1pf, log1pl \- logarithm of 1 plus argument
.SH LIBRARY
@@ -112,24 +112,24 @@ is raised.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR log1p (),
.BR log1pf (),
.BR log1pl ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-C99, POSIX.1-2001, POSIX.1-2008.
+C11, POSIX.1-2008.
+.SH HISTORY
+C99, POSIX.1-2001.
.\" BSD
.SH BUGS
Before glibc 2.22, the glibc implementation did not set
diff --git a/man3/log2.3 b/man3/log2.3
index 645824781..223ac9992 100644
--- a/man3/log2.3
+++ b/man3/log2.3
@@ -14,7 +14,7 @@
.\" Modified 2002-07-27 by Walter Harms
.\" (walter.harms@informatik.uni-oldenburg.de)
.\"
-.TH log2 3 2022-12-15 "Linux man-pages 6.03"
+.TH log2 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
log2, log2f, log2l \- base-2 logarithmic function
.SH LIBRARY
@@ -59,29 +59,28 @@ when calling these functions.
.PP
For a discussion of the errors that can occur for these functions, see
.BR log (3).
-.SH VERSIONS
-These functions were added in glibc 2.1.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR log2 (),
.BR log2f (),
.BR log2l ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-C99, POSIX.1-2001, POSIX.1-2008.
+C11, POSIX.1-2008.
+.SH HISTORY
+glibc 2.1.
+C99, POSIX.1-2001.
.PP
The variant returning
.I double
diff --git a/man3/logb.3 b/man3/logb.3
index 5293f4425..1bde61bb3 100644
--- a/man3/logb.3
+++ b/man3/logb.3
@@ -7,7 +7,7 @@
.\"
.\" Inspired by a page by Walter Harms created 2002-08-10
.\"
-.TH logb 3 2023-02-05 "Linux man-pages 6.03"
+.TH logb 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
logb, logbf, logbl \- get exponent of a floating-point value
.SH LIBRARY
@@ -110,34 +110,33 @@ These functions do not set
.IR errno .
.\" FIXME . Is it intentional that these functions do not set errno?
.\" log(), log2(), log10() do set errno
-.\" Bug raised: http://sources.redhat.com/bugzilla/show_bug.cgi?id=6793
+.\" Bug raised: https://www.sourceware.org/bugzilla/show_bug.cgi?id=6793
.\"
-.\" .SH HISTORY
-.\" The
-.\" .BR logb ()
-.\" function occurs in 4.3BSD.
-.\" see IEEE.3 in the 4.3BSD manual
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR logb (),
.BR logbf (),
.BR logbl ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-C99, POSIX.1-2001, POSIX.1-2008.
+C11, POSIX.1-2008.
+.SH HISTORY
+C99, POSIX.1-2001.
+.TP
+.BR logb ()
+4.3BSD
+(see IEEE.3 in the 4.3BSD manual).
.SH SEE ALSO
.BR ilogb (3),
.BR log (3)
diff --git a/man3/login.3 b/man3/login.3
index 07e4ec01e..b6fa4ae02 100644
--- a/man3/login.3
+++ b/man3/login.3
@@ -4,7 +4,7 @@
.\"
.\" SPDX-License-Identifier: GPL-2.0-or-later
.\"
-.TH login 3 2022-12-15 "Linux man-pages 6.03"
+.TH login 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
login, logout \- write utmp and wtmp entries
.SH LIBRARY
@@ -96,23 +96,23 @@ in
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lb lb lbx
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR login (),
.BR logout ()
T} Thread safety T{
+.na
+.nh
MT-Unsafe race:utent
sig:ALRM timer
T}
.TE
-.hy
-.ad
.sp 1
In the above table,
.I utent
@@ -130,12 +130,8 @@ and
.BR logout ()
calls those functions,
so we use race:utent to remind users.
-.SH STANDARDS
-Not in POSIX.1.
-Present on the BSDs.
-.SH NOTES
-Note that the
-member
+.SH VERSIONS
+The member
.I ut_user
of
.I struct utmp
@@ -148,6 +144,8 @@ is defined as an alias for
.I ut_user
in
.IR <utmp.h> .
+.SH STANDARDS
+BSD.
.SH SEE ALSO
.BR getutent (3),
.BR utmp (5)
diff --git a/man3/lrint.3 b/man3/lrint.3
index 3e6fd820c..66f8598eb 100644
--- a/man3/lrint.3
+++ b/man3/lrint.3
@@ -5,7 +5,7 @@
.\"
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
-.TH lrint 3 2022-12-15 "Linux man-pages 6.03"
+.TH lrint 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
lrint, lrintf, lrintl, llrint, llrintf, llrintl \- round to nearest integer
.SH LIBRARY
@@ -76,20 +76,18 @@ is raised.
These functions do not set
.IR errno .
.\" FIXME . Is it intentional that these functions do not set errno?
-.\" Bug raised: http://sources.redhat.com/bugzilla/show_bug.cgi?id=6798
-.SH VERSIONS
-These functions were added in glibc 2.1.
+.\" Bug raised: https://www.sourceware.org/bugzilla/show_bug.cgi?id=6798
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR lrint (),
.BR lrintf (),
.BR lrintl (),
@@ -98,11 +96,12 @@ T{
.BR llrintl ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-C99, POSIX.1-2001, POSIX.1-2008.
+C11, POSIX.1-2008.
+.SH HISTORY
+glibc 2.1.
+C99, POSIX.1-2001.
.SH SEE ALSO
.BR ceil (3),
.BR floor (3),
diff --git a/man3/lround.3 b/man3/lround.3
index 19978c9e4..e48f71ae1 100644
--- a/man3/lround.3
+++ b/man3/lround.3
@@ -5,7 +5,7 @@
.\"
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
-.TH lround 3 2022-12-15 "Linux man-pages 6.03"
+.TH lround 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
lround, lroundf, lroundl, llround, llroundf, llroundl \- round to
nearest integer
@@ -79,20 +79,18 @@ is raised.
These functions do not set
.IR errno .
.\" FIXME . Is it intentional that these functions do not set errno?
-.\" Bug raised: http://sources.redhat.com/bugzilla/show_bug.cgi?id=6797
-.SH VERSIONS
-These functions were added in glibc 2.1.
+.\" Bug raised: https://www.sourceware.org/bugzilla/show_bug.cgi?id=6797
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR lround (),
.BR lroundf (),
.BR lroundl (),
@@ -101,11 +99,12 @@ T{
.BR llroundl ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-C99, POSIX.1-2001, POSIX.1-2008.
+C11, POSIX.1-2008.
+.SH HISTORY
+glibc 2.1.
+C99, POSIX.1-2001.
.SH SEE ALSO
.BR ceil (3),
.BR floor (3),
diff --git a/man3/lsearch.3 b/man3/lsearch.3
index 978da20e2..a41943513 100644
--- a/man3/lsearch.3
+++ b/man3/lsearch.3
@@ -4,7 +4,7 @@
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
.\" Corrected prototype and include, aeb, 990927
-.TH lsearch 3 2022-12-15 "Linux man-pages 6.03"
+.TH lsearch 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
lfind, lsearch \- linear search of an array
.SH LIBRARY
@@ -69,24 +69,24 @@ match is found.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR lfind (),
.BR lsearch ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, SVr4, 4.3BSD.
-Present in libc since libc-4.6.27.
+POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001, SVr4, 4.3BSD.
+libc-4.6.27.
.SH BUGS
The naming is unfortunate.
.SH SEE ALSO
diff --git a/man3/lseek64.3 b/man3/lseek64.3
index f4b58a905..aee84ed92 100644
--- a/man3/lseek64.3
+++ b/man3/lseek64.3
@@ -4,7 +4,7 @@
.\"
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
-.TH lseek64 3 2022-12-15 "Linux man-pages 6.03"
+.TH lseek64 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
lseek64 \- reposition 64-bit read/write file offset
.SH LIBRARY
@@ -171,19 +171,17 @@ system call that supports 64-bit file offsets.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR lseek64 ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
.SH NOTES
.BR lseek64 ()
diff --git a/man3/makecontext.3 b/man3/makecontext.3
index 6cd65e339..c4e237829 100644
--- a/man3/makecontext.3
+++ b/man3/makecontext.3
@@ -6,7 +6,7 @@
.\"
.\" 2006-08-02, mtk, Added example program
.\"
-.TH makecontext 3 2022-12-15 "Linux man-pages 6.03"
+.TH makecontext 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
makecontext, swapcontext \- manipulate user context
.SH LIBRARY
@@ -85,41 +85,40 @@ to indicate the error.
.TP
.B ENOMEM
Insufficient stack space left.
-.SH VERSIONS
-.BR makecontext ()
-and
-.BR swapcontext ()
-are provided since glibc 2.1.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lb lb lbx
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR makecontext ()
T} Thread safety T{
+.na
+.nh
MT-Safe race:ucp
T}
T{
+.na
+.nh
.BR swapcontext ()
T} Thread safety T{
+.na
+.nh
MT-Safe race:oucp race:ucp
T}
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
+None.
+.SH HISTORY
+glibc 2.1.
SUSv2, POSIX.1-2001.
-POSIX.1-2008 removes the specifications of
-.BR makecontext ()
-and
-.BR swapcontext (),
+Removed in POSIX.1-2008,
citing portability issues, and
recommending that applications be rewritten to use POSIX threads instead.
.SH NOTES
@@ -174,12 +173,12 @@ main: exiting
#include <stdio.h>
#include <stdlib.h>
#include <ucontext.h>
-
+\&
static ucontext_t uctx_main, uctx_func1, uctx_func2;
-
+\&
#define handle_error(msg) \e
do { perror(msg); exit(EXIT_FAILURE); } while (0)
-
+\&
static void
func1(void)
{
@@ -189,7 +188,7 @@ func1(void)
handle_error("swapcontext");
printf("%s: returning\en", __func__);
}
-
+\&
static void
func2(void)
{
@@ -199,20 +198,20 @@ func2(void)
handle_error("swapcontext");
printf("%s: returning\en", __func__);
}
-
+\&
int
main(int argc, char *argv[])
{
char func1_stack[16384];
char func2_stack[16384];
-
+\&
if (getcontext(&uctx_func1) == \-1)
handle_error("getcontext");
uctx_func1.uc_stack.ss_sp = func1_stack;
uctx_func1.uc_stack.ss_size = sizeof(func1_stack);
uctx_func1.uc_link = &uctx_main;
makecontext(&uctx_func1, func1, 0);
-
+\&
if (getcontext(&uctx_func2) == \-1)
handle_error("getcontext");
uctx_func2.uc_stack.ss_sp = func2_stack;
@@ -220,11 +219,11 @@ main(int argc, char *argv[])
/* Successor context is f1(), unless argc > 1 */
uctx_func2.uc_link = (argc > 1) ? NULL : &uctx_func1;
makecontext(&uctx_func2, func2, 0);
-
+\&
printf("%s: swapcontext(&uctx_main, &uctx_func2)\en", __func__);
if (swapcontext(&uctx_main, &uctx_func2) == \-1)
handle_error("swapcontext");
-
+\&
printf("%s: exiting\en", __func__);
exit(EXIT_SUCCESS);
}
diff --git a/man3/makedev.3 b/man3/makedev.3
index 609fd3b5c..af44a7922 100644
--- a/man3/makedev.3
+++ b/man3/makedev.3
@@ -4,7 +4,7 @@
.\"
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
-.TH makedev 3 2022-12-15 "Linux man-pages 6.03"
+.TH makedev 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
makedev, major, minor \- manage a device number
.SH LIBRARY
@@ -45,34 +45,30 @@ decompose the device IDs in the structure returned by
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR makedev (),
.BR major (),
.BR minor ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
+.SH VERSIONS
+The BSDs expose the definitions for these macros via
+.IR <sys/types.h> .
.SH STANDARDS
-The
-.BR makedev (),
-.BR major (),
-and
-.BR minor ()
-functions are not specified in POSIX.1,
-but are present on many other systems.
-.\" The BSDs, HP-UX, Solaris, AIX, Irix.
+None.
+.SH HISTORY
+BSD, HP-UX, Solaris, AIX, Irix.
.\" The header location is inconsistent:
.\" Could be sys/mkdev.h, sys/sysmacros.h, or sys/types.h.
-.SH NOTES
+.PP
These interfaces are defined as macros.
Since glibc 2.3.3,
they have been aliases for three GNU-specific functions:
@@ -82,11 +78,10 @@ and
.BR gnu_dev_minor ().
The latter names are exported, but the traditional names are more portable.
.PP
-The BSDs expose the definitions for these macros via
-.IR <sys/types.h> .
Depending on the version,
-glibc also exposes definitions for these macros from that
-header file if suitable feature test macros are defined.
+glibc also exposes definitions for these macros from
+.I <sys/types.h>
+if suitable feature test macros are defined.
However, this behavior was deprecated in glibc 2.25,
.\" glibc commit dbab6577c6684c62bd2521c1c29dc25c3cac966f
and since glibc 2.28,
diff --git a/man3/mallinfo.3 b/man3/mallinfo.3
index 9c213c544..af0813774 100644
--- a/man3/mallinfo.3
+++ b/man3/mallinfo.3
@@ -3,7 +3,7 @@
.\"
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
-.TH mallinfo 3 2023-02-05 "Linux man-pages 6.03"
+.TH mallinfo 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
mallinfo, mallinfo2 \- obtain memory allocation information
.SH LIBRARY
@@ -115,32 +115,25 @@ of the heap.
This is the maximum number of bytes that could ideally
(i.e., ignoring page alignment restrictions, and so on) be released by
.BR malloc_trim (3).
-.SH VERSIONS
-.\" mallinfo(): Available already in glibc 2.0, possibly earlier
-The
-.BR mallinfo2 ()
-function was added
-.\" commit e3960d1c57e57f33e0e846d615788f4ede73b945
-in glibc 2.33.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lb lb lbx
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR mallinfo (),
.BR mallinfo2 ()
T} Thread safety T{
+.na
+.nh
MT-Unsafe init const:mallopt
T}
.TE
-.hy
-.ad
.sp 1
.BR mallinfo ()/
.BR mallinfo2 ()
@@ -158,11 +151,16 @@ would modify the global internal objects with atomics, that make sure
.BR mallinfo2 ()
is safe enough, others modify with non-atomically maybe not.
.SH STANDARDS
-These functions are not specified by POSIX or the C standards.
-A
+None.
+.SH HISTORY
+.TP
.BR mallinfo ()
-function exists on many System V derivatives,
-and was specified in the SVID.
+glibc 2.0.
+SVID.
+.TP
+.BR mallinfo2 ()
+.\" commit e3960d1c57e57f33e0e846d615788f4ede73b945
+glibc 2.33.
.SH BUGS
.\" FIXME . http://sourceware.org/bugzilla/show_bug.cgi?id=208
.\" See the 24 Aug 2011 mail by Paul Pluzhnikov:
@@ -228,7 +226,7 @@ Free bytes held in fastbins (fsmblks): 0
Total allocated space (uordblks): 0
Total free space (fordblks): 0
Topmost releasable block (keepcost): 0
-
+\&
============== After allocating blocks ==============
Total non\-mmapped bytes (arena): 135168
# of free chunks (ordblks): 1
@@ -240,7 +238,7 @@ Free bytes held in fastbins (fsmblks): 0
Total allocated space (uordblks): 104000
Total free space (fordblks): 31168
Topmost releasable block (keepcost): 31168
-
+\&
============== After freeing blocks ==============
Total non\-mmapped bytes (arena): 135168
# of free chunks (ordblks): 501
@@ -261,14 +259,14 @@ Topmost releasable block (keepcost): 31168
#include <malloc.h>
#include <stdlib.h>
#include <string.h>
-
+\&
static void
display_mallinfo2(void)
{
struct mallinfo2 mi;
-
+\&
mi = mallinfo2();
-
+\&
printf("Total non\-mmapped bytes (arena): %zu\en", mi.arena);
printf("# of free chunks (ordblks): %zu\en", mi.ordblks);
printf("# of free fastbin blocks (smblks): %zu\en", mi.smblks);
@@ -280,51 +278,51 @@ display_mallinfo2(void)
printf("Total free space (fordblks): %zu\en", mi.fordblks);
printf("Topmost releasable block (keepcost): %zu\en", mi.keepcost);
}
-
+\&
int
main(int argc, char *argv[])
{
#define MAX_ALLOCS 2000000
char *alloc[MAX_ALLOCS];
size_t blockSize, numBlocks, freeBegin, freeEnd, freeStep;
-
+\&
if (argc < 3 || strcmp(argv[1], "\-\-help") == 0) {
fprintf(stderr, "%s num\-blocks block\-size [free\-step "
"[start\-free [end\-free]]]\en", argv[0]);
exit(EXIT_FAILURE);
}
-
+\&
numBlocks = atoi(argv[1]);
blockSize = atoi(argv[2]);
freeStep = (argc > 3) ? atoi(argv[3]) : 1;
freeBegin = (argc > 4) ? atoi(argv[4]) : 0;
freeEnd = (argc > 5) ? atoi(argv[5]) : numBlocks;
-
+\&
printf("============== Before allocating blocks ==============\en");
display_mallinfo2();
-
+\&
for (size_t j = 0; j < numBlocks; j++) {
if (numBlocks >= MAX_ALLOCS) {
fprintf(stderr, "Too many allocations\en");
exit(EXIT_FAILURE);
}
-
+\&
alloc[j] = malloc(blockSize);
if (alloc[j] == NULL) {
perror("malloc");
exit(EXIT_FAILURE);
}
}
-
+\&
printf("\en============== After allocating blocks ==============\en");
display_mallinfo2();
-
+\&
for (size_t j = freeBegin; j < freeEnd; j += freeStep)
free(alloc[j]);
-
+\&
printf("\en============== After freeing blocks ==============\en");
display_mallinfo2();
-
+\&
exit(EXIT_SUCCESS);
}
.EE
diff --git a/man3/malloc.3 b/man3/malloc.3
index 71b776f86..eee0b3069 100644
--- a/man3/malloc.3
+++ b/man3/malloc.3
@@ -1,6 +1,6 @@
'\" t
.\" Copyright (c) 1993 by Thomas Koenig (ig25@rz.uni-karlsruhe.de)
-.\" and Copyright i2007, 2012, 2018, Michael Kerrisk <mtk.manpages@gmail.com>
+.\" and Copyright 2007, 2012, 2018, Michael Kerrisk <mtk.manpages@gmail.com>
.\"
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
@@ -12,7 +12,7 @@
.\" FIXME . Review http://austingroupbugs.net/view.php?id=374
.\" to see what changes are required on this page.
.\"
-.TH malloc 3 2023-02-05 "Linux man-pages 6.03"
+.TH malloc 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
malloc, free, calloc, realloc, reallocarray \- allocate and free dynamic memory
.SH LIBRARY
@@ -22,11 +22,11 @@ Standard C library
.nf
.B #include <stdlib.h>
.PP
-.BI "void *malloc(size_t " "size" );
-.BI "void free(void " "*ptr" );
-.BI "void *calloc(size_t " "nmemb" ", size_t " "size" );
-.BI "void *realloc(void " "*ptr" ", size_t " "size" );
-.BI "void *reallocarray(void " "*ptr" ", size_t " nmemb ", size_t " "size" );
+.BI "void *malloc(size_t " size );
+.BI "void free(void *_Nullable " ptr );
+.BI "void *calloc(size_t " nmemb ", size_t " size );
+.BI "void *realloc(void *_Nullable " ptr ", size_t " size );
+.BI "void *reallocarray(void *_Nullable " ptr ", size_t " nmemb ", size_t " size );
.fi
.PP
.RS -4
@@ -226,48 +226,65 @@ or
.B RLIMIT_DATA
limit described in
.BR getrlimit (2).
-.SH VERSIONS
-.BR reallocarray ()
-was added in glibc 2.26.
-.PP
-.BR malloc ()
-and related functions rejected sizes greater than
-.B PTRDIFF_MAX
-starting in glibc 2.30.
-.PP
-.BR free ()
-preserved
-.I errno
-starting in glibc 2.33.
+Another reason could be that
+the number of mappings created by the caller process
+exceeded the limit specified by
+.IR /proc/sys/vm/max_map_count .
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR malloc (),
.BR free (),
.BR calloc (),
.BR realloc ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-.BR malloc (),
-.BR free (),
-.BR calloc (),
-.BR realloc ():
-POSIX.1-2001, POSIX.1-2008, C99.
-.PP
+.TP
+.BR malloc ()
+.TQ
+.BR free ()
+.TQ
+.BR calloc ()
+.TQ
+.BR realloc ()
+C11, POSIX.1-2008.
+.TP
.BR reallocarray ()
-is a nonstandard extension that first appeared in OpenBSD 5.6 and FreeBSD 11.0.
+None.
+.SH HISTORY
+.TP
+.BR malloc ()
+.TQ
+.BR free ()
+.TQ
+.BR calloc ()
+.TQ
+.BR realloc ()
+POSIX.1-2001, C89.
+.TP
+.BR reallocarray ()
+glibc 2.26.
+OpenBSD 5.6, FreeBSD 11.0.
+.PP
+.BR malloc ()
+and related functions rejected sizes greater than
+.B PTRDIFF_MAX
+starting in glibc 2.30.
+.PP
+.BR free ()
+preserved
+.I errno
+starting in glibc 2.33.
.SH NOTES
By default, Linux follows an optimistic memory allocation strategy.
This means that when
@@ -381,6 +398,38 @@ as POSIX and the C standard do not allow replacement of
.BR calloc (),
and
.BR realloc ().
+.SH EXAMPLES
+.EX
+#include <err.h>
+#include <stddef.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+\&
+#define MALLOCARRAY(n, type) ((type *) my_mallocarray(n, sizeof(type)))
+#define MALLOC(type) MALLOCARRAY(1, type)
+\&
+static inline void *my_mallocarray(size_t nmemb, size_t size);
+\&
+int
+main(void)
+{
+ char *p;
+\&
+ p = MALLOCARRAY(32, char);
+ if (p == NULL)
+ err(EXIT_FAILURE, "malloc");
+\&
+ strlcpy(p, "foo", 32);
+ puts(p);
+}
+\&
+static inline void *
+my_mallocarray(size_t nmemb, size_t size)
+{
+ return reallocarray(NULL, nmemb, size);
+}
+.EE
.SH SEE ALSO
.\" http://g.oswego.edu/dl/html/malloc.html
.\" A Memory Allocator - by Doug Lea
diff --git a/man3/malloc_get_state.3 b/man3/malloc_get_state.3
index 4296f622e..1577735ad 100644
--- a/man3/malloc_get_state.3
+++ b/man3/malloc_get_state.3
@@ -3,7 +3,7 @@
.\"
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
-.TH malloc_get_state 3 2022-12-15 "Linux man-pages 6.03"
+.TH malloc_get_state 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
malloc_get_state, malloc_set_state \-
record and restore state of malloc implementation
@@ -73,23 +73,21 @@ returns \-2.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR malloc_get_state (),
.BR malloc_set_state ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-These functions are GNU extensions.
+GNU.
.SH NOTES
These functions are useful when using this
.BR malloc (3)
diff --git a/man3/malloc_hook.3 b/man3/malloc_hook.3
index 0c6af2abe..8ade1b1be 100644
--- a/man3/malloc_hook.3
+++ b/man3/malloc_hook.3
@@ -5,7 +5,7 @@
.\" Heavily based on glibc documentation
.\" Polished, added docs, removed glibc doc bug, 2002-07-20, aeb
.\"
-.TH __malloc_hook 3 2023-01-07 "Linux man-pages 6.03"
+.TH __malloc_hook 3 2023-05-03 "Linux man-pages 6.05.01"
.SH NAME
__malloc_hook, __malloc_initialize_hook,
__memalign_hook, __free_hook, __realloc_hook,
@@ -81,7 +81,7 @@ points at a function that is called each time after
.BR sbrk (2)
was asked for more memory.
.SH STANDARDS
-These functions are GNU extensions.
+GNU.
.SH NOTES
The use of these hook functions is not safe in multithreaded programs,
and they are now deprecated.
@@ -105,45 +105,45 @@ Here is a short example of how to use these variables.
.EX
#include <stdio.h>
#include <malloc.h>
-
+\&
/* Prototypes for our hooks */
static void my_init_hook(void);
static void *my_malloc_hook(size_t, const void *);
-
+\&
/* Variables to save original hooks */
static void *(*old_malloc_hook)(size_t, const void *);
-
+\&
/* Override initializing hook from the C library */
void (*__malloc_initialize_hook)(void) = my_init_hook;
-
+\&
static void
my_init_hook(void)
{
old_malloc_hook = __malloc_hook;
__malloc_hook = my_malloc_hook;
}
-
+\&
static void *
my_malloc_hook(size_t size, const void *caller)
{
void *result;
-
+\&
/* Restore all old hooks */
__malloc_hook = old_malloc_hook;
-
+\&
/* Call recursively */
result = malloc(size);
-
+\&
/* Save underlying hooks */
old_malloc_hook = __malloc_hook;
-
+\&
/* printf() might call malloc(), so protect it too */
printf("malloc(%zu) called from %p returns %p\en",
size, caller, result);
-
+\&
/* Restore our own hooks */
__malloc_hook = my_malloc_hook;
-
+\&
return result;
}
.EE
diff --git a/man3/malloc_info.3 b/man3/malloc_info.3
index ef57abaab..045430b0c 100644
--- a/man3/malloc_info.3
+++ b/man3/malloc_info.3
@@ -3,7 +3,7 @@
.\"
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
-.TH malloc_info 3 2023-02-05 "Linux man-pages 6.03"
+.TH malloc_info 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
malloc_info \- export malloc state to a stream
.SH LIBRARY
@@ -41,28 +41,25 @@ is set to indicate the error.
.B EINVAL
.I options
was nonzero.
-.SH VERSIONS
-.BR malloc_info ()
-was added in glibc 2.10.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR malloc_info ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-This function is a GNU extension.
+GNU.
+.SH HISTORY
+glibc 2.10.
.SH NOTES
The memory-allocation information is provided as an XML string
(rather than a C structure)
@@ -133,7 +130,7 @@ glibc 2.13
<aspace type="total" size="135168"/>
<aspace type="mprotect" size="135168"/>
</malloc>
-
+\&
============ After allocating blocks ============
<malloc version="1">
<heap nr="0">
@@ -174,81 +171,81 @@ glibc 2.13
#include <pthread.h>
#include <stdlib.h>
#include <unistd.h>
-
+\&
static size_t blockSize;
static size_t numThreads;
static unsigned int numBlocks;
-
+\&
static void *
thread_func(void *arg)
{
int tn = (int) arg;
-
+\&
/* The multiplier \[aq](2 + tn)\[aq] ensures that each thread (including
the main thread) allocates a different amount of memory. */
-
+\&
for (unsigned int j = 0; j < numBlocks; j++)
if (malloc(blockSize * (2 + tn)) == NULL)
err(EXIT_FAILURE, "malloc\-thread");
-
+\&
sleep(100); /* Sleep until main thread terminates. */
return NULL;
}
-
+\&
int
main(int argc, char *argv[])
{
int sleepTime;
pthread_t *thr;
-
+\&
if (argc < 4) {
fprintf(stderr,
"%s num\-threads num\-blocks block\-size [sleep\-time]\en",
argv[0]);
exit(EXIT_FAILURE);
}
-
+\&
numThreads = atoi(argv[1]);
numBlocks = atoi(argv[2]);
blockSize = atoi(argv[3]);
sleepTime = (argc > 4) ? atoi(argv[4]) : 0;
-
+\&
thr = calloc(numThreads, sizeof(*thr));
if (thr == NULL)
err(EXIT_FAILURE, "calloc");
-
+\&
printf("============ Before allocating blocks ============\en");
malloc_info(0, stdout);
-
+\&
/* Create threads that allocate different amounts of memory. */
-
+\&
for (size_t tn = 0; tn < numThreads; tn++) {
errno = pthread_create(&thr[tn], NULL, thread_func,
(void *) tn);
if (errno != 0)
err(EXIT_FAILURE, "pthread_create");
-
+\&
/* If we add a sleep interval after the start\-up of each
thread, the threads likely won\[aq]t contend for malloc
mutexes, and therefore additional arenas won\[aq]t be
allocated (see malloc(3)). */
-
+\&
if (sleepTime > 0)
sleep(sleepTime);
}
-
+\&
/* The main thread also allocates some memory. */
-
+\&
for (unsigned int j = 0; j < numBlocks; j++)
if (malloc(blockSize) == NULL)
err(EXIT_FAILURE, "malloc");
-
+\&
sleep(2); /* Give all threads a chance to
complete allocations. */
-
+\&
printf("\en============ After allocating blocks ============\en");
malloc_info(0, stdout);
-
+\&
exit(EXIT_SUCCESS);
}
.EE
diff --git a/man3/malloc_stats.3 b/man3/malloc_stats.3
index 9d5b7e456..7c17d2c1c 100644
--- a/man3/malloc_stats.3
+++ b/man3/malloc_stats.3
@@ -3,7 +3,7 @@
.\"
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
-.TH malloc_stats 3 2022-12-15 "Linux man-pages 6.03"
+.TH malloc_stats 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
malloc_stats \- print memory allocation statistics
.SH LIBRARY
@@ -35,27 +35,25 @@ the function prints the sum of these two statistics for all arenas,
and the maximum number of blocks and bytes that were ever simultaneously
allocated using
.BR mmap (2).
-.\" .SH VERSIONS
-.\" Available already in glibc 2.0, possibly earlier
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR malloc_stats ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-This function is a GNU extension.
+GNU.
+.SH HISTORY
+glibc 2.0.
.SH NOTES
More detailed information about memory allocations in the main arena
can be obtained using
diff --git a/man3/malloc_trim.3 b/man3/malloc_trim.3
index 9433bf1d6..f57de447e 100644
--- a/man3/malloc_trim.3
+++ b/man3/malloc_trim.3
@@ -3,7 +3,7 @@
.\"
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
-.TH malloc_trim 3 2022-12-15 "Linux man-pages 6.03"
+.TH malloc_trim 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
malloc_trim \- release free memory from the heap
.SH LIBRARY
@@ -42,27 +42,25 @@ function returns 1 if memory was actually released back to the system,
or 0 if it was not possible to release any memory.
.SH ERRORS
No errors are defined.
-.\" .SH VERSIONS
-.\" Available already in glibc 2.0, possibly earlier
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR malloc_trim ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-This function is a GNU extension.
+GNU.
+.SH VERSIONS
+glibc 2.0.
.SH NOTES
Only the main heap (using
.BR sbrk (2))
diff --git a/man3/malloc_usable_size.3 b/man3/malloc_usable_size.3
index 11598a471..91d22d8dd 100644
--- a/man3/malloc_usable_size.3
+++ b/man3/malloc_usable_size.3
@@ -3,7 +3,7 @@
.\"
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
-.TH malloc_usable_size 3 2022-12-15 "Linux man-pages 6.03"
+.TH malloc_usable_size 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
malloc_usable_size \- obtain size of block of memory allocated from heap
.SH LIBRARY
@@ -13,20 +13,17 @@ Standard C library
.nf
.B #include <malloc.h>
.PP
-.BI "size_t malloc_usable_size(void *" ptr );
+.BI "size_t malloc_usable_size(void *_Nullable " ptr );
.fi
.SH DESCRIPTION
-The
-.BR malloc_usable_size ()
-function returns the number of usable bytes in the block pointed to by
-.IR ptr ,
-a pointer to a block of memory allocated by
+This function can be used for
+diagnostics or statistics about allocations from
.BR malloc (3)
or a related function.
.SH RETURN VALUE
.BR malloc_usable_size ()
-returns the number of usable bytes in
-the block of allocated memory pointed to by
+returns a value no less than
+the size of the block of allocated memory pointed to by
.IR ptr .
If
.I ptr
@@ -34,33 +31,31 @@ is NULL, 0 is returned.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR malloc_usable_size ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-This function is a GNU extension.
-.SH NOTES
+GNU.
+.SH CAVEATS
The value returned by
.BR malloc_usable_size ()
-may be greater than the requested size of the allocation because
-of alignment and minimum size constraints.
-Although the excess bytes can be overwritten by the application
-without ill effects,
-this is not good programming practice:
-the number of excess bytes in an allocation depends on
-the underlying implementation.
-.PP
-The main use of this function is for debugging and introspection.
+may be greater than the requested size of the allocation
+because of various internal implementation details,
+none of which the programmer should rely on.
+This function is intended to only be used
+for diagnostics and statistics;
+writing to the excess memory without first calling
+.BR realloc (3)
+to resize the allocation is not supported.
+The returned value is only valid at the time of the call.
.SH SEE ALSO
.BR malloc (3)
diff --git a/man3/mallopt.3 b/man3/mallopt.3
index 9d29de597..5fdda5cb2 100644
--- a/man3/mallopt.3
+++ b/man3/mallopt.3
@@ -2,7 +2,7 @@
.\"
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
-.TH mallopt 3 2023-02-05 "Linux man-pages 6.03"
+.TH mallopt 3 2023-05-03 "Linux man-pages 6.05.01"
.SH NAME
mallopt \- set memory allocation parameters
.SH LIBRARY
@@ -435,10 +435,7 @@ On error,
is
.I not
set.
-.\" .SH VERSIONS
-.\" Available already in glibc 2.0, possibly earlier
-.SH STANDARDS
-This function is not specified by POSIX or the C standards.
+.SH VERSIONS
A similar function exists on many System V derivatives,
but the range of values for
.I param
@@ -450,7 +447,10 @@ The SVID defined options
and
.BR M_KEEP ,
but only the first of these is implemented in glibc.
-.\" .SH NOTES
+.SH STANDARDS
+None.
+.SH HISTORY
+glibc 2.0.
.SH BUGS
Specifying an invalid value for
.I param
@@ -462,7 +462,7 @@ a call of the form:
.\" setting the M_MXFAST limit rounds up: (s + SIZE_SZ) & ~MALLOC_ALIGN_MASK)
.\" malloc requests are rounded up:
.\" (req) + SIZE_SZ + MALLOC_ALIGN_MASK) & ~MALLOC_ALIGN_MASK
-.\" http://sources.redhat.com/bugzilla/show_bug.cgi?id=12129
+.\" https://www.sourceware.org/bugzilla/show_bug.cgi?id=12129
.PP
.in +4n
.EX
@@ -494,7 +494,7 @@ the bytes of the region are initialized to the byte specified in
However, there is an
.RI off-by- sizeof(size_t)
error in the implementation:
-.\" FIXME . http://sources.redhat.com/bugzilla/show_bug.cgi?id=12140
+.\" FIXME . https://www.sourceware.org/bugzilla/show_bug.cgi?id=12140
instead of initializing precisely the block of memory
being freed by the call
.IR free(p) ,
@@ -574,31 +574,31 @@ main(): returned from second free() call
#include <malloc.h>
#include <stdio.h>
#include <stdlib.h>
-
+\&
int
main(int argc, char *argv[])
{
char *p;
-
+\&
if (argc > 1) {
if (mallopt(M_CHECK_ACTION, atoi(argv[1])) != 1) {
fprintf(stderr, "mallopt() failed");
exit(EXIT_FAILURE);
}
}
-
+\&
p = malloc(1000);
if (p == NULL) {
fprintf(stderr, "malloc() failed");
exit(EXIT_FAILURE);
}
-
+\&
free(p);
printf("%s(): returned from first free() call\en", __func__);
-
+\&
free(p);
printf("%s(): returned from second free() call\en", __func__);
-
+\&
exit(EXIT_SUCCESS);
}
.EE
diff --git a/man3/matherr.3 b/man3/matherr.3
index 1a2805cce..8e9a9738d 100644
--- a/man3/matherr.3
+++ b/man3/matherr.3
@@ -4,7 +4,7 @@
.\"
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
-.TH matherr 3 2023-02-05 "Linux man-pages 6.03"
+.TH matherr 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
matherr \- SVID math library exception handling
.SH LIBRARY
@@ -259,19 +259,17 @@ remainder(x,0) DOMAIN NAN y EDOM \" retval is 0.0/0.0
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR matherr ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
.SH EXAMPLES
The example program demonstrates the use of
@@ -367,13 +365,13 @@ x=12345.000000
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
-
+\&
static int matherr_ret = 0; /* Value that matherr()
should return */
static int change_retval = 0; /* Should matherr() change
function\[aq]s return value? */
static double new_retval; /* New function return value */
-
+\&
int
matherr(struct exception *exc)
{
@@ -388,38 +386,38 @@ matherr(struct exception *exc)
fprintf(stderr, " args: %f, %f\en",
exc\->arg1, exc\->arg2);
fprintf(stderr, " retval: %f\en", exc\->retval);
-
+\&
if (change_retval)
exc\->retval = new_retval;
-
+\&
return matherr_ret;
}
-
+\&
int
main(int argc, char *argv[])
{
double x;
-
+\&
if (argc < 2) {
fprintf(stderr, "Usage: %s <argval>"
" [<matherr\-ret> [<new\-func\-retval>]]\en", argv[0]);
exit(EXIT_FAILURE);
}
-
+\&
if (argc > 2) {
_LIB_VERSION = _SVID_;
matherr_ret = atoi(argv[2]);
}
-
+\&
if (argc > 3) {
change_retval = 1;
new_retval = atof(argv[3]);
}
-
+\&
x = log(atof(argv[1]));
if (errno != 0)
perror("errno");
-
+\&
printf("x=%f\en", x);
exit(EXIT_SUCCESS);
}
diff --git a/man3/mblen.3 b/man3/mblen.3
index c79cf57f7..0a8bbdebf 100644
--- a/man3/mblen.3
+++ b/man3/mblen.3
@@ -9,7 +9,7 @@
.\" OpenGroup's Single UNIX specification http://www.UNIX-systems.org/online.html
.\" ISO/IEC 9899:1999
.\"
-.TH mblen 3 2022-12-15 "Linux man-pages 6.03"
+.TH mblen 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
mblen \- determine number of bytes in next multibyte character
.SH LIBRARY
@@ -86,22 +86,27 @@ multibyte character.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR mblen ()
T} Thread safety MT-Unsafe race
.TE
-.hy
-.ad
.sp 1
+.SH VERSIONS
+The function
+.BR mbrlen (3)
+provides a better interface to the same
+functionality.
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, C99.
+C11, POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001, C99.
.SH NOTES
The behavior of
.BR mblen ()
@@ -109,10 +114,5 @@ depends on the
.B LC_CTYPE
category of the
current locale.
-.PP
-The function
-.BR mbrlen (3)
-provides a better interface to the same
-functionality.
.SH SEE ALSO
.BR mbrlen (3)
diff --git a/man3/mbrlen.3 b/man3/mbrlen.3
index e60075e8a..bf19f885c 100644
--- a/man3/mbrlen.3
+++ b/man3/mbrlen.3
@@ -9,7 +9,7 @@
.\" OpenGroup's Single UNIX specification http://www.UNIX-systems.org/online.html
.\" ISO/IEC 9899:1999
.\"
-.TH mbrlen 3 2022-12-15 "Linux man-pages 6.03"
+.TH mbrlen 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
mbrlen \- determine number of bytes in next multibyte character
.SH LIBRARY
@@ -104,22 +104,22 @@ should be increased.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR mbrlen ()
T} Thread safety MT-Unsafe race:mbrlen/!ps
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, C99.
+C11, POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001, C99.
.SH NOTES
The behavior of
.BR mbrlen ()
diff --git a/man3/mbrtowc.3 b/man3/mbrtowc.3
index fc025581f..2dc8f1562 100644
--- a/man3/mbrtowc.3
+++ b/man3/mbrtowc.3
@@ -10,7 +10,7 @@
.\" http://www.UNIX-systems.org/online.html
.\" ISO/IEC 9899:1999
.\"
-.TH mbrtowc 3 2023-02-05 "Linux man-pages 6.03"
+.TH mbrtowc 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
mbrtowc \- convert a multibyte sequence to a wide character
.SH LIBRARY
@@ -174,22 +174,22 @@ should be increased.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR mbrtowc ()
T} Thread safety MT-Unsafe race:mbrtowc/!ps
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, C99.
+C11, POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001, C99.
.SH NOTES
The behavior of
.BR mbrtowc ()
diff --git a/man3/mbsinit.3 b/man3/mbsinit.3
index 44cd5ac66..41a43a449 100644
--- a/man3/mbsinit.3
+++ b/man3/mbsinit.3
@@ -9,7 +9,7 @@
.\" OpenGroup's Single UNIX specification http://www.UNIX-systems.org/online.html
.\" ISO/IEC 9899:1999
.\"
-.TH mbsinit 3 2022-12-15 "Linux man-pages 6.03"
+.TH mbsinit 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
mbsinit \- test for initial shift state
.SH LIBRARY
@@ -87,22 +87,22 @@ Otherwise, it returns 0.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR mbsinit ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, C99.
+C11, POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001, C99.
.SH NOTES
The behavior of
.BR mbsinit ()
diff --git a/man3/mbsnrtowcs.3 b/man3/mbsnrtowcs.3
index 0698e5264..b9d00291c 100644
--- a/man3/mbsnrtowcs.3
+++ b/man3/mbsnrtowcs.3
@@ -8,7 +8,7 @@
.\" Dinkumware C library reference http://www.dinkumware.com/
.\" OpenGroup's Single UNIX specification http://www.UNIX-systems.org/online.html
.\"
-.TH mbsnrtowcs 3 2023-02-05 "Linux man-pages 6.03"
+.TH mbsnrtowcs 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
mbsnrtowcs \- convert a multibyte string to a wide-character string
.SH LIBRARY
@@ -164,21 +164,21 @@ set to
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lb lb lbx
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR mbsnrtowcs ()
T} Thread safety T{
+.na
+.nh
MT-Unsafe race:mbsnrtowcs/!ps
T}
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
POSIX.1-2008.
diff --git a/man3/mbsrtowcs.3 b/man3/mbsrtowcs.3
index c814d391e..e613a1404 100644
--- a/man3/mbsrtowcs.3
+++ b/man3/mbsrtowcs.3
@@ -9,7 +9,7 @@
.\" OpenGroup's Single UNIX specification http://www.UNIX-systems.org/online.html
.\" ISO/IEC 9899:1999
.\"
-.TH mbsrtowcs 3 2023-02-05 "Linux man-pages 6.03"
+.TH mbsrtowcs 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
mbsrtowcs \- convert a multibyte string to a wide-character string
.SH LIBRARY
@@ -125,24 +125,26 @@ set to
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lb lb lbx
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR mbsrtowcs ()
T} Thread safety T{
+.na
+.nh
MT-Unsafe race:mbsrtowcs/!ps
T}
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, C99.
+C11, POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001, C99.
.SH NOTES
The behavior of
.BR mbsrtowcs ()
diff --git a/man3/mbstowcs.3 b/man3/mbstowcs.3
index 44cc989c7..c66b9c2d1 100644
--- a/man3/mbstowcs.3
+++ b/man3/mbstowcs.3
@@ -10,7 +10,7 @@
.\" OpenGroup's Single UNIX specification http://www.UNIX-systems.org/online.html
.\" ISO/IEC 9899:1999
.\"
-.TH mbstowcs 3 2023-02-05 "Linux man-pages 6.03"
+.TH mbstowcs 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
mbstowcs \- convert a multibyte string to a wide-character string
.SH LIBRARY
@@ -95,22 +95,27 @@ is returned.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR mbstowcs ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
+.SH VERSIONS
+The function
+.BR mbsrtowcs (3)
+provides a better interface to the same
+functionality.
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, C99.
+C11, POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001, C99.
.SH NOTES
The behavior of
.BR mbstowcs ()
@@ -118,11 +123,6 @@ depends on the
.B LC_CTYPE
category of the
current locale.
-.PP
-The function
-.BR mbsrtowcs (3)
-provides a better interface to the same
-functionality.
.SH EXAMPLES
The program below illustrates the use of
.BR mbstowcs (),
@@ -135,7 +135,7 @@ $ ./t_mbstowcs de_DE.UTF\-8 Grüße!
Length of source string (excluding terminator):
8 bytes
6 multibyte characters
-
+\&
Wide character string is: Grüße! (6 characters)
G alpha upper
r alpha lower
@@ -155,81 +155,81 @@ Wide character string is: Grüße! (6 characters)
#include <string.h>
#include <wchar.h>
#include <wctype.h>
-
+\&
int
main(int argc, char *argv[])
{
size_t mbslen; /* Number of multibyte characters in source */
wchar_t *wcs; /* Pointer to converted wide character string */
-
+\&
if (argc < 3) {
fprintf(stderr, "Usage: %s <locale> <string>\en", argv[0]);
exit(EXIT_FAILURE);
}
-
+\&
/* Apply the specified locale. */
-
+\&
if (setlocale(LC_ALL, argv[1]) == NULL) {
perror("setlocale");
exit(EXIT_FAILURE);
}
-
+\&
/* Calculate the length required to hold argv[2] converted to
a wide character string. */
-
+\&
mbslen = mbstowcs(NULL, argv[2], 0);
if (mbslen == (size_t) \-1) {
perror("mbstowcs");
exit(EXIT_FAILURE);
}
-
+\&
/* Describe the source string to the user. */
-
+\&
printf("Length of source string (excluding terminator):\en");
printf(" %zu bytes\en", strlen(argv[2]));
printf(" %zu multibyte characters\en\en", mbslen);
-
+\&
/* Allocate wide character string of the desired size. Add 1
to allow for terminating null wide character (L\[aq]\e0\[aq]). */
-
+\&
wcs = calloc(mbslen + 1, sizeof(*wcs));
if (wcs == NULL) {
perror("calloc");
exit(EXIT_FAILURE);
}
-
+\&
/* Convert the multibyte character string in argv[2] to a
wide character string. */
-
+\&
if (mbstowcs(wcs, argv[2], mbslen + 1) == (size_t) \-1) {
perror("mbstowcs");
exit(EXIT_FAILURE);
}
-
+\&
printf("Wide character string is: %ls (%zu characters)\en",
wcs, mbslen);
-
+\&
/* Now do some inspection of the classes of the characters in
the wide character string. */
-
+\&
for (wchar_t *wp = wcs; *wp != 0; wp++) {
printf(" %lc ", (wint_t) *wp);
-
+\&
if (!iswalpha(*wp))
printf("!");
printf("alpha ");
-
+\&
if (iswalpha(*wp)) {
if (iswupper(*wp))
printf("upper ");
-
+\&
if (iswlower(*wp))
printf("lower ");
}
-
+\&
putchar(\[aq]\en\[aq]);
}
-
+\&
exit(EXIT_SUCCESS);
}
.EE
diff --git a/man3/mbtowc.3 b/man3/mbtowc.3
index 8446ab87b..743e5a7c1 100644
--- a/man3/mbtowc.3
+++ b/man3/mbtowc.3
@@ -9,7 +9,7 @@
.\" OpenGroup's Single UNIX specification http://www.UNIX-systems.org/online.html
.\" ISO/IEC 9899:1999
.\"
-.TH mbtowc 3 2023-02-05 "Linux man-pages 6.03"
+.TH mbtowc 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
mbtowc \- convert a multibyte sequence to a wide character
.SH LIBRARY
@@ -113,22 +113,28 @@ has nontrivial shift state, or zero if the encoding is stateless.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR mbtowc ()
T} Thread safety MT-Unsafe race
.TE
-.hy
-.ad
.sp 1
+.SH VERSIONS
+This function is not multithread safe.
+The function
+.BR mbrtowc (3)
+provides
+a better interface to the same functionality.
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, C99.
+C11, POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001, C99.
.SH NOTES
The behavior of
.BR mbtowc ()
@@ -136,12 +142,6 @@ depends on the
.B LC_CTYPE
category of the
current locale.
-.PP
-This function is not multithread safe.
-The function
-.BR mbrtowc (3)
-provides
-a better interface to the same functionality.
.SH SEE ALSO
.BR MB_CUR_MAX (3),
.BR mblen (3),
diff --git a/man3/mcheck.3 b/man3/mcheck.3
index a9d3eb8eb..97f217ff8 100644
--- a/man3/mcheck.3
+++ b/man3/mcheck.3
@@ -3,7 +3,7 @@
.\"
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
-.TH mcheck 3 2022-12-15 "Linux man-pages 6.03"
+.TH mcheck 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
mcheck, mcheck_check_all, mcheck_pedantic, mprobe \- heap consistency checking
.SH LIBRARY
@@ -113,42 +113,42 @@ A block of memory was freed twice.
and
.BR mcheck_pedantic ()
return 0 on success, or \-1 on error.
-.SH VERSIONS
-The
-.BR mcheck_pedantic ()
-and
-.BR mcheck_check_all ()
-functions are available since glibc 2.2.
-The
-.BR mcheck ()
-and
-.BR mprobe ()
-functions are present since at least glibc 2.0
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR mcheck (),
.BR mcheck_pedantic (),
.BR mcheck_check_all (),
.BR mprobe ()
T} Thread safety T{
+.na
+.nh
MT-Unsafe race:mcheck
const:malloc_hooks
T}
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-These functions are GNU extensions.
+GNU.
+.SH HISTORY
+.TP
+.BR mcheck_pedantic ()
+.TQ
+.BR mcheck_check_all ()
+glibc 2.2.
+.TP
+.BR mcheck ()
+.TQ
+.BR mprobe ()
+glibc 2.0.
.SH NOTES
Linking a program with
.I \-lmcheck
@@ -172,7 +172,7 @@ when running the program:
.EX
.RB "$" " ./a.out"
About to free
-
+\&
About to free a second time
block freed twice
Aborted (core dumped)
@@ -185,25 +185,25 @@ Aborted (core dumped)
#include <mcheck.h>
#include <stdio.h>
#include <stdlib.h>
-
+\&
int
main(void)
{
char *p;
-
+\&
if (mcheck(NULL) != 0) {
fprintf(stderr, "mcheck() failed\en");
-
+\&
exit(EXIT_FAILURE);
}
-
+\&
p = malloc(1000);
-
+\&
fprintf(stderr, "About to free\en");
free(p);
fprintf(stderr, "\enAbout to free a second time\en");
free(p);
-
+\&
exit(EXIT_SUCCESS);
}
.EE
diff --git a/man3/memccpy.3 b/man3/memccpy.3
index f25c4a16f..6d14698ca 100644
--- a/man3/memccpy.3
+++ b/man3/memccpy.3
@@ -8,7 +8,7 @@
.\" Lewine's _POSIX Programmer's Guide_ (O'Reilly & Associates, 1991)
.\" 386BSD man pages
.\" Modified Sat Jul 24 18:57:24 1993 by Rik Faith (faith@cs.unc.edu)
-.TH memccpy 3 2022-12-15 "Linux man-pages 6.03"
+.TH memccpy 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
memccpy \- copy memory area
.SH LIBRARY
@@ -55,22 +55,22 @@ characters of
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR memccpy ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, SVr4, 4.3BSD.
+POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001, SVr4, 4.3BSD.
.SH SEE ALSO
.BR bcopy (3),
.BR bstring (3),
diff --git a/man3/memchr.3 b/man3/memchr.3
index 3d15fb1a9..92708cdb9 100644
--- a/man3/memchr.3
+++ b/man3/memchr.3
@@ -10,7 +10,7 @@
.\" Modified Wed Feb 20 21:09:36 2002, Ian Redfern (redferni@logica.com)
.\" 2008-07-09, mtk, add rawmemchr()
.\"
-.TH memchr 3 2023-01-05 "Linux man-pages 6.03"
+.TH memchr 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
memchr, memrchr, rawmemchr \- scan memory for a character
.SH LIBRARY
@@ -23,7 +23,7 @@ Standard C library
.BI "void *memchr(const void " s [. n "], int " c ", size_t " n );
.BI "void *memrchr(const void " s [. n "], int " c ", size_t " n );
.PP
-.BI "[[deprecated]] void *rawmemchr(const void " s [. n "], int " c );
+.BI "[[deprecated]] void *rawmemchr(const void *" s ", int " c );
.fi
.PP
.RS -4
@@ -94,42 +94,42 @@ the given memory area.
The
.BR rawmemchr ()
function returns a pointer to the matching byte.
-.SH VERSIONS
-.BR rawmemchr ()
-first appeared in glibc 2.1.
-.PP
-.BR memrchr ()
-first appeared in glibc 2.2.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR memchr (),
.BR memrchr (),
.BR rawmemchr ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-.BR memchr ():
-POSIX.1-2001, POSIX.1-2008, C99, SVr4, 4.3BSD.
-.PP
-The
+.TP
+.BR memchr ()
+C11, POSIX.1-2008.
+.TP
.BR memrchr ()
-function is a GNU extension, available since glibc 2.1.91.
-.PP
-The
+.TQ
+.BR rawmemchr ()
+GNU.
+.SH HISTORY
+.TP
+.BR memchr ()
+POSIX.1-2001, C89, SVr4, 4.3BSD.
+.TP
+.BR memrchr ()
+glibc 2.2.
+.TP
.BR rawmemchr ()
-function is a GNU extension, available since glibc 2.1.
+glibc 2.1.
.SH SEE ALSO
.BR bstring (3),
.BR ffs (3),
diff --git a/man3/memcmp.3 b/man3/memcmp.3
index a2a33cedc..f3d94ea7d 100644
--- a/man3/memcmp.3
+++ b/man3/memcmp.3
@@ -8,7 +8,7 @@
.\" Lewine's _POSIX Programmer's Guide_ (O'Reilly & Associates, 1991)
.\" 386BSD man pages
.\" Modified Sat Jul 24 18:55:27 1993 by Rik Faith (faith@cs.unc.edu)
-.TH memcmp 3 2023-01-07 "Linux man-pages 6.03"
+.TH memcmp 3 2023-07-30 "Linux man-pages 6.05.01"
.SH NAME
memcmp \- compare memory areas
.SH LIBRARY
@@ -48,32 +48,40 @@ is zero, the return value is zero.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR memcmp ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, C99, SVr4, 4.3BSD.
-.SH NOTES
+C11, POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001, C89, SVr4, 4.3BSD.
+.SH CAVEATS
Do not use
.BR memcmp ()
-to compare security critical data, such as cryptographic secrets,
-because the required CPU time depends on the number of equal bytes.
-Instead, a function that performs comparisons in constant time is required.
+to compare confidential data,
+such as cryptographic secrets,
+because the CPU time required for the comparison
+depends on the contents of the addresses compared,
+this function is subject to timing-based side-channel attacks.
+In such cases,
+a function that performs comparisons in deterministic time,
+depending only on
+.I n
+(the quantity of bytes compared)
+is required.
Some operating systems provide such a function (e.g., NetBSD's
.BR consttime_memequal ()),
but no such function is specified in POSIX.
-On Linux, it may be necessary to implement such a function oneself.
+On Linux, you may need to implement such a function yourself.
.SH SEE ALSO
.BR bstring (3),
.BR strcasecmp (3),
diff --git a/man3/memcpy.3 b/man3/memcpy.3
index 1dab9516f..ec8e3b42f 100644
--- a/man3/memcpy.3
+++ b/man3/memcpy.3
@@ -9,7 +9,7 @@
.\" Lewine's _POSIX Programmer's Guide_ (O'Reilly & Associates, 1991)
.\" 386BSD man pages
.\" Modified Sun Jul 25 10:41:09 1993 by Rik Faith (faith@cs.unc.edu)
-.TH memcpy 3 2022-12-29 "Linux man-pages 6.03"
+.TH memcpy 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
memcpy \- copy memory area
.SH LIBRARY
@@ -38,23 +38,23 @@ function returns a pointer to \fIdest\fP.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR memcpy ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, C99, SVr4, 4.3BSD.
-.SH NOTES
+C11, POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001, C89, SVr4, 4.3BSD.
+.SH CAVEATS
Failure to observe the requirement that the memory areas
do not overlap has been the source of significant bugs.
(POSIX and the C standards are explicit that employing
diff --git a/man3/memfrob.3 b/man3/memfrob.3
index 4d688fd2a..3f19845ed 100644
--- a/man3/memfrob.3
+++ b/man3/memfrob.3
@@ -8,7 +8,7 @@
.\" Lewine's _POSIX Programmer's Guide_ (O'Reilly & Associates, 1991)
.\" 386BSD man pages
.\" Modified Sat Jul 24 18:54:45 1993 by Rik Faith (faith@cs.unc.edu)
-.TH memfrob 3 2022-12-15 "Linux man-pages 6.03"
+.TH memfrob 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
memfrob \- frobnicate (obfuscate) a memory area
.SH LIBRARY
@@ -42,25 +42,20 @@ area.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR memfrob ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-The
-.BR memfrob ()
-function is unique to the
-GNU C Library.
+GNU.
.SH SEE ALSO
.BR bstring (3),
.BR strfry (3)
diff --git a/man3/memmem.3 b/man3/memmem.3
index 8a1623d84..f87203c50 100644
--- a/man3/memmem.3
+++ b/man3/memmem.3
@@ -8,7 +8,7 @@
.\" 386BSD man pages
.\" Modified Sat Jul 24 18:50:48 1993 by Rik Faith (faith@cs.unc.edu)
.\" Interchanged 'needle' and 'haystack'; added history, aeb, 980113.
-.TH memmem 3 2022-12-15 "Linux man-pages 6.03"
+.TH memmem 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
memmem \- locate a substring
.SH LIBRARY
@@ -43,26 +43,23 @@ substring, or NULL if the substring is not found.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR memmem ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-This function is not specified in POSIX.1,
-but is present on a number of other systems,
-including:
+None.
+.SH HISTORY
musl libc 0.9.7;
-FreeBSD 6.0, OpenBSD 5.4, NetBSD, and Illumos.
+FreeBSD 6.0, OpenBSD 5.4, NetBSD, Illumos.
.SH BUGS
.\" This function was broken in Linux libraries up to and including libc 5.0.9;
.\" there the
diff --git a/man3/memmove.3 b/man3/memmove.3
index 216cb9a9f..6b3b8f036 100644
--- a/man3/memmove.3
+++ b/man3/memmove.3
@@ -8,7 +8,7 @@
.\" Lewine's _POSIX Programmer's Guide_ (O'Reilly & Associates, 1991)
.\" 386BSD man pages
.\" Modified Sat Jul 24 18:49:59 1993 by Rik Faith (faith@cs.unc.edu)
-.TH memmove 3 2022-12-29 "Linux man-pages 6.03"
+.TH memmove 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
memmove \- copy memory area
.SH LIBRARY
@@ -46,22 +46,22 @@ function returns a pointer to
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR memmove ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, C99, SVr4, 4.3BSD.
+C11, POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001, C89, SVr4, 4.3BSD.
.SH SEE ALSO
.BR bcopy (3),
.BR bstring (3),
diff --git a/man3/mempcpy.3 b/man3/mempcpy.3
index d9b176223..46337c229 100644
--- a/man3/mempcpy.3
+++ b/man3/mempcpy.3
@@ -6,7 +6,7 @@
.\" Heavily based on glibc infopages, copyright Free Software Foundation
.\"
.\" aeb, 2003, polished a little
-.TH mempcpy 3 2022-12-15 "Linux man-pages 6.03"
+.TH mempcpy 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
mempcpy, wmempcpy \- copy memory area
.SH LIBRARY
@@ -57,29 +57,26 @@ wide characters.
.I dest
+
.IR n .
-.SH VERSIONS
-.BR mempcpy ()
-first appeared in glibc 2.1.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR mempcpy (),
.BR wmempcpy ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-This function is a GNU extension.
+GNU.
+.SH HISTORY
+glibc 2.1.
.SH EXAMPLES
.EX
void *
diff --git a/man3/memset.3 b/man3/memset.3
index 8f80432a1..b56ef4679 100644
--- a/man3/memset.3
+++ b/man3/memset.3
@@ -8,7 +8,7 @@
.\" Lewine's _POSIX Programmer's Guide_ (O'Reilly & Associates, 1991)
.\" 386BSD man pages
.\" Modified Sat Jul 24 18:49:23 1993 by Rik Faith (faith@cs.unc.edu)
-.TH memset 3 2022-12-29 "Linux man-pages 6.03"
+.TH memset 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
memset \- fill memory with a constant byte
.SH LIBRARY
@@ -38,22 +38,22 @@ function returns a pointer to the memory area
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR memset ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, C99, SVr4, 4.3BSD.
+C11, POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001, C89, SVr4, 4.3BSD.
.SH SEE ALSO
.BR bstring (3),
.BR bzero (3),
diff --git a/man3/mkdtemp.3 b/man3/mkdtemp.3
index 573df4c09..4c5525995 100644
--- a/man3/mkdtemp.3
+++ b/man3/mkdtemp.3
@@ -4,7 +4,7 @@
.\" and GNU libc documentation
.\"
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
-.TH mkdtemp 3 2023-02-05 "Linux man-pages 6.03"
+.TH mkdtemp 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
mkdtemp \- create a unique temporary directory
.SH LIBRARY
@@ -57,30 +57,27 @@ Now \fItemplate\fP is unchanged.
Also see
.BR mkdir (2)
for other possible values for \fIerrno\fP.
-.SH VERSIONS
-Available since glibc 2.1.91.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR mkdtemp ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
POSIX.1-2008.
-This function is present on the BSDs.
-.\" As at 2006, this function is being considered for a revision of POSIX.1
-.\" Also in NetBSD 1.4.
+.SH HISTORY
+glibc 2.1.91.
+NetBSD 1.4.
+POSIX.1-2008.
.SH SEE ALSO
.BR mktemp (1),
.BR mkdir (2),
diff --git a/man3/mkfifo.3 b/man3/mkfifo.3
index 3e41cae3b..f43f07da2 100644
--- a/man3/mkfifo.3
+++ b/man3/mkfifo.3
@@ -6,7 +6,7 @@
.\"
.\" changed section from 2 to 3, aeb, 950919
.\"
-.TH mkfifo 3 2023-02-05 "Linux man-pages 6.03"
+.TH mkfifo 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
mkfifo, mkfifoat \- make a FIFO special file (a named pipe)
.SH LIBRARY
@@ -162,35 +162,34 @@ is a file descriptor referring to a file other than a directory.
.TP
.B EROFS
\fIpathname\fP refers to a read-only filesystem.
-.SH VERSIONS
-.BR mkfifoat ()
-was added in glibc 2.4.
-It is implemented using
-.BR mknodat (2),
-available since Linux 2.6.16.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR mkfifo (),
.BR mkfifoat ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
+.SH VERSIONS
+It is implemented using
+.BR mknodat (2).
.SH STANDARDS
-.BR mkfifo ():
-POSIX.1-2001, POSIX.1-2008.
-.PP
-.BR mkfifoat ():
+POSIX.1-2008.
+.SH HISTORY
+.TP
+.BR mkfifo ()
+POSIX.1-2001.
+.TP
+.BR mkfifoat ()
+glibc 2.4.
POSIX.1-2008.
.SH SEE ALSO
.BR mkfifo (1),
diff --git a/man3/mkstemp.3 b/man3/mkstemp.3
index 8b355170c..dbfa25218 100644
--- a/man3/mkstemp.3
+++ b/man3/mkstemp.3
@@ -13,7 +13,7 @@
.\" Modified 990328, aeb
.\" 2008-06-19, mtk, Added mkostemp(); various other changes
.\"
-.TH mkstemp 3 2023-02-05 "Linux man-pages 6.03"
+.TH mkstemp 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
mkstemp, mkostemp, mkstemps, mkostemps \- create a unique temporary file
.SH LIBRARY
@@ -169,47 +169,53 @@ were not XXXXXX.
.PP
These functions may also fail with any of the errors described for
.BR open (2).
-.SH VERSIONS
-.BR mkostemp ()
-is available since glibc 2.7.
-.BR mkstemps ()
-and
-.BR mkostemps ()
-are available since glibc 2.11.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR mkstemp (),
.BR mkostemp (),
.BR mkstemps (),
.BR mkostemps ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-.BR mkstemp ():
-4.3BSD, POSIX.1-2001.
-.PP
-.BR mkstemps ():
-unstandardized, but appears on several other systems.
+.TP
+.BR mkstemp ()
+POSIX.1-2001.
+.TP
+.BR mkstemps ()
+BSD.
.\" mkstemps() appears to be at least on the BSDs, Mac OS X, Solaris,
.\" and Tru64.
-.PP
+.TP
.BR mkostemp ()
-and
-.BR mkostemps ():
-are glibc extensions.
-.SH NOTES
+.TQ
+.BR mkostemps ()
+GNU.
+.SH HISTORY
+.TP
+.BR mkstemp ()
+4.3BSD, POSIX.1-2001.
+.TP
+.BR mkstemps ()
+glibc 2.11.
+BSD, Mac OS X, Solaris, Tru64.
+.TP
+.BR mkostemp ()
+glibc 2.7.
+.TP
+.BR mkostemps ()
+glibc 2.11.
+.PP
In glibc versions 2.06 and earlier, the file is created with permissions 0666,
that is, read and write for all users.
This old behavior may be
diff --git a/man3/mktemp.3 b/man3/mktemp.3
index df1cdb5b1..c925dd035 100644
--- a/man3/mktemp.3
+++ b/man3/mktemp.3
@@ -12,7 +12,7 @@
.\" (prompted by Scott Burkett <scottb@IntNet.net>)
.\" Modified Sun Mar 28 23:44:38 1999 by Andries Brouwer (aeb@cwi.nl)
.\"
-.TH mktemp 3 2023-02-05 "Linux man-pages 6.03"
+.TH mktemp 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
mktemp \- make a unique temporary filename
.SH LIBRARY
@@ -72,24 +72,23 @@ The last six characters of \fItemplate\fP were not XXXXXX.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR mktemp ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
+None.
+.SH HISTORY
4.3BSD, POSIX.1-2001.
-POSIX.1-2008 removes the specification of
-.BR mktemp ().
+Removed in POSIX.1-2008.
.\" .SH NOTES
.\" The prototype is in
.\" .I <unistd.h>
diff --git a/man3/modf.3 b/man3/modf.3
index a5478a7b2..118d21335 100644
--- a/man3/modf.3
+++ b/man3/modf.3
@@ -11,7 +11,7 @@
.\" Modified 2002-07-27 by Walter Harms
.\" (walter.harms@informatik.uni-oldenburg.de)
.\"
-.TH modf 3 2023-02-05 "Linux man-pages 6.03"
+.TH modf 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
modf, modff, modfl \- extract signed integral and fractional values from
floating-point number
@@ -67,29 +67,29 @@ No errors occur.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR modf (),
.BR modff (),
.BR modfl ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-C99, POSIX.1-2001, POSIX.1-2008.
+C11, POSIX.1-2008.
+.SH HISTORY
+C99, POSIX.1-2001.
.PP
The variant returning
.I double
also conforms to
-SVr4, 4.3BSD.
+SVr4, 4.3BSD, C89.
.SH SEE ALSO
.BR frexp (3),
.BR ldexp (3)
diff --git a/man3/mpool.3 b/man3/mpool.3
index 956ad2372..20dd313eb 100644
--- a/man3/mpool.3
+++ b/man3/mpool.3
@@ -5,7 +5,7 @@
.\"
.\" @(#)mpool.3 8.1 (Berkeley) 6/4/93
.\"
-.TH mpool 3 2022-12-04 "Linux man-pages 6.03"
+.TH mpool 3 2023-03-30 "Linux man-pages 6.05.01"
.UC 7
.SH NAME
mpool \- shared memory buffer pool
@@ -197,8 +197,7 @@ function may fail and set
for any of the errors specified for the library routine
.BR free (3).
.SH STANDARDS
-Not in POSIX.1.
-Present on the BSDs.
+BSD.
.SH SEE ALSO
.BR btree (3),
.BR dbopen (3),
diff --git a/man3/mq_close.3 b/man3/mq_close.3
index 1d1e3f5f4..483466053 100644
--- a/man3/mq_close.3
+++ b/man3/mq_close.3
@@ -3,7 +3,7 @@
.\"
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
-.TH mq_close 3 2022-12-15 "Linux man-pages 6.03"
+.TH mq_close 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
mq_close \- close a message queue descriptor
.SH LIBRARY
@@ -41,22 +41,22 @@ is invalid.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR mq_close ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008.
+POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001.
.SH NOTES
All open message queues are automatically closed on process termination,
or upon
diff --git a/man3/mq_getattr.3 b/man3/mq_getattr.3
index de08ab850..7c183e772 100644
--- a/man3/mq_getattr.3
+++ b/man3/mq_getattr.3
@@ -3,7 +3,7 @@
.\"
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
-.TH mq_getattr 3 2022-12-15 "Linux man-pages 6.03"
+.TH mq_getattr 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
mq_getattr, mq_setattr \- get/set message queue attributes
.SH LIBRARY
@@ -117,24 +117,20 @@ contained set bits other than
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR mq_getattr (),
.BR mq_setattr ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
-.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008.
-.SH NOTES
+.SH VERSIONS
On Linux,
.BR mq_getattr ()
and
@@ -142,6 +138,10 @@ and
are library functions layered on top of the
.BR mq_getsetattr (2)
system call.
+.SH STANDARDS
+POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001.
.SH EXAMPLES
The program below can be used to show the default
.I mq_maxmsg
@@ -188,34 +188,34 @@ $ \fBcat /proc/sys/fs/mqueue/msgsize_default\fP
#include <stdlib.h>
#include <sys/stat.h>
#include <unistd.h>
-
+\&
#define errExit(msg) do { perror(msg); exit(EXIT_FAILURE); \e
} while (0)
-
+\&
int
main(int argc, char *argv[])
{
mqd_t mqd;
struct mq_attr attr;
-
+\&
if (argc != 2) {
fprintf(stderr, "Usage: %s mq\-name\en", argv[0]);
exit(EXIT_FAILURE);
}
-
+\&
mqd = mq_open(argv[1], O_CREAT | O_EXCL, 0600, NULL);
if (mqd == (mqd_t) \-1)
errExit("mq_open");
-
+\&
if (mq_getattr(mqd, &attr) == \-1)
errExit("mq_getattr");
-
+\&
printf("Maximum # of messages on queue: %ld\en", attr.mq_maxmsg);
printf("Maximum message size: %ld\en", attr.mq_msgsize);
-
+\&
if (mq_unlink(argv[1]) == \-1)
errExit("mq_unlink");
-
+\&
exit(EXIT_SUCCESS);
}
.EE
diff --git a/man3/mq_notify.3 b/man3/mq_notify.3
index ae016c107..bb0d5145a 100644
--- a/man3/mq_notify.3
+++ b/man3/mq_notify.3
@@ -3,7 +3,7 @@
.\"
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
-.TH mq_notify 3 2022-12-15 "Linux man-pages 6.03"
+.TH mq_notify 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
mq_notify \- register for notification when a message is available
.SH LIBRARY
@@ -156,24 +156,19 @@ notifications for the queue
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR mq_notify ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
-.SH STANDARDS
-POSIX.1-2001.
-.SH NOTES
-.\"
+.SH VERSIONS
.SS C library/kernel differences
In the glibc implementation, the
.BR mq_notify ()
@@ -194,6 +189,10 @@ The implementation involves the use of a raw
.BR netlink (7)
socket and creates a new thread for each notification that is
delivered to the process.
+.SH STANDARDS
+POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001.
.SH EXAMPLES
The following program registers a notification request for the
message queue named in its command-line argument.
@@ -209,10 +208,10 @@ queue and then terminates the process.
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
-
+\&
#define handle_error(msg) \e
do { perror(msg); exit(EXIT_FAILURE); } while (0)
-
+\&
static void /* Thread start function */
tfunc(union sigval sv)
{
@@ -220,46 +219,46 @@ tfunc(union sigval sv)
ssize_t nr;
void *buf;
mqd_t mqdes = *((mqd_t *) sv.sival_ptr);
-
+\&
/* Determine max. msg size; allocate buffer to receive msg */
-
+\&
if (mq_getattr(mqdes, &attr) == \-1)
handle_error("mq_getattr");
buf = malloc(attr.mq_msgsize);
if (buf == NULL)
handle_error("malloc");
-
+\&
nr = mq_receive(mqdes, buf, attr.mq_msgsize, NULL);
if (nr == \-1)
handle_error("mq_receive");
-
+\&
printf("Read %zd bytes from MQ\en", nr);
free(buf);
exit(EXIT_SUCCESS); /* Terminate the process */
}
-
+\&
int
main(int argc, char *argv[])
{
mqd_t mqdes;
struct sigevent sev;
-
+\&
if (argc != 2) {
fprintf(stderr, "Usage: %s <mq\-name>\en", argv[0]);
exit(EXIT_FAILURE);
}
-
+\&
mqdes = mq_open(argv[1], O_RDONLY);
if (mqdes == (mqd_t) \-1)
handle_error("mq_open");
-
+\&
sev.sigev_notify = SIGEV_THREAD;
sev.sigev_notify_function = tfunc;
sev.sigev_notify_attributes = NULL;
sev.sigev_value.sival_ptr = &mqdes; /* Arg. to thread func. */
if (mq_notify(mqdes, &sev) == \-1)
handle_error("mq_notify");
-
+\&
pause(); /* Process will be terminated by thread function */
}
.EE
diff --git a/man3/mq_open.3 b/man3/mq_open.3
index ca77ea90f..32ff069c9 100644
--- a/man3/mq_open.3
+++ b/man3/mq_open.3
@@ -3,7 +3,7 @@
.\"
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
-.TH mq_open 3 2022-12-15 "Linux man-pages 6.03"
+.TH mq_open 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
mq_open \- open a message queue
.SH LIBRARY
@@ -251,23 +251,19 @@ limit was encountered; see
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR mq_open ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
-.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008.
-.SH NOTES
+.SH VERSIONS
.SS C library/kernel differences
The
.BR mq_open ()
@@ -285,6 +281,10 @@ so the C library function passes
without the preceding slash (i.e.,
.IR name+1 )
to the system call.
+.SH STANDARDS
+POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001.
.SH BUGS
Before Linux 2.6.14,
the process umask was not applied to the permissions specified in
diff --git a/man3/mq_receive.3 b/man3/mq_receive.3
index b792b9212..40e997333 100644
--- a/man3/mq_receive.3
+++ b/man3/mq_receive.3
@@ -3,7 +3,7 @@
.\"
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
-.TH mq_receive 3 2022-12-15 "Linux man-pages 6.03"
+.TH mq_receive 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
mq_receive, mq_timedreceive \- receive a message from a message queue
.SH LIBRARY
@@ -129,29 +129,29 @@ The call timed out before a message could be transferred.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR mq_receive (),
.BR mq_timedreceive ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
-.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008.
-.SH NOTES
+.SH VERSIONS
On Linux,
.BR mq_timedreceive ()
is a system call, and
.BR mq_receive ()
is a library function layered on top of that system call.
+.SH STANDARDS
+POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001.
.SH SEE ALSO
.BR mq_close (3),
.BR mq_getattr (3),
diff --git a/man3/mq_send.3 b/man3/mq_send.3
index 5fa05dd30..7e1b6c6b6 100644
--- a/man3/mq_send.3
+++ b/man3/mq_send.3
@@ -3,7 +3,7 @@
.\"
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
-.TH mq_send 3 2022-12-15 "Linux man-pages 6.03"
+.TH mq_send 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
mq_send, mq_timedsend \- send a message to a message queue
.SH LIBRARY
@@ -136,29 +136,29 @@ The call timed out before a message could be transferred.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR mq_send (),
.BR mq_timedsend ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
-.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008.
-.SH NOTES
+.SH VERSIONS
On Linux,
.BR mq_timedsend ()
is a system call, and
.BR mq_send ()
is a library function layered on top of that system call.
+.SH STANDARDS
+POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001.
.SH SEE ALSO
.BR mq_close (3),
.BR mq_getattr (3),
diff --git a/man3/mq_unlink.3 b/man3/mq_unlink.3
index 8bd7b9d43..7564ccf70 100644
--- a/man3/mq_unlink.3
+++ b/man3/mq_unlink.3
@@ -3,7 +3,7 @@
.\"
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
-.TH mq_unlink 3 2022-12-15 "Linux man-pages 6.03"
+.TH mq_unlink 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
mq_unlink \- remove a message queue
.SH LIBRARY
@@ -43,22 +43,22 @@ There is no message queue with the given
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR mq_unlink ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008.
+POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001.
.SH SEE ALSO
.BR mq_close (3),
.BR mq_getattr (3),
diff --git a/man3/mtrace.3 b/man3/mtrace.3
index 5e8b508a3..442da6fbd 100644
--- a/man3/mtrace.3
+++ b/man3/mtrace.3
@@ -3,7 +3,7 @@
.\"
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
-.TH mtrace 3 2022-12-15 "Linux man-pages 6.03"
+.TH mtrace 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
mtrace, muntrace \- malloc tracing
.SH LIBRARY
@@ -63,20 +63,18 @@ has no effect.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR mtrace (),
.BR muntrace ()
T} Thread safety MT-Unsafe
.TE
-.hy
-.ad
.sp 1
.\" FIXME: The marking is different from that in the glibc manual,
.\" markings in glibc manual are more detailed:
@@ -88,7 +86,7 @@ T} Thread safety MT-Unsafe
.\" glibc manual says muntrace should have marking locale because it calls
.\" fprintf(), but muntrace does not execute area which cause locale problem.
.SH STANDARDS
-These functions are GNU extensions.
+GNU.
.SH NOTES
In normal usage,
.BR mtrace ()
@@ -132,15 +130,15 @@ The demonstration uses the following program:
#include <mcheck.h>
#include <stdio.h>
#include <stdlib.h>
-
+\&
int
main(void)
{
mtrace();
-
+\&
for (unsigned int j = 0; j < 2; j++)
malloc(100); /* Never freed\-\-a memory leak */
-
+\&
calloc(16, 16); /* Never freed\-\-a memory leak */
exit(EXIT_SUCCESS);
}
diff --git a/man3/nan.3 b/man3/nan.3
index bb941a8b2..9fa95b6be 100644
--- a/man3/nan.3
+++ b/man3/nan.3
@@ -7,7 +7,7 @@
.\"
.\" Corrections by aeb
.\"
-.TH nan 3 2022-12-15 "Linux man-pages 6.03"
+.TH nan 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
nan, nanf, nanl \- return 'Not a Number'
.SH LIBRARY
@@ -66,31 +66,31 @@ On IEEE 754 systems, there are many representations of NaN, and
.I tagp
selects one.
On other systems it may do nothing.
-.SH VERSIONS
-These functions were added in glibc 2.1.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR nan (),
.BR nanf (),
.BR nanl ()
T} Thread safety MT-Safe locale
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-C99, POSIX.1-2001, POSIX.1-2008.
+C11, POSIX.1-2008.
+.PP
See also IEC 559 and the appendix with
recommended functions in IEEE 754/IEEE 854.
+.SH HISTORY
+glibc 2.1.
+C99, POSIX.1-2001.
.SH SEE ALSO
.BR isnan (3),
.BR strtod (3),
diff --git a/man3/netlink.3 b/man3/netlink.3
index 918c6794f..eeb88754e 100644
--- a/man3/netlink.3
+++ b/man3/netlink.3
@@ -5,7 +5,7 @@
.\" Based on the original comments from Alexey Kuznetsov
.\" $Id: netlink.3,v 1.1 1999/05/14 17:17:24 freitag Exp $
.\"
-.TH netlink 3 2023-02-05 "Linux man-pages 6.03"
+.TH netlink 3 2023-03-30 "Linux man-pages 6.05.01"
.SH NAME
netlink \- Netlink macros
.SH LIBRARY
@@ -76,12 +76,12 @@ is in a form suitable for parsing.
.BR NLMSG_PAYLOAD ()
Return the length of the payload associated with the
.IR nlmsghdr .
-.SH STANDARDS
-These macros are nonstandard Linux extensions.
-.SH NOTES
+.SH VERSIONS
It is often better to use netlink via
.I libnetlink
than via the low-level kernel interface.
+.SH STANDARDS
+Linux.
.SH SEE ALSO
.BR libnetlink (3),
.BR netlink (7)
diff --git a/man3/newlocale.3 b/man3/newlocale.3
index f79237b68..2c602a4a9 100644
--- a/man3/newlocale.3
+++ b/man3/newlocale.3
@@ -2,7 +2,7 @@
.\"
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
-.TH newlocale 3 2023-02-05 "Linux man-pages 6.03"
+.TH newlocale 3 2023-05-03 "Linux man-pages 6.05.01"
.SH NAME
newlocale, freelocale \- create, modify, and free a locale object
.SH LIBRARY
@@ -182,14 +182,10 @@ is not a string pointer referring to a valid locale.
.TP
.B ENOMEM
Insufficient memory to create a locale object.
-.SH VERSIONS
-The
-.BR newlocale ()
-and
-.BR freelocale ()
-functions first appeared in glibc 2.3.
.SH STANDARDS
POSIX.1-2008.
+.SH HISTORY
+glibc 2.3.
.SH NOTES
Each locale object created by
.BR newlocale ()
@@ -283,10 +279,10 @@ Te Paraire, te 07 o Poutū\-te\-rangi, 2014 00:38:44 CET
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
-
+\&
#define errExit(msg) do { perror(msg); exit(EXIT_FAILURE); \e
} while (0)
-
+\&
int
main(int argc, char *argv[])
{
@@ -295,58 +291,58 @@ main(int argc, char *argv[])
size_t s;
struct tm *tm;
locale_t loc, nloc;
-
+\&
if (argc < 2) {
fprintf(stderr, "Usage: %s locale1 [locale2]\en", argv[0]);
exit(EXIT_FAILURE);
}
-
+\&
/* Create a new locale object, taking the LC_NUMERIC settings
from the locale specified in argv[1]. */
-
+\&
loc = newlocale(LC_NUMERIC_MASK, argv[1], (locale_t) 0);
if (loc == (locale_t) 0)
errExit("newlocale");
-
+\&
/* If a second command\-line argument was specified, modify the
locale object to take the LC_TIME settings from the locale
specified in argv[2]. We assign the result of this newlocale()
call to \[aq]nloc\[aq] rather than \[aq]loc\[aq], since in some cases, we might
want to preserve \[aq]loc\[aq] if this call fails. */
-
+\&
if (argc > 2) {
nloc = newlocale(LC_TIME_MASK, argv[2], loc);
if (nloc == (locale_t) 0)
errExit("newlocale");
loc = nloc;
}
-
+\&
/* Apply the newly created locale to this thread. */
-
+\&
uselocale(loc);
-
+\&
/* Test effect of LC_NUMERIC. */
-
+\&
printf("%8.3f\en", 123456.789);
-
+\&
/* Test effect of LC_TIME. */
-
+\&
t = time(NULL);
tm = localtime(&t);
if (tm == NULL)
errExit("time");
-
+\&
s = strftime(buf, sizeof(buf), "%c", tm);
if (s == 0)
errExit("strftime");
-
+\&
printf("%s\en", buf);
-
+\&
/* Free the locale object. */
-
+\&
uselocale(LC_GLOBAL_LOCALE); /* So \[aq]loc\[aq] is no longer in use */
freelocale(loc);
-
+\&
exit(EXIT_SUCCESS);
}
.EE
diff --git a/man3/nextafter.3 b/man3/nextafter.3
index 715b182aa..3636b5500 100644
--- a/man3/nextafter.3
+++ b/man3/nextafter.3
@@ -7,7 +7,7 @@
.\"
.\" Based on glibc infopages
.\"
-.TH nextafter 3 2023-02-05 "Linux man-pages 6.03"
+.TH nextafter 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
nextafter, nextafterf, nextafterl, nexttoward, nexttowardf, nexttowardl \-
floating-point number manipulation
@@ -163,14 +163,14 @@ is raised.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR nextafter (),
.BR nextafterf (),
.BR nextafterl (),
@@ -179,13 +179,14 @@ T{
.BR nexttowardl ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-C99, POSIX.1-2001, POSIX.1-2008.
+C11, POSIX.1-2008.
+.PP
This function is defined in IEC 559 (and the appendix with
recommended functions in IEEE 754/IEEE 854).
+.SH HISTORY
+C99, POSIX.1-2001.
.SH BUGS
In glibc 2.5 and earlier, these functions do not raise an underflow
floating-point
diff --git a/man3/nextup.3 b/man3/nextup.3
index c5fe45335..7a0eaaaec 100644
--- a/man3/nextup.3
+++ b/man3/nextup.3
@@ -3,7 +3,7 @@
.\"
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
-.TH nextup 3 2022-12-15 "Linux man-pages 6.03"
+.TH nextup 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
nextup, nextupf, nextupl, nextdown, nextdownf, nextdownl \-
return next floating-point number toward positive/negative infinity
@@ -63,19 +63,17 @@ and similarly for the other types.
.SH RETURN VALUE
See DESCRIPTION.
.\" .SH ERRORS
-.SH VERSIONS
-These functions were added in glibc 2.24.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR nextup (),
.BR nextupf (),
.BR nextupl (),
@@ -84,14 +82,14 @@ T{
.BR nextdownl ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
These functions are described in
.I IEEE Std 754-2008 - Standard for Floating-Point Arithmetic
and
.IR "ISO/IEC TS 18661".
+.SH HISTORY
+glibc 2.24.
.SH SEE ALSO
.BR nearbyint (3),
.BR nextafter (3)
diff --git a/man3/nl_langinfo.3 b/man3/nl_langinfo.3
index face3fb34..2726c296b 100644
--- a/man3/nl_langinfo.3
+++ b/man3/nl_langinfo.3
@@ -11,7 +11,7 @@
.\"
.\" Corrected prototype, 2002-10-18, aeb
.\"
-.TH nl_langinfo 3 2023-02-05 "Linux man-pages 6.03"
+.TH nl_langinfo 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
nl_langinfo, nl_langinfo_l \- query language and locale information
.SH LIBRARY
@@ -295,22 +295,22 @@ the string returned by these functions.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR nl_langinfo ()
T} Thread safety MT-Safe locale
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, SUSv2.
+POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001, SUSv2.
.SH NOTES
The behavior of
.BR nl_langinfo_l ()
@@ -330,16 +330,16 @@ the radix character.
#include <locale.h>
#include <stdio.h>
#include <stdlib.h>
-
+\&
int
main(void)
{
setlocale(LC_CTYPE, "");
setlocale(LC_NUMERIC, "");
-
+\&
printf("%s\en", nl_langinfo(CODESET));
printf("%s\en", nl_langinfo(RADIXCHAR));
-
+\&
exit(EXIT_SUCCESS);
}
.EE
diff --git a/man3/ntp_gettime.3 b/man3/ntp_gettime.3
index 488d16472..30ec3ce6c 100644
--- a/man3/ntp_gettime.3
+++ b/man3/ntp_gettime.3
@@ -3,7 +3,7 @@
.\"
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
-.TH ntp_gettime 3 2022-12-15 "Linux man-pages 6.03"
+.TH ntp_gettime 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
ntp_gettime, ntp_gettimex \- get time parameters (NTP daemon interface)
.SH LIBRARY
@@ -28,7 +28,7 @@ struct ntptimeval {
long maxerror; /* Maximum error */
long esterror; /* Estimated error */
long tai; /* TAI offset */
-
+\&
/* Further padding bytes allowing for future expansion */
};
.EE
@@ -95,36 +95,36 @@ are as for
.BR adjtimex (2).
Given a correct pointer argument, these functions always succeed.
.\" FIXME . the info page incorrectly describes the return values.
-.SH VERSIONS
-The
-.BR ntp_gettime ()
-function is available since glibc 2.1.
-The
-.BR ntp_gettimex ()
-function is available since glibc 2.12.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR ntp_gettime (),
.BR ntp_gettimex ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
+.TP
.BR ntp_gettime ()
-is described in the NTP Kernel Application Program Interface.
+NTP Kernel Application Program Interface.
+.TP
+.BR ntp_gettimex ()
+GNU.
+.SH HISTORY
+.TP
+.BR ntp_gettime ()
+glibc 2.1.
+.TP
.BR ntp_gettimex ()
-is a GNU extension.
+glibc 2.12.
.SH SEE ALSO
.BR adjtimex (2),
.BR ntp_adjtime (3),
diff --git a/man3/offsetof.3 b/man3/offsetof.3
index 1c69152d8..5dbccc859 100644
--- a/man3/offsetof.3
+++ b/man3/offsetof.3
@@ -25,7 +25,7 @@
.\" References:
.\" /usr/lib/gcc/i486-linux-gnu/4.1.1/include/stddef.h
.\" glibc-doc
-.TH offsetof 3 2022-12-29 "Linux man-pages 6.03"
+.TH offsetof 3 2023-05-03 "Linux man-pages 6.05.01"
.SH NAME
offsetof \- offset of a structure member
.SH LIBRARY
@@ -64,7 +64,9 @@ within the given
.IR type ,
in units of bytes.
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, C99.
+C11, POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001, C89.
.SH EXAMPLES
On a Linux/i386 system, when compiled using the default
.BR gcc (1)
@@ -84,7 +86,7 @@ sizeof(struct s)=16
#include <stddef.h>
#include <stdio.h>
#include <stdlib.h>
-
+\&
int
main(void)
{
@@ -94,14 +96,14 @@ main(void)
double d;
char a[];
};
-
+\&
/* Output is compiler dependent */
-
+\&
printf("offsets: i=%zu; c=%zu; d=%zu a=%zu\en",
offsetof(struct s, i), offsetof(struct s, c),
offsetof(struct s, d), offsetof(struct s, a));
printf("sizeof(struct s)=%zu\en", sizeof(struct s));
-
+\&
exit(EXIT_SUCCESS);
}
.EE
diff --git a/man3/on_exit.3 b/man3/on_exit.3
index 6d1494e0c..4ab7aa1be 100644
--- a/man3/on_exit.3
+++ b/man3/on_exit.3
@@ -9,7 +9,7 @@
.\" 386BSD man pages
.\" Modified 1993-04-02, David Metcalfe
.\" Modified 1993-07-25, Rik Faith (faith@cs.unc.edu)
-.TH on_exit 3 2023-02-05 "Linux man-pages 6.03"
+.TH on_exit 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
on_exit \- register a function to be called at normal process termination
.SH LIBRARY
@@ -70,27 +70,27 @@ it returns a nonzero value.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR on_exit ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-This function comes from SunOS 4, but is also present in glibc.
-It no longer occurs in Solaris (SunOS 5).
-Portable application should avoid this function, and use the standard
+None.
+.SH HISTORY
+SunOS 4, glibc.
+Removed in Solaris (SunOS 5).
+Use the standard
.BR atexit (3)
instead.
-.SH NOTES
+.SH CAVEATS
By the time
.I function
is executed, stack
diff --git a/man3/open_memstream.3 b/man3/open_memstream.3
index 2ddb284d7..ce9da1973 100644
--- a/man3/open_memstream.3
+++ b/man3/open_memstream.3
@@ -5,7 +5,7 @@
.\"
.\" 2008-12-04, Petr Baudis <pasky@suse.cz>: Document open_wmemstream()
.\"
-.TH open_memstream 3 2022-12-15 "Linux man-pages 6.03"
+.TH open_memstream 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
open_memstream, open_wmemstream \- open a dynamic memory buffer stream
.SH LIBRARY
@@ -95,33 +95,31 @@ pointer.
Otherwise, NULL is returned and
.I errno
is set to indicate the error.
-.SH VERSIONS
-.BR open_memstream ()
-was already available in glibc 1.0.x.
-.BR open_wmemstream ()
-is available since glibc 2.4.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR open_memstream (),
.BR open_wmemstream ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
POSIX.1-2008.
-These functions are not specified in POSIX.1-2001,
-and are not widely available on other systems.
+.SH HISTORY
+.TP
+.BR open_memstream ()
+glibc 1.0.x.
+.TP
+.BR open_wmemstream ()
+glibc 2.4.
.SH NOTES
There is no file descriptor associated with the file stream
returned by these functions
diff --git a/man3/opendir.3 b/man3/opendir.3
index 319ee400c..4ecbd62fd 100644
--- a/man3/opendir.3
+++ b/man3/opendir.3
@@ -10,7 +10,7 @@
.\" Modified Sat Jul 24 18:46:01 1993 by Rik Faith (faith@cs.unc.edu)
.\" Modified 11 June 1995 by Andries Brouwer (aeb@cwi.nl)
.\" 2007-07-30 Ulrich Drepper <drepper@redhat.com>: document fdopendir().
-.TH opendir 3 2022-12-15 "Linux man-pages 6.03"
+.TH opendir 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
opendir, fdopendir \- open a directory
.SH LIBRARY
@@ -89,32 +89,32 @@ Insufficient memory to complete the operation.
.TP
.B ENOTDIR
\fIname\fP is not a directory.
-.SH VERSIONS
-.BR fdopendir ()
-is available since glibc 2.4.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR opendir (),
.BR fdopendir ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
+POSIX.1-2008.
+.SH STANDARDS
+.TP
.BR opendir ()
-is present on SVr4, 4.3BSD, and specified in POSIX.1-2001.
+SVr4, 4.3BSD, POSIX.1-2001.
+.TP
.BR fdopendir ()
-is specified in POSIX.1-2008.
+POSIX.1-2008.
+glibc 2.4.
.SH NOTES
Filename entries can be read from a directory stream using
.BR readdir (3).
diff --git a/man3/openpty.3 b/man3/openpty.3
index fd17a8315..9bdcb142e 100644
--- a/man3/openpty.3
+++ b/man3/openpty.3
@@ -8,7 +8,7 @@
.\"
.\" Added -lutil remark, 030718
.\"
-.TH openpty 3 2022-12-15 "Linux man-pages 6.03"
+.TH openpty 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
openpty, login_tty, forkpty \- terminal utility functions
.SH LIBRARY
@@ -129,28 +129,27 @@ fails.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR forkpty (),
.BR openpty ()
T} Thread safety MT-Safe locale
T{
+.na
+.nh
.BR login_tty ()
T} Thread safety MT-Unsafe race:ttyname
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-These are BSD functions, present in glibc.
-They are not standardized in POSIX.
-.SH NOTES
+BSD.
+.SH HISTORY
The
.B const
modifiers were added to the structure pointer arguments of
diff --git a/man3/perror.3 b/man3/perror.3
index 2c9559874..efb3e6f5f 100644
--- a/man3/perror.3
+++ b/man3/perror.3
@@ -10,7 +10,7 @@
.\" (msmith@falcon.mercer.peachnet.edu) and various other changes.
.\" Modified 1996-05-16 by Martin Schulze (joey@infodrom.north.de)
.\"
-.TH perror 3 2023-02-05 "Linux man-pages 6.03"
+.TH perror 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
perror \- print a system error message
.SH LIBRARY
@@ -99,55 +99,43 @@ Thus, if a failing call is not immediately followed by a call to
the value of
.I errno
should be saved.
-.SH VERSIONS
-Since glibc 2.32, the declarations of
-.I sys_errlist
-and
-.I sys_nerr
-are no longer exposed by
-.IR <stdio.h> .
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR perror ()
T} Thread safety MT-Safe race:stderr
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-.BR perror (),
-.IR errno :
-POSIX.1-2001, POSIX.1-2008, C99, 4.3BSD.
-.PP
-The externals
+.TP
+.I errno
+.TQ
+.BR perror ()
+C11, POSIX.1-2008.
+.TP
.I sys_nerr
-and
+.TQ
.I sys_errlist
-derive from BSD, but are not specified in POSIX.1.
-.SH NOTES
-The externals
+BSD.
+.SH HISTORY
+.TP
+.I errno
+.TQ
+.BR perror ()
+POSIX.1-2001, C89, 4.3BSD.
+.TP
.I sys_nerr
-and
+.TQ
.I sys_errlist
-are defined by glibc, but in
-.IR <stdio.h> .
-.\" and only when _BSD_SOURCE is defined.
-.\" When
-.\" .B _GNU_SOURCE
-.\" is defined, the symbols
-.\" .I _sys_nerr
-.\" and
-.\" .I _sys_errlist
-.\" are provided.
+Removed in glibc 2.32.
.SH SEE ALSO
.BR err (3),
.BR errno (3),
diff --git a/man3/popen.3 b/man3/popen.3
index 170ceb511..698fe2837 100644
--- a/man3/popen.3
+++ b/man3/popen.3
@@ -10,7 +10,7 @@
.\" Modified Sat May 18 20:37:44 1996 by Martin Schulze (joey@linux.de)
.\" Modified 7 May 1998 by Joseph S. Myers (jsm28@cam.ac.uk)
.\"
-.TH popen 3 2023-02-05 "Linux man-pages 6.03"
+.TH popen 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
popen, pclose \- pipe stream to or from a process
.SH LIBRARY
@@ -150,30 +150,29 @@ is set to
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR popen (),
.BR pclose ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
-.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008.
-.PP
+.SH VERSIONS
The \[aq]e\[aq] value for
.I type
is a Linux extension.
-.SH NOTES
-.BR Note :
-carefully read Caveats in
+.SH STANDARDS
+POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001.
+.SH CAVEATS
+Carefully read Caveats in
.BR system (3).
.SH BUGS
Since the standard input of a command opened for reading shares its seek
diff --git a/man3/posix_fallocate.3 b/man3/posix_fallocate.3
index 22d0ae972..1c5c18905 100644
--- a/man3/posix_fallocate.3
+++ b/man3/posix_fallocate.3
@@ -3,7 +3,7 @@
.\"
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
-.TH posix_fallocate 3 2023-02-05 "Linux man-pages 6.03"
+.TH posix_fallocate 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
posix_fallocate \- allocate file space
.SH LIBRARY
@@ -91,30 +91,30 @@ emulation shown in NOTES, such as musl libc.
.B ESPIPE
.I fd
refers to a pipe.
-.SH VERSIONS
-.BR posix_fallocate ()
-is available since glibc 2.1.94.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lb lb lbx
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR posix_fallocate ()
T} Thread safety T{
+.na
+.nh
MT-Safe (but see NOTES)
T}
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-POSIX.1-2001.
+POSIX.1-2008.
+.SH HISTORY
+glibc 2.1.94.
+POSIX.1-2001
.PP
POSIX.1-2008 says that an implementation
.I shall
@@ -138,7 +138,7 @@ was less than 0, and
give the error if
.I len
equals zero.
-.SH NOTES
+.SH CAVEATS
In the glibc implementation,
.BR posix_fallocate ()
is implemented using the
diff --git a/man3/posix_madvise.3 b/man3/posix_madvise.3
index 5347a4580..25ab37d12 100644
--- a/man3/posix_madvise.3
+++ b/man3/posix_madvise.3
@@ -2,7 +2,7 @@
.\"
.\" SPDX-License-Identifier: GPL-2.0-or-later
.\"
-.TH posix_madvise 3 2022-12-04 "Linux man-pages 6.03"
+.TH posix_madvise 3 2023-03-30 "Linux man-pages 6.05.01"
.SH NAME
posix_madvise \- give advice about patterns of memory usage
.SH LIBRARY
@@ -86,12 +86,6 @@ is invalid.
Addresses in the specified range are partially or completely outside
the caller's address space.
.SH VERSIONS
-Support for
-.BR posix_madvise ()
-was added in glibc 2.2.
-.SH STANDARDS
-POSIX.1-2001.
-.SH NOTES
POSIX.1 permits an implementation to generate an error if
.I len
is 0.
@@ -108,6 +102,11 @@ is treated as a no-op, because the corresponding
value,
.BR MADV_DONTNEED ,
has destructive semantics.
+.SH STANDARDS
+POSIX.1-2008.
+.SH HISTORY
+glibc 2.2.
+POSIX.1-2001.
.SH SEE ALSO
.BR madvise (2),
.BR posix_fadvise (2)
diff --git a/man3/posix_memalign.3 b/man3/posix_memalign.3
index 50a105d6e..f0c1f6f04 100644
--- a/man3/posix_memalign.3
+++ b/man3/posix_memalign.3
@@ -7,7 +7,7 @@
.\" 2001-10-11, 2003-08-22, aeb, added some details
.\" 2012-03-23, Michael Kerrisk <mtk.manpages@mail.com>
.\" Document pvalloc() and aligned_alloc()
-.TH posix_memalign 3 2023-02-05 "Linux man-pages 6.03"
+.TH posix_memalign 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
posix_memalign, aligned_alloc, memalign, valloc, pvalloc \-
allocate aligned memory
@@ -20,12 +20,12 @@ Standard C library
.PP
.BI "int posix_memalign(void **" memptr ", size_t " alignment ", size_t " size );
.BI "void *aligned_alloc(size_t " alignment ", size_t " size );
-.BI "void *valloc(size_t " size );
+.BI "[[deprecated]] void *valloc(size_t " size );
.PP
.B #include <malloc.h>
.PP
-.BI "void *memalign(size_t " alignment ", size_t " size );
-.BI "void *pvalloc(size_t " size );
+.BI "[[deprecated]] void *memalign(size_t " alignment ", size_t " size );
+.BI "[[deprecated]] void *pvalloc(size_t " size );
.fi
.PP
.RS -4
@@ -91,9 +91,8 @@ The function
is the same as
.BR memalign (),
except for the added restriction that
-.I size
-should be a multiple of
-.IR alignment .
+.I alignment
+must be a power of two.
.PP
The obsolete function
.BR valloc ()
@@ -145,67 +144,66 @@ argument was not a power of two, or was not a multiple of
.TP
.B ENOMEM
There was insufficient memory to fulfill the allocation request.
-.SH VERSIONS
-The functions
-.BR memalign (),
-.BR valloc (),
-and
-.BR pvalloc ()
-have been available since at least glibc 2.0.
-.PP
-The function
-.BR aligned_alloc ()
-was added in glibc 2.16.
-.PP
-The function
-.BR posix_memalign ()
-is available since glibc 2.1.91.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR aligned_alloc (),
.BR memalign (),
.BR posix_memalign ()
T} Thread safety MT-Safe
T{
+.na
+.nh
.BR valloc (),
.BR pvalloc ()
T} Thread safety MT-Unsafe init
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-The function
+.TP
+.BR aligned_alloc ()
+C11.
+.TP
+.BR posix_memalign ()
+POSIX.1-2008.
+.TP
+.BR memalign ()
+.TQ
.BR valloc ()
-appeared in 3.0BSD.
-It is documented as being obsolete in 4.3BSD,
-and as legacy in SUSv2.
-It does not appear in POSIX.1.
-.PP
-The function
+None.
+.TP
.BR pvalloc ()
-is a GNU extension.
-.PP
-The function
-.BR memalign ()
-appears in SunOS 4.1.3 but not in 4.4BSD.
-.PP
-The function
-.BR posix_memalign ()
-comes from POSIX.1d and is specified in POSIX.1-2001 and POSIX.1-2008.
-.PP
-The function
+GNU.
+.SH HISTORY
+.TP
.BR aligned_alloc ()
-is specified in the C11 standard.
+glibc 2.16.
+C11.
+.TP
+.BR posix_memalign ()
+glibc 2.1.91.
+POSIX.1d, POSIX.1-2001.
+.TP
+.BR memalign ()
+glibc 2.0.
+SunOS 4.1.3.
+.TP
+.BR valloc ()
+glibc 2.0.
+3.0BSD.
+Documented as obsolete in 4.3BSD,
+and as legacy in SUSv2.
+.TP
+.BR pvalloc ()
+glibc 2.0.
.\"
.SS Headers
Everybody agrees that
diff --git a/man3/posix_openpt.3 b/man3/posix_openpt.3
index e076b777f..09733d0a4 100644
--- a/man3/posix_openpt.3
+++ b/man3/posix_openpt.3
@@ -3,7 +3,7 @@
.\"
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
-.TH posix_openpt 3 2023-02-05 "Linux man-pages 6.03"
+.TH posix_openpt 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
posix_openpt \- open a pseudoterminal device
.SH LIBRARY
@@ -54,32 +54,28 @@ is set to indicate the error.
.SH ERRORS
See
.BR open (2).
-.SH VERSIONS
-glibc support for
-.BR posix_openpt ()
-has been provided since glibc 2.2.1.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR posix_openpt ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008.
+POSIX.1-2008.
+.SH HISTORY
+glibc 2.2.1.
+POSIX.1-2001.
.PP
-.BR posix_openpt ()
-is part of the UNIX 98 pseudoterminal support (see
+It is part of the UNIX 98 pseudoterminal support (see
.BR pts (4)).
.SH NOTES
Some older UNIX implementations that support System V
diff --git a/man3/posix_spawn.3 b/man3/posix_spawn.3
index 6dbad2ea0..32fa8b373 100644
--- a/man3/posix_spawn.3
+++ b/man3/posix_spawn.3
@@ -8,7 +8,7 @@
.\" POSIX 1003.1-2004 documentation
.\" (http://www.opengroup.org/onlinepubs/009695399)
.\"
-.TH posix_spawn 3 2023-02-05 "Linux man-pages 6.03"
+.TH posix_spawn 3 2023-05-03 "Linux man-pages 6.05.01"
.SH NAME
posix_spawn, posix_spawnp \- spawn a process
.SH LIBRARY
@@ -508,14 +508,11 @@ In addition, these functions fail if:
.TP
.B ENOSYS
Function not supported on this system.
-.SH VERSIONS
-The
-.BR posix_spawn ()
-and
-.BR posix_spawnp ()
-functions are available since glibc 2.2.
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008.
+POSIX.1-2008.
+.SH HISTORY
+glibc 2.2.
+POSIX.1-2001.
.\" FIXME . This piece belongs in spawnattr_setflags(3)
.\" The
.\" .B POSIX_SPAWN_USEVFORK
@@ -638,7 +635,7 @@ can't be blocked).
$ \fB./a.out \-s sleep 60 &\fP
[1] 7637
$ PID of child: 7638
-
+.PP
$ \fBkill 7638\fP
$ \fBkill \-KILL 7638\fP
$ Child status: killed by signal 9
@@ -669,16 +666,16 @@ Child status: exited, status=127
#include <string.h>
#include <unistd.h>
#include <wait.h>
-
+\&
#define errExit(msg) do { perror(msg); \e
exit(EXIT_FAILURE); } while (0)
-
+\&
#define errExitEN(en, msg) \e
do { errno = en; perror(msg); \e
exit(EXIT_FAILURE); } while (0)
-
+\&
char **environ;
-
+\&
int
main(int argc, char *argv[])
{
@@ -689,87 +686,87 @@ main(int argc, char *argv[])
posix_spawnattr_t *attrp;
posix_spawn_file_actions_t file_actions;
posix_spawn_file_actions_t *file_actionsp;
-
+\&
/* Parse command\-line options, which can be used to specify an
attributes object and file actions object for the child. */
-
+\&
attrp = NULL;
file_actionsp = NULL;
-
+\&
while ((opt = getopt(argc, argv, "sc")) != \-1) {
switch (opt) {
case \[aq]c\[aq]: /* \-c: close standard output in child */
-
+\&
/* Create a file actions object and add a "close"
action to it. */
-
+\&
s = posix_spawn_file_actions_init(&file_actions);
if (s != 0)
errExitEN(s, "posix_spawn_file_actions_init");
-
+\&
s = posix_spawn_file_actions_addclose(&file_actions,
STDOUT_FILENO);
if (s != 0)
errExitEN(s, "posix_spawn_file_actions_addclose");
-
+\&
file_actionsp = &file_actions;
break;
-
+\&
case \[aq]s\[aq]: /* \-s: block all signals in child */
-
+\&
/* Create an attributes object and add a "set signal mask"
action to it. */
-
+\&
s = posix_spawnattr_init(&attr);
if (s != 0)
errExitEN(s, "posix_spawnattr_init");
s = posix_spawnattr_setflags(&attr, POSIX_SPAWN_SETSIGMASK);
if (s != 0)
errExitEN(s, "posix_spawnattr_setflags");
-
+\&
sigfillset(&mask);
s = posix_spawnattr_setsigmask(&attr, &mask);
if (s != 0)
errExitEN(s, "posix_spawnattr_setsigmask");
-
+\&
attrp = &attr;
break;
}
}
-
+\&
/* Spawn the child. The name of the program to execute and the
command\-line arguments are taken from the command\-line arguments
of this program. The environment of the program execed in the
child is made the same as the parent\[aq]s environment. */
-
+\&
s = posix_spawnp(&child_pid, argv[optind], file_actionsp, attrp,
&argv[optind], environ);
if (s != 0)
errExitEN(s, "posix_spawn");
-
+\&
/* Destroy any objects that we created earlier. */
-
+\&
if (attrp != NULL) {
s = posix_spawnattr_destroy(attrp);
if (s != 0)
errExitEN(s, "posix_spawnattr_destroy");
}
-
+\&
if (file_actionsp != NULL) {
s = posix_spawn_file_actions_destroy(file_actionsp);
if (s != 0)
errExitEN(s, "posix_spawn_file_actions_destroy");
}
-
+\&
printf("PID of child: %jd\en", (intmax_t) child_pid);
-
+\&
/* Monitor status of the child until it terminates. */
-
+\&
do {
s = waitpid(child_pid, &status, WUNTRACED | WCONTINUED);
if (s == \-1)
errExit("waitpid");
-
+\&
printf("Child status: ");
if (WIFEXITED(status)) {
printf("exited, status=%d\en", WEXITSTATUS(status));
@@ -781,7 +778,7 @@ main(int argc, char *argv[])
printf("continued\en");
}
} while (!WIFEXITED(status) && !WIFSIGNALED(status));
-
+\&
exit(EXIT_SUCCESS);
}
.EE
diff --git a/man3/pow.3 b/man3/pow.3
index 24ccaac71..3f0be5cc1 100644
--- a/man3/pow.3
+++ b/man3/pow.3
@@ -13,7 +13,7 @@
.\" Modified 1995-08-14 by Arnt Gulbrandsen <agulbra@troll.no>
.\" Modified 2002-07-27 by Walter Harms
.\" (walter.harms@informatik.uni-oldenburg.de)
-.TH pow 3 2023-02-05 "Linux man-pages 6.03"
+.TH pow 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
pow, powf, powl \- power functions
.SH LIBRARY
@@ -66,7 +66,7 @@ If result underflows, and is not representable,
a range error occurs,
and 0.0 with the appropriate sign is returned.
.\" POSIX.1 does not specify the sign of the zero,
-.\" but http://sources.redhat.com/bugzilla/show_bug.cgi?id=2678
+.\" but https://www.sourceware.org/bugzilla/show_bug.cgi?id=2678
.\" points out that the zero has the wrong sign in some cases.
.PP
.\" pow(\(+-0, <0 [[odd]]) = HUGE_VAL*
@@ -249,7 +249,7 @@ is a NaN, the result is a NaN.
.SH ERRORS
.\" FIXME . review status of this error
.\" longstanding bug report for glibc:
-.\" http://sources.redhat.com/bugzilla/show_bug.cgi?id=369
+.\" https://www.sourceware.org/bugzilla/show_bug.cgi?id=369
.\" For negative x, and -large and +large y, glibc 2.8 gives incorrect
.\" results
.\" pow(-0.5,-DBL_MAX)=nan
@@ -309,29 +309,29 @@ is raised.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR pow (),
.BR powf (),
.BR powl ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-C99, POSIX.1-2001, POSIX.1-2008.
+C11, POSIX.1-2008.
+.SH HISTORY
+C99, POSIX.1-2001.
.PP
The variant returning
.I double
also conforms to
-SVr4, 4.3BSD.
+SVr4, 4.3BSD, C89.
.SH BUGS
.SS Historical bugs (now fixed)
Before glibc 2.28,
@@ -351,14 +351,14 @@ This problem was fixed
in glibc 2.28.
.PP
A number of bugs
-.\" http://sources.redhat.com/bugzilla/show_bug.cgi?id=3866
+.\" https://www.sourceware.org/bugzilla/show_bug.cgi?id=3866
in the glibc implementation of
.BR pow ()
were fixed in glibc 2.16.
.PP
In glibc 2.9 and earlier,
.\"
-.\" http://sources.redhat.com/bugzilla/show_bug.cgi?id=6776
+.\" https://www.sourceware.org/bugzilla/show_bug.cgi?id=6776
when a pole error occurs,
.I errno
is set to
diff --git a/man3/pow10.3 b/man3/pow10.3
index 7dba9de1b..bbbac22af 100644
--- a/man3/pow10.3
+++ b/man3/pow10.3
@@ -3,7 +3,7 @@
.\"
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
-.TH pow10 3 2022-12-15 "Linux man-pages 6.03"
+.TH pow10 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
pow10, pow10f, pow10l \- base-10 power functions
.SH LIBRARY
@@ -29,32 +29,29 @@ with the difference that the latter functions are now standardized
in TS\ 18661-4:2015.
Those latter functions should be used in preference
to the functions described in this page.
-.SH VERSIONS
-These functions were added in glibc 2.1.
-Since glibc 2.27,
-.\" glibc commit 5a80d39d0d2587e9bd8e72f19e92eeb2a66fbe9e
-the use of these functions in new programs is no longer supported.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR pow10 (),
.BR pow10f (),
.BR pow10l ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-This functions are nonstandard GNU extensions.
+GNU.
+.SH VERSIONS
+glibc 2.1.
+Removed in glibc 2.27.
+.\" glibc commit 5a80d39d0d2587e9bd8e72f19e92eeb2a66fbe9e
.SH SEE ALSO
.BR exp10 (3),
.BR pow (3)
diff --git a/man3/powerof2.3 b/man3/powerof2.3
index 78ecb7f2e..fae024f13 100644
--- a/man3/powerof2.3
+++ b/man3/powerof2.3
@@ -2,7 +2,7 @@
.\"
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
-.TH powerof2 3 2022-12-31 "Linux man-pages 6.03"
+.TH powerof2 3 2023-03-30 "Linux man-pages 6.05.01"
.SH NAME
powerof2 \- test if a value is a power of 2
.SH LIBRARY
@@ -31,7 +31,7 @@ if
is a power of 2 or not,
respectively.
.SH STANDARDS
-This nonstandard macro is present in glibc and the BSDs.
+BSD.
.SH CAVEATS
The arguments may be evaluated more than once.
.PP
diff --git a/man3/printf.3 b/man3/printf.3
index 33fe60067..edd6ba85a 100644
--- a/man3/printf.3
+++ b/man3/printf.3
@@ -13,7 +13,7 @@
.\" 2000-07-26 jsm28@hermes.cam.ac.uk - three small fixes
.\" 2000-10-16 jsm28@hermes.cam.ac.uk - more fixes
.\"
-.TH printf 3 2023-02-05 "Linux man-pages 6.03"
+.TH printf 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
printf, fprintf, dprintf, sprintf, snprintf, vprintf, vfprintf, vdprintf,
vsprintf, vsnprintf \- formatted output conversion
@@ -324,7 +324,7 @@ and
flags both appear, the
.B \&0
flag is ignored.
-If a precision is given with a numeric conversion
+If a precision is given with an integer conversion
.RB ( d ,
.BR i ,
.BR o ,
@@ -895,7 +895,92 @@ or more means that the output was truncated.
(See also below under NOTES.)
.PP
If an output error is encountered, a negative value is returned.
-.SH VERSIONS
+.SH ATTRIBUTES
+For an explanation of the terms used in this section, see
+.BR attributes (7).
+.TS
+allbox;
+lbx lb lb
+l l l.
+Interface Attribute Value
+T{
+.na
+.nh
+.BR printf (),
+.BR fprintf (),
+.BR sprintf (),
+.BR snprintf (),
+.BR vprintf (),
+.BR vfprintf (),
+.BR vsprintf (),
+.BR vsnprintf ()
+T} Thread safety MT-Safe locale
+.TE
+.sp 1
+.SH STANDARDS
+.TP
+.BR fprintf ()
+.TQ
+.BR printf ()
+.TQ
+.BR sprintf ()
+.TQ
+.BR vprintf ()
+.TQ
+.BR vfprintf ()
+.TQ
+.BR vsprintf ()
+.TQ
+.BR snprintf ()
+.TQ
+.BR vsnprintf ()
+C11, POSIX.1-2008.
+.TP
+.BR dprintf ()
+.TQ
+.BR vdprintf ()
+GNU, POSIX.1-2008.
+.SH HISTORY
+.TP
+.BR fprintf ()
+.TQ
+.BR printf ()
+.TQ
+.BR sprintf ()
+.TQ
+.BR vprintf ()
+.TQ
+.BR vfprintf ()
+.TQ
+.BR vsprintf ()
+C89, POSIX.1-2001.
+.TP
+.BR snprintf ()
+.TQ
+.BR vsnprintf ()
+SUSv2, C99, POSIX.1-2001.
+.IP
+Concerning the return value of
+.BR snprintf (),
+SUSv2 and C99 contradict each other: when
+.BR snprintf ()
+is called with
+.IR size =0
+then SUSv2 stipulates an unspecified return value less than 1,
+while C99 allows
+.I str
+to be NULL in this case, and gives the return value (as always)
+as the number of characters that would have been written in case
+the output string has been large enough.
+POSIX.1-2001 and later align their specification of
+.BR snprintf ()
+with C99.
+.TP
+.BR dprintf ()
+.TQ
+.BR vdprintf ()
+GNU, POSIX.1-2008.
+.PP
.\" Linux libc4 knows about the five C standard flags.
.\" It knows about the length modifiers \fBh\fP, \fBl\fP, \fBL\fP,
.\" and the conversions
@@ -935,64 +1020,7 @@ of the
.B m
conversion specifier, that is
.IR %#m .
-.SH ATTRIBUTES
-For an explanation of the terms used in this section, see
-.BR attributes (7).
-.ad l
-.nh
-.TS
-allbox;
-lbx lb lb
-l l l.
-Interface Attribute Value
-T{
-.BR printf (),
-.BR fprintf (),
-.BR sprintf (),
-.BR snprintf (),
-.BR vprintf (),
-.BR vfprintf (),
-.BR vsprintf (),
-.BR vsnprintf ()
-T} Thread safety MT-Safe locale
-.TE
-.hy
-.ad
-.sp 1
-.SH STANDARDS
-.BR fprintf (),
-.BR printf (),
-.BR sprintf (),
-.BR snprintf (),
-.BR vprintf (),
-.BR vfprintf (),
-.BR vsprintf (),
-.BR vsnprintf ():
-POSIX.1-2001, POSIX.1-2008, C99.
-.PP
-The
-.BR dprintf ()
-and
-.BR vdprintf ()
-functions were originally GNU extensions that were later standardized
-in POSIX.1-2008.
-.PP
-Concerning the return value of
-.BR snprintf (),
-SUSv2 and C99 contradict each other: when
-.BR snprintf ()
-is called with
-.IR size =0
-then SUSv2 stipulates an unspecified return value less than 1,
-while C99 allows
-.I str
-to be NULL in this case, and gives the return value (as always)
-as the number of characters that would have been written in case
-the output string has been large enough.
-POSIX.1-2001 and later align their specification of
-.BR snprintf ()
-with C99.
-.SH NOTES
+.SH CAVEATS
Some programs imprudently rely on code such as the following
.PP
.in +4n
@@ -1162,7 +1190,7 @@ To allocate a sufficiently large string and print into it
#include <stdio.h>
#include <stdlib.h>
#include <stdarg.h>
-
+\&
char *
make_message(const char *fmt, ...)
{
@@ -1170,30 +1198,30 @@ make_message(const char *fmt, ...)
size_t size = 0;
char *p = NULL;
va_list ap;
-
+\&
/* Determine required size. */
-
+\&
va_start(ap, fmt);
n = vsnprintf(p, size, fmt, ap);
va_end(ap);
-
+\&
if (n < 0)
return NULL;
-
+\&
size = (size_t) n + 1; /* One extra byte for \[aq]\e0\[aq] */
p = malloc(size);
if (p == NULL)
return NULL;
-
+\&
va_start(ap, fmt);
n = vsnprintf(p, size, fmt, ap);
va_end(ap);
-
+\&
if (n < 0) {
free(p);
return NULL;
}
-
+\&
return p;
}
.EE
diff --git a/man3/profil.3 b/man3/profil.3
index b9ddbaeef..caa5f489d 100644
--- a/man3/profil.3
+++ b/man3/profil.3
@@ -6,7 +6,7 @@
.\" Modified Fri Jun 23 01:35:19 1995 Andries Brouwer <aeb@cwi.nl>
.\" (prompted by Bas V. de Bakker <bas@phys.uva.nl>)
.\" Corrected (and moved to man3), 980612, aeb
-.TH profil 3 2022-12-15 "Linux man-pages 6.03"
+.TH profil 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
profil \- execution time profile
.SH LIBRARY
@@ -62,22 +62,22 @@ Zero is always returned.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR profil ()
T} Thread safety MT-Unsafe
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-Similar to a call in SVr4 (but not POSIX.1).
+None.
+.SH HISTORY
+Similar to a call in SVr4.
.SH BUGS
.BR profil ()
cannot be used on a program that also uses
diff --git a/man3/program_invocation_name.3 b/man3/program_invocation_name.3
index 440d7aaeb..79bd2f773 100644
--- a/man3/program_invocation_name.3
+++ b/man3/program_invocation_name.3
@@ -21,7 +21,7 @@
.\" SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
.\" %%%LICENSE_END
.\"
-.TH program_invocation_name 3 2022-10-30 "Linux man-pages 6.03"
+.TH program_invocation_name 3 2023-03-30 "Linux man-pages 6.05.01"
.SH NAME
program_invocation_name, program_invocation_short_name \- \
obtain name used to invoke calling program
@@ -56,12 +56,11 @@ with all text up to and including the final slash (/), if any, removed.
.PP
These variables are automatically initialized by the glibc run-time
startup code.
-.SH STANDARDS
-These variables are GNU extensions, and should not be
-used in programs intended to be portable.
-.SH NOTES
+.SH VERSIONS
The Linux-specific
-.I /proc/[number]/cmdline
+.IR /proc/ pid /cmdline
file provides access to similar information.
+.SH STANDARDS
+GNU.
.SH SEE ALSO
.BR proc (5)
diff --git a/man3/psignal.3 b/man3/psignal.3
index fa730da68..e9c972805 100644
--- a/man3/psignal.3
+++ b/man3/psignal.3
@@ -8,7 +8,7 @@
.\" Lewine's _POSIX Programmer's Guide_ (O'Reilly & Associates, 1991)
.\" 386BSD man pages
.\" Modified Sat Jul 24 18:45:17 1993 by Rik Faith (faith@cs.unc.edu)
-.TH psignal 3 2023-02-05 "Linux man-pages 6.03"
+.TH psignal 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
psignal, psiginfo \- print signal description
.SH LIBRARY
@@ -75,29 +75,26 @@ The
and
.BR psiginfo ()
functions return no value.
-.SH VERSIONS
-The
-.BR psiginfo ()
-function was added in glibc 2.10.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR psignal (),
.BR psiginfo ()
T} Thread safety MT-Safe locale
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
+POSIX.1-2008.
+.SH HISTORY
+glibc 2.10.
POSIX.1-2008, 4.3BSD.
.SH BUGS
Up to glibc 2.12,
diff --git a/man3/pthread_atfork.3 b/man3/pthread_atfork.3
index e6ec6ddb0..1bcfc7e4c 100644
--- a/man3/pthread_atfork.3
+++ b/man3/pthread_atfork.3
@@ -2,7 +2,7 @@
.\"
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
-.TH pthread_atfork 3 2023-02-05 "Linux man-pages 6.03"
+.TH pthread_atfork 3 2023-03-30 "Linux man-pages 6.05.01"
.SH NAME
pthread_atfork \- register fork handlers
.SH LIBRARY
@@ -65,7 +65,9 @@ handlers are called in the order of registration.
.B ENOMEM
Could not allocate memory to record the fork handler list entry.
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008.
+POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001.
.SH NOTES
When
.BR fork (2)
diff --git a/man3/pthread_attr_init.3 b/man3/pthread_attr_init.3
index bb1f7a567..8792ab4cd 100644
--- a/man3/pthread_attr_init.3
+++ b/man3/pthread_attr_init.3
@@ -4,7 +4,7 @@
.\"
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
-.TH pthread_attr_init 3 2022-12-15 "Linux man-pages 6.03"
+.TH pthread_attr_init 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
pthread_attr_init, pthread_attr_destroy \- initialize and destroy
thread attributes object
@@ -61,23 +61,23 @@ handle a possible error return).
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR pthread_attr_init (),
.BR pthread_attr_destroy ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008.
+POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001.
.SH NOTES
The
.I pthread_attr_t
@@ -156,7 +156,7 @@ Thread attributes:
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
-
+\&
static void
display_pthread_attr(pthread_attr_t *attr, char *prefix)
{
@@ -164,7 +164,7 @@ display_pthread_attr(pthread_attr_t *attr, char *prefix)
size_t v;
void *stkaddr;
struct sched_param sp;
-
+\&
s = pthread_attr_getdetachstate(attr, &i);
if (s != 0)
errc(EXIT_FAILURE, s, "pthread_attr_getdetachstate");
@@ -172,7 +172,7 @@ display_pthread_attr(pthread_attr_t *attr, char *prefix)
(i == PTHREAD_CREATE_DETACHED) ? "PTHREAD_CREATE_DETACHED" :
(i == PTHREAD_CREATE_JOINABLE) ? "PTHREAD_CREATE_JOINABLE" :
"???");
-
+\&
s = pthread_attr_getscope(attr, &i);
if (s != 0)
errc(EXIT_FAILURE, s, "pthread_attr_getscope");
@@ -180,7 +180,7 @@ display_pthread_attr(pthread_attr_t *attr, char *prefix)
(i == PTHREAD_SCOPE_SYSTEM) ? "PTHREAD_SCOPE_SYSTEM" :
(i == PTHREAD_SCOPE_PROCESS) ? "PTHREAD_SCOPE_PROCESS" :
"???");
-
+\&
s = pthread_attr_getinheritsched(attr, &i);
if (s != 0)
errc(EXIT_FAILURE, s, "pthread_attr_getinheritsched");
@@ -188,7 +188,7 @@ display_pthread_attr(pthread_attr_t *attr, char *prefix)
(i == PTHREAD_INHERIT_SCHED) ? "PTHREAD_INHERIT_SCHED" :
(i == PTHREAD_EXPLICIT_SCHED) ? "PTHREAD_EXPLICIT_SCHED" :
"???");
-
+\&
s = pthread_attr_getschedpolicy(attr, &i);
if (s != 0)
errc(EXIT_FAILURE, s, "pthread_attr_getschedpolicy");
@@ -197,44 +197,44 @@ display_pthread_attr(pthread_attr_t *attr, char *prefix)
(i == SCHED_FIFO) ? "SCHED_FIFO" :
(i == SCHED_RR) ? "SCHED_RR" :
"???");
-
+\&
s = pthread_attr_getschedparam(attr, &sp);
if (s != 0)
errc(EXIT_FAILURE, s, "pthread_attr_getschedparam");
printf("%sScheduling priority = %d\en", prefix, sp.sched_priority);
-
+\&
s = pthread_attr_getguardsize(attr, &v);
if (s != 0)
errc(EXIT_FAILURE, s, "pthread_attr_getguardsize");
printf("%sGuard size = %zu bytes\en", prefix, v);
-
+\&
s = pthread_attr_getstack(attr, &stkaddr, &v);
if (s != 0)
errc(EXIT_FAILURE, s, "pthread_attr_getstack");
printf("%sStack address = %p\en", prefix, stkaddr);
printf("%sStack size = %#zx bytes\en", prefix, v);
}
-
+\&
static void *
thread_start(void *arg)
{
int s;
pthread_attr_t gattr;
-
+\&
/* pthread_getattr_np() is a non\-standard GNU extension that
retrieves the attributes of the thread specified in its
first argument. */
-
+\&
s = pthread_getattr_np(pthread_self(), &gattr);
if (s != 0)
errc(EXIT_FAILURE, s, "pthread_getattr_np");
-
+\&
printf("Thread attributes:\en");
display_pthread_attr(&gattr, "\et");
-
+\&
exit(EXIT_SUCCESS); /* Terminate all threads */
}
-
+\&
int
main(int argc, char *argv[])
{
@@ -242,54 +242,54 @@ main(int argc, char *argv[])
pthread_attr_t attr;
pthread_attr_t *attrp; /* NULL or &attr */
int s;
-
+\&
attrp = NULL;
-
+\&
/* If a command\-line argument was supplied, use it to set the
stack\-size attribute and set a few other thread attributes,
and set attrp pointing to thread attributes object. */
-
+\&
if (argc > 1) {
size_t stack_size;
void *sp;
-
+\&
attrp = &attr;
-
+\&
s = pthread_attr_init(&attr);
if (s != 0)
errc(EXIT_FAILURE, s, "pthread_attr_init");
-
+\&
s = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
if (s != 0)
errc(EXIT_FAILURE, s, "pthread_attr_setdetachstate");
-
+\&
s = pthread_attr_setinheritsched(&attr, PTHREAD_EXPLICIT_SCHED);
if (s != 0)
errc(EXIT_FAILURE, s, "pthread_attr_setinheritsched");
-
+\&
stack_size = strtoul(argv[1], NULL, 0);
-
+\&
s = posix_memalign(&sp, sysconf(_SC_PAGESIZE), stack_size);
if (s != 0)
errc(EXIT_FAILURE, s, "posix_memalign");
-
+\&
printf("posix_memalign() allocated at %p\en", sp);
-
+\&
s = pthread_attr_setstack(&attr, sp, stack_size);
if (s != 0)
errc(EXIT_FAILURE, s, "pthread_attr_setstack");
}
-
+\&
s = pthread_create(&thr, attrp, &thread_start, NULL);
if (s != 0)
errc(EXIT_FAILURE, s, "pthread_create");
-
+\&
if (attrp != NULL) {
s = pthread_attr_destroy(attrp);
if (s != 0)
errc(EXIT_FAILURE, s, "pthread_attr_destroy");
}
-
+\&
pause(); /* Terminates when other thread calls exit() */
}
.EE
diff --git a/man3/pthread_attr_setaffinity_np.3 b/man3/pthread_attr_setaffinity_np.3
index 03e28cca9..923ee0ba7 100644
--- a/man3/pthread_attr_setaffinity_np.3
+++ b/man3/pthread_attr_setaffinity_np.3
@@ -4,7 +4,7 @@
.\"
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
-.TH pthread_attr_setaffinity_np 3 2022-12-15 "Linux man-pages 6.03"
+.TH pthread_attr_setaffinity_np 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
pthread_attr_setaffinity_np, pthread_attr_getaffinity_np \- set/get
CPU affinity attribute in thread attributes object
@@ -85,29 +85,27 @@ is too small).
.B ENOMEM
.RB ( pthread_attr_setaffinity_np ())
Could not allocate memory.
-.SH VERSIONS
-These functions are provided since glibc 2.3.4.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR pthread_attr_setaffinity_np (),
.BR pthread_attr_getaffinity_np ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-These functions are nonstandard GNU extensions;
+GNU;
hence the suffix "_np" (nonportable) in the names.
+.SH HISTORY
+glibc 2.3.4.
.SH NOTES
In glibc 2.3.3 only,
versions of these functions were provided that did not have a
diff --git a/man3/pthread_attr_setdetachstate.3 b/man3/pthread_attr_setdetachstate.3
index 3c0144809..c98494321 100644
--- a/man3/pthread_attr_setdetachstate.3
+++ b/man3/pthread_attr_setdetachstate.3
@@ -4,7 +4,7 @@
.\"
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
-.TH pthread_attr_setdetachstate 3 2022-12-15 "Linux man-pages 6.03"
+.TH pthread_attr_setdetachstate 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
pthread_attr_setdetachstate, pthread_attr_getdetachstate \-
set/get detach state attribute in thread attributes object
@@ -69,23 +69,23 @@ An invalid value was specified in
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR pthread_attr_setdetachstate (),
.BR pthread_attr_getdetachstate ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008.
+POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001.
.SH NOTES
See
.BR pthread_create (3)
diff --git a/man3/pthread_attr_setguardsize.3 b/man3/pthread_attr_setguardsize.3
index 13b3ee6f4..7d8d8cb26 100644
--- a/man3/pthread_attr_setguardsize.3
+++ b/man3/pthread_attr_setguardsize.3
@@ -4,7 +4,7 @@
.\"
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
-.TH pthread_attr_setguardsize 3 2022-12-15 "Linux man-pages 6.03"
+.TH pthread_attr_setguardsize 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
pthread_attr_setguardsize, pthread_attr_getguardsize \- set/get guard size
attribute in thread attributes object
@@ -83,28 +83,27 @@ is invalid.
On Linux these functions always succeed
(but portable and future-proof applications should nevertheless
handle a possible error return).
-.SH VERSIONS
-These functions are provided since glibc 2.1.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR pthread_attr_setguardsize (),
.BR pthread_attr_getguardsize ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008.
+POSIX.1-2008.
+.SH HISTORY
+glibc 2.1.
+POSIX.1-2001.
.SH NOTES
A guard area consists of virtual memory pages that are protected
to prevent read and write access.
@@ -145,7 +144,7 @@ allocating extra space at the end of the stack for the guard area.
.\" which looks pretty clearly to be in violation of POSIX.
.\"
.\" Filed bug, 22 Oct 2008:
-.\" http://sources.redhat.com/bugzilla/show_bug.cgi?id=6973
+.\" https://www.sourceware.org/bugzilla/show_bug.cgi?id=6973
.\"
.\" Older reports:
.\" https//bugzilla.redhat.com/show_bug.cgi?id=435337
diff --git a/man3/pthread_attr_setinheritsched.3 b/man3/pthread_attr_setinheritsched.3
index 8aa764e78..aa062d1a3 100644
--- a/man3/pthread_attr_setinheritsched.3
+++ b/man3/pthread_attr_setinheritsched.3
@@ -4,7 +4,7 @@
.\"
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
-.TH pthread_attr_setinheritsched 3 2022-12-15 "Linux man-pages 6.03"
+.TH pthread_attr_setinheritsched 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
pthread_attr_setinheritsched, pthread_attr_getinheritsched \- set/get
inherit-scheduler attribute in thread attributes object
@@ -87,28 +87,27 @@ POSIX.1 also documents an optional
.B ENOTSUP
error ("attempt was made to set the attribute to an unsupported value") for
.BR pthread_attr_setinheritsched ().
-.\" .SH VERSIONS
-.\" Available since glibc 2.0.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR pthread_attr_setinheritsched (),
.BR pthread_attr_getinheritsched ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008.
+POSIX.1-2008.
+.SH HISTORY
+glibc 2.0.
+POSIX.1-2001.
.SH BUGS
As at glibc 2.8, if a thread attributes object is initialized using
.BR pthread_attr_init (3),
diff --git a/man3/pthread_attr_setschedparam.3 b/man3/pthread_attr_setschedparam.3
index 977e15776..379f30c7c 100644
--- a/man3/pthread_attr_setschedparam.3
+++ b/man3/pthread_attr_setschedparam.3
@@ -4,7 +4,7 @@
.\"
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
-.TH pthread_attr_setschedparam 3 2022-12-15 "Linux man-pages 6.03"
+.TH pthread_attr_setschedparam 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
pthread_attr_setschedparam, pthread_attr_getschedparam \- set/get
scheduling parameter attributes in thread attributes object
@@ -84,28 +84,27 @@ error for
This value is never returned on Linux
(but portable and future-proof applications should nevertheless
handle this error return value).
-.\" .SH VERSIONS
-.\" Available since glibc 2.0.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR pthread_attr_setschedparam (),
.BR pthread_attr_getschedparam ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008.
+POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001.
+glibc 2.0.
.SH NOTES
See
.BR pthread_attr_setschedpolicy (3)
diff --git a/man3/pthread_attr_setschedpolicy.3 b/man3/pthread_attr_setschedpolicy.3
index a24dfebcf..9311af6e0 100644
--- a/man3/pthread_attr_setschedpolicy.3
+++ b/man3/pthread_attr_setschedpolicy.3
@@ -4,7 +4,7 @@
.\"
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
-.TH pthread_attr_setschedpolicy 3 2022-12-15 "Linux man-pages 6.03"
+.TH pthread_attr_setschedpolicy 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
pthread_attr_setschedpolicy, pthread_attr_getschedpolicy \- set/get
scheduling policy attribute in thread attributes object
@@ -76,28 +76,27 @@ POSIX.1 also documents an optional
.B ENOTSUP
error ("attempt was made to set the attribute to an unsupported value") for
.BR pthread_attr_setschedpolicy ().
-.\" .SH VERSIONS
-.\" Available since glibc 2.0.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR pthread_attr_setschedpolicy (),
.BR pthread_attr_getschedpolicy ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008.
+POSIX.1-2008.
+.SH HISTORY
+glibc 2.0.
+POSIX.1-2001.
.SH EXAMPLES
See
.BR pthread_setschedparam (3).
diff --git a/man3/pthread_attr_setscope.3 b/man3/pthread_attr_setscope.3
index 102c5dd48..c9acfc479 100644
--- a/man3/pthread_attr_setscope.3
+++ b/man3/pthread_attr_setscope.3
@@ -4,7 +4,7 @@
.\"
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
-.TH pthread_attr_setscope 3 2022-12-15 "Linux man-pages 6.03"
+.TH pthread_attr_setscope 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
pthread_attr_setscope, pthread_attr_getscope \- set/get contention scope
attribute in thread attributes object
@@ -100,23 +100,23 @@ which is not supported on Linux.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR pthread_attr_setscope (),
.BR pthread_attr_getscope ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008.
+POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001.
.SH NOTES
The
.B PTHREAD_SCOPE_SYSTEM
diff --git a/man3/pthread_attr_setsigmask_np.3 b/man3/pthread_attr_setsigmask_np.3
index ece2ef1e4..ee789a62d 100644
--- a/man3/pthread_attr_setsigmask_np.3
+++ b/man3/pthread_attr_setsigmask_np.3
@@ -4,7 +4,7 @@
.\"
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
-.TH pthread_attr_setsigmask_np 3 2023-02-05 "Linux man-pages 6.03"
+.TH pthread_attr_setsigmask_np 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
pthread_attr_setsigmask_np, pthread_attr_getsigmask_np \- set/get
signal mask attribute in thread attributes object
@@ -68,29 +68,27 @@ On error, these functions return a positive error number.
.B ENOMEM
.RB ( pthread_attr_setsigmask_np ())
Could not allocate memory.
-.SH VERSIONS
-These functions are provided since glibc 2.32.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR pthread_attr_setsigmask_np (),
.BR pthread_attr_getsigmask_np ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-These functions are nonstandard GNU extensions;
+GNU;
hence the suffix "_np" (nonportable) in the names.
+.SH HISTORY
+glibc 2.32.
.SH NOTES
The signal mask attribute determines the signal mask that will be assigned to
a thread created using the thread attributes object
diff --git a/man3/pthread_attr_setstack.3 b/man3/pthread_attr_setstack.3
index 7ce31c9bf..78c2ff460 100644
--- a/man3/pthread_attr_setstack.3
+++ b/man3/pthread_attr_setstack.3
@@ -4,7 +4,7 @@
.\"
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
-.TH pthread_attr_setstack 3 2022-12-15 "Linux man-pages 6.03"
+.TH pthread_attr_setstack 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
pthread_attr_setstack, pthread_attr_getstack \- set/get stack
attributes in thread attributes object
@@ -89,28 +89,27 @@ error if the stack area described by
and
.I stacksize
is not both readable and writable by the caller.
-.SH VERSIONS
-These functions are provided since glibc 2.2.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR pthread_attr_setstack (),
.BR pthread_attr_getstack ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008.
+POSIX.1-2008.
+.SH HISTORY
+glibc 2.2.
+POSIX.1-2001.
.SH NOTES
These functions are provided for applications that must ensure that
a thread's stack is placed in a particular location.
diff --git a/man3/pthread_attr_setstackaddr.3 b/man3/pthread_attr_setstackaddr.3
index 7b0747924..9ec2e9a77 100644
--- a/man3/pthread_attr_setstackaddr.3
+++ b/man3/pthread_attr_setstackaddr.3
@@ -4,7 +4,7 @@
.\"
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
-.TH pthread_attr_setstackaddr 3 2022-12-15 "Linux man-pages 6.03"
+.TH pthread_attr_setstackaddr 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
pthread_attr_setstackaddr, pthread_attr_getstackaddr \-
set/get stack address attribute in thread attributes object
@@ -15,8 +15,10 @@ POSIX threads library
.nf
.B #include <pthread.h>
.PP
+.B [[deprecated]]
.BI "int pthread_attr_setstackaddr(pthread_attr_t *" attr \
", void *" stackaddr );
+.B [[deprecated]]
.BI "int pthread_attr_getstackaddr(const pthread_attr_t *restrict " attr ,
.BI " void **restrict " stackaddr );
.fi
@@ -60,29 +62,28 @@ on error, they return a nonzero error number.
No errors are defined
(but applications should nevertheless
handle a possible error return).
-.SH VERSIONS
-These functions are provided since glibc 2.1.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR pthread_attr_setstackaddr (),
.BR pthread_attr_getstackaddr ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-POSIX.1-2001 specifies these functions but marks them as obsolete.
-POSIX.1-2008 removes the specification of these functions.
+None.
+.SH HISTORY
+glibc 2.1.
+Marked obsolete in POSIX.1-2001.
+Removed in POSIX.1-2008.
.SH NOTES
.I Do not use these functions!
They cannot be portably used, since they provide no way of specifying
diff --git a/man3/pthread_attr_setstacksize.3 b/man3/pthread_attr_setstacksize.3
index 83195bd6f..278346e3d 100644
--- a/man3/pthread_attr_setstacksize.3
+++ b/man3/pthread_attr_setstacksize.3
@@ -4,7 +4,7 @@
.\"
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
-.TH pthread_attr_setstacksize 3 2022-12-15 "Linux man-pages 6.03"
+.TH pthread_attr_setstacksize 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
pthread_attr_setstacksize, pthread_attr_getstacksize \- set/get stack size
attribute in thread attributes object
@@ -60,26 +60,24 @@ can fail with the error
if
.I stacksize
is not a multiple of the system page size.
-.SH VERSIONS
-These functions are provided since glibc 2.1.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR pthread_attr_setstacksize (),
.BR pthread_attr_getstacksize ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
+.SH VERSIONS
+These functions are provided since glibc 2.1.
.SH STANDARDS
POSIX.1-2001, POSIX.1-2008.
.SH NOTES
diff --git a/man3/pthread_cancel.3 b/man3/pthread_cancel.3
index c36b22c58..8230c8030 100644
--- a/man3/pthread_cancel.3
+++ b/man3/pthread_cancel.3
@@ -4,7 +4,7 @@
.\"
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
-.TH pthread_cancel 3 2023-02-05 "Linux man-pages 6.03"
+.TH pthread_cancel 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
pthread_cancel \- send a cancelation request to a thread
.SH LIBRARY
@@ -61,7 +61,7 @@ When a cancelation requested is acted on, the following steps occur for
.I thread
(in this order):
.IP (1) 5
-Cancellation clean-up handlers are popped
+Cancelation clean-up handlers are popped
(in the reverse of the order in which they were pushed) and called.
(See
.BR pthread_cleanup_push (3).)
@@ -102,28 +102,22 @@ on error, it returns a nonzero error number.
No thread with the ID
.I thread
could be found.
-.\" .SH VERSIONS
-.\" Available since glibc 2.0
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR pthread_cancel ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
-.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008.
-.SH NOTES
+.SH VERSIONS
On Linux, cancelation is implemented using signals.
Under the NPTL threading implementation,
the first real-time signal (i.e., signal 32) is used for this purpose.
@@ -131,6 +125,11 @@ On LinuxThreads, the second real-time signal is used,
if real-time signals are available, otherwise
.B SIGUSR2
is used.
+.SH STANDARDS
+POSIX.1-2008.
+.SH HISTORY
+glibc 2.0
+POSIX.1-2001.
.SH EXAMPLES
The program below creates a thread and then cancels it.
The main thread joins with the canceled thread to check
@@ -156,66 +155,66 @@ main(): thread was canceled
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
-
+\&
#define handle_error_en(en, msg) \e
do { errno = en; perror(msg); exit(EXIT_FAILURE); } while (0)
-
+\&
static void *
thread_func(void *ignored_argument)
{
int s;
-
+\&
/* Disable cancelation for a while, so that we don\[aq]t
immediately react to a cancelation request. */
-
+\&
s = pthread_setcancelstate(PTHREAD_CANCEL_DISABLE, NULL);
if (s != 0)
handle_error_en(s, "pthread_setcancelstate");
-
+\&
printf("%s(): started; cancelation disabled\en", __func__);
sleep(5);
printf("%s(): about to enable cancelation\en", __func__);
-
+\&
s = pthread_setcancelstate(PTHREAD_CANCEL_ENABLE, NULL);
if (s != 0)
handle_error_en(s, "pthread_setcancelstate");
-
+\&
/* sleep() is a cancelation point. */
-
+\&
sleep(1000); /* Should get canceled while we sleep */
-
+\&
/* Should never get here. */
-
+\&
printf("%s(): not canceled!\en", __func__);
return NULL;
}
-
+\&
int
main(void)
{
pthread_t thr;
void *res;
int s;
-
+\&
/* Start a thread and then send it a cancelation request. */
-
+\&
s = pthread_create(&thr, NULL, &thread_func, NULL);
if (s != 0)
handle_error_en(s, "pthread_create");
-
+\&
sleep(2); /* Give thread a chance to get started */
-
+\&
printf("%s(): sending cancelation request\en", __func__);
s = pthread_cancel(thr);
if (s != 0)
handle_error_en(s, "pthread_cancel");
-
+\&
/* Join with thread to see what its exit status was. */
-
+\&
s = pthread_join(thr, &res);
if (s != 0)
handle_error_en(s, "pthread_join");
-
+\&
if (res == PTHREAD_CANCELED)
printf("%s(): thread was canceled\en", __func__);
else
diff --git a/man3/pthread_cleanup_push.3 b/man3/pthread_cleanup_push.3
index 4a0cf32ee..9fcccb388 100644
--- a/man3/pthread_cleanup_push.3
+++ b/man3/pthread_cleanup_push.3
@@ -4,7 +4,7 @@
.\"
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
-.TH pthread_cleanup_push 3 2023-02-05 "Linux man-pages 6.03"
+.TH pthread_cleanup_push 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
pthread_cleanup_push, pthread_cleanup_pop \- push and pop
thread cancelation clean-up handlers
@@ -103,30 +103,24 @@ inside the handler.
These functions do not return a value.
.SH ERRORS
There are no errors.
-.\" SH VERSIONS
-.\" Available since glibc 2.0
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR pthread_cleanup_push (),
.BR pthread_cleanup_pop ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
-.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008.
-.SH NOTES
-On Linux, the
+.SH VERSIONS
+On glibc, the
.BR pthread_cleanup_push ()
and
.BR pthread_cleanup_pop ()
@@ -151,6 +145,11 @@ and
.BR pthread_cleanup_pop ()
is undefined.
Portable applications should avoid doing this.
+.SH STANDARDS
+POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001.
+glibc 2.0.
.SH EXAMPLES
The program below provides a simple example of the use of the functions
described in this page.
@@ -237,32 +236,32 @@ was nonzero.
#include <stdlib.h>
#include <sys/types.h>
#include <unistd.h>
-
+\&
#define handle_error_en(en, msg) \e
do { errno = en; perror(msg); exit(EXIT_FAILURE); } while (0)
-
+\&
static int done = 0;
static int cleanup_pop_arg = 0;
static int cnt = 0;
-
+\&
static void
cleanup_handler(void *arg)
{
printf("Called clean\-up handler\en");
cnt = 0;
}
-
+\&
static void *
thread_start(void *arg)
{
time_t curr;
-
+\&
printf("New thread started\en");
-
+\&
pthread_cleanup_push(cleanup_handler, NULL);
-
+\&
curr = time(NULL);
-
+\&
while (!done) {
pthread_testcancel(); /* A cancelation point */
if (curr < time(NULL)) {
@@ -271,40 +270,40 @@ thread_start(void *arg)
cnt++;
}
}
-
+\&
pthread_cleanup_pop(cleanup_pop_arg);
return NULL;
}
-
+\&
int
main(int argc, char *argv[])
{
pthread_t thr;
int s;
void *res;
-
+\&
s = pthread_create(&thr, NULL, thread_start, NULL);
if (s != 0)
handle_error_en(s, "pthread_create");
-
+\&
sleep(2); /* Allow new thread to run a while */
-
+\&
if (argc > 1) {
if (argc > 2)
cleanup_pop_arg = atoi(argv[2]);
done = 1;
-
+\&
} else {
printf("Canceling thread\en");
s = pthread_cancel(thr);
if (s != 0)
handle_error_en(s, "pthread_cancel");
}
-
+\&
s = pthread_join(thr, &res);
if (s != 0)
handle_error_en(s, "pthread_join");
-
+\&
if (res == PTHREAD_CANCELED)
printf("Thread was canceled; cnt = %d\en", cnt);
else
diff --git a/man3/pthread_cleanup_push_defer_np.3 b/man3/pthread_cleanup_push_defer_np.3
index ee00d4268..d72b3d25e 100644
--- a/man3/pthread_cleanup_push_defer_np.3
+++ b/man3/pthread_cleanup_push_defer_np.3
@@ -3,7 +3,7 @@
.\"
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
-.TH pthread_cleanup_push_defer_np 3 2022-10-30 "Linux man-pages 6.03"
+.TH pthread_cleanup_push_defer_np 3 2023-05-03 "Linux man-pages 6.05.01"
.SH NAME
pthread_cleanup_push_defer_np, pthread_cleanup_pop_restore_np \- push and pop
thread cancelation clean-up handlers while saving cancelability type
@@ -79,7 +79,7 @@ is equivalent to (but shorter and more efficient than):
.in +4n
.EX
int oldtype;
-
+\&
pthread_cleanup_push(routine, arg);
pthread_setcanceltype(PTHREAD_CANCEL_DEFERRED, &oldtype);
\&...
@@ -87,11 +87,11 @@ pthread_setcanceltype(oldtype, NULL);
pthread_cleanup_pop(execute);
.EE
.in
-.\" SH VERSIONS
-.\" Available since glibc 2.0
.SH STANDARDS
-These functions are nonstandard GNU extensions;
+GNU;
hence the suffix "_np" (nonportable) in the names.
+.SH HISTORY
+glibc 2.0
.SH SEE ALSO
.BR pthread_cancel (3),
.BR pthread_cleanup_push (3),
diff --git a/man3/pthread_create.3 b/man3/pthread_create.3
index f661c11ad..268bfa06b 100644
--- a/man3/pthread_create.3
+++ b/man3/pthread_create.3
@@ -4,7 +4,7 @@
.\"
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
-.TH pthread_create 3 2023-02-05 "Linux man-pages 6.03"
+.TH pthread_create 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
pthread_create \- create a new thread
.SH LIBRARY
@@ -137,22 +137,22 @@ No permission to set the scheduling policy and parameters specified in
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR pthread_create ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008.
+POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001.
.SH NOTES
See
.BR pthread_self (3)
@@ -274,41 +274,41 @@ Joined with thread 3; returned value was SERVUS
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
-
+\&
#define handle_error_en(en, msg) \e
do { errno = en; perror(msg); exit(EXIT_FAILURE); } while (0)
-
+\&
#define handle_error(msg) \e
do { perror(msg); exit(EXIT_FAILURE); } while (0)
-
+\&
struct thread_info { /* Used as argument to thread_start() */
pthread_t thread_id; /* ID returned by pthread_create() */
int thread_num; /* Application\-defined thread # */
char *argv_string; /* From command\-line argument */
};
-
+\&
/* Thread start function: display address near top of our stack,
and return upper\-cased copy of argv_string. */
-
+\&
static void *
thread_start(void *arg)
{
struct thread_info *tinfo = arg;
char *uargv;
-
+\&
printf("Thread %d: top of stack near %p; argv_string=%s\en",
tinfo\->thread_num, (void *) &tinfo, tinfo\->argv_string);
-
+\&
uargv = strdup(tinfo\->argv_string);
if (uargv == NULL)
handle_error("strdup");
-
+\&
for (char *p = uargv; *p != \[aq]\e0\[aq]; p++)
*p = toupper(*p);
-
+\&
return uargv;
}
-
+\&
int
main(int argc, char *argv[])
{
@@ -318,77 +318,77 @@ main(int argc, char *argv[])
ssize_t stack_size;
pthread_attr_t attr;
struct thread_info *tinfo;
-
+\&
/* The "\-s" option specifies a stack size for our threads. */
-
+\&
stack_size = \-1;
while ((opt = getopt(argc, argv, "s:")) != \-1) {
switch (opt) {
case \[aq]s\[aq]:
stack_size = strtoul(optarg, NULL, 0);
break;
-
+\&
default:
fprintf(stderr, "Usage: %s [\-s stack\-size] arg...\en",
argv[0]);
exit(EXIT_FAILURE);
}
}
-
+\&
num_threads = argc \- optind;
-
+\&
/* Initialize thread creation attributes. */
-
+\&
s = pthread_attr_init(&attr);
if (s != 0)
handle_error_en(s, "pthread_attr_init");
-
+\&
if (stack_size > 0) {
s = pthread_attr_setstacksize(&attr, stack_size);
if (s != 0)
handle_error_en(s, "pthread_attr_setstacksize");
}
-
+\&
/* Allocate memory for pthread_create() arguments. */
-
+\&
tinfo = calloc(num_threads, sizeof(*tinfo));
if (tinfo == NULL)
handle_error("calloc");
-
+\&
/* Create one thread for each command\-line argument. */
-
+\&
for (size_t tnum = 0; tnum < num_threads; tnum++) {
tinfo[tnum].thread_num = tnum + 1;
tinfo[tnum].argv_string = argv[optind + tnum];
-
+\&
/* The pthread_create() call stores the thread ID into
corresponding element of tinfo[]. */
-
+\&
s = pthread_create(&tinfo[tnum].thread_id, &attr,
&thread_start, &tinfo[tnum]);
if (s != 0)
handle_error_en(s, "pthread_create");
}
-
+\&
/* Destroy the thread attributes object, since it is no
longer needed. */
-
+\&
s = pthread_attr_destroy(&attr);
if (s != 0)
handle_error_en(s, "pthread_attr_destroy");
-
+\&
/* Now join with each thread, and display its returned value. */
-
+\&
for (size_t tnum = 0; tnum < num_threads; tnum++) {
s = pthread_join(tinfo[tnum].thread_id, &res);
if (s != 0)
handle_error_en(s, "pthread_join");
-
+\&
printf("Joined with thread %d; returned value was %s\en",
tinfo[tnum].thread_num, (char *) res);
free(res); /* Free memory allocated by thread */
}
-
+\&
free(tinfo);
exit(EXIT_SUCCESS);
}
diff --git a/man3/pthread_detach.3 b/man3/pthread_detach.3
index 4a93fc00d..aba9f05fe 100644
--- a/man3/pthread_detach.3
+++ b/man3/pthread_detach.3
@@ -4,7 +4,7 @@
.\"
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
-.TH pthread_detach 3 2022-12-15 "Linux man-pages 6.03"
+.TH pthread_detach 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
pthread_detach \- detach a thread
.SH LIBRARY
@@ -46,22 +46,22 @@ could be found.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR pthread_detach ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008.
+POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001.
.SH NOTES
Once a thread has been detached, it can't be joined with
.BR pthread_join (3)
diff --git a/man3/pthread_equal.3 b/man3/pthread_equal.3
index e7cc0a5d8..976e27319 100644
--- a/man3/pthread_equal.3
+++ b/man3/pthread_equal.3
@@ -4,7 +4,7 @@
.\"
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
-.TH pthread_equal 3 2022-12-15 "Linux man-pages 6.03"
+.TH pthread_equal 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
pthread_equal \- compare thread IDs
.SH LIBRARY
@@ -29,22 +29,22 @@ This function always succeeds.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR pthread_equal ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008.
+POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001.
.SH NOTES
The
.BR pthread_equal ()
diff --git a/man3/pthread_exit.3 b/man3/pthread_exit.3
index c7ed85b3d..4f317a9c7 100644
--- a/man3/pthread_exit.3
+++ b/man3/pthread_exit.3
@@ -4,7 +4,7 @@
.\"
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
-.TH pthread_exit 3 2022-12-15 "Linux man-pages 6.03"
+.TH pthread_exit 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
pthread_exit \- terminate calling thread
.SH LIBRARY
@@ -57,22 +57,22 @@ This function always succeeds.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR pthread_exit ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008.
+POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001.
.SH NOTES
Performing a return from the start function of any thread other
than the main thread results in an implicit call to
diff --git a/man3/pthread_getattr_default_np.3 b/man3/pthread_getattr_default_np.3
index e96d87008..a88961afe 100644
--- a/man3/pthread_getattr_default_np.3
+++ b/man3/pthread_getattr_default_np.3
@@ -3,7 +3,7 @@
.\"
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
-.TH pthread_getattr_default_np 3 2023-02-05 "Linux man-pages 6.03"
+.TH pthread_getattr_default_np 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
pthread_getattr_default_np, pthread_setattr_default_np, \-
get or set default thread-creation attributes
@@ -58,29 +58,27 @@ is invalid, or the stack address attribute is set in
.\" Can happen (but unlikely) while trying to allocate memory for cpuset
.RB ( pthread_setattr_default_np ())
Insufficient memory.
-.SH VERSIONS
-These functions are available since glibc 2.18.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR pthread_getattr_default_np (),
.BR pthread_setattr_default_np ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-These functions are nonstandard GNU extensions;
+GNU;
hence the suffix "_np" (nonportable) in their names.
+.SH HISTORY
+glibc 2.18.
.SH EXAMPLES
The program below uses
.BR pthread_getattr_default_np ()
@@ -109,7 +107,7 @@ Inherit scheduler: INHERIT
#include <pthread.h>
#include <stdio.h>
#include <stdlib.h>
-
+\&
static void
display_pthread_attr(pthread_attr_t *attr)
{
@@ -120,17 +118,17 @@ display_pthread_attr(pthread_attr_t *attr)
struct sched_param schedparam;
int detachstate;
int inheritsched;
-
+\&
s = pthread_attr_getstacksize(attr, &stacksize);
if (s != 0)
errc(EXIT_FAILURE, s, "pthread_attr_getstacksize");
printf("Stack size: %zd\en", stacksize);
-
+\&
s = pthread_attr_getguardsize(attr, &guardsize);
if (s != 0)
errc(EXIT_FAILURE, s, "pthread_attr_getguardsize");
printf("Guard size: %zd\en", guardsize);
-
+\&
s = pthread_attr_getschedpolicy(attr, &policy);
if (s != 0)
errc(EXIT_FAILURE, s, "pthread_attr_getschedpolicy");
@@ -138,12 +136,12 @@ display_pthread_attr(pthread_attr_t *attr)
(policy == SCHED_FIFO) ? "SCHED_FIFO" :
(policy == SCHED_RR) ? "SCHED_RR" :
(policy == SCHED_OTHER) ? "SCHED_OTHER" : "[unknown]");
-
+\&
s = pthread_attr_getschedparam(attr, &schedparam);
if (s != 0)
errc(EXIT_FAILURE, s, "pthread_attr_getschedparam");
printf("Scheduling priority: %d\en", schedparam.sched_priority);
-
+\&
s = pthread_attr_getdetachstate(attr, &detachstate);
if (s != 0)
errc(EXIT_FAILURE, s, "pthread_attr_getdetachstate");
@@ -151,7 +149,7 @@ display_pthread_attr(pthread_attr_t *attr)
(detachstate == PTHREAD_CREATE_DETACHED) ? "DETACHED" :
(detachstate == PTHREAD_CREATE_JOINABLE) ? "JOINABLE" :
"???");
-
+\&
s = pthread_attr_getinheritsched(attr, &inheritsched);
if (s != 0)
errc(EXIT_FAILURE, s, "pthread_attr_getinheritsched");
@@ -160,19 +158,19 @@ display_pthread_attr(pthread_attr_t *attr)
(inheritsched == PTHREAD_EXPLICIT_SCHED) ? "EXPLICIT" :
"???");
}
-
+\&
int
main(void)
{
int s;
pthread_attr_t attr;
-
+\&
s = pthread_getattr_default_np(&attr);
if (s != 0)
errc(EXIT_FAILURE, s, "pthread_getattr_default_np");
-
+\&
display_pthread_attr(&attr);
-
+\&
exit(EXIT_SUCCESS);
}
.EE
diff --git a/man3/pthread_getattr_np.3 b/man3/pthread_getattr_np.3
index df8d2a67c..be1fb1965 100644
--- a/man3/pthread_getattr_np.3
+++ b/man3/pthread_getattr_np.3
@@ -4,7 +4,7 @@
.\"
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
-.TH pthread_getattr_np 3 2023-02-05 "Linux man-pages 6.03"
+.TH pthread_getattr_np 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
pthread_getattr_np \- get attributes of created thread
.SH LIBRARY
@@ -75,28 +75,26 @@ and
if the
.B RLIMIT_STACK
resource limit is not supported.
-.SH VERSIONS
-This function is available since glibc 2.2.3.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR pthread_getattr_np ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-This function is a nonstandard GNU extension;
+GNU;
hence the suffix "_np" (nonportable) in the name.
+.SH HISTORY
+glibc 2.2.3.
.SH EXAMPLES
The program below demonstrates the use of
.BR pthread_getattr_np ().
@@ -134,7 +132,7 @@ Thread attributes object after initializations:
Guard size = 4097 bytes
Stack address = (nil)
Stack size = 0x0 (0) bytes
-
+\&
Attributes of created thread:
Guard size = 8192 bytes
Stack address = 0x40196000 (EOS = 0x40397000)
@@ -163,12 +161,12 @@ In this case, the guard size attribute is ignored.
.EX
.RB "$" " ./a.out \-g 4096 \-s 0x8000 \-a"
Allocated thread stack at 0x804d000
-
+\&
Thread attributes object after initializations:
Guard size = 4096 bytes
Stack address = 0x804d000 (EOS = 0x8055000)
Stack size = 0x8000 (32768) bytes
-
+\&
Attributes of created thread:
Guard size = 0 bytes
Stack address = 0x804d000 (EOS = 0x8055000)
@@ -186,19 +184,19 @@ Attributes of created thread:
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
-
+\&
static void
display_stack_related_attributes(pthread_attr_t *attr, char *prefix)
{
int s;
size_t stack_size, guard_size;
void *stack_addr;
-
+\&
s = pthread_attr_getguardsize(attr, &guard_size);
if (s != 0)
errc(EXIT_FAILURE, s, "pthread_attr_getguardsize");
printf("%sGuard size = %zu bytes\en", prefix, guard_size);
-
+\&
s = pthread_attr_getstack(attr, &stack_addr, &stack_size);
if (s != 0)
errc(EXIT_FAILURE, s, "pthread_attr_getstack");
@@ -209,33 +207,33 @@ display_stack_related_attributes(pthread_attr_t *attr, char *prefix)
printf("%sStack size = %#zx (%zu) bytes\en",
prefix, stack_size, stack_size);
}
-
+\&
static void
display_thread_attributes(pthread_t thread, char *prefix)
{
int s;
pthread_attr_t attr;
-
+\&
s = pthread_getattr_np(thread, &attr);
if (s != 0)
errc(EXIT_FAILURE, s, "pthread_getattr_np");
-
+\&
display_stack_related_attributes(&attr, prefix);
-
+\&
s = pthread_attr_destroy(&attr);
if (s != 0)
errc(EXIT_FAILURE, s, "pthread_attr_destroy");
}
-
+\&
static void * /* Start function for thread we create */
thread_start(void *arg)
{
printf("Attributes of created thread:\en");
display_thread_attributes(pthread_self(), "\et");
-
+\&
exit(EXIT_SUCCESS); /* Terminate all threads */
}
-
+\&
static void
usage(char *pname, char *msg)
{
@@ -246,7 +244,7 @@ usage(char *pname, char *msg)
fprintf(stderr, "\et\et\-a means program should allocate stack\en");
exit(EXIT_FAILURE);
}
-
+\&
static pthread_attr_t * /* Get thread attributes from command line */
get_thread_attributes_from_cl(int argc, char *argv[],
pthread_attr_t *attrp)
@@ -259,7 +257,7 @@ get_thread_attributes_from_cl(int argc, char *argv[],
allocate_stack = 0;
stack_size = \-1;
guard_size = \-1;
-
+\&
while ((opt = getopt(argc, argv, "ag:s:")) != \-1) {
switch (opt) {
case \[aq]a\[aq]: allocate_stack = 1; break;
@@ -268,21 +266,21 @@ get_thread_attributes_from_cl(int argc, char *argv[],
default: usage(argv[0], NULL);
}
}
-
+\&
if (allocate_stack && stack_size == \-1)
usage(argv[0], "Specifying \-a without \-s makes no sense\en");
-
+\&
if (argc > optind)
usage(argv[0], "Extraneous command\-line arguments\en");
-
+\&
if (stack_size >= 0 || guard_size > 0) {
ret_attrp = attrp;
-
+\&
s = pthread_attr_init(attrp);
if (s != 0)
errc(EXIT_FAILURE, s, "pthread_attr_init");
}
-
+\&
if (stack_size >= 0) {
if (!allocate_stack) {
s = pthread_attr_setstacksize(attrp, stack_size);
@@ -294,22 +292,22 @@ get_thread_attributes_from_cl(int argc, char *argv[],
if (s != 0)
errc(EXIT_FAILURE, s, "posix_memalign");
printf("Allocated thread stack at %p\en\en", stack_addr);
-
+\&
s = pthread_attr_setstack(attrp, stack_addr, stack_size);
if (s != 0)
errc(EXIT_FAILURE, s, "pthread_attr_setstacksize");
}
}
-
+\&
if (guard_size >= 0) {
s = pthread_attr_setguardsize(attrp, guard_size);
if (s != 0)
errc(EXIT_FAILURE, s, "pthread_attr_setstacksize");
}
-
+\&
return ret_attrp;
}
-
+\&
int
main(int argc, char *argv[])
{
@@ -318,25 +316,25 @@ main(int argc, char *argv[])
pthread_attr_t attr;
pthread_attr_t *attrp = NULL; /* Set to &attr if we initialize
a thread attributes object */
-
+\&
attrp = get_thread_attributes_from_cl(argc, argv, &attr);
-
+\&
if (attrp != NULL) {
printf("Thread attributes object after initializations:\en");
display_stack_related_attributes(attrp, "\et");
printf("\en");
}
-
+\&
s = pthread_create(&thr, attrp, &thread_start, NULL);
if (s != 0)
errc(EXIT_FAILURE, s, "pthread_create");
-
+\&
if (attrp != NULL) {
s = pthread_attr_destroy(attrp);
if (s != 0)
errc(EXIT_FAILURE, s, "pthread_attr_destroy");
}
-
+\&
pause(); /* Terminates when other thread calls exit() */
}
.EE
diff --git a/man3/pthread_getcpuclockid.3 b/man3/pthread_getcpuclockid.3
index 8c11a301c..127d662f0 100644
--- a/man3/pthread_getcpuclockid.3
+++ b/man3/pthread_getcpuclockid.3
@@ -4,7 +4,7 @@
.\"
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
-.TH pthread_getcpuclockid 3 2022-12-15 "Linux man-pages 6.03"
+.TH pthread_getcpuclockid 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
pthread_getcpuclockid \- retrieve ID of a thread's CPU time clock
.SH LIBRARY
@@ -45,27 +45,26 @@ Per-thread CPU time clocks are not supported by the system.
No thread with the ID
.I thread
could be found.
-.SH VERSIONS
-This function is available since glibc 2.2.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR pthread_getcpuclockid ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008.
+POSIX.1-2008.
+.SH HISTORY
+glibc 2.2.
+POSIX.1-2001.
.SH NOTES
When
.I thread
@@ -100,7 +99,7 @@ Subthread CPU time: 0.992
.\" SRC BEGIN (pthread_getcpuclockid.c)
.EX
/* Link with "\-lrt" */
-
+\&
#include <errno.h>
#include <pthread.h>
#include <stdint.h>
@@ -109,13 +108,13 @@ Subthread CPU time: 0.992
#include <string.h>
#include <time.h>
#include <unistd.h>
-
+\&
#define handle_error(msg) \e
do { perror(msg); exit(EXIT_FAILURE); } while (0)
-
+\&
#define handle_error_en(en, msg) \e
do { errno = en; perror(msg); exit(EXIT_FAILURE); } while (0)
-
+\&
static void *
thread_start(void *arg)
{
@@ -123,51 +122,51 @@ thread_start(void *arg)
for (;;)
continue;
}
-
+\&
static void
pclock(char *msg, clockid_t cid)
{
struct timespec ts;
-
+\&
printf("%s", msg);
if (clock_gettime(cid, &ts) == \-1)
handle_error("clock_gettime");
printf("%4jd.%03ld\en", (intmax_t) ts.tv_sec, ts.tv_nsec / 1000000);
}
-
+\&
int
main(void)
{
pthread_t thread;
clockid_t cid;
int s;
-
+\&
s = pthread_create(&thread, NULL, thread_start, NULL);
if (s != 0)
handle_error_en(s, "pthread_create");
-
+\&
printf("Main thread sleeping\en");
sleep(1);
-
+\&
printf("Main thread consuming some CPU time...\en");
for (unsigned int j = 0; j < 2000000; j++)
getppid();
-
+\&
pclock("Process total CPU time: ", CLOCK_PROCESS_CPUTIME_ID);
-
+\&
s = pthread_getcpuclockid(pthread_self(), &cid);
if (s != 0)
handle_error_en(s, "pthread_getcpuclockid");
pclock("Main thread CPU time: ", cid);
-
+\&
/* The preceding 4 lines of code could have been replaced by:
pclock("Main thread CPU time: ", CLOCK_THREAD_CPUTIME_ID); */
-
+\&
s = pthread_getcpuclockid(thread, &cid);
if (s != 0)
handle_error_en(s, "pthread_getcpuclockid");
pclock("Subthread CPU time: 1 ", cid);
-
+\&
exit(EXIT_SUCCESS); /* Terminates both threads */
}
.EE
diff --git a/man3/pthread_join.3 b/man3/pthread_join.3
index 31464db89..9284d857f 100644
--- a/man3/pthread_join.3
+++ b/man3/pthread_join.3
@@ -4,7 +4,7 @@
.\"
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
-.TH pthread_join 3 2022-12-15 "Linux man-pages 6.03"
+.TH pthread_join 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
pthread_join \- join with a terminated thread
.SH LIBRARY
@@ -80,22 +80,22 @@ could be found.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR pthread_join ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008.
+POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001.
.SH NOTES
After a successful call to
.BR pthread_join (),
diff --git a/man3/pthread_kill.3 b/man3/pthread_kill.3
index 5b0533f64..0501c4fad 100644
--- a/man3/pthread_kill.3
+++ b/man3/pthread_kill.3
@@ -4,7 +4,7 @@
.\"
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
-.TH pthread_kill 3 2022-12-15 "Linux man-pages 6.03"
+.TH pthread_kill 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
pthread_kill \- send a signal to a thread
.SH LIBRARY
@@ -52,30 +52,19 @@ An invalid signal was specified.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR pthread_kill ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
-.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008.
-.SH NOTES
-Signal dispositions are process-wide:
-if a signal handler is installed,
-the handler will be invoked in the thread
-.IR thread ,
-but if the disposition of the signal is "stop", "continue", or "terminate",
-this action will affect the whole process.
-.PP
+.SH VERSIONS
The glibc implementation of
.BR pthread_kill ()
gives an error
@@ -98,6 +87,17 @@ lifetime has ended produces undefined behavior,
and an attempt to use an invalid thread ID in a call to
.BR pthread_kill ()
can, for example, cause a segmentation fault.
+.SH STANDARDS
+POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001.
+.SH NOTES
+Signal dispositions are process-wide:
+if a signal handler is installed,
+the handler will be invoked in the thread
+.IR thread ,
+but if the disposition of the signal is "stop", "continue", or "terminate",
+this action will affect the whole process.
.SH SEE ALSO
.BR kill (2),
.BR sigaction (2),
diff --git a/man3/pthread_kill_other_threads_np.3 b/man3/pthread_kill_other_threads_np.3
index 476e13d4c..aec544dd4 100644
--- a/man3/pthread_kill_other_threads_np.3
+++ b/man3/pthread_kill_other_threads_np.3
@@ -4,7 +4,7 @@
.\"
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
-.TH pthread_kill_other_threads_np 3 2022-12-15 "Linux man-pages 6.03"
+.TH pthread_kill_other_threads_np 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
pthread_kill_other_threads_np \- terminate all other threads in process
.SH LIBRARY
@@ -26,28 +26,33 @@ except the calling thread.
The cancelation state and cancelation type of the
to-be-terminated threads are ignored,
and the cleanup handlers are not called in those threads.
-.\" .SH VERSIONS
-.\" Available since glibc 2.0
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR pthread_kill_other_threads_np ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
+.SH VERSIONS
+In the NPTL threading implementation,
+.BR pthread_kill_other_threads_np ()
+exists, but does nothing.
+(Nothing needs to be done,
+because the implementation does the right thing during an
+.BR execve (2).)
.SH STANDARDS
-This function is a nonstandard GNU extension;
+GNU;
hence the suffix "_np" (nonportable) in the name.
+.SH HISTORY
+glibc 2.0
.SH NOTES
.BR pthread_kill_other_threads_np ()
is intended to be called just before a thread calls
@@ -57,13 +62,6 @@ This function is designed to address a limitation in the obsolete
LinuxThreads implementation whereby the other threads of an application
are not automatically terminated (as POSIX.1-2001 requires) during
.BR execve (2).
-.PP
-In the NPTL threading implementation,
-.BR pthread_kill_other_threads_np ()
-exists, but does nothing.
-(Nothing needs to be done,
-because the implementation does the right thing during an
-.BR execve (2).)
.SH SEE ALSO
.BR execve (2),
.BR pthread_cancel (3),
diff --git a/man3/pthread_mutex_consistent.3 b/man3/pthread_mutex_consistent.3
index 9fe3f8939..0f9cda3a7 100644
--- a/man3/pthread_mutex_consistent.3
+++ b/man3/pthread_mutex_consistent.3
@@ -3,7 +3,7 @@
.\"
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
-.TH pthread_mutex_consistent 3 2022-12-04 "Linux man-pages 6.03"
+.TH pthread_mutex_consistent 3 2023-03-30 "Linux man-pages 6.05.01"
.SH NAME
pthread_mutex_consistent \- make a robust mutex consistent
.SH LIBRARY
@@ -44,19 +44,11 @@ it returns a positive error number to indicate the error.
.TP
.B EINVAL
The mutex is either not robust or is not in an inconsistent state.
-.SH VERSIONS
-.BR pthread_mutex_consistent ()
-was added in glibc 2.12.
.SH STANDARDS
POSIX.1-2008.
-.SH NOTES
-.BR pthread_mutex_consistent ()
-simply informs the implementation that the state (shared data)
-guarded by the mutex has been restored to a consistent state and that
-normal operations can now be performed with the mutex.
-It is the application's responsibility to ensure that the
-shared data has been restored to a consistent state before calling
-.BR pthread_mutex_consistent ().
+.SH HISTORY
+glibc 2.12.
+POSIX.1-2008.
.PP
Before the addition of
.BR pthread_mutex_consistent ()
@@ -73,6 +65,14 @@ was defined:
This GNU-specific API, which first appeared in glibc 2.4,
is nowadays obsolete and should not be used in new programs;
since glibc 2.34 it has been marked as deprecated.
+.SH NOTES
+.BR pthread_mutex_consistent ()
+simply informs the implementation that the state (shared data)
+guarded by the mutex has been restored to a consistent state and that
+normal operations can now be performed with the mutex.
+It is the application's responsibility to ensure that the
+shared data has been restored to a consistent state before calling
+.BR pthread_mutex_consistent ().
.SH EXAMPLES
See
.BR pthread_mutexattr_setrobust (3).
diff --git a/man3/pthread_mutexattr_getpshared.3 b/man3/pthread_mutexattr_getpshared.3
index 7f44bb9e6..b2abac111 100644
--- a/man3/pthread_mutexattr_getpshared.3
+++ b/man3/pthread_mutexattr_getpshared.3
@@ -2,7 +2,7 @@
.\"
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
-.TH pthread_mutexattr_getpshared 3 2022-10-30 "Linux man-pages 6.03"
+.TH pthread_mutexattr_getpshared 3 2023-03-30 "Linux man-pages 6.05.01"
.SH NAME
pthread_mutexattr_getpshared, pthread_mutexattr_setpshared \- get/set
process-shared mutex attribute
@@ -72,7 +72,9 @@ is invalid.
.B PTHREAD_PROCESS_SHARED
but the implementation does not support process-shared mutexes.
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008.
+POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001.
.SH SEE ALSO
.ad l
.nh
diff --git a/man3/pthread_mutexattr_init.3 b/man3/pthread_mutexattr_init.3
index 2ccd65e98..55d2530cd 100644
--- a/man3/pthread_mutexattr_init.3
+++ b/man3/pthread_mutexattr_init.3
@@ -2,7 +2,7 @@
.\"
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
-.TH pthread_mutexattr_init 3 2022-10-30 "Linux man-pages 6.03"
+.TH pthread_mutexattr_init 3 2023-03-30 "Linux man-pages 6.05.01"
.SH NAME
pthread_mutexattr_init, pthread_mutexattr_destroy \- initialize and
destroy a mutex attributes object
@@ -38,7 +38,9 @@ object are undefined.
On success, these functions return 0.
On error, they return a positive error number.
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008.
+POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001.
.SH NOTES
Subsequent changes to a mutex attributes object do not affect mutex that
have already been initialized using that object.
diff --git a/man3/pthread_mutexattr_setrobust.3 b/man3/pthread_mutexattr_setrobust.3
index 73291a81f..3612e15f5 100644
--- a/man3/pthread_mutexattr_setrobust.3
+++ b/man3/pthread_mutexattr_setrobust.3
@@ -3,7 +3,7 @@
.\"
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
-.TH pthread_mutexattr_setrobust 3 2022-12-04 "Linux man-pages 6.03"
+.TH pthread_mutexattr_setrobust 3 2023-05-03 "Linux man-pages 6.05.01"
.SH NAME
pthread_mutexattr_getrobust, pthread_mutexattr_setrobust
\- get and set the robustness attribute of a mutex attributes object
@@ -121,13 +121,6 @@ or
was passed to
.BR pthread_mutexattr_setrobust ().
.SH VERSIONS
-.BR pthread_mutexattr_getrobust ()
-and
-.BR pthread_mutexattr_setrobust ()
-were added in glibc 2.12.
-.SH STANDARDS
-POSIX.1-2008.
-.SH NOTES
In the Linux implementation,
when using process-shared robust mutexes, a waiting thread also receives the
.B EOWNERDEAD
@@ -138,6 +131,11 @@ POSIX.1 does not specify this detail,
but the same behavior also occurs in at least some
.\" E.g., Solaris, according to its manual page
other implementations.
+.SH STANDARDS
+POSIX.1-2008.
+.SH HISTORY
+glibc 2.12.
+POSIX.1-2008.
.PP
Before the addition of
.BR pthread_mutexattr_getrobust ()
@@ -197,12 +195,12 @@ $ \fB./a.out\fP
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
-
+\&
#define handle_error_en(en, msg) \e
do { errno = en; perror(msg); exit(EXIT_FAILURE); } while (0)
-
+\&
static pthread_mutex_t mtx;
-
+\&
static void *
original_owner_thread(void *ptr)
{
@@ -211,26 +209,26 @@ original_owner_thread(void *ptr)
printf("[original owner] Locked. Now exiting without unlocking.\en");
pthread_exit(NULL);
}
-
+\&
int
main(void)
{
pthread_t thr;
pthread_mutexattr_t attr;
int s;
-
+\&
pthread_mutexattr_init(&attr);
-
+\&
pthread_mutexattr_setrobust(&attr, PTHREAD_MUTEX_ROBUST);
-
+\&
pthread_mutex_init(&mtx, &attr);
-
+\&
pthread_create(&thr, NULL, original_owner_thread, NULL);
-
+\&
sleep(2);
-
+\&
/* "original_owner_thread" should have exited by now. */
-
+\&
printf("[main] Attempting to lock the robust mutex.\en");
s = pthread_mutex_lock(&mtx);
if (s == EOWNERDEAD) {
@@ -243,7 +241,7 @@ main(void)
s = pthread_mutex_unlock(&mtx);
if (s != 0)
handle_error_en(s, "pthread_mutex_unlock");
-
+\&
exit(EXIT_SUCCESS);
} else if (s == 0) {
printf("[main] pthread_mutex_lock() unexpectedly succeeded\en");
diff --git a/man3/pthread_rwlockattr_setkind_np.3 b/man3/pthread_rwlockattr_setkind_np.3
index 0a429ff9b..d068119db 100644
--- a/man3/pthread_rwlockattr_setkind_np.3
+++ b/man3/pthread_rwlockattr_setkind_np.3
@@ -2,7 +2,7 @@
.\"
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
-.TH pthread_rwlockattr_setkind_np 3 2022-10-30 "Linux man-pages 6.03"
+.TH pthread_rwlockattr_setkind_np 3 2023-03-30 "Linux man-pages 6.05.01"
.SH NAME
pthread_rwlockattr_setkind_np, pthread_rwlockattr_getkind_np \- set/get
the read-write lock kind of the thread read-write lock attribute object
@@ -110,14 +110,10 @@ returns a nonzero error number.
.B EINVAL
.I pref
specifies an unsupported value.
-.SH VERSIONS
-The
-.BR pthread_rwlockattr_getkind_np ()
-and
-.BR pthread_rwlockattr_setkind_np ()
-functions first appeared in glibc 2.1.
.SH STANDARDS
-These functions are non-standard GNU extensions;
+GNU;
hence the suffix "_np" (nonportable) in the names.
+.SH HISTORY
+glibc 2.1.
.SH SEE ALSO
.BR pthreads (7)
diff --git a/man3/pthread_self.3 b/man3/pthread_self.3
index 1ca2a0932..6c2d58e52 100644
--- a/man3/pthread_self.3
+++ b/man3/pthread_self.3
@@ -4,7 +4,7 @@
.\"
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
-.TH pthread_self 3 2022-12-15 "Linux man-pages 6.03"
+.TH pthread_self 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
pthread_self \- obtain ID of the calling thread
.SH LIBRARY
@@ -32,22 +32,22 @@ This function always succeeds.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR pthread_self ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008.
+POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001.
.SH NOTES
POSIX.1 allows an implementation wide freedom in choosing
the type used to represent a thread ID;
diff --git a/man3/pthread_setaffinity_np.3 b/man3/pthread_setaffinity_np.3
index a85a56e63..112317ded 100644
--- a/man3/pthread_setaffinity_np.3
+++ b/man3/pthread_setaffinity_np.3
@@ -4,7 +4,7 @@
.\"
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
-.TH pthread_setaffinity_np 3 2022-12-15 "Linux man-pages 6.03"
+.TH pthread_setaffinity_np 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
pthread_setaffinity_np, pthread_getaffinity_np \- set/get
CPU affinity of a thread
@@ -94,29 +94,34 @@ is smaller than the size of the affinity mask used by the kernel.
No thread with the ID
.I thread
could be found.
-.SH VERSIONS
-These functions are provided since glibc 2.3.4.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR pthread_setaffinity_np (),
.BR pthread_getaffinity_np ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-These functions are nonstandard GNU extensions;
+GNU;
hence the suffix "_np" (nonportable) in the names.
+.SH HISTORY
+glibc 2.3.4.
+.PP
+In glibc 2.3.3 only,
+versions of these functions were provided that did not have a
+.I cpusetsize
+argument.
+Instead the CPU set size given to the underlying system calls was always
+.IR sizeof(cpu_set_t) .
.SH NOTES
After a call to
.BR pthread_setaffinity_np (),
@@ -137,13 +142,6 @@ and
.BR sched_getaffinity (2)
system calls.
.PP
-In glibc 2.3.3 only,
-versions of these functions were provided that did not have a
-.I cpusetsize
-argument.
-Instead the CPU set size given to the underlying system calls was always
-.IR sizeof(cpu_set_t) .
-.PP
A new thread created by
.BR pthread_create (3)
inherits a copy of its creator's CPU affinity mask.
@@ -164,37 +162,37 @@ to check the resulting CPU affinity mask of the thread.
#include <pthread.h>
#include <stdio.h>
#include <stdlib.h>
-
+\&
int
main(void)
{
int s;
cpu_set_t cpuset;
pthread_t thread;
-
+\&
thread = pthread_self();
-
+\&
/* Set affinity mask to include CPUs 0 to 7. */
-
+\&
CPU_ZERO(&cpuset);
for (size_t j = 0; j < 8; j++)
CPU_SET(j, &cpuset);
-
+\&
s = pthread_setaffinity_np(thread, sizeof(cpuset), &cpuset);
if (s != 0)
errc(EXIT_FAILURE, s, "pthread_setaffinity_np");
-
+\&
/* Check the actual affinity mask assigned to the thread. */
-
+\&
s = pthread_getaffinity_np(thread, sizeof(cpuset), &cpuset);
if (s != 0)
errc(EXIT_FAILURE, s, "pthread_getaffinity_np");
-
+\&
printf("Set returned by pthread_getaffinity_np() contained:\en");
for (size_t j = 0; j < CPU_SETSIZE; j++)
if (CPU_ISSET(j, &cpuset))
printf(" CPU %zu\en", j);
-
+\&
exit(EXIT_SUCCESS);
}
.EE
diff --git a/man3/pthread_setcancelstate.3 b/man3/pthread_setcancelstate.3
index ddcdc3dd6..5fd0d27a1 100644
--- a/man3/pthread_setcancelstate.3
+++ b/man3/pthread_setcancelstate.3
@@ -4,7 +4,7 @@
.\"
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
-.TH pthread_setcancelstate 3 2022-12-15 "Linux man-pages 6.03"
+.TH pthread_setcancelstate 3 2023-07-30 "Linux man-pages 6.05.01"
.SH NAME
pthread_setcancelstate, pthread_setcanceltype \-
set cancelability state and type
@@ -95,40 +95,44 @@ can fail with the following error:
.B EINVAL
Invalid value for
.IR type .
-.\" .SH VERSIONS
-.\" Available since glibc 2.0
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR pthread_setcancelstate (),
.BR pthread_setcanceltype ()
T} Thread safety T{
+.na
+.nh
MT-Safe
T}
T{
+.na
+.nh
.BR pthread_setcancelstate (),
.BR pthread_setcanceltype ()
T} Async-cancel safety T{
+.na
+.nh
AC-Safe
T}
.TE
-.hy
-.ad
.sp 1
-.hy
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008.
+POSIX.1-2008.
+.SH HISTORY
+glibc 2.0
+POSIX.1-2001.
.SH NOTES
For details of what happens when a thread is canceled, see
-.BR pthread_cancel (3).
+.BR \%pthread_cancel (3).
.PP
Briefly disabling cancelability is useful
if a thread performs some critical action
diff --git a/man3/pthread_setconcurrency.3 b/man3/pthread_setconcurrency.3
index 59d6ccbb0..642208ff8 100644
--- a/man3/pthread_setconcurrency.3
+++ b/man3/pthread_setconcurrency.3
@@ -3,7 +3,7 @@
.\"
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
-.TH pthread_setconcurrency 3 2022-12-15 "Linux man-pages 6.03"
+.TH pthread_setconcurrency 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
pthread_setconcurrency, pthread_getconcurrency \- set/get
the concurrency level
@@ -60,28 +60,27 @@ POSIX.1 also documents an
error ("the value specified by
.I new_level
would cause a system resource to be exceeded").
-.SH VERSIONS
-These functions are available since glibc 2.1.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR pthread_setconcurrency (),
.BR pthread_getconcurrency ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008.
+POSIX.1-2008.
+.SH HISTORY
+glibc 2.1.
+POSIX.1-2001.
.SH NOTES
The default concurrency level is 0.
.PP
diff --git a/man3/pthread_setname_np.3 b/man3/pthread_setname_np.3
index 92de26913..5d9a711be 100644
--- a/man3/pthread_setname_np.3
+++ b/man3/pthread_setname_np.3
@@ -4,7 +4,7 @@
.\"
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
-.TH pthread_setname_np 3 2023-02-05 "Linux man-pages 6.03"
+.TH pthread_setname_np 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
pthread_setname_np, pthread_getname_np \- set/get the name of a thread
.SH LIBRARY
@@ -28,8 +28,9 @@ The
function can be used to set a unique name for a thread,
which can be useful for debugging
multithreaded applications.
-The thread name is a meaningful C language string, whose length is
-restricted to 16 characters, including the terminating null byte (\[aq]\e0\[aq]).
+The thread name is a meaningful C language string,
+whose length is restricted to 16 characters,
+including the terminating null byte (\[aq]\e0\[aq]).
The
.I thread
argument specifies the thread whose name is to be changed;
@@ -77,32 +78,30 @@ and
is too small to hold the thread name.
.PP
If either of these functions fails to open
-.IR /proc/self/task/[tid]/comm ,
+.IR /proc/self/task/ tid /comm ,
then the call may fail with one of the errors described in
.BR open (2).
-.SH VERSIONS
-These functions were added in glibc 2.12.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR pthread_setname_np (),
.BR pthread_getname_np ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-These functions are nonstandard GNU extensions;
+GNU;
hence the suffix "_np" (nonportable) in the names.
+.SH HISTORY
+glibc 2.12.
.SH NOTES
.BR pthread_setname_np ()
internally writes to the thread-specific
@@ -110,7 +109,7 @@ internally writes to the thread-specific
file under the
.I /proc
filesystem:
-.IR /proc/self/task/[tid]/comm .
+.IR /proc/self/task/ tid /comm .
.BR pthread_getname_np ()
retrieves it from the same location.
.SH EXAMPLES
@@ -150,47 +149,47 @@ THREADFOO
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
-
+\&
#define NAMELEN 16
-
+\&
static void *
threadfunc(void *parm)
{
sleep(5); // allow main program to set the thread name
return NULL;
}
-
+\&
int
main(int argc, char *argv[])
{
pthread_t thread;
int rc;
char thread_name[NAMELEN];
-
+\&
rc = pthread_create(&thread, NULL, threadfunc, NULL);
if (rc != 0)
errc(EXIT_FAILURE, rc, "pthread_create");
-
+\&
rc = pthread_getname_np(thread, thread_name, NAMELEN);
if (rc != 0)
errc(EXIT_FAILURE, rc, "pthread_getname_np");
-
+\&
printf("Created a thread. Default name is: %s\en", thread_name);
rc = pthread_setname_np(thread, (argc > 1) ? argv[1] : "THREADFOO");
if (rc != 0)
errc(EXIT_FAILURE, rc, "pthread_setname_np");
-
+\&
sleep(2);
-
+\&
rc = pthread_getname_np(thread, thread_name, NAMELEN);
if (rc != 0)
errc(EXIT_FAILURE, rc, "pthread_getname_np");
printf("The thread name after setting it is %s.\en", thread_name);
-
+\&
rc = pthread_join(thread, NULL);
if (rc != 0)
errc(EXIT_FAILURE, rc, "pthread_join");
-
+\&
printf("Done\en");
exit(EXIT_SUCCESS);
}
diff --git a/man3/pthread_setschedparam.3 b/man3/pthread_setschedparam.3
index 2eb9bea22..62a5832ae 100644
--- a/man3/pthread_setschedparam.3
+++ b/man3/pthread_setschedparam.3
@@ -4,7 +4,7 @@
.\"
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
-.TH pthread_setschedparam 3 2023-02-05 "Linux man-pages 6.03"
+.TH pthread_setschedparam 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
pthread_setschedparam, pthread_getschedparam \- set/get
scheduling policy and parameters of a thread
@@ -118,28 +118,27 @@ POSIX.1 also documents an
("attempt was made to set the policy or scheduling parameters
to an unsupported value") error for
.BR pthread_setschedparam ().
-.\" .SH VERSIONS
-.\" Available since glibc 2.0
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR pthread_setschedparam (),
.BR pthread_getschedparam ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008.
+POSIX.1-2008.
+.SH HISTORY
+glibc 2.0
+POSIX.1-2001.
.SH NOTES
For a description of the permissions required to, and the effect of,
changing a thread's scheduling policy and priority,
@@ -177,11 +176,11 @@ Password:
# \fB./a.out \-mf10 \-ar20 \-i e\fP
Scheduler settings of main thread
policy=SCHED_FIFO, priority=10
-
+\&
Scheduler settings in \[aq]attr\[aq]
policy=SCHED_RR, priority=20
inheritsched is EXPLICIT
-
+\&
Scheduler attributes of new thread
policy=SCHED_RR, priority=20
.EE
@@ -202,11 +201,11 @@ and instead take their scheduling attributes from the creating thread.
# \fB./a.out \-mf10 \-ar20 \-i i\fP
Scheduler settings of main thread
policy=SCHED_FIFO, priority=10
-
+\&
Scheduler settings in \[aq]attr\[aq]
policy=SCHED_RR, priority=20
inheritsched is INHERIT
-
+\&
Scheduler attributes of new thread
policy=SCHED_FIFO, priority=10
.EE
@@ -226,22 +225,22 @@ is the default for the inherit scheduler attribute.
.\" SRC BEGIN (pthreads_sched_test.c)
.EX
/* pthreads_sched_test.c */
-
+\&
#include <errno.h>
#include <pthread.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
-
+\&
#define handle_error_en(en, msg) \e
do { errno = en; perror(msg); exit(EXIT_FAILURE); } while (0)
-
+\&
static void
usage(char *prog_name, char *msg)
{
if (msg != NULL)
fputs(msg, stderr);
-
+\&
fprintf(stderr, "Usage: %s [options]\en", prog_name);
fprintf(stderr, "Options are:\en");
#define fpe(msg) fprintf(stderr, "\et%s", msg) /* Shorter */
@@ -258,7 +257,7 @@ usage(char *prog_name, char *msg)
fpe(" main thread before pthread_create() call\en");
exit(EXIT_FAILURE);
}
-
+\&
static int
get_policy(char p, int *policy)
{
@@ -269,7 +268,7 @@ get_policy(char p, int *policy)
default: return 0;
}
}
-
+\&
static void
display_sched_attr(int policy, struct sched_param *param)
{
@@ -280,29 +279,29 @@ display_sched_attr(int policy, struct sched_param *param)
"???",
param\->sched_priority);
}
-
+\&
static void
display_thread_sched_attr(char *msg)
{
int policy, s;
struct sched_param param;
-
+\&
s = pthread_getschedparam(pthread_self(), &policy, &param);
if (s != 0)
handle_error_en(s, "pthread_getschedparam");
-
+\&
printf("%s\en", msg);
display_sched_attr(policy, &param);
}
-
+\&
static void *
thread_start(void *arg)
{
display_thread_sched_attr("Scheduler attributes of new thread");
-
+\&
return NULL;
}
-
+\&
int
main(int argc, char *argv[])
{
@@ -312,14 +311,14 @@ main(int argc, char *argv[])
pthread_attr_t *attrp;
char *attr_sched_str, *main_sched_str, *inheritsched_str;
struct sched_param param;
-
+\&
/* Process command\-line options. */
-
+\&
use_null_attrib = 0;
attr_sched_str = NULL;
main_sched_str = NULL;
inheritsched_str = NULL;
-
+\&
while ((opt = getopt(argc, argv, "a:Ai:m:")) != \-1) {
switch (opt) {
case \[aq]a\[aq]: attr_sched_str = optarg; break;
@@ -329,40 +328,40 @@ main(int argc, char *argv[])
default: usage(argv[0], "Unrecognized option\en");
}
}
-
+\&
if (use_null_attrib
&& (inheritsched_str != NULL || attr_sched_str != NULL))
{
usage(argv[0], "Can\[aq]t specify \-A with \-i or \-a\en");
}
-
+\&
/* Optionally set scheduling attributes of main thread,
and display the attributes. */
-
+\&
if (main_sched_str != NULL) {
if (!get_policy(main_sched_str[0], &policy))
usage(argv[0], "Bad policy for main thread (\-m)\en");
param.sched_priority = strtol(&main_sched_str[1], NULL, 0);
-
+\&
s = pthread_setschedparam(pthread_self(), policy, &param);
if (s != 0)
handle_error_en(s, "pthread_setschedparam");
}
-
+\&
display_thread_sched_attr("Scheduler settings of main thread");
printf("\en");
-
+\&
/* Initialize thread attributes object according to options. */
-
+\&
attrp = NULL;
-
+\&
if (!use_null_attrib) {
s = pthread_attr_init(&attr);
if (s != 0)
handle_error_en(s, "pthread_attr_init");
attrp = &attr;
}
-
+\&
if (inheritsched_str != NULL) {
if (inheritsched_str[0] == \[aq]e\[aq])
inheritsched = PTHREAD_EXPLICIT_SCHED;
@@ -370,17 +369,17 @@ main(int argc, char *argv[])
inheritsched = PTHREAD_INHERIT_SCHED;
else
usage(argv[0], "Value for \-i must be \[aq]e\[aq] or \[aq]i\[aq]\en");
-
+\&
s = pthread_attr_setinheritsched(&attr, inheritsched);
if (s != 0)
handle_error_en(s, "pthread_attr_setinheritsched");
}
-
+\&
if (attr_sched_str != NULL) {
if (!get_policy(attr_sched_str[0], &policy))
usage(argv[0], "Bad policy for \[aq]attr\[aq] (\-a)\en");
param.sched_priority = strtol(&attr_sched_str[1], NULL, 0);
-
+\&
s = pthread_attr_setschedpolicy(&attr, policy);
if (s != 0)
handle_error_en(s, "pthread_attr_setschedpolicy");
@@ -388,10 +387,10 @@ main(int argc, char *argv[])
if (s != 0)
handle_error_en(s, "pthread_attr_setschedparam");
}
-
+\&
/* If we initialized a thread attributes object, display
the scheduling attributes that were set in the object. */
-
+\&
if (attrp != NULL) {
s = pthread_attr_getschedparam(&attr, &param);
if (s != 0)
@@ -399,10 +398,10 @@ main(int argc, char *argv[])
s = pthread_attr_getschedpolicy(&attr, &policy);
if (s != 0)
handle_error_en(s, "pthread_attr_getschedpolicy");
-
+\&
printf("Scheduler settings in \[aq]attr\[aq]\en");
display_sched_attr(policy, &param);
-
+\&
pthread_attr_getinheritsched(&attr, &inheritsched);
printf(" inheritsched is %s\en",
(inheritsched == PTHREAD_INHERIT_SCHED) ? "INHERIT" :
@@ -410,25 +409,25 @@ main(int argc, char *argv[])
"???");
printf("\en");
}
-
+\&
/* Create a thread that will display its scheduling attributes. */
-
+\&
s = pthread_create(&thread, attrp, &thread_start, NULL);
if (s != 0)
handle_error_en(s, "pthread_create");
-
+\&
/* Destroy unneeded thread attributes object. */
-
+\&
if (!use_null_attrib) {
s = pthread_attr_destroy(&attr);
if (s != 0)
handle_error_en(s, "pthread_attr_destroy");
}
-
+\&
s = pthread_join(thread, NULL);
if (s != 0)
handle_error_en(s, "pthread_join");
-
+\&
exit(EXIT_SUCCESS);
}
.EE
diff --git a/man3/pthread_setschedprio.3 b/man3/pthread_setschedprio.3
index bd8026450..64bcb5738 100644
--- a/man3/pthread_setschedprio.3
+++ b/man3/pthread_setschedprio.3
@@ -4,7 +4,7 @@
.\"
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
-.TH pthread_setschedprio 3 2022-12-15 "Linux man-pages 6.03"
+.TH pthread_setschedprio 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
pthread_setschedprio \- set scheduling priority of a thread
.SH LIBRARY
@@ -60,27 +60,26 @@ POSIX.1 also documents an
("attempt was made to set the priority
to an unsupported value") error for
.BR pthread_setschedparam (3).
-.SH VERSIONS
-This function is available since glibc 2.3.4.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR pthread_setschedprio ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008.
+POSIX.1-2008.
+.SH HISTORY
+glibc 2.3.4.
+POSIX.1-2001.
.SH NOTES
For a description of the permissions required to, and the effect of,
changing a thread's scheduling priority,
diff --git a/man3/pthread_sigmask.3 b/man3/pthread_sigmask.3
index 26e41b10a..724f1e95f 100644
--- a/man3/pthread_sigmask.3
+++ b/man3/pthread_sigmask.3
@@ -4,7 +4,7 @@
.\"
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
-.TH pthread_sigmask 3 2022-12-15 "Linux man-pages 6.03"
+.TH pthread_sigmask 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
pthread_sigmask \- examine and change mask of blocked signals
.SH LIBRARY
@@ -49,22 +49,22 @@ See
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR pthread_sigmask ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008.
+POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001.
.SH NOTES
A new thread inherits a copy of its creator's signal mask.
.PP
@@ -103,18 +103,18 @@ Signal handling thread got signal 10
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
-
+\&
/* Simple error handling functions */
-
+\&
#define handle_error_en(en, msg) \e
do { errno = en; perror(msg); exit(EXIT_FAILURE); } while (0)
-
+\&
static void *
sig_thread(void *arg)
{
sigset_t *set = arg;
int s, sig;
-
+\&
for (;;) {
s = sigwait(set, &sig);
if (s != 0)
@@ -122,31 +122,31 @@ sig_thread(void *arg)
printf("Signal handling thread got signal %d\en", sig);
}
}
-
+\&
int
main(void)
{
pthread_t thread;
sigset_t set;
int s;
-
+\&
/* Block SIGQUIT and SIGUSR1; other threads created by main()
will inherit a copy of the signal mask. */
-
+\&
sigemptyset(&set);
sigaddset(&set, SIGQUIT);
sigaddset(&set, SIGUSR1);
s = pthread_sigmask(SIG_BLOCK, &set, NULL);
if (s != 0)
handle_error_en(s, "pthread_sigmask");
-
+\&
s = pthread_create(&thread, NULL, &sig_thread, &set);
if (s != 0)
handle_error_en(s, "pthread_create");
-
+\&
/* Main thread carries on to create other threads and/or do
other work. */
-
+\&
pause(); /* Dummy pause so we can test program */
}
.EE
diff --git a/man3/pthread_sigqueue.3 b/man3/pthread_sigqueue.3
index 48ebe0095..587369659 100644
--- a/man3/pthread_sigqueue.3
+++ b/man3/pthread_sigqueue.3
@@ -3,7 +3,7 @@
.\"
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
-.TH pthread_sigqueue 3 2022-12-15 "Linux man-pages 6.03"
+.TH pthread_sigqueue 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
pthread_sigqueue \- queue a signal and data to a thread
.SH LIBRARY
@@ -71,30 +71,22 @@ is not supported on this system.
.B ESRCH
.I thread
is not valid.
-.SH VERSIONS
-The
-.BR pthread_sigqueue ()
-function first appeared in glibc 2.11.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR pthread_sigqueue ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
-.SH STANDARDS
-This function is a GNU extension.
-.SH NOTES
+.SH VERSIONS
The glibc implementation of
.BR pthread_sigqueue ()
gives an error
@@ -104,6 +96,10 @@ used internally by the NPTL threading implementation.
See
.BR nptl (7)
for details.
+.SH STANDARDS
+GNU.
+.SH HISTORY
+glibc 2.11.
.SH SEE ALSO
.BR rt_tgsigqueueinfo (2),
.BR sigaction (2),
diff --git a/man3/pthread_spin_init.3 b/man3/pthread_spin_init.3
index 65e0cf050..87ad2e8f4 100644
--- a/man3/pthread_spin_init.3
+++ b/man3/pthread_spin_init.3
@@ -2,7 +2,7 @@
.\"
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
-.TH pthread_spin_init 3 2022-12-04 "Linux man-pages 6.03"
+.TH pthread_spin_init 3 2023-03-30 "Linux man-pages 6.05.01"
.SH NAME
pthread_spin_init, pthread_spin_destroy \- initialize or destroy a spin lock
.SH LIBRARY
@@ -103,9 +103,10 @@ a new spin lock.
.TP
.B ENOMEM
Insufficient memory to initialize the spin lock.
-.SH VERSIONS
-These functions were added in glibc 2.2.
.SH STANDARDS
+POSIX.1-2008.
+.SH HISTORY
+glibc 2.2.
POSIX.1-2001.
.PP
Support for process-shared spin locks is a POSIX option.
diff --git a/man3/pthread_spin_lock.3 b/man3/pthread_spin_lock.3
index 910bd0b4a..4c9bcf106 100644
--- a/man3/pthread_spin_lock.3
+++ b/man3/pthread_spin_lock.3
@@ -2,7 +2,7 @@
.\"
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
-.TH pthread_spin_lock 3 2022-12-04 "Linux man-pages 6.03"
+.TH pthread_spin_lock 3 2023-03-30 "Linux man-pages 6.05.01"
.SH NAME
pthread_spin_lock, pthread_spin_trylock, pthread_spin_unlock \-
lock and unlock a spin lock
@@ -82,11 +82,12 @@ fails with the following errors:
.TP
.B EBUSY
The spin lock is currently locked by another thread.
-.SH VERSIONS
-These functions were added in glibc 2.2.
.SH STANDARDS
+POSIX.1-2008.
+.SH HISTORY
+glibc 2.2.
POSIX.1-2001.
-.SH NOTES
+.SH CAVEATS
Applying any of the functions described on this page to
an uninitialized spin lock results in undefined behavior.
.PP
diff --git a/man3/pthread_testcancel.3 b/man3/pthread_testcancel.3
index ae362ccf3..9188edebb 100644
--- a/man3/pthread_testcancel.3
+++ b/man3/pthread_testcancel.3
@@ -4,7 +4,7 @@
.\"
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
-.TH pthread_testcancel 3 2022-12-15 "Linux man-pages 6.03"
+.TH pthread_testcancel 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
pthread_testcancel \- request delivery of any pending cancelation request
.SH LIBRARY
@@ -35,27 +35,26 @@ If the calling thread is canceled as a consequence of a call
to this function, then the function does not return.
.SH ERRORS
This function always succeeds.
-.\" SH VERSIONS
-.\" Available since glibc 2.0
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR pthread_testcancel ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008.
+POSIX.1-2008.
+.SH HISTORY
+glibc 2.0.
+POSIX.1-2001.
.SH EXAMPLES
See
.BR pthread_cleanup_push (3).
diff --git a/man3/pthread_tryjoin_np.3 b/man3/pthread_tryjoin_np.3
index adc844cca..1a0643db6 100644
--- a/man3/pthread_tryjoin_np.3
+++ b/man3/pthread_tryjoin_np.3
@@ -4,7 +4,7 @@
.\"
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
-.TH pthread_tryjoin_np 3 2022-12-15 "Linux man-pages 6.03"
+.TH pthread_tryjoin_np 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
pthread_tryjoin_np, pthread_timedjoin_np \- try to join with a
terminated thread
@@ -92,29 +92,27 @@ terminated.
.BR pthread_timedjoin_np ()
never returns the error
.BR EINTR .
-.SH VERSIONS
-These functions were added in glibc 2.3.3.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR pthread_tryjoin_np (),
.BR pthread_timedjoin_np ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-These functions are nonstandard GNU extensions;
+GNU;
hence the suffix "_np" (nonportable) in the names.
+.SH HISTORY
+glibc 2.3.3.
.SH BUGS
The
.BR pthread_timedjoin_np ()
@@ -134,15 +132,15 @@ The following code waits to join for up to 5 seconds:
.EX
struct timespec ts;
int s;
-
+\&
\&...
-
+\&
if (clock_gettime(CLOCK_REALTIME, &ts) == \-1) {
/* Handle error */
}
-
+\&
ts.tv_sec += 5;
-
+\&
s = pthread_timedjoin_np(thread, NULL, &ts);
if (s != 0) {
/* Handle error */
diff --git a/man3/pthread_yield.3 b/man3/pthread_yield.3
index e367aa372..95bb580f4 100644
--- a/man3/pthread_yield.3
+++ b/man3/pthread_yield.3
@@ -3,7 +3,7 @@
.\"
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
-.TH pthread_yield 3 2022-12-15 "Linux man-pages 6.03"
+.TH pthread_yield 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
pthread_yield \- yield the processor
.SH LIBRARY
@@ -35,35 +35,33 @@ on error, it returns an error number.
On Linux, this call always succeeds
(but portable and future-proof applications should nevertheless
handle a possible error return).
-.SH VERSIONS
-Since glibc 2.34, this function is marked as deprecated.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR pthread_yield ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
+.SH VERSIONS
+On Linux, this function is implemented as a call to
+.BR sched_yield (2).
.SH STANDARDS
-This call is nonstandard, but present on several other systems.
+None.
+.SH HISTORY
+.\" BSD, Tru64, AIX, and Irix.
+Deprecated since glibc 2.34.
Use the standardized
.BR sched_yield (2)
instead.
-.\" e.g., the BSDs, Tru64, AIX, and Irix.
.SH NOTES
-On Linux, this function is implemented as a call to
-.BR sched_yield (2).
-.PP
.BR pthread_yield ()
is intended for use with real-time scheduling policies (i.e.,
.B SCHED_FIFO
diff --git a/man3/ptsname.3 b/man3/ptsname.3
index 525563a4e..b57f0570e 100644
--- a/man3/ptsname.3
+++ b/man3/ptsname.3
@@ -5,7 +5,7 @@
.\"
.\" 2004-12-17, mtk, added description of ptsname_r() + ERRORS
.\"
-.TH ptsname 3 2023-02-05 "Linux man-pages 6.03"
+.TH ptsname 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
ptsname, ptsname_r \- get the name of the slave pseudoterminal
.SH LIBRARY
@@ -89,37 +89,39 @@ does not refer to a pseudoterminal master device.
only)
.I buf
is too small.
-.SH VERSIONS
-.BR ptsname ()
-is provided since glibc 2.1.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR ptsname ()
T} Thread safety MT-Unsafe race:ptsname
T{
+.na
+.nh
.BR ptsname_r ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
+.SH VERSIONS
+A version of
+.BR ptsname_r ()
+is documented on Tru64 and HP-UX,
+but on those implementations,
+\-1 is returned on error, with
+.I errno
+set to indicate the error.
+Avoid using this function in portable programs.
.SH STANDARDS
.TP
.BR ptsname ():
-POSIX.1-2001, POSIX.1-2008.
-.PP
-.BR ptsname ()
-is part of the UNIX 98 pseudoterminal support (see
-.BR pts (4)).
+POSIX.1-2008.
.PP
.BR ptsname_r ()
is a Linux extension, that is proposed for inclusion
@@ -127,11 +129,15 @@ is a Linux extension, that is proposed for inclusion
.\" http://austingroupbugs.net/tag_view_page.php?tag_id=8
.\" http://austingroupbugs.net/view.php?id=508
in the next major revision of POSIX.1 (Issue 8).
-A version of this function is documented on Tru64 and HP-UX, but
-on those implementations, \-1 is returned on error, with
-.I errno
-set to indicate the error.
-Avoid using this function in portable programs.
+.SH HISTORY
+.TP
+.BR ptsname ():
+POSIX.1-2001.
+glibc 2.1.
+.PP
+.BR ptsname ()
+is part of the UNIX 98 pseudoterminal support (see
+.BR pts (4)).
.SH SEE ALSO
.BR grantpt (3),
.BR posix_openpt (3),
diff --git a/man3/putenv.3 b/man3/putenv.3
index 9f4db0155..da15b2eff 100644
--- a/man3/putenv.3
+++ b/man3/putenv.3
@@ -14,7 +14,7 @@
.\" Modified Mon Oct 11 11:11:11 1999 by Andries Brouwer (aeb@cwi.nl)
.\" Modified Wed Nov 10 00:02:26 1999 by Andries Brouwer (aeb@cwi.nl)
.\" Modified Sun May 20 22:17:20 2001 by Andries Brouwer (aeb@cwi.nl)
-.TH putenv 3 2023-02-05 "Linux man-pages 6.03"
+.TH putenv 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
putenv \- change or add an environment variable
.SH LIBRARY
@@ -66,23 +66,23 @@ Insufficient space to allocate new environment.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR putenv ()
T} Thread safety MT-Unsafe const:env
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, SVr4, 4.3BSD.
-.SH NOTES
+POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001, SVr2, 4.3BSD-Reno.
+.PP
The
.BR putenv ()
function is not required to be reentrant, and the
@@ -112,12 +112,13 @@ changing it later will change the environment.
with an automatic variable
as the argument, then return from the calling function while \fIstring\fP
is still part of the environment.)
-However, from glibc 2.0 to glibc 2.1.1, it differs:r
+However, from glibc 2.0 to glibc 2.1.1, it differs:
a copy of the string is used.
On the one hand this causes a memory leak, and on the other hand
it violates SUSv2.
.PP
-The 4.4BSD version, like glibc 2.0, uses a copy.
+The 4.3BSD-Reno version, like glibc 2.0, uses a copy;
+this is fixed in all modern BSDs.
.PP
SUSv2 removes the \fIconst\fP from the prototype, and so does glibc 2.1.3.
.PP
diff --git a/man3/putgrent.3 b/man3/putgrent.3
index b2ab436e3..e1b955c4b 100644
--- a/man3/putgrent.3
+++ b/man3/putgrent.3
@@ -3,7 +3,7 @@
.\"
.\" SPDX-License-Identifier: GPL-1.0-or-later
.\"
-.TH putgrent 3 2022-12-15 "Linux man-pages 6.03"
+.TH putgrent 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
putgrent \- write a group database entry to a file
.SH LIBRARY
@@ -47,22 +47,20 @@ The function returns zero on success, and a nonzero value on error.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR putgrent ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-This function is a GNU extension.
+GNU.
.SH SEE ALSO
.BR fgetgrent (3),
.BR getgrent (3),
diff --git a/man3/putpwent.3 b/man3/putpwent.3
index d73e43b57..d1755f81b 100644
--- a/man3/putpwent.3
+++ b/man3/putpwent.3
@@ -8,7 +8,7 @@
.\" Lewine's _POSIX Programmer's Guide_ (O'Reilly & Associates, 1991)
.\" 386BSD man pages
.\" Modified Sat Jul 24 18:43:46 1993 by Rik Faith (faith@cs.unc.edu)
-.TH putpwent 3 2023-02-05 "Linux man-pages 6.03"
+.TH putpwent 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
putpwent \- write a password file entry
.SH LIBRARY
@@ -71,21 +71,21 @@ Invalid (NULL) argument given.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR putpwent ()
T} Thread safety MT-Safe locale
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
+None.
+.SH HISTORY
SVr4.
.SH SEE ALSO
.BR endpwent (3),
diff --git a/man3/puts.3 b/man3/puts.3
index d4d267979..a113df5dc 100644
--- a/man3/puts.3
+++ b/man3/puts.3
@@ -4,7 +4,7 @@
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
.\" Modified Sat Jul 24 18:42:59 1993 by Rik Faith (faith@cs.unc.edu)
-.TH puts 3 2023-02-05 "Linux man-pages 6.03"
+.TH puts 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
fputc, fputs, putc, putchar, puts \- output of characters and strings
.SH LIBRARY
@@ -84,14 +84,14 @@ on error.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR fputc (),
.BR fputs (),
.BR putc (),
@@ -99,11 +99,11 @@ T{
.BR puts ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, C99.
+C11, POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001, C89, C99.
.SH BUGS
It is not advisable to mix calls to output functions from the
.I stdio
diff --git a/man3/putwchar.3 b/man3/putwchar.3
index 57eec985f..e5446812d 100644
--- a/man3/putwchar.3
+++ b/man3/putwchar.3
@@ -10,7 +10,7 @@
.\" http://www.UNIX-systems.org/online.html
.\" ISO/IEC 9899:1999
.\"
-.TH putwchar 3 2022-12-15 "Linux man-pages 6.03"
+.TH putwchar 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
putwchar \- write a wide character to standard output
.SH LIBRARY
@@ -59,22 +59,22 @@ to indicate an error.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR putwchar ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, C99.
+C11, POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001, C99.
.SH NOTES
The behavior of
.BR putwchar ()
diff --git a/man3/qecvt.3 b/man3/qecvt.3
index cbca76aaa..aa19f81ec 100644
--- a/man3/qecvt.3
+++ b/man3/qecvt.3
@@ -6,7 +6,7 @@
.\" This replaces an earlier man page written by Walter Harms
.\" <walter.harms@informatik.uni-oldenburg.de>.
.\"
-.TH qecvt 3 2022-12-15 "Linux man-pages 6.03"
+.TH qecvt 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
qecvt, qfcvt, qgcvt \- convert a floating-point number to a string
.SH LIBRARY
@@ -72,33 +72,34 @@ and
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR qecvt ()
T} Thread safety MT-Unsafe race:qecvt
T{
+.na
+.nh
.BR qfcvt ()
T} Thread safety MT-Unsafe race:qfcvt
T{
+.na
+.nh
.BR qgcvt ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-SVr4.
-Not seen in most common UNIX implementations,
-but occurs in SunOS.
+None.
+.SH HISTORY
+SVr4, SunOS, GNU.
.\" Not supported by libc4 and libc5.
-Supported by glibc.
-.SH NOTES
+.PP
These functions are obsolete.
Instead,
.BR snprintf (3)
diff --git a/man3/qsort.3 b/man3/qsort.3
index e226775b9..09737a220 100644
--- a/man3/qsort.3
+++ b/man3/qsort.3
@@ -15,7 +15,7 @@
.\" and Ben Bacarisse <software@bsb.me.uk>
.\" Document qsort_r()
.\"
-.TH qsort 3 2023-01-07 "Linux man-pages 6.03"
+.TH qsort 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
qsort, qsort_r \- sort an array
.SH LIBRARY
@@ -81,30 +81,33 @@ The
and
.BR qsort_r ()
functions return no value.
-.SH VERSIONS
-.BR qsort_r ()
-was added in glibc 2.8.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR qsort (),
.BR qsort_r ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-.BR qsort ():
-POSIX.1-2001, POSIX.1-2008, C99, SVr4, 4.3BSD.
+.TP
+.BR qsort ()
+C11, POSIX.1-2008.
+.SH HISTORY
+.TP
+.BR qsort ()
+POSIX.1-2001, C89, SVr4, 4.3BSD.
+.TP
+.BR qsort_r ()
+glibc 2.8.
.SH NOTES
To compare C strings, the comparison function can call
.BR strcmp (3),
@@ -121,17 +124,17 @@ which sorts the strings given in its command-line arguments:
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-
+\&
static int
cmpstringp(const void *p1, const void *p2)
{
/* The actual arguments to this function are "pointers to
pointers to char", but strcmp(3) arguments are "pointers
to char", hence the following cast plus dereference. */
-
+\&
return strcmp(*(const char **) p1, *(const char **) p2);
}
-
+\&
int
main(int argc, char *argv[])
{
@@ -139,9 +142,9 @@ main(int argc, char *argv[])
fprintf(stderr, "Usage: %s <string>...\en", argv[0]);
exit(EXIT_FAILURE);
}
-
+\&
qsort(&argv[1], argc \- 1, sizeof(char *), cmpstringp);
-
+\&
for (size_t j = 1; j < argc; j++)
puts(argv[j]);
exit(EXIT_SUCCESS);
diff --git a/man3/raise.3 b/man3/raise.3
index b7a6530fc..49d2d9660 100644
--- a/man3/raise.3
+++ b/man3/raise.3
@@ -7,7 +7,7 @@
.\" Modified Sat Jul 24 18:40:56 1993 by Rik Faith (faith@cs.unc.edu)
.\" Modified 1995 by Mike Battersby (mib@deakin.edu.au)
.\"
-.TH raise 3 2022-12-29 "Linux man-pages 6.03"
+.TH raise 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
raise \- send a signal to the caller
.SH LIBRARY
@@ -48,23 +48,23 @@ returns 0 on success, and nonzero for failure.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR raise ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, C99.
-.SH NOTES
+C11, POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001, C89.
+.PP
Since glibc 2.3.3,
.BR raise ()
is implemented by calling
diff --git a/man3/rand.3 b/man3/rand.3
index d1af5921b..6146ce9fe 100644
--- a/man3/rand.3
+++ b/man3/rand.3
@@ -19,7 +19,7 @@
.\" Modified 2003-11-15, aeb, added rand_r
.\" 2010-09-13, mtk, added example program
.\"
-.TH rand 3 2023-02-05 "Linux man-pages 6.03"
+.TH rand 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
rand, rand_r, srand \- pseudo-random number generator
.SH LIBRARY
@@ -117,35 +117,21 @@ function returns no value.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR rand (),
.BR rand_r (),
.BR srand ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
-.SH STANDARDS
-The functions
-.BR rand ()
-and
-.BR srand ()
-conform to SVr4, 4.3BSD, C99, POSIX.1-2001.
-The function
-.BR rand_r ()
-is from POSIX.1-2001.
-POSIX.1-2008 marks
-.BR rand_r ()
-as obsolete.
-.SH NOTES
+.SH VERSIONS
The versions of
.BR rand ()
and
@@ -164,6 +150,25 @@ when good randomness is needed.
(Use
.BR random (3)
instead.)
+.SH STANDARDS
+.TP
+.BR rand ()
+.TQ
+.BR srand ()
+C11, POSIX.1-2008.
+.TP
+.BR rand_r ()
+POSIX.1-2008.
+.SH HISTORY
+.TP
+.BR rand ()
+.TQ
+.BR srand ()
+SVr4, 4.3BSD, C89, POSIX.1-2001.
+.TP
+.BR rand_r ()
+POSIX.1-2001.
+Obsolete in POSIX.1-2008.
.SH EXAMPLES
POSIX.1-2001 gives the following example of an implementation of
.BR rand ()
@@ -174,13 +179,13 @@ possibly useful when one needs the same sequence on two different machines.
.in +4n
.EX
static unsigned long next = 1;
-
+\&
/* RAND_MAX assumed to be 32767 */
int myrand(void) {
next = next * 1103515245 + 12345;
return((unsigned)(next/65536) % 32768);
}
-
+\&
void mysrand(unsigned int seed) {
next = seed;
}
@@ -200,32 +205,32 @@ the program uses a random seed.
.EX
#include <stdio.h>
#include <stdlib.h>
-
+\&
int
main(int argc, char *argv[])
{
int r;
unsigned int seed, nloops;
-
+\&
if (argc != 3) {
fprintf(stderr, "Usage: %s <seed> <nloops>\en", argv[0]);
exit(EXIT_FAILURE);
}
-
+\&
seed = atoi(argv[1]);
nloops = atoi(argv[2]);
-
+\&
if (seed == \-1) {
seed = arc4random();
printf("seed: %u\en", seed);
}
-
+\&
srand(seed);
for (unsigned int j = 0; j < nloops; j++) {
r = rand();
printf("%d\en", r);
}
-
+\&
exit(EXIT_SUCCESS);
}
.EE
diff --git a/man3/random.3 b/man3/random.3
index 2958b5be1..9c69344e8 100644
--- a/man3/random.3
+++ b/man3/random.3
@@ -11,7 +11,7 @@
.\" Modified Sat Jul 24 18:13:39 1993 by Rik Faith (faith@cs.unc.edu)
.\" Modified Sun Aug 20 21:47:07 2000, aeb
.\"
-.TH random 3 2023-02-10 "Linux man-pages 6.03"
+.TH random 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
random, srandom, initstate, setstate \- random number generator
.SH LIBRARY
@@ -138,34 +138,26 @@ A state array of less than 8 bytes was specified to
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR random (),
.BR srandom (),
.BR initstate (),
.BR setstate ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, 4.3BSD.
+POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001, 4.3BSD.
.SH NOTES
-The
-.BR random ()
-function should not be used in multithreaded programs
-where reproducible behavior is required.
-Use
-.BR random_r (3)
-for that purpose.
-.PP
Random-number generation is a complex topic.
.I Numerical Recipes in C: The Art of Scientific Computing
(William H.\& Press, Brian P.\& Flannery, Saul A.\& Teukolsky,
@@ -178,6 +170,14 @@ in depth, see Chapter 3 (Random Numbers) in Donald E.\& Knuth's
.IR "The Art of Computer Programming" ,
volume 2 (Seminumerical Algorithms), 2nd ed.; Reading, Massachusetts:
Addison-Wesley Publishing Company, 1981.
+.SH CAVEATS
+The
+.BR random ()
+function should not be used in multithreaded programs
+where reproducible behavior is required.
+Use
+.BR random_r (3)
+for that purpose.
.SH BUGS
According to POSIX,
.BR initstate ()
diff --git a/man3/random_r.3 b/man3/random_r.3
index e5567028f..c812c2f25 100644
--- a/man3/random_r.3
+++ b/man3/random_r.3
@@ -4,7 +4,7 @@
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
.\"
-.TH random_r 3 2023-02-05 "Linux man-pages 6.03"
+.TH random_r 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
random_r, srandom_r, initstate_r, setstate_r \- reentrant
random number generator
@@ -141,25 +141,23 @@ was NULL.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR random_r (),
.BR srandom_r (),
.BR initstate_r (),
.BR setstate_r ()
T} Thread safety MT-Safe race:buf
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-These functions are nonstandard glibc extensions.
+GNU.
.\" These functions appear to be on Tru64, but don't seem to be on
.\" Solaris, HP-UX, or FreeBSD.
.SH BUGS
diff --git a/man3/rcmd.3 b/man3/rcmd.3
index 072590e26..765e85ade 100644
--- a/man3/rcmd.3
+++ b/man3/rcmd.3
@@ -13,7 +13,7 @@
.\"
.\" 2007-12-08, mtk, Converted from mdoc to man macros
.\"
-.TH rcmd 3 2023-02-05 "Linux man-pages 6.03"
+.TH rcmd 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
rcmd, rresvport, iruserok, ruserok, rcmd_af,
rresvport_af, iruserok_af, ruserok_af \- routines for returning a
@@ -243,48 +243,50 @@ For information on the return from
and
.BR iruserok (),
see above.
-.SH VERSIONS
-The functions
-.BR iruserok_af (),
-.BR rcmd_af (),
-.BR rresvport_af (),
-and
-.BR ruserok_af ()
-functions are provided since glibc 2.2.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR rcmd (),
.BR rcmd_af ()
T} Thread safety MT-Unsafe
T{
+.na
+.nh
.BR rresvport (),
.BR rresvport_af ()
T} Thread safety MT-Safe
T{
+.na
+.nh
.BR iruserok (),
.BR ruserok (),
.BR iruserok_af (),
.BR ruserok_af ()
T} Thread safety MT-Safe locale
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-Not in POSIX.1.
-Present on the BSDs, Solaris, and many other systems.
-These
-functions appeared in
-4.2BSD.
+BSD.
+.SH HISTORY
+.TP
+.BR iruserok_af ()
+.TQ
+.BR rcmd_af ()
+.TQ
+.BR rresvport_af ()
+.TQ
+.BR ruserok_af ()
+glibc 2.2.
+.PP
+Solaris, 4.2BSD.
The "_af" variants are more recent additions,
and are not present on as wide a range of systems.
.SH BUGS
@@ -293,7 +295,7 @@ and
.BR iruserok_af ()
are declared in glibc headers only since glibc 2.12.
.\" Bug filed 25 Nov 2007:
-.\" http://sources.redhat.com/bugzilla/show_bug.cgi?id=5399
+.\" https://www.sourceware.org/bugzilla/show_bug.cgi?id=5399
.SH SEE ALSO
.BR rlogin (1),
.BR rsh (1),
diff --git a/man3/re_comp.3 b/man3/re_comp.3
index e61d40c86..3cb445015 100644
--- a/man3/re_comp.3
+++ b/man3/re_comp.3
@@ -5,7 +5,7 @@
.\"
.\" Wed Jun 14 16:10:28 BST 1995 Wilf. (G.Wilford@@ee.surrey.ac.uk)
.\"
-.TH re_comp 3 2022-12-15 "Linux man-pages 6.03"
+.TH re_comp 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
re_comp, re_exec \- BSD regex functions
.SH LIBRARY
@@ -49,24 +49,24 @@ returns 1 for a successful match, zero for failure.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR re_comp (),
.BR re_exec ()
T} Thread safety MT-Unsafe
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
+None.
+.SH HISTORY
4.3BSD.
-.SH NOTES
+.PP
These functions are obsolete; the functions documented in
.BR regcomp (3)
should be used instead.
diff --git a/man3/readdir.3 b/man3/readdir.3
index 75be4343e..2e0ea0927 100644
--- a/man3/readdir.3
+++ b/man3/readdir.3
@@ -14,7 +14,7 @@
.\" 2007-07-30 Ulrich Drepper <drepper@redhat.com>, mtk:
.\" Rework discussion of nonstandard structure fields.
.\"
-.TH readdir 3 2023-02-05 "Linux man-pages 6.03"
+.TH readdir 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
readdir \- read a directory
.SH LIBRARY
@@ -175,19 +175,17 @@ Invalid directory stream descriptor \fIdirp\fP.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR readdir ()
T} Thread safety MT-Unsafe race:dirstream
.TE
-.hy
-.ad
.sp 1
.PP
In the current POSIX.1 specification (POSIX.1-2008),
@@ -209,17 +207,7 @@ It is expected that a future version of POSIX.1
will require that
.BR readdir ()
be thread-safe when concurrently employed on different directory streams.
-.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, SVr4, 4.3BSD.
-.SH NOTES
-A directory stream is opened using
-.BR opendir (3).
-.PP
-The order in which filenames are read by successive calls to
-.BR readdir ()
-depends on the filesystem implementation;
-it is unlikely that the names will be sorted in any fashion.
-.PP
+.SH VERSIONS
Only the fields
.I d_name
and (as an XSI extension)
@@ -290,6 +278,18 @@ In such cases, the
field will contain a value that exceeds the size of the glibc
.I dirent
structure shown above.
+.SH STANDARDS
+POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001, SVr4, 4.3BSD.
+.SH NOTES
+A directory stream is opened using
+.BR opendir (3).
+.PP
+The order in which filenames are read by successive calls to
+.BR readdir ()
+depends on the filesystem implementation;
+it is unlikely that the names will be sorted in any fashion.
.SH SEE ALSO
.BR getdents (2),
.BR read (2),
diff --git a/man3/readdir_r.3 b/man3/readdir_r.3
index ecab7c4c4..f853e51bd 100644
--- a/man3/readdir_r.3
+++ b/man3/readdir_r.3
@@ -4,7 +4,7 @@
.\"
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
-.TH readdir_r 3 2023-02-05 "Linux man-pages 6.03"
+.TH readdir_r 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
readdir_r \- read a directory
.SH LIBRARY
@@ -126,21 +126,21 @@ A directory entry whose name was too long to be read was encountered.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR readdir_r ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008.
+POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001.
.SH SEE ALSO
.BR readdir (3)
diff --git a/man3/realpath.3 b/man3/realpath.3
index cafbafd11..3f25e60b9 100644
--- a/man3/realpath.3
+++ b/man3/realpath.3
@@ -6,7 +6,7 @@
.\" Rewritten old page, 990824, aeb@cwi.nl
.\" 2004-12-14, mtk, added discussion of resolved_path == NULL
.\"
-.TH realpath 3 2023-02-05 "Linux man-pages 6.03"
+.TH realpath 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
realpath \- return the canonicalized absolute pathname
.SH LIBRARY
@@ -69,10 +69,6 @@ The caller should deallocate this buffer using
.\" Even if we use resolved_path == NULL, then realpath() will still
.\" return ENAMETOOLONG if the resolved pathname would exceed PATH_MAX
.\" bytes -- MTK, Dec 04
-.\" .SH HISTORY
-.\" The
-.\" .BR realpath ()
-.\" function first appeared in 4.4BSD, contributed by Jan-Simon Pendry.
.SH RETURN VALUE
If there is no error,
.BR realpath ()
@@ -123,28 +119,40 @@ A component of the path prefix is not a directory.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR realpath ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
+.SH VERSIONS
+.SS GNU extensions
+If the call fails with either
+.B EACCES
+or
+.B ENOENT
+and
+.I resolved_path
+is not NULL, then the prefix of
+.I path
+that is not readable or does not exist is returned in
+.IR resolved_path .
.SH STANDARDS
-4.4BSD, POSIX.1-2001.
+POSIX.1-2008.
+.SH HISTORY
+4.4BSD, POSIX.1-2001, Solaris.
.PP
POSIX.1-2001 says that the behavior if
.I resolved_path
is NULL is implementation-defined.
POSIX.1-2008 specifies the behavior described in this page.
-.SH NOTES
+.PP
In 4.4BSD and Solaris, the limit on the pathname length is
.B MAXPATHLEN
(found in \fI<sys/param.h>\fP).
@@ -184,17 +192,6 @@ A typical source fragment would be
.\" .BR realpath ()
.\" is given in \fI<unistd.h>\fP in libc4 and libc5,
.\" but in \fI<stdlib.h>\fP everywhere else.
-.SS GNU extensions
-If the call fails with either
-.B EACCES
-or
-.B ENOENT
-and
-.I resolved_path
-is not NULL, then the prefix of
-.I path
-that is not readable or does not exist is returned in
-.IR resolved_path .
.SH BUGS
The POSIX.1-2001 standard version of this function is broken by design,
since it is impossible to determine a suitable size for the output buffer,
diff --git a/man3/recno.3 b/man3/recno.3
index dad21d3d8..a4a38d20c 100644
--- a/man3/recno.3
+++ b/man3/recno.3
@@ -5,7 +5,7 @@
.\"
.\" @(#)recno.3 8.5 (Berkeley) 8/18/94
.\"
-.TH recno 3 2022-12-04 "Linux man-pages 6.03"
+.TH recno 3 2022-12-04 "Linux man-pages 6.05.01"
.UC 7
.SH NAME
recno \- record number database access method
diff --git a/man3/regex.3 b/man3/regex.3
index 98f411ef5..fe6a6b348 100644
--- a/man3/regex.3
+++ b/man3/regex.3
@@ -1,5 +1,7 @@
'\" t
.\" Copyright (C), 1995, Graeme W. Wilford. (Wilf.)
+.\" Copyright 2023, Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
+.\" Copyright 2023, Alejandro Colomar <alx@kernel.org>
.\"
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
@@ -8,7 +10,7 @@
.\" Modified 8 May 1998 by Joseph S. Myers (jsm28@cam.ac.uk)
.\"
.\" show the synopsis section nicely
-.TH regex 3 2023-02-05 "Linux man-pages 6.03"
+.TH regex 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
regcomp, regexec, regerror, regfree \- POSIX regex functions
.SH LIBRARY
@@ -22,50 +24,69 @@ Standard C library
.BI " int " cflags );
.BI "int regexec(const regex_t *restrict " preg \
", const char *restrict " string ,
-.BI " size_t " nmatch ", regmatch_t " pmatch "[restrict ." nmatch ],
+.BI " size_t " nmatch ", \
+regmatch_t " pmatch "[_Nullable restrict ." nmatch ],
.BI " int " eflags );
.PP
-.BI "size_t regerror(int " errcode ", const regex_t *restrict " preg ,
-.BI " char " errbuf "[restrict ." errbuf_size "], \
-size_t " errbuf_size );
+.BI "size_t regerror(int " errcode ", const regex_t *_Nullable restrict " preg ,
+.BI " char " errbuf "[_Nullable restrict ." errbuf_size ],
+.BI " size_t " errbuf_size );
.BI "void regfree(regex_t *" preg );
+.PP
+.B typedef struct {
+.B " size_t re_nsub;"
+.B } regex_t;
+.PP
+.B typedef struct {
+.B " regoff_t rm_so;"
+.B " regoff_t rm_eo;"
+.B } regmatch_t;
+.PP
+.BR typedef " /* ... */ " regoff_t;
.fi
.SH DESCRIPTION
-.SS POSIX regex compiling
+.SS Compilation
.BR regcomp ()
is used to compile a regular expression into a form that is suitable
for subsequent
.BR regexec ()
searches.
.PP
-.BR regcomp ()
-is supplied with
-.IR preg ,
-a pointer to a pattern buffer storage area;
-.IR regex ,
-a pointer to the null-terminated string and
-.IR cflags ,
-flags used to determine the type of compilation.
+On success, the pattern buffer at
+.I *preg
+is initialized.
+.I regex
+is a null-terminated string.
+The locale must be the same when running
+.BR regexec ().
.PP
-All regular expression searching must be done via a compiled pattern
-buffer, thus
+After
+.BR regcomp ()
+succeeds,
+.I preg->re_nsub
+holds the number of subexpressions in
+.IR regex .
+Thus, a value of
+.I preg->re_nsub
++ 1
+passed as
+.I nmatch
+to
.BR regexec ()
-must always be supplied with the address of a
-.BR regcomp ()-initialized
-pattern buffer.
+is sufficient to capture all matches.
.PP
.I cflags
is the
-.RB bitwise- or
+bitwise OR
of zero or more of the following:
.TP
.B REG_EXTENDED
Use
-.B POSIX
+POSIX
Extended Regular Expression syntax when interpreting
.IR regex .
If not set,
-.B POSIX
+POSIX
Basic Regular Expression syntax is used.
.TP
.B REG_ICASE
@@ -75,20 +96,20 @@ Subsequent
searches using this pattern buffer will be case insensitive.
.TP
.B REG_NOSUB
-Do not report position of matches.
-The
-.I nmatch
-and
-.I pmatch
-arguments to
+Report only overall success.
.BR regexec ()
-are ignored if the pattern buffer supplied was compiled with this flag set.
+will use only
+.I pmatch
+for
+.BR REG_STARTEND ,
+ignoring
+.IR nmatch .
.TP
.B REG_NEWLINE
Match-any-character operators don't match a newline.
.IP
A nonmatching list
-.RB ( [\[ha]...] )
+.RB ( [\[ha]...\&] )
not containing a newline does not match a newline.
.IP
Match-beginning-of-line operator
@@ -108,18 +129,16 @@ whether
.I eflags
contains
.BR REG_NOTEOL .
-.SS POSIX regex matching
+.SS Matching
.BR regexec ()
is used to match a null-terminated string
-against the precompiled pattern buffer,
-.IR preg .
-.I nmatch
-and
-.I pmatch
-are used to provide information regarding the location of any matches.
+against the compiled pattern buffer in
+.IR *preg ,
+which must have been initialised with
+.BR regexec ().
.I eflags
is the
-.RB bitwise- or
+bitwise OR
of zero or more of the following flags:
.TP
.B REG_NOTBOL
@@ -139,75 +158,67 @@ compilation flag
above).
.TP
.B REG_STARTEND
-Use
-.I pmatch[0]
-on the input string, starting at byte
-.I pmatch[0].rm_so
-and ending before byte
-.IR pmatch[0].rm_eo .
+Match
+.RI [ "string + pmatch[0].rm_so" , " string + pmatch[0].rm_eo" )
+instead of
+.RI [ string , " string + strlen(string)" ).
This allows matching embedded NUL bytes
and avoids a
.BR strlen (3)
-on large strings.
-It does not use
+on known-length strings.
+If any matches are returned
+.RB ( REG_NOSUB
+wasn't passed to
+.BR regcomp (),
+the match succeeded, and
.I nmatch
-on input, and does not change
-.B REG_NOTBOL
-or
-.B REG_NEWLINE
-processing.
+> 0), they overwrite
+.I pmatch
+as usual, and the match offsets remain relative to
+.I string
+(not
+.IR "string + pmatch[0].rm_so" ).
This flag is a BSD extension, not present in POSIX.
-.SS Byte offsets
+.SS Match offsets
Unless
.B REG_NOSUB
-was set for the compilation of the pattern buffer, it is possible to
-obtain match addressing information.
-.I pmatch
-must be dimensioned to have at least
-.I nmatch
-elements.
-These are filled in by
+was passed to
+.BR regcomp (),
+it is possible to
+obtain the locations of matches within
+.IR string :
.BR regexec ()
-with substring match addresses.
-The offsets of the subexpression starting at the
-.IR i th
-open parenthesis are stored in
-.IR pmatch[i] .
-The entire regular expression's match addresses are stored in
-.IR pmatch[0] .
-(Note that to return the offsets of
-.I N
-subexpression matches,
+fills
.I nmatch
-must be at least
-.IR N+1 .)
-Any unused structure elements will contain the value \-1.
-.PP
-The
-.I regmatch_t
-structure which is the type of
+elements of
.I pmatch
-is defined in
-.IR <regex.h> .
+with results:
+.I pmatch[0]
+corresponds to the entire match,
+.I pmatch[1]
+to the first subexpression, etc.
+If there were more matches than
+.IR nmatch ,
+they are discarded;
+if fewer,
+unused elements of
+.I pmatch
+are filled with
+.BR \-1 s.
.PP
-.in +4n
-.EX
-typedef struct {
- regoff_t rm_so;
- regoff_t rm_eo;
-} regmatch_t;
-.EE
-.in
+Each returned valid
+.RB (non- \-1 )
+match corresponds to the range
+.RI [ "string + rm_so" , " string + rm_eo" ).
.PP
-Each
-.I rm_so
-element that is not \-1 indicates the start offset of the next largest
-substring match within the string.
-The relative
-.I rm_eo
-element indicates the end offset of the match,
-which is the offset of the first character after the matching text.
-.SS POSIX error reporting
+.I regoff_t
+is a signed integer type
+capable of storing the largest value that can be stored in either an
+.I ptrdiff_t
+type or a
+.I ssize_t
+type.
+.SS Error reporting
.BR regerror ()
is used to turn the error codes that can be returned by both
.BR regcomp ()
@@ -215,34 +226,27 @@ and
.BR regexec ()
into error message strings.
.PP
-.BR regerror ()
-is passed the error code,
-.IR errcode ,
-the pattern buffer,
-.IR preg ,
-a pointer to a character string buffer,
-.IR errbuf ,
-and the size of the string buffer,
-.IR errbuf_size .
-It returns the size of the
-.I errbuf
-required to contain the null-terminated error message string.
-If both
-.I errbuf
-and
+If
+.I preg
+isn't a null pointer,
+.I errcode
+must be the latest error returned from an operation on
+.IR preg .
+.PP
+If
+.I errbuf_size
+isn't 0, up to
.I errbuf_size
-are nonzero,
-.I errbuf
-is filled in with the first
-.I "errbuf_size \- 1"
-characters of the error message and a terminating null byte (\[aq]\e0\[aq]).
-.SS POSIX pattern buffer freeing
-Supplying
+bytes are copied to
+.IR errbuf ;
+the error string is always null-terminated, and truncated to fit.
+.SS Freeing
.BR regfree ()
-with a precompiled pattern buffer,
-.IR preg ,
-will free the memory allocated to the pattern buffer by the compiling
-process,
+deinitializes the pattern buffer at
+.IR *preg ,
+freeing any associated memory;
+.I *preg
+must have been initialized via
.BR regcomp ().
.SH RETURN VALUE
.BR regcomp ()
@@ -252,6 +256,9 @@ returns zero for a successful compilation or an error code for failure.
returns zero for a successful match or
.B REG_NOMATCH
for failure.
+.PP
+.BR regerror ()
+returns the size of the buffer required to hold the string.
.SH ERRORS
The following errors can be returned by
.BR regcomp ():
@@ -280,7 +287,7 @@ Unknown character class name.
.TP
.B REG_EEND
Nonspecific error.
-This is not defined by POSIX.2.
+This is not defined by POSIX.
.TP
.B REG_EESCAPE
Trailing backslash.
@@ -294,7 +301,7 @@ occurs prior to the starting point.
.TP
.B REG_ESIZE
Compiled regular expression requires a pattern buffer larger than 64\ kB.
-This is not defined by POSIX.2.
+This is not defined by POSIX.
.TP
.B REG_ESPACE
The regex routines ran out of memory.
@@ -304,69 +311,96 @@ Invalid back reference to a subexpression.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR regcomp (),
.BR regexec ()
T} Thread safety MT-Safe locale
T{
+.na
+.nh
.BR regerror ()
T} Thread safety MT-Safe env
T{
+.na
+.nh
.BR regfree ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008.
+POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001.
+.PP
+Prior to POSIX.1-2008,
+.I regoff_t
+was required to be
+capable of storing the largest value that can be stored in either an
+.I off_t
+type or a
+.I ssize_t
+type.
+.SH CAVEATS
+.I re_nsub
+is only required to be initialized if
+.B REG_NOSUB
+wasn't specified, but all known implementations initialize it regardless.
+.\" glibc, musl, 4.4BSD, illumos
+.PP
+Both
+.I regex_t
+and
+.I regmatch_t
+may (and do) have more members, in any order.
+Always reference them by name.
+.\" illumos has two more start/end pairs and the first one is of pointers
.SH EXAMPLES
.EX
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <regex.h>
-
+\&
#define ARRAY_SIZE(arr) (sizeof((arr)) / sizeof((arr)[0]))
-
+\&
static const char *const str =
"1) John Driverhacker;\en2) John Doe;\en3) John Foo;\en";
static const char *const re = "John.*o";
-
+\&
int main(void)
{
static const char *s = str;
regex_t regex;
regmatch_t pmatch[1];
regoff_t off, len;
-
+\&
if (regcomp(&regex, re, REG_NEWLINE))
exit(EXIT_FAILURE);
-
+\&
printf("String = \e"%s\e"\en", str);
printf("Matches:\en");
-
+\&
for (unsigned int i = 0; ; i++) {
if (regexec(&regex, s, ARRAY_SIZE(pmatch), pmatch, 0))
break;
-
+\&
off = pmatch[0].rm_so + (s \- str);
len = pmatch[0].rm_eo \- pmatch[0].rm_so;
printf("#%zu:\en", i);
printf("offset = %jd; length = %jd\en", (intmax_t) off,
(intmax_t) len);
printf("substring = \e"%.*s\e"\en", len, s + pmatch[0].rm_so);
-
+\&
s += pmatch[0].rm_eo;
}
-
+\&
exit(EXIT_SUCCESS);
}
.EE
diff --git a/man3/remainder.3 b/man3/remainder.3
index 035e42e13..df97879b6 100644
--- a/man3/remainder.3
+++ b/man3/remainder.3
@@ -15,7 +15,7 @@
.\" (walter.harms@informatik.uni-oldenburg.de)
.\" Modified 2003-11-18, 2004-10-05 aeb
.\"
-.TH remainder 3 2023-02-05 "Linux man-pages 6.03"
+.TH remainder 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
drem, dremf, dreml, remainder, remainderf, remainderl \- \
floating-point remainder function
@@ -26,15 +26,14 @@ Math library
.nf
.B #include <math.h>
.PP
-/* The C99 versions */
.BI "double remainder(double " x ", double " y );
.BI "float remainderf(float " x ", float " y );
.BI "long double remainderl(long double " x ", long double " y );
.PP
/* Obsolete synonyms */
-.BI "double drem(double " x ", double " y );
-.BI "float dremf(float " x ", float " y );
-.BI "long double dreml(long double " x ", long double " y );
+.BI "[[deprecated]] double drem(double " x ", double " y );
+.BI "[[deprecated]] float dremf(float " x ", float " y );
+.BI "[[deprecated]] long double dreml(long double " x ", long double " y );
.fi
.PP
.RS -4
@@ -154,14 +153,14 @@ is raised.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR drem (),
.BR dremf (),
.BR dreml (),
@@ -170,36 +169,43 @@ T{
.BR remainderl ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
.\" IEC 60559.
-The functions
-.BR remainder (),
-.BR remainderf (),
-and
+.TP
+.BR remainder ()
+.TQ
+.BR remainderf ()
+.TQ
.BR remainderl ()
-are specified in C99, POSIX.1-2001, and POSIX.1-2008.
-.PP
-The function
+C11, POSIX.1-2008.
+.TP
.BR drem ()
-is from 4.3BSD.
-The
-.I float
-and
-.I "long double"
-variants
+.TQ
.BR dremf ()
-and
+.TQ
.BR dreml ()
-exist on some systems, such as Tru64 and glibc2.
-Avoid the use of these functions in favor of
+None.
+.SH HISTORY
+.\" IEC 60559.
+.TP
.BR remainder ()
-etc.
+.TQ
+.BR remainderf ()
+.TQ
+.BR remainderl ()
+C99, POSIX.1-2001.
+.TP
+.BR drem ()
+4.3BSD.
+.TP
+.BR dremf ()
+.TQ
+.BR dreml ()
+Tru64, glibc2.
.SH BUGS
Before glibc 2.15,
-.\" http://sources.redhat.com/bugzilla/show_bug.cgi?id=6779
+.\" https://www.sourceware.org/bugzilla/show_bug.cgi?id=6779
the call
.PP
.in +4n
@@ -212,7 +218,7 @@ returned a NaN, as expected, but wrongly caused a domain error.
Since glibc 2.15, a silent NaN (i.e., no domain error) is returned.
.PP
Before glibc 2.15,
-.\" http://sources.redhat.com/bugzilla/show_bug.cgi?id=6783
+.\" https://www.sourceware.org/bugzilla/show_bug.cgi?id=6783
.I errno
was not set to
.B EDOM
diff --git a/man3/remove.3 b/man3/remove.3
index eaaeb46b6..d814d719a 100644
--- a/man3/remove.3
+++ b/man3/remove.3
@@ -9,7 +9,7 @@
.\"
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
-.TH remove 3 2022-12-29 "Linux man-pages 6.03"
+.TH remove 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
remove \- remove a file or directory
.SH LIBRARY
@@ -56,22 +56,22 @@ and
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR remove ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, C99, 4.3BSD.
+C11, POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001, C89, 4.3BSD.
.\" .SH NOTES
.\" Under libc4 and libc5,
.\" .BR remove ()
diff --git a/man3/remquo.3 b/man3/remquo.3
index f5dd12b84..4fd76eaa3 100644
--- a/man3/remquo.3
+++ b/man3/remquo.3
@@ -8,7 +8,7 @@
.\" based on glibc infopages
.\" polished, aeb
.\"
-.TH remquo 3 2022-12-15 "Linux man-pages 6.03"
+.TH remquo 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
remquo, remquof, remquol \- remainder and part of quotient
.SH LIBRARY
@@ -110,30 +110,29 @@ is raised.
These functions do not set
.IR errno .
.\" FIXME . Is it intentional that these functions do not set errno?
-.\" Bug raised: http://sources.redhat.com/bugzilla/show_bug.cgi?id=6802
-.SH VERSIONS
-These functions were added in glibc 2.1.
+.\" Bug raised: https://www.sourceware.org/bugzilla/show_bug.cgi?id=6802
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR remquo (),
.BR remquof (),
.BR remquol ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-C99, POSIX.1-2001, POSIX.1-2008.
+C11, POSIX.1-2008.
+.SH HISTORY
+glibc 2.1.
+C99, POSIX.1-2001.
.SH SEE ALSO
.BR fmod (3),
.BR logb (3),
diff --git a/man3/resolver.3 b/man3/resolver.3
index 16ddae9de..416951f1b 100644
--- a/man3/resolver.3
+++ b/man3/resolver.3
@@ -11,7 +11,7 @@
.\" Modified 1993-07-25 by Rik Faith (faith@cs.unc.edu)
.\" Modified 2004-10-31 by aeb
.\"
-.TH resolver 3 2023-02-05 "Linux man-pages 6.03"
+.TH resolver 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
res_ninit, res_nquery, res_nsearch, res_nquerydomain, res_nmkquery, res_nsend,
res_nclose,
@@ -473,14 +473,14 @@ resolver configuration file
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR res_ninit (),
.BR res_nclose (),
.BR res_nquery (),
@@ -489,15 +489,17 @@ T{
.BR res_nsend ()
T} Thread safety MT-Safe locale
T{
+.na
+.nh
.BR res_nmkquery (),
.BR dn_comp (),
.BR dn_expand ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
+None.
+.SH HISTORY
4.3BSD.
.SH SEE ALSO
.BR gethostbyname (3),
diff --git a/man3/rewinddir.3 b/man3/rewinddir.3
index d00bfeda6..61221baa6 100644
--- a/man3/rewinddir.3
+++ b/man3/rewinddir.3
@@ -9,7 +9,7 @@
.\" 386BSD man pages
.\" Modified Sat Jul 24 18:29:11 1993 by Rik Faith (faith@cs.unc.edu)
.\" Modified 11 June 1995 by Andries Brouwer (aeb@cwi.nl)
-.TH rewinddir 3 2022-12-15 "Linux man-pages 6.03"
+.TH rewinddir 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
rewinddir \- reset directory stream
.SH LIBRARY
@@ -36,22 +36,22 @@ function returns no value.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR rewinddir ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, SVr4, 4.3BSD.
+POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001, SVr4, 4.3BSD.
.SH SEE ALSO
.BR closedir (3),
.BR opendir (3),
diff --git a/man3/rexec.3 b/man3/rexec.3
index acdf155f4..7f94d27a3 100644
--- a/man3/rexec.3
+++ b/man3/rexec.3
@@ -11,7 +11,7 @@
.\"
.\" 2013-06-21, mtk, Converted from mdoc to man macros
.\"
-.TH rexec 3 2022-12-15 "Linux man-pages 6.03"
+.TH rexec 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
rexec, rexec_af \- return stream to a remote command
.SH LIBRARY
@@ -123,37 +123,31 @@ This argument can be specified as
or
.B AF_UNSPEC
(to allow the implementation to select the protocol).
-.SH VERSIONS
-The
-.BR rexec_af ()
-function was added in glibc 2.2.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR rexec (),
.BR rexec_af ()
T} Thread safety MT-Unsafe
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-These functions are not in POSIX.1.
-The
+None.
+.SH HISTORY
+.TP
.BR rexec ()
-function first appeared in
-4.2BSD, and is present on the BSDs, Solaris, and many other systems.
-The
+4.2BSD, BSD, Solaris.
+.TP
.BR rexec_af ()
-function is more recent, and less widespread.
+glibc 2.2.
.SH BUGS
The
.BR rexec ()
diff --git a/man3/rint.3 b/man3/rint.3
index 431b41e6f..945f48bcd 100644
--- a/man3/rint.3
+++ b/man3/rint.3
@@ -5,7 +5,7 @@
.\"
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
-.TH rint 3 2023-02-05 "Linux man-pages 6.03"
+.TH rint 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
nearbyint, nearbyintf, nearbyintl, rint, rintf, rintl \- round
to nearest integer
@@ -95,14 +95,14 @@ POSIX.1-2001 documents a range error for overflows, but see NOTES.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR nearbyint (),
.BR nearbyintf (),
.BR nearbyintl (),
@@ -111,11 +111,11 @@ T{
.BR rintl ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-C99, POSIX.1-2001, POSIX.1-2008.
+C11, POSIX.1-2008.
+.SH HISTORY
+C99, POSIX.1-2001.
.SH NOTES
SUSv2 and POSIX.1-2001 contain text about overflow (which might set
.I errno
diff --git a/man3/round.3 b/man3/round.3
index 7b9fbf96f..591875feb 100644
--- a/man3/round.3
+++ b/man3/round.3
@@ -5,7 +5,7 @@
.\"
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
-.TH round 3 2022-12-15 "Linux man-pages 6.03"
+.TH round 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
round, roundf, roundl \- round to nearest integer, away from zero
.SH LIBRARY
@@ -57,29 +57,28 @@ itself is returned.
.SH ERRORS
No errors occur.
POSIX.1-2001 documents a range error for overflows, but see NOTES.
-.SH VERSIONS
-These functions were added in glibc 2.1.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR round (),
.BR roundf (),
.BR roundl ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-C99, POSIX.1-2001, POSIX.1-2008.
+C11, POSIX.1-2008.
+.SH HISTORY
+glibc 2.1.
+C99, POSIX.1-2001.
.SH NOTES
POSIX.1-2001 contains text about overflow (which might set
.I errno
diff --git a/man3/roundup.3 b/man3/roundup.3
index cc86d61d3..d21949e14 100644
--- a/man3/roundup.3
+++ b/man3/roundup.3
@@ -2,7 +2,7 @@
.\"
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
-.TH roundup 3 2023-01-19 "Linux man-pages 6.03"
+.TH roundup 3 2023-03-30 "Linux man-pages 6.05.01"
.SH NAME
roundup \- round up in steps
.SH LIBRARY
@@ -33,7 +33,7 @@ See CAVEATS.
.SH RETURN VALUE
This macro returns the rounded value.
.SH STANDARDS
-This nonstandard macro is present in glibc and some BSDs.
+None.
.SH CAVEATS
The arguments may be evaluated more than once.
.PP
diff --git a/man3/rpc.3 b/man3/rpc.3
index 0535aa296..4923e8a52 100644
--- a/man3/rpc.3
+++ b/man3/rpc.3
@@ -9,7 +9,7 @@
.\"
.\" 2007-12-30, mtk, Convert function prototypes to modern C syntax
.\"
-.TH rpc 3 2023-02-05 "Linux man-pages 6.03"
+.TH rpc 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
rpc \- library routines for remote procedure calls
.SH LIBRARY
@@ -1109,14 +1109,14 @@ Service implementors usually do not need this routine.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR auth_destroy (),
.BR authnone_create (),
.BR authunix_create (),
@@ -1181,8 +1181,6 @@ T{
.BR xprt_unregister ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
.SH SEE ALSO
.\" We don't have an rpc_secure.3 page in the set at the moment -- MTK, 19 Sep 05
diff --git a/man3/rpmatch.3 b/man3/rpmatch.3
index 44c780699..ac3fa09bf 100644
--- a/man3/rpmatch.3
+++ b/man3/rpmatch.3
@@ -27,7 +27,7 @@
.\"
.\" 2006-05-19, mtk, various edits and example program
.\"
-.TH rpmatch 3 2023-02-05 "Linux man-pages 6.03"
+.TH rpmatch 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
rpmatch \- determine if the answer to a question is affirmative or negative
.SH LIBRARY
@@ -108,24 +108,22 @@ that of an unrecognized value of
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR rpmatch ()
T} Thread safety MT-Safe locale
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-.BR rpmatch ()
-is not required by any standard,
-but available under the GNU C library, FreeBSD, and AIX.
+None.
+.SH HISTORY
+GNU, FreeBSD, AIX.
.SH BUGS
The
.BR YESEXPR " and " NOEXPR
@@ -149,7 +147,7 @@ is applied to the string given in the program's command-line argument.
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-
+\&
int
main(int argc, char *argv[])
{
@@ -157,7 +155,7 @@ main(int argc, char *argv[])
fprintf(stderr, "%s response\en", argv[0]);
exit(EXIT_FAILURE);
}
-
+\&
setlocale(LC_ALL, "");
printf("rpmatch() returns: %d\en", rpmatch(argv[1]));
exit(EXIT_SUCCESS);
diff --git a/man3/rtime.3 b/man3/rtime.3
index c3c8b2b34..a866d0b81 100644
--- a/man3/rtime.3
+++ b/man3/rtime.3
@@ -8,7 +8,7 @@
.\"
.\" Slightly polished, aeb, 2003-04-06
.\"
-.TH rtime 3 2022-12-15 "Linux man-pages 6.03"
+.TH rtime 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
rtime \- get time from a remote machine
.SH LIBRARY
@@ -59,19 +59,17 @@ The waiting time as defined in timeout has expired.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR rtime ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
.SH NOTES
Only IPv4 is supported.
@@ -115,12 +113,12 @@ The result is the localtime of the computer "linux".
#include <stdlib.h>
#include <string.h>
#include <time.h>
-
+\&
#include <rpc/auth_des.h>
-
+\&
static int use_tcp = 0;
static const char servername[] = "linux";
-
+\&
int
main(void)
{
@@ -130,12 +128,12 @@ main(void)
struct rpc_timeval time1 = {0, 0};
struct rpc_timeval timeout = {1, 0};
struct sockaddr_in name;
-
+\&
memset(&name, 0, sizeof(name));
sethostent(1);
hent = gethostbyname(servername);
memcpy(&name.sin_addr, hent\->h_addr, hent\->h_length);
-
+\&
ret = rtime(&name, &time1, use_tcp ? NULL : &timeout);
if (ret < 0)
perror("rtime error");
@@ -143,7 +141,7 @@ main(void)
t = time1.tv_sec;
printf("%s\en", ctime(&t));
}
-
+\&
exit(EXIT_SUCCESS);
}
.EE
diff --git a/man3/rtnetlink.3 b/man3/rtnetlink.3
index b15c9f172..7033d4b67 100644
--- a/man3/rtnetlink.3
+++ b/man3/rtnetlink.3
@@ -1,15 +1,10 @@
-.\" This man page is Copyright (C) 1999 Andi Kleen <ak@muc.de>.
+.\" SPDX-License-Identifier: Linux-man-pages-1-para
.\"
-.\" %%%LICENSE_START(VERBATIM_ONE_PARA)
-.\" Permission is granted to distribute possibly modified copies
-.\" of this page provided the header is included verbatim,
-.\" and in case of nontrivial modification author and date
-.\" of the modification is added to the header.
-.\" %%%LICENSE_END
+.\" This man page is Copyright (C) 1999 Andi Kleen <ak@muc.de>.
.\"
.\" $Id: rtnetlink.3,v 1.2 1999/05/18 10:35:10 freitag Exp $
.\"
-.TH rtnetlink 3 2022-10-30 "Linux man-pages 6.03"
+.TH rtnetlink 3 2023-07-15 "Linux man-pages 6.05.01"
.SH NAME
rtnetlink \- macros to manipulate rtnetlink messages
.SH LIBRARY
@@ -80,7 +75,7 @@ returns the amount of space which will be needed in a message with
.I len
bytes of data.
.SH STANDARDS
-These macros are nonstandard Linux extensions.
+Linux.
.SH BUGS
This manual page is incomplete.
.SH EXAMPLES
@@ -90,20 +85,20 @@ Creating a rtnetlink message to set the MTU of a device:
.in +4n
.EX
#include <linux/rtnetlink.h>
-
+\&
\&...
-
+\&
struct {
struct nlmsghdr nh;
struct ifinfomsg if;
char attrbuf[512];
} req;
-
+\&
struct rtattr *rta;
unsigned int mtu = 1000;
-
+\&
int rtnetlink_sk = socket(AF_NETLINK, SOCK_DGRAM, NETLINK_ROUTE);
-
+\&
memset(&req, 0, sizeof(req));
req.nh.nlmsg_len = NLMSG_LENGTH(sizeof(req.if));
req.nh.nlmsg_flags = NLM_F_REQUEST;
diff --git a/man3/scalb.3 b/man3/scalb.3
index 804b4f6fa..5513a27bd 100644
--- a/man3/scalb.3
+++ b/man3/scalb.3
@@ -5,7 +5,7 @@
.\"
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
-.TH scalb 3 2023-02-05 "Linux man-pages 6.03"
+.TH scalb 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
scalb, scalbf, scalbl \- multiply floating-point number
by integral power of radix (OBSOLETE)
@@ -155,49 +155,40 @@ is raised.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR scalb (),
.BR scalbf (),
.BR scalbl ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
+None.
+.SH HISTORY
+.TP
.BR scalb ()
-is specified in POSIX.1-2001, but marked obsolescent.
-POSIX.1-2008 removes the specification of
-.BR scalb (),
+4.3BSD.
+Obsolescent in POSIX.1-2001;
+Removed in POSIX.1-2008,
recommending the use of
.BR scalbln (3),
.BR scalblnf (3),
or
.BR scalblnl (3)
instead.
-The
-.BR scalb ()
-function is from 4.3BSD.
-.PP
-.BR scalbf ()
-and
-.BR scalbl ()
-are unstandardized;
-.BR scalbf ()
-is nevertheless present on several other systems
.\" Looking at header files: scalbf() is present on the
.\" BSDs, Tru64, HP-UX 11, Irix 6.5; scalbl() is on HP-UX 11 and Tru64.
.SH BUGS
Before glibc 2.20,
-.\" http://sources.redhat.com/bugzilla/show_bug.cgi?id=6803
-.\" http://sources.redhat.com/bugzilla/show_bug.cgi?id=6804
+.\" https://www.sourceware.org/bugzilla/show_bug.cgi?id=6803
+.\" https://www.sourceware.org/bugzilla/show_bug.cgi?id=6804
these functions did not set
.I errno
for domain and range errors.
diff --git a/man3/scalbln.3 b/man3/scalbln.3
index 529e1e6ce..06514562d 100644
--- a/man3/scalbln.3
+++ b/man3/scalbln.3
@@ -5,7 +5,7 @@
.\"
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
-.TH scalbln 3 2023-02-05 "Linux man-pages 6.03"
+.TH scalbln 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
scalbn, scalbnf, scalbnl, scalbln, scalblnf, scalblnl \-
multiply floating-point number by integral power of radix
@@ -123,19 +123,17 @@ is set to
An underflow floating-point exception
.RB ( FE_UNDERFLOW )
is raised.
-.SH VERSIONS
-These functions were added in glibc 2.1.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR scalbn (),
.BR scalbnf (),
.BR scalbnl (),
@@ -144,12 +142,13 @@ T{
.BR scalblnl ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-C99, POSIX.1-2001, POSIX.1-2008.
-.SH NOTES
+C11, POSIX.1-2008.
+.SH HISTORY
+glibc 2.1.
+C99, POSIX.1-2001.
+.SH HISTORY
These functions differ from the obsolete functions described in
.BR scalb (3)
in the type of their second argument.
@@ -158,7 +157,7 @@ of an integral type, while those in
.BR scalb (3)
have a second argument of type
.IR double .
-.PP
+.SH NOTES
If
.B FLT_RADIX
equals 2 (which is usual), then
@@ -167,7 +166,7 @@ is equivalent to
.BR ldexp (3).
.SH BUGS
Before glibc 2.20,
-.\" http://sources.redhat.com/bugzilla/show_bug.cgi?id=6803
+.\" https://www.sourceware.org/bugzilla/show_bug.cgi?id=6803
these functions did not set
.I errno
for range errors.
diff --git a/man3/scandir.3 b/man3/scandir.3
index f734e6ac7..1abda05b7 100644
--- a/man3/scandir.3
+++ b/man3/scandir.3
@@ -21,7 +21,7 @@
.\"
.\" SPDX-License-Identifier: GPL-2.0-or-later
.\"
-.TH scandir 3 2023-02-05 "Linux man-pages 6.03"
+.TH scandir 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
scandir, scandirat, alphasort, versionsort \- scan
a directory for matching entries
@@ -180,43 +180,51 @@ The path in \fIdirp\fR is not a directory.
is a relative pathname and
.I dirfd
is a file descriptor referring to a file other than a directory.
-.SH VERSIONS
-.BR versionsort ()
-was added in glibc 2.1.
-.PP
-.BR scandirat ()
-was added in glibc 2.15.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR scandir (),
.BR scandirat ()
T} Thread safety MT-Safe
T{
+.na
+.nh
.BR alphasort (),
.BR versionsort ()
T} Thread safety MT-Safe locale
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-.BR alphasort (),
-.BR scandir ():
+.TP
+.BR alphasort ()
+.TQ
+.BR scandir ()
+POSIX.1-2008.
+.TP
+.BR versionsort ()
+.TQ
+.BR scandirat ()
+GNU.
+.SH HISTORY
+.TP
+.BR alphasort ()
+.TQ
+.BR scandir ()
4.3BSD, POSIX.1-2008.
-.PP
+.TP
.BR versionsort ()
-and
+glibc 2.1.
+.TP
.BR scandirat ()
-are GNU extensions.
+glibc 2.15.
.\" .LP
.\" The functions
.\" .BR scandir ()
@@ -267,25 +275,25 @@ in reverse order.
#include <dirent.h>
#include <stdio.h>
#include <stdlib.h>
-
+\&
int
main(void)
{
struct dirent **namelist;
int n;
-
+\&
n = scandir(".", &namelist, NULL, alphasort);
if (n == \-1) {
perror("scandir");
exit(EXIT_FAILURE);
}
-
+\&
while (n\-\-) {
printf("%s\en", namelist[n]\->d_name);
free(namelist[n]);
}
free(namelist);
-
+\&
exit(EXIT_SUCCESS);
}
.EE
diff --git a/man3/scanf.3 b/man3/scanf.3
index f38e109db..79345095c 100644
--- a/man3/scanf.3
+++ b/man3/scanf.3
@@ -1,8 +1,8 @@
'\" t
.\" Copyright 2022 Alejandro Colomar <alx@kernel.org>
-.\" SPDX-License-Identifier: Linux-man-pages-copyleft
+.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
-.TH scanf 3 2022-12-29 "Linux man-pages 6.03"
+.TH scanf 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
scanf, fscanf, vscanf, vfscanf \- input FILE format conversion
.SH LIBRARY
@@ -118,25 +118,25 @@ Out of memory.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR scanf (),
.BR fscanf (),
.BR vscanf (),
.BR vfscanf ()
T} Thread safety MT-Safe locale
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-These functions conform to C99 and POSIX.1-2001.
+C11, POSIX.1-2008.
+.SH HISTORY
+C99, POSIX.1-2001.
.SH SEE ALSO
.BR fgets (3),
.BR getline (3),
diff --git a/man3/sched_getcpu.3 b/man3/sched_getcpu.3
index 694e70911..eb34a1159 100644
--- a/man3/sched_getcpu.3
+++ b/man3/sched_getcpu.3
@@ -4,7 +4,7 @@
.\"
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
-.TH sched_getcpu 3 2022-12-15 "Linux man-pages 6.03"
+.TH sched_getcpu 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
sched_getcpu \- determine CPU on which the calling thread is running
.SH LIBRARY
@@ -46,28 +46,25 @@ is set to indicate the error.
.B ENOSYS
This kernel does not implement
.BR getcpu (2).
-.SH VERSIONS
-This function is available since glibc 2.6.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR sched_getcpu ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-.BR sched_getcpu ()
-is glibc-specific.
+GNU.
+.SH HISTORY
+glibc 2.6.
.SH NOTES
The call
.PP
diff --git a/man3/seekdir.3 b/man3/seekdir.3
index 0d941a704..4a3fa5147 100644
--- a/man3/seekdir.3
+++ b/man3/seekdir.3
@@ -9,7 +9,7 @@
.\" 386BSD man pages
.\" Modified Sat Jul 24 18:25:21 1993 by Rik Faith (faith@cs.unc.edu)
.\"
-.TH seekdir 3 2023-02-05 "Linux man-pages 6.03"
+.TH seekdir 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
seekdir \- set the position of the next readdir() call in the directory
stream.
@@ -52,23 +52,23 @@ function returns no value.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR seekdir ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, 4.3BSD.
-.SH NOTES
+POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001, 4.3BSD.
+.SH CAVEATS
Up to glibc 2.1.1, the type of the
.I loc
argument was
diff --git a/man3/sem_close.3 b/man3/sem_close.3
index 1cc0afb5d..88adb8785 100644
--- a/man3/sem_close.3
+++ b/man3/sem_close.3
@@ -3,7 +3,7 @@
.\"
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
-.TH sem_close 3 2022-12-15 "Linux man-pages 6.03"
+.TH sem_close 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
sem_close \- close a named semaphore
.SH LIBRARY
@@ -35,22 +35,22 @@ is not a valid semaphore.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR sem_close ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008.
+POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001.
.SH NOTES
All open named semaphores are automatically closed on process
termination, or upon
diff --git a/man3/sem_destroy.3 b/man3/sem_destroy.3
index ebbf68b12..524a318d8 100644
--- a/man3/sem_destroy.3
+++ b/man3/sem_destroy.3
@@ -3,7 +3,7 @@
.\"
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
-.TH sem_destroy 3 2022-12-15 "Linux man-pages 6.03"
+.TH sem_destroy 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
sem_destroy \- destroy an unnamed semaphore
.SH LIBRARY
@@ -47,22 +47,22 @@ is not a valid semaphore.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR sem_destroy ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008.
+POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001.
.SH NOTES
An unnamed semaphore should be destroyed with
.BR sem_destroy ()
diff --git a/man3/sem_getvalue.3 b/man3/sem_getvalue.3
index 4e839fc98..6e529bab5 100644
--- a/man3/sem_getvalue.3
+++ b/man3/sem_getvalue.3
@@ -3,7 +3,7 @@
.\"
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
-.TH sem_getvalue 3 2022-12-15 "Linux man-pages 6.03"
+.TH sem_getvalue 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
sem_getvalue \- get the value of a semaphore
.SH LIBRARY
@@ -49,22 +49,22 @@ is valid.)
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR sem_getvalue ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008.
+POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001.
.SH NOTES
The value of the semaphore may already have changed by the time
.BR sem_getvalue ()
diff --git a/man3/sem_init.3 b/man3/sem_init.3
index abc822c4b..5f9c352af 100644
--- a/man3/sem_init.3
+++ b/man3/sem_init.3
@@ -3,7 +3,7 @@
.\"
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
-.TH sem_init 3 2022-12-15 "Linux man-pages 6.03"
+.TH sem_init 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
sem_init \- initialize an unnamed semaphore
.SH LIBRARY
@@ -76,23 +76,23 @@ but the system does not support process-shared semaphores (see
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR sem_init ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
+POSIX.1-2008.
+.SH HISTORY
POSIX.1-2001.
-.SH NOTES
+.PP
Bizarrely, POSIX.1-2001 does not specify the value that should
be returned by a successful call to
.BR sem_init ().
diff --git a/man3/sem_open.3 b/man3/sem_open.3
index 79b48bf05..0845be985 100644
--- a/man3/sem_open.3
+++ b/man3/sem_open.3
@@ -3,7 +3,7 @@
.\"
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
-.TH sem_open 3 2022-12-15 "Linux man-pages 6.03"
+.TH sem_open 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
sem_open \- initialize and open a named semaphore
.SH LIBRARY
@@ -151,22 +151,22 @@ Insufficient memory.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR sem_open ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008.
+POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001.
.SH SEE ALSO
.BR sem_close (3),
.BR sem_getvalue (3),
diff --git a/man3/sem_post.3 b/man3/sem_post.3
index e7643138a..5406484fc 100644
--- a/man3/sem_post.3
+++ b/man3/sem_post.3
@@ -3,7 +3,7 @@
.\"
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
-.TH sem_post 3 2022-12-15 "Linux man-pages 6.03"
+.TH sem_post 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
sem_post \- unlock a semaphore
.SH LIBRARY
@@ -42,21 +42,21 @@ The maximum allowable value for a semaphore would be exceeded.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR sem_post ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
+POSIX.1-2008.
+.SH HISTORY
POSIX.1-2001.
.SH NOTES
.BR sem_post ()
diff --git a/man3/sem_unlink.3 b/man3/sem_unlink.3
index ade49b0ac..434d14521 100644
--- a/man3/sem_unlink.3
+++ b/man3/sem_unlink.3
@@ -3,7 +3,7 @@
.\"
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
-.TH sem_unlink 3 2022-12-15 "Linux man-pages 6.03"
+.TH sem_unlink 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
sem_unlink \- remove a named semaphore
.SH LIBRARY
@@ -43,22 +43,22 @@ There is no semaphore with the given
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR sem_unlink ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008.
+POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001.
.SH SEE ALSO
.BR sem_getvalue (3),
.BR sem_open (3),
diff --git a/man3/sem_wait.3 b/man3/sem_wait.3
index e08e53f0d..b1302ca32 100644
--- a/man3/sem_wait.3
+++ b/man3/sem_wait.3
@@ -3,7 +3,7 @@
.\"
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
-.TH sem_wait 3 2022-12-15 "Linux man-pages 6.03"
+.TH sem_wait 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
sem_wait, sem_timedwait, sem_trywait \- lock a semaphore
.SH LIBRARY
@@ -114,24 +114,24 @@ The call timed out before the semaphore could be locked.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR sem_wait (),
.BR sem_trywait (),
.BR sem_timedwait ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008.
+POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001.
.SH EXAMPLES
The (somewhat trivial) program shown below operates on an
unnamed semaphore.
@@ -173,14 +173,14 @@ sem_timedwait() timed out
#include <stdlib.h>
#include <time.h>
#include <unistd.h>
-
+\&
#include <assert.h>
-
+\&
sem_t sem;
-
+\&
#define handle_error(msg) \e
do { perror(msg); exit(EXIT_FAILURE); } while (0)
-
+\&
static void
handler(int sig)
{
@@ -190,47 +190,47 @@ handler(int sig)
_exit(EXIT_FAILURE);
}
}
-
+\&
int
main(int argc, char *argv[])
{
struct sigaction sa;
struct timespec ts;
int s;
-
+\&
if (argc != 3) {
fprintf(stderr, "Usage: %s <alarm\-secs> <wait\-secs>\en",
argv[0]);
exit(EXIT_FAILURE);
}
-
+\&
if (sem_init(&sem, 0, 0) == \-1)
handle_error("sem_init");
-
+\&
/* Establish SIGALRM handler; set alarm timer using argv[1]. */
-
+\&
sa.sa_handler = handler;
sigemptyset(&sa.sa_mask);
sa.sa_flags = 0;
if (sigaction(SIGALRM, &sa, NULL) == \-1)
handle_error("sigaction");
-
+\&
alarm(atoi(argv[1]));
-
+\&
/* Calculate relative interval as current time plus
number of seconds given argv[2]. */
-
+\&
if (clock_gettime(CLOCK_REALTIME, &ts) == \-1)
handle_error("clock_gettime");
-
+\&
ts.tv_sec += atoi(argv[2]);
-
+\&
printf("%s() about to call sem_timedwait()\en", __func__);
while ((s = sem_timedwait(&sem, &ts)) == \-1 && errno == EINTR)
continue; /* Restart if interrupted by handler. */
-
+\&
/* Check what happened. */
-
+\&
if (s == \-1) {
if (errno == ETIMEDOUT)
printf("sem_timedwait() timed out\en");
@@ -238,7 +238,7 @@ main(int argc, char *argv[])
perror("sem_timedwait");
} else
printf("sem_timedwait() succeeded\en");
-
+\&
exit((s == 0) ? EXIT_SUCCESS : EXIT_FAILURE);
}
.EE
diff --git a/man3/setaliasent.3 b/man3/setaliasent.3
index 1c7892849..45fb54861 100644
--- a/man3/setaliasent.3
+++ b/man3/setaliasent.3
@@ -5,7 +5,7 @@
.\"
.\" Polished a bit, added a little, aeb
.\"
-.TH setaliasent 3 2022-12-15 "Linux man-pages 6.03"
+.TH setaliasent 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
setaliasent, endaliasent, getaliasent, getaliasent_r,
getaliasbyname, getaliasbyname_r \- read an alias entry
@@ -105,35 +105,36 @@ file.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR setaliasent (),
.BR endaliasent (),
.BR getaliasent_r (),
.BR getaliasbyname_r ()
T} Thread safety MT-Safe locale
T{
+.na
+.nh
.BR getaliasent (),
.BR getaliasbyname ()
T} Thread safety MT-Unsafe
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-These routines are glibc-specific.
+GNU.
+.SH HISTORY
The NeXT system has similar routines:
.PP
.in +4n
.EX
#include <aliasdb.h>
-
+\&
void alias_setent(void);
void alias_endent(void);
alias_ent *alias_getent(void);
@@ -151,12 +152,12 @@ It will dump all names in the alias database.
#include <errno.h>
#include <stdio.h>
#include <stdlib.h>
-
+\&
int
main(void)
{
struct aliasent *al;
-
+\&
setaliasent();
for (;;) {
al = getaliasent();
diff --git a/man3/setbuf.3 b/man3/setbuf.3
index 1ae1cf299..ad998c307 100644
--- a/man3/setbuf.3
+++ b/man3/setbuf.3
@@ -18,7 +18,7 @@
.\" Correction, 2000-03-03, Andreas Jaeger <aj@suse.de>
.\" Added return value for setvbuf, aeb,
.\"
-.TH setbuf 3 2023-02-05 "Linux man-pages 6.03"
+.TH setbuf 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
setbuf, setbuffer, setlinebuf, setvbuf \- stream buffering operations
.SH LIBRARY
@@ -142,30 +142,34 @@ The other functions do not return a value.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR setbuf (),
.BR setbuffer (),
.BR setlinebuf (),
.BR setvbuf ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-The
+.TP
+.BR setbuf ()
+.TQ
+.BR setvbuf ()
+C11, POSIX.1-2008.
+.SH HISTORY
+.TP
.BR setbuf ()
-and
+.TQ
.BR setvbuf ()
-functions conform to C99.
-.SH NOTES
+C89, POSIX.1-2001.
+.SH CAVEATS
POSIX notes
.\" https://www.austingroupbugs.net/view.php?id=397#c799
.\" 0000397: setbuf and errno
@@ -201,12 +205,12 @@ For example, the following is invalid:
.\" [[invalid]] SRC BEGIN (setbuf.c)
.EX
#include <stdio.h>
-
+\&
int
main(void)
{
char buf[BUFSIZ];
-
+\&
setbuf(stdout, buf);
printf("Hello, world!\en");
return 0;
diff --git a/man3/setenv.3 b/man3/setenv.3
index 0561854ec..0fe652162 100644
--- a/man3/setenv.3
+++ b/man3/setenv.3
@@ -15,7 +15,7 @@
.\" Noted nonstandard behavior of setenv() if name contains '='
.\" 2005-08-12, mtk, glibc 2.3.4 fixed the "name contains '='" bug
.\"
-.TH setenv 3 2023-02-05 "Linux man-pages 6.03"
+.TH setenv 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
setenv \- change or add an environment variable
.SH LIBRARY
@@ -104,29 +104,23 @@ Insufficient memory to add a new variable to the environment.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR setenv (),
.BR unsetenv ()
T} Thread safety MT-Unsafe const:env
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, 4.3BSD.
-.SH NOTES
-POSIX.1 does not require
-.BR setenv ()
-or
-.BR unsetenv ()
-to be reentrant.
+POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001, 4.3BSD.
.PP
Prior to glibc 2.2.2,
.BR unsetenv ()
@@ -135,6 +129,12 @@ as returning
.IR void ;
more recent glibc versions follow the
POSIX.1-compliant prototype shown in the SYNOPSIS.
+.SH CAVEATS
+POSIX.1 does not require
+.BR setenv ()
+or
+.BR unsetenv ()
+to be reentrant.
.SH BUGS
POSIX.1 specifies that if
.I name
diff --git a/man3/setjmp.3 b/man3/setjmp.3
index e9f22daf0..5133f89b3 100644
--- a/man3/setjmp.3
+++ b/man3/setjmp.3
@@ -3,7 +3,7 @@
.\"
.\" SPDX-License-Identifier: GPL-2.0-or-later
.\"
-.TH setjmp 3 2023-02-05 "Linux man-pages 6.03"
+.TH setjmp 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
setjmp, sigsetjmp, longjmp, siglongjmp \- performing a nonlocal goto
.SH LIBRARY
@@ -121,34 +121,48 @@ functions do not return.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR setjmp (),
.BR sigsetjmp ()
T} Thread safety MT-Safe
T{
+.na
+.nh
.BR longjmp (),
.BR siglongjmp ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-.BR setjmp (),
-.BR longjmp ():
-POSIX.1-2001, POSIX.1-2008, C99.
+.TP
+.BR setjmp ()
+.TQ
+.BR longjmp ()
+C11, POSIX.1-2008.
+.TP
+.BR sigsetjmp ()
+.TQ
+.BR siglongjmp ()
+POSIX.1-2008.
+.SH HISTORY
+.TP
+.BR setjmp ()
+.TQ
+.BR longjmp ()
+POSIX.1-2001, C89.
+.TP
+.BR sigsetjmp ()
+.TQ
+.BR siglongjmp ()
+POSIX.1-2001.
.PP
-.BR sigsetjmp (),
-.BR siglongjmp ():
-POSIX.1-2001, POSIX.1-2008.
-.SH NOTES
POSIX does not specify whether
.BR setjmp ()
will save the signal mask
@@ -188,7 +202,7 @@ with calls to
with a nonzero
.I savesigs
argument.
-.PP
+.SH NOTES
.BR setjmp ()
and
.BR longjmp ()
@@ -203,7 +217,7 @@ if you want to portably save and restore signal masks, use
and
.BR siglongjmp ().
See also the discussion of program readability below.
-.PP
+.SH CAVEATS
The compiler may optimize variables into registers, and
.BR longjmp ()
may restore the values of other registers in addition to the
@@ -259,7 +273,7 @@ calls may not even be in the same source code module.
In summary, nonlocal gotos can make programs harder to understand
and maintain, and an alternative should be used if possible.
.\"
-.SS Caveats
+.SS Undefined Behavior
If the function which called
.BR setjmp ()
returns before
diff --git a/man3/setlocale.3 b/man3/setlocale.3
index e0d625733..d2b511e2b 100644
--- a/man3/setlocale.3
+++ b/man3/setlocale.3
@@ -10,7 +10,7 @@
.\" Modified Tue Aug 24 17:11:01 1999 by Andries Brouwer (aeb@cwi.nl)
.\" Modified Tue Feb 6 03:31:55 2001 by Andries Brouwer (aeb@cwi.nl)
.\"
-.TH setlocale 3 2023-02-05 "Linux man-pages 6.03"
+.TH setlocale 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
setlocale \- set the current locale
.SH LIBRARY
@@ -34,8 +34,6 @@ the program's current locale is modified according to the arguments.
The argument
.I category
determines which parts of the program's current locale should be modified.
-.ad l
-.nh
.TS
lB lB
lB lx.
@@ -76,8 +74,6 @@ LC_TIME T{
Formatting of date and time values
T}
.TE
-.hy
-.ad
.PP
The categories marked with an asterisk in the above table
are GNU extensions.
@@ -184,34 +180,62 @@ The return value is NULL if the request cannot be honored.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR setlocale ()
T} Thread safety MT-Unsafe const:locale env
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, C99.
-.PP
-The C standards specify only the categories
-.BR LC_ALL ,
-.BR LC_COLLATE ,
-.BR LC_CTYPE ,
-.BR LC_MONETARY ,
-.BR LC_NUMERIC ,
-and
-.BR LC_TIME .
-POSIX.1 adds
-.BR LC_MESSAGES .
-The remaining categories are GNU extensions.
+C11, POSIX.1-2008.
+.SS Categories
+.TP
+.B LC_ALL
+.TQ
+.B LC_COLLATE
+.TQ
+.B LC_CTYPE
+.TQ
+.B LC_MONETARY
+.TQ
+.B LC_NUMERIC
+.TQ
+.B LC_TIME
+C11, POSIX.1-2008.
+.TP
+.B LC_MESSAGES
+POSIX.1-2008.
+.TP
+Others:
+GNU.
+.SH HISTORY
+POSIX.1-2001, C89.
+.SS Categories
+.TP
+.B LC_ALL
+.TQ
+.B LC_COLLATE
+.TQ
+.B LC_CTYPE
+.TQ
+.B LC_MONETARY
+.TQ
+.B LC_NUMERIC
+.TQ
+.B LC_TIME
+C89, POSIX.1-2001.
+.TP
+.B LC_MESSAGES
+POSIX.1-2001.
+.TP
+Others:
+GNU.
.SH SEE ALSO
.BR locale (1),
.BR localedef (1),
diff --git a/man3/setlogmask.3 b/man3/setlogmask.3
index afe2189dd..223b86461 100644
--- a/man3/setlogmask.3
+++ b/man3/setlogmask.3
@@ -3,7 +3,7 @@
.\"
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
-.TH setlogmask 3 2022-12-15 "Linux man-pages 6.03"
+.TH setlogmask 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
setlogmask \- set log priority mask
.SH LIBRARY
@@ -59,22 +59,22 @@ None.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR setlogmask ()
T} Thread safety MT-Unsafe race:LogMask
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008.
+POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001.
.\" Note that the description in POSIX.1-2001 is flawed.
.PP
.BR LOG_UPTO ()
diff --git a/man3/setnetgrent.3 b/man3/setnetgrent.3
index 9238c7ac6..8cc779fa8 100644
--- a/man3/setnetgrent.3
+++ b/man3/setnetgrent.3
@@ -6,7 +6,7 @@
.\" based on glibc infopages
.\" polished - aeb
.\"
-.TH setnetgrent 3 2023-02-05 "Linux man-pages 6.03"
+.TH setnetgrent 3 2023-07-30 "Linux man-pages 6.05.01"
.SH NAME
setnetgrent, endnetgrent, getnetgrent, getnetgrent_r, innetgr \-
handle network group entries
@@ -34,22 +34,18 @@ Standard C library
Feature Test Macro Requirements for glibc (see
.BR feature_test_macros (7)):
.RE
-.ad l
.PP
-.nh
-.BR setnetgrent (),
-.BR endnetgrent (),
-.BR getnetgrent (),
-.BR getnetgrent_r (),
-.BR innetgr ():
-.hy
+.BR \%setnetgrent (),
+.BR \%endnetgrent (),
+.BR \%getnetgrent (),
+.BR \%getnetgrent_r (),
+.BR \%innetgr ():
.nf
Since glibc 2.19:
_DEFAULT_SOURCE
glibc 2.19 and earlier:
_BSD_SOURCE || _SVID_SOURCE
.fi
-.ad
.SH DESCRIPTION
The
.I netgroup
@@ -101,35 +97,43 @@ These functions return 1 on success and 0 for failure.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lb lb lbx
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR setnetgrent (),
.BR getnetgrent_r (),
.BR innetgr ()
T} Thread safety T{
+.na
+.nh
MT-Unsafe race:netgrent
locale
T}
T{
+.na
+.nh
.BR endnetgrent ()
T} Thread safety T{
+.na
+.nh
MT-Unsafe race:netgrent
T}
T{
+.na
+.nh
.BR getnetgrent ()
T} Thread safety T{
+.na
+.nh
MT-Unsafe race:netgrent
race:netgrentbuf locale
T}
.TE
-.hy
-.ad
.sp 1
In the above table,
.I netgrent
@@ -144,8 +148,13 @@ or
.BR endnetgrent ()
are used in parallel in different threads of a program,
then data races could occur.
+.SH VERSIONS
+In the BSD implementation,
+.BR setnetgrent ()
+returns void.
.SH STANDARDS
-These functions are not in POSIX.1, but
+None.
+.SH HISTORY
.BR setnetgrent (),
.BR endnetgrent (),
.BR getnetgrent (),
@@ -155,10 +164,6 @@ are available on most UNIX systems.
.BR getnetgrent_r ()
is not widely available on other systems.
.\" getnetgrent_r() is on Solaris 8 and AIX 5.1, but not the BSDs.
-.SH NOTES
-In the BSD implementation,
-.BR setnetgrent ()
-returns void.
.SH SEE ALSO
.BR sethostent (3),
.BR setprotoent (3),
diff --git a/man3/shm_open.3 b/man3/shm_open.3
index 24eddb027..c5756c475 100644
--- a/man3/shm_open.3
+++ b/man3/shm_open.3
@@ -3,7 +3,7 @@
.\"
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
-.TH shm_open 3 2023-02-05 "Linux man-pages 6.03"
+.TH shm_open 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
shm_open, shm_unlink \- create/open or unlink POSIX shared memory objects
.SH LIBRARY
@@ -220,37 +220,23 @@ An attempt was to made to
a
.I name
that does not exist.
-.SH VERSIONS
-These functions are provided in glibc 2.2 and later.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR shm_open (),
.BR shm_unlink ()
T} Thread safety MT-Safe locale
.TE
-.hy
-.ad
.sp 1
-.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008.
-.PP
-POSIX.1-2001 says that the group ownership of a newly created shared
-memory object is set to either the calling process's effective group ID
-or "a system default group ID".
-POSIX.1-2008 says that the group ownership
-may be set to either the calling process's effective group ID
-or, if the object is visible in the filesystem,
-the group ID of the parent directory.
-.SH NOTES
+.SH VERSIONS
POSIX leaves the behavior of the combination of
.B O_RDONLY
and
@@ -264,6 +250,19 @@ of a dedicated
.BR tmpfs (5)
filesystem that is normally mounted under
.IR /dev/shm .
+.SH STANDARDS
+POSIX.1-2008.
+.SH HISTORY
+glibc 2.2.
+POSIX.1-2001.
+.PP
+POSIX.1-2001 says that the group ownership of a newly created shared
+memory object is set to either the calling process's effective group ID
+or "a system default group ID".
+POSIX.1-2008 says that the group ownership
+may be set to either the calling process's effective group ID
+or, if the object is visible in the filesystem,
+the group ID of the parent directory.
.SH EXAMPLES
The programs below employ POSIX shared memory and POSIX unnamed semaphores
to exchange a piece of data.
@@ -299,15 +298,15 @@ on the memory object that is shared between the two programs.
#include <sys/mman.h>
#include <sys/stat.h>
#include <unistd.h>
-
+\&
#define errExit(msg) do { perror(msg); exit(EXIT_FAILURE); \e
} while (0)
-
+\&
#define BUF_SIZE 1024 /* Maximum size for exchanged string */
-
+\&
/* Define a structure that will be imposed on the shared
memory object */
-
+\&
struct shmbuf {
sem_t sem1; /* POSIX unnamed semaphore */
sem_t sem2; /* POSIX unnamed semaphore */
@@ -336,74 +335,74 @@ to tell the "send" program that it may now access the shared memory.
.\" SRC BEGIN (pshm_ucase_bounce.c)
.EX
/* pshm_ucase_bounce.c
-
+\&
Licensed under GNU General Public License v2 or later.
*/
#include <ctype.h>
-
+\&
#include "pshm_ucase.h"
-
+\&
int
main(int argc, char *argv[])
{
int fd;
char *shmpath;
struct shmbuf *shmp;
-
+\&
if (argc != 2) {
fprintf(stderr, "Usage: %s /shm\-path\en", argv[0]);
exit(EXIT_FAILURE);
}
-
+\&
shmpath = argv[1];
-
+\&
/* Create shared memory object and set its size to the size
of our structure. */
-
+\&
fd = shm_open(shmpath, O_CREAT | O_EXCL | O_RDWR, 0600);
if (fd == \-1)
errExit("shm_open");
-
+\&
if (ftruncate(fd, sizeof(struct shmbuf)) == \-1)
errExit("ftruncate");
-
+\&
/* Map the object into the caller\[aq]s address space. */
-
+\&
shmp = mmap(NULL, sizeof(*shmp), PROT_READ | PROT_WRITE,
MAP_SHARED, fd, 0);
if (shmp == MAP_FAILED)
errExit("mmap");
-
+\&
/* Initialize semaphores as process\-shared, with value 0. */
-
+\&
if (sem_init(&shmp\->sem1, 1, 0) == \-1)
errExit("sem_init\-sem1");
if (sem_init(&shmp\->sem2, 1, 0) == \-1)
errExit("sem_init\-sem2");
-
+\&
/* Wait for \[aq]sem1\[aq] to be posted by peer before touching
shared memory. */
-
+\&
if (sem_wait(&shmp\->sem1) == \-1)
errExit("sem_wait");
-
+\&
/* Convert data in shared memory into upper case. */
-
+\&
for (size_t j = 0; j < shmp\->cnt; j++)
shmp\->buf[j] = toupper((unsigned char) shmp\->buf[j]);
-
+\&
/* Post \[aq]sem2\[aq] to tell the peer that it can now
access the modified data in shared memory. */
-
+\&
if (sem_post(&shmp\->sem2) == \-1)
errExit("sem_post");
-
+\&
/* Unlink the shared memory object. Even if the peer process
is still using the object, this is okay. The object will
be removed only after all open references are closed. */
-
+\&
shm_unlink(shmpath);
-
+\&
exit(EXIT_SUCCESS);
}
.EE
@@ -429,13 +428,13 @@ on standard output.
.\" SRC BEGIN (pshm_ucase_send.c)
.EX
/* pshm_ucase_send.c
-
+\&
Licensed under GNU General Public License v2 or later.
*/
#include <string.h>
-
+\&
#include "pshm_ucase.h"
-
+\&
int
main(int argc, char *argv[])
{
@@ -443,54 +442,54 @@ main(int argc, char *argv[])
char *shmpath, *string;
size_t len;
struct shmbuf *shmp;
-
+\&
if (argc != 3) {
fprintf(stderr, "Usage: %s /shm\-path string\en", argv[0]);
exit(EXIT_FAILURE);
}
-
+\&
shmpath = argv[1];
string = argv[2];
len = strlen(string);
-
+\&
if (len > BUF_SIZE) {
fprintf(stderr, "String is too long\en");
exit(EXIT_FAILURE);
}
-
+\&
/* Open the existing shared memory object and map it
into the caller\[aq]s address space. */
-
+\&
fd = shm_open(shmpath, O_RDWR, 0);
if (fd == \-1)
errExit("shm_open");
-
+\&
shmp = mmap(NULL, sizeof(*shmp), PROT_READ | PROT_WRITE,
MAP_SHARED, fd, 0);
if (shmp == MAP_FAILED)
errExit("mmap");
-
+\&
/* Copy data into the shared memory object. */
-
+\&
shmp\->cnt = len;
memcpy(&shmp\->buf, string, len);
-
+\&
/* Tell peer that it can now access shared memory. */
-
+\&
if (sem_post(&shmp\->sem1) == \-1)
errExit("sem_post");
-
+\&
/* Wait until peer says that it has finished accessing
the shared memory. */
-
+\&
if (sem_wait(&shmp\->sem2) == \-1)
errExit("sem_wait");
-
+\&
/* Write modified data in shared memory to standard output. */
-
+\&
write(STDOUT_FILENO, &shmp\->buf, len);
write(STDOUT_FILENO, "\en", 1);
-
+\&
exit(EXIT_SUCCESS);
}
.EE
diff --git a/man3/siginterrupt.3 b/man3/siginterrupt.3
index 95191dab0..3f4c2461f 100644
--- a/man3/siginterrupt.3
+++ b/man3/siginterrupt.3
@@ -9,7 +9,7 @@
.\" 386BSD man pages
.\" Modified Sun Jul 25 10:40:51 1993 by Rik Faith (faith@cs.unc.edu)
.\" Modified Sun Apr 14 16:20:34 1996 by Andries Brouwer (aeb@cwi.nl)
-.TH siginterrupt 3 2023-02-05 "Linux man-pages 6.03"
+.TH siginterrupt 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
siginterrupt \- allow signals to interrupt system calls
.SH LIBRARY
@@ -19,7 +19,7 @@ Standard C library
.nf
.B #include <signal.h>
.PP
-.BI "int siginterrupt(int " sig ", int " flag );
+.BI "[[deprecated]] int siginterrupt(int " sig ", int " flag );
.fi
.PP
.RS -4
@@ -69,27 +69,28 @@ The specified signal number is invalid.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lb lb lbx
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR siginterrupt ()
T} Thread safety T{
+.na
+.nh
MT-Unsafe const:sigintr
T}
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
+POSIX.1-2008.
+.SH HISTORY
4.3BSD, POSIX.1-2001.
-POSIX.1-2008 marks
-.BR siginterrupt ()
-as obsolete, recommending the use of
+Obsolete in POSIX.1-2008,
+recommending the use of
.BR sigaction (2)
with the
.B SA_RESTART
diff --git a/man3/signbit.3 b/man3/signbit.3
index da6de44bd..5dddad653 100644
--- a/man3/signbit.3
+++ b/man3/signbit.3
@@ -7,7 +7,7 @@
.\"
.\" Based on glibc infopages, copyright Free Software Foundation
.\"
-.TH signbit 3 2022-12-15 "Linux man-pages 6.03"
+.TH signbit 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
signbit \- test sign of a real floating-point number
.SH LIBRARY
@@ -57,22 +57,23 @@ No errors occur.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR signbit ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, C99.
+C11, POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001, C99.
+.PP
This function is defined in IEC 559 (and the appendix with
recommended functions in IEEE 754/IEEE 854).
.SH SEE ALSO
diff --git a/man3/significand.3 b/man3/significand.3
index 7ff36d43b..794955ac0 100644
--- a/man3/significand.3
+++ b/man3/significand.3
@@ -5,7 +5,7 @@
.\"
.\" heavily based on glibc infopages, copyright Free Software Foundation
.\"
-.TH significand 3 2023-02-05 "Linux man-pages 6.03"
+.TH significand 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
significand, significandf, significandl \-
get mantissa of floating-point number
@@ -50,28 +50,29 @@ for IEEE 754 conformance.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR significand (),
.BR significandf (),
.BR significandl ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-These functions are nonstandard; the
-.I double
-version is available on a number of other systems.
-.\" .SH HISTORY
-.\" This function came from BSD.
+None.
+.TP
+.BR significand ()
+BSD.
+.SH HISTORY
+.TP
+.BR significand ()
+BSD.
.SH SEE ALSO
.BR ilogb (3),
.BR scalb (3)
diff --git a/man3/sigpause.3 b/man3/sigpause.3
index a65ef208b..492d9fabc 100644
--- a/man3/sigpause.3
+++ b/man3/sigpause.3
@@ -3,7 +3,7 @@
.\"
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
-.TH sigpause 3 2023-02-05 "Linux man-pages 6.03"
+.TH sigpause 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
sigpause \- atomically release blocked signals and wait for interrupt
.SH LIBRARY
@@ -13,9 +13,9 @@ Standard C library
.nf
.B #include <signal.h>
.PP
-.BI "int sigpause(int " sigmask "); /* BSD (but see NOTES) */"
+.BI "[[deprecated]] int sigpause(int " sigmask "); /* BSD (but see NOTES) */"
.PP
-.BI "int sigpause(int " sig "); /* System V / UNIX 95 */"
+.BI "[[deprecated]] int sigpause(int " sig "); /* POSIX.1 / SysV / UNIX 95 */"
.fi
.SH DESCRIPTION
Don't use this function.
@@ -40,19 +40,17 @@ set to
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR sigpause ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
.\" FIXME: The marking is different from that in the glibc manual,
.\" marking in glibc manual is more detailed:
@@ -62,29 +60,7 @@ T} Thread safety MT-Safe
.\" glibc manual says /!linux!bsd indicate the preceding marker only applies
.\" when the underlying kernel is neither Linux nor a BSD kernel.
.\" So, it is safe in Linux kernel.
-.SH STANDARDS
-The System V version of
-.BR sigpause ()
-is standardized in POSIX.1-2001.
-It is also specified in POSIX.1-2008, where it is marked obsolete.
-.SH NOTES
-.SS History
-The classical BSD version of this function appeared in 4.2BSD.
-It sets the process's signal mask to
-.IR sigmask .
-UNIX 95 standardized the incompatible System V version of
-this function, which removes only the specified signal
-.I sig
-from the process's signal mask.
-.\" __xpg_sigpause: UNIX 95, spec 1170, SVID, SVr4, XPG
-The unfortunate situation with two incompatible functions with the
-same name was solved by the
-.BR \%sigsuspend (2)
-function, that takes a
-.I "sigset_t\ *"
-argument (instead of an
-.IR int ).
-.SS Linux notes
+.SH VERSIONS
On Linux, this routine is a system call only on the Sparc (sparc64)
architecture.
.PP
@@ -119,6 +95,27 @@ should be amended to use
.\" For the BSD version, one usually uses a zero
.\" .I sigmask
.\" to indicate that no signals are to be blocked.
+.SH STANDARDS
+POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001.
+Obsoleted in POSIX.1-2008.
+.PP
+The classical BSD version of this function appeared in 4.2BSD.
+It sets the process's signal mask to
+.IR sigmask .
+UNIX 95 standardized the incompatible System V version of
+this function, which removes only the specified signal
+.I sig
+from the process's signal mask.
+.\" __xpg_sigpause: UNIX 95, spec 1170, SVID, SVr4, XPG
+The unfortunate situation with two incompatible functions with the
+same name was solved by the
+.BR \%sigsuspend (2)
+function, that takes a
+.I "sigset_t\ *"
+argument (instead of an
+.IR int ).
.SH SEE ALSO
.BR kill (2),
.BR sigaction (2),
diff --git a/man3/sigqueue.3 b/man3/sigqueue.3
index f9892c43c..98238a40e 100644
--- a/man3/sigqueue.3
+++ b/man3/sigqueue.3
@@ -6,7 +6,7 @@
.\" added note on self-signaling, aeb, 2002-06-07
.\" added note on CAP_KILL, mtk, 2004-06-16
.\"
-.TH sigqueue 3 2022-12-15 "Linux man-pages 6.03"
+.TH sigqueue 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
sigqueue \- queue a signal and data to a process
.SH LIBRARY
@@ -97,38 +97,22 @@ For the required permissions, see
.B ESRCH
No process has a PID matching
.IR pid .
-.SH VERSIONS
-.BR sigqueue ()
-and the underlying
-.BR rt_sigqueueinfo (2)
-system call first appeared in Linux 2.2.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR sigqueue ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
-.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008.
-.SH NOTES
-If this function results in the sending of a signal to the process
-that invoked it, and that signal was not blocked by the calling thread,
-and no other threads were willing to handle this signal (either by
-having it unblocked, or by waiting for it using
-.BR sigwait (3)),
-then at least some signal must be delivered to this thread before this
-function returns.
+.SH VERSIONS
.SS C library/kernel differences
On Linux,
.BR sigqueue ()
@@ -156,6 +140,19 @@ uinfo.si_uid = getuid(); /* Real UID of sender */
uinfo.si_value = val; /* Argument supplied to sigqueue() */
.EE
.in
+.SH STANDARDS
+POSIX.1-2008.
+.SH HISTORY
+Linux 2.2.
+POSIX.1-2001.
+.SH NOTES
+If this function results in the sending of a signal to the process
+that invoked it, and that signal was not blocked by the calling thread,
+and no other threads were willing to handle this signal (either by
+having it unblocked, or by waiting for it using
+.BR sigwait (3)),
+then at least some signal must be delivered to this thread before this
+function returns.
.SH SEE ALSO
.BR kill (2),
.BR rt_sigqueueinfo (2),
diff --git a/man3/sigset.3 b/man3/sigset.3
index e64387e49..f7fad4d3d 100644
--- a/man3/sigset.3
+++ b/man3/sigset.3
@@ -3,7 +3,7 @@
.\"
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
-.TH sigset 3 2022-12-15 "Linux man-pages 6.03"
+.TH sigset 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
sigset, sighold, sigrelse, sigignore \- System V signal API
.SH LIBRARY
@@ -15,11 +15,11 @@ Standard C library
.PP
.B typedef void (*sighandler_t)(int);
.PP
-.BI "sighandler_t sigset(int " sig ", sighandler_t " disp );
+.BI "[[deprecated]] sighandler_t sigset(int " sig ", sighandler_t " disp );
.PP
-.BI "int sighold(int " sig );
-.BI "int sigrelse(int " sig );
-.BI "int sigignore(int " sig );
+.BI "[[deprecated]] int sighold(int " sig );
+.BI "[[deprecated]] int sigrelse(int " sig );
+.BI "[[deprecated]] int sigignore(int " sig );
.fi
.PP
.RS -4
@@ -153,33 +153,32 @@ see the errors under
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR sigset (),
.BR sighold (),
.BR sigrelse (),
.BR sigignore ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-SVr4, POSIX.1-2001, POSIX.1-2008.
-These functions are obsolete: do not use them in new programs.
-POSIX.1-2008 marks
-.BR sighold (),
-.BR sigignore (),
-.BR sigpause (3),
-.BR sigrelse (),
-and
-.BR sigset ()
+POSIX.1-2008.
+.TP
+.I sighandler_t
+GNU.
+POSIX.1 uses the same type but without a
+.IR typedef .
+.SH HISTORY
+glibc 2.1.
+SVr4, POSIX.1-2001.
+POSIX.1-2008 marks these functions
as obsolete, recommending the use of
.BR sigaction (2),
.BR sigprocmask (2),
@@ -188,14 +187,6 @@ and
.BR sigsuspend (2)
instead.
.SH NOTES
-These functions appeared in glibc 2.1.
-.PP
-The
-.I sighandler_t
-type is a GNU extension; it is used on this page only to make the
-.BR sigset ()
-prototype more easily readable.
-.PP
The
.BR sigset ()
function provides reliable signal handling semantics (as when calling
diff --git a/man3/sigsetops.3 b/man3/sigsetops.3
index 414afae3c..4172dbce4 100644
--- a/man3/sigsetops.3
+++ b/man3/sigsetops.3
@@ -9,7 +9,7 @@
.\" 2007-10-26 mdw added wording that a sigset_t must be initialized
.\" prior to use
.\"
-.TH SIGSETOPS 3 2023-02-05 "Linux man-pages 6.03"
+.TH SIGSETOPS 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
sigemptyset, sigfillset, sigaddset, sigdelset, sigismember \- POSIX
signal set operations
@@ -114,14 +114,14 @@ is not a valid signal.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR sigemptyset (),
.BR sigfillset (),
.BR sigaddset (),
@@ -132,21 +132,9 @@ T{
.BR sigandset ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
-.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008.
-.SH NOTES
-When creating a filled signal set, the glibc
-.BR sigfillset ()
-function does not include the two real-time signals used internally
-by the NPTL threading implementation.
-See
-.BR nptl (7)
-for details.
-.\"
-.SS glibc extensions
+.SH VERSIONS
+.SS GNU
If the
.B _GNU_SOURCE
feature test macro is defined, then \fI<signal.h>\fP
@@ -184,6 +172,18 @@ Both functions return 0 on success, and \-1 on failure.
.PP
These functions are nonstandard (a few other systems provide similar
functions) and their use should be avoided in portable applications.
+.SH STANDARDS
+POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001.
+.SH NOTES
+When creating a filled signal set, the glibc
+.BR sigfillset ()
+function does not include the two real-time signals used internally
+by the NPTL threading implementation.
+See
+.BR nptl (7)
+for details.
.SH SEE ALSO
.BR sigaction (2),
.BR sigpending (2),
diff --git a/man3/sigvec.3 b/man3/sigvec.3
index c219a402e..c4529a883 100644
--- a/man3/sigvec.3
+++ b/man3/sigvec.3
@@ -3,7 +3,7 @@
.\"
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
-.TH sigvec 3 2023-02-05 "Linux man-pages 6.03"
+.TH sigvec 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
sigvec, sigblock, sigsetmask, siggetmask, sigmask \- BSD signal API
.SH LIBRARY
@@ -13,13 +13,14 @@ Standard C library
.nf
.B #include <signal.h>
.PP
-.BI "int sigvec(int " sig ", const struct sigvec *" vec ", struct sigvec *" ovec );
+.BI "[[deprecated]] int sigvec(int " sig ", const struct sigvec *" vec ,
+.BI " struct sigvec *" ovec );
.PP
-.BI "int sigmask(int " signum );
+.BI "[[deprecated]] int sigmask(int " signum );
.PP
-.BI "int sigblock(int " mask );
-.BI "int sigsetmask(int " mask );
-.B int siggetmask(void);
+.BI "[[deprecated]] int sigblock(int " mask );
+.BI "[[deprecated]] int sigsetmask(int " mask );
+.B [[deprecated]] int siggetmask(void);
.fi
.PP
.RS -4
@@ -208,24 +209,17 @@ See the ERRORS under
.BR sigaction (2)
and
.BR sigprocmask (2).
-.SH VERSIONS
-Starting with glibc 2.21, the GNU C library no longer exports the
-.BR sigvec ()
-function as part of the ABI.
-(To ensure backward compatibility,
-the glibc symbol versioning scheme continues to export the interface
-to binaries linked against older versions of the library.)
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR sigvec (),
.BR sigmask (),
.BR sigblock (),
@@ -233,15 +227,25 @@ T{
.BR siggetmask ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-All of these functions were in
-4.3BSD, except
-.BR siggetmask (),
-whose origin is unclear.
-These functions are obsolete: do not use them in new programs.
+None.
+.SH HISTORY
+.TP
+.BR sigvec ()
+.TQ
+.BR sigblock ()
+.TQ
+.BR sigmask ()
+.TQ
+.BR sigsetmask ()
+4.3BSD.
+.TP
+.BR siggetmask ()
+Unclear origin.
+.TP
+.BR sigvec ()
+Removed in glibc 2.21.
.SH NOTES
On 4.3BSD, the
.BR signal ()
diff --git a/man3/sigwait.3 b/man3/sigwait.3
index b9f9e7e3c..38250ec9f 100644
--- a/man3/sigwait.3
+++ b/man3/sigwait.3
@@ -4,7 +4,7 @@
.\"
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
-.TH sigwait 3 2023-02-05 "Linux man-pages 6.03"
+.TH sigwait 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
sigwait \- wait for a signal
.SH LIBRARY
@@ -67,23 +67,19 @@ contains an invalid signal number.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR sigwait ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
-.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008.
-.SH NOTES
+.SH VERSIONS
.BR sigwait ()
is implemented using
.BR sigtimedwait (2).
@@ -95,6 +91,10 @@ are used internally by the NPTL threading implementation.
See
.BR nptl (7)
for details.
+.SH STANDARDS
+POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001.
.SH EXAMPLES
See
.BR pthread_sigmask (3).
diff --git a/man3/sin.3 b/man3/sin.3
index 64cbe9556..8ef99de43 100644
--- a/man3/sin.3
+++ b/man3/sin.3
@@ -13,7 +13,7 @@
.\" Modified 2002-07-27 by Walter Harms
.\" (walter.harms@informatik.uni-oldenburg.de)
.\"
-.TH sin 3 2023-02-05 "Linux man-pages 6.03"
+.TH sin 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
sin, sinf, sinl \- sine function
.SH LIBRARY
@@ -82,32 +82,32 @@ is raised.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR sin (),
.BR sinf (),
.BR sinl ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-C99, POSIX.1-2001, POSIX.1-2008.
+C11, POSIX.1-2008.
+.SH HISTORY
+C99, POSIX.1-2001.
.PP
The variant returning
.I double
also conforms to
-SVr4, 4.3BSD.
+SVr4, 4.3BSD, C89.
.SH BUGS
Before glibc 2.10, the glibc implementation did not set
-.\" http://sources.redhat.com/bugzilla/show_bug.cgi?id=6781
+.\" https://www.sourceware.org/bugzilla/show_bug.cgi?id=6781
.I errno
to
.B EDOM
diff --git a/man3/sincos.3 b/man3/sincos.3
index 9c694b597..79b920db0 100644
--- a/man3/sincos.3
+++ b/man3/sincos.3
@@ -5,7 +5,7 @@
.\"
.\" SPDX-License-Identifier: GPL-1.0-or-later
.\"
-.TH sincos 3 2023-01-07 "Linux man-pages 6.03"
+.TH sincos 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
sincos, sincosf, sincosl \- calculate sin and cos simultaneously
.SH LIBRARY
@@ -67,29 +67,27 @@ is set to
An invalid floating-point exception
.RB ( FE_INVALID )
is raised.
-.SH VERSIONS
-These functions were added in glibc 2.1.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR sincos (),
.BR sincosf (),
.BR sincosl ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-These functions are GNU extensions.
+GNU.
+.SH HISTORY
+glibc 2.1.
.SH NOTES
To see the performance advantage of
.BR sincos (),
diff --git a/man3/sinh.3 b/man3/sinh.3
index 94f5cc547..bc9d17e0e 100644
--- a/man3/sinh.3
+++ b/man3/sinh.3
@@ -14,7 +14,7 @@
.\" Modified 2002-07-27 by Walter Harms
.\" (walter.harms@informatik.uni-oldenburg.de)
.\"
-.TH sinh 3 2023-02-05 "Linux man-pages 6.03"
+.TH sinh 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
sinh, sinhf, sinhl \- hyperbolic sine function
.SH LIBRARY
@@ -98,29 +98,29 @@ is raised.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR sinh (),
.BR sinhf (),
.BR sinhl ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-C99, POSIX.1-2001, POSIX.1-2008.
+C11, POSIX.1-2008.
+.SH HISTORY
+C99, POSIX.1-2001.
.PP
The variant returning
.I double
also conforms to
-SVr4, 4.3BSD.
+SVr4, 4.3BSD, C89.
.SH SEE ALSO
.BR acosh (3),
.BR asinh (3),
diff --git a/man3/sleep.3 b/man3/sleep.3
index b7d7bdac4..cf87069ed 100644
--- a/man3/sleep.3
+++ b/man3/sleep.3
@@ -4,7 +4,7 @@
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
.\" Modified Sat Jul 24 18:16:02 1993 by Rik Faith (faith@cs.unc.edu)
-.TH sleep 3 2022-12-15 "Linux man-pages 6.03"
+.TH sleep 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
sleep \- sleep for a specified number of seconds
.SH LIBRARY
@@ -29,23 +29,19 @@ if the call was interrupted by a signal handler.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR sleep ()
T} Thread safety MT-Unsafe sig:SIGCHLD/linux
.TE
-.hy
-.ad
.sp 1
-.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008.
-.SH NOTES
+.SH VERSIONS
On Linux,
.BR sleep ()
is implemented via
@@ -53,7 +49,7 @@ is implemented via
See the
.BR nanosleep (2)
man page for a discussion of the clock used.
-.SS Portability notes
+.PP
On some systems,
.BR sleep ()
may be implemented using
@@ -66,7 +62,11 @@ mixing calls to
and
.BR sleep ()
is a bad idea.
-.PP
+.SH STANDARDS
+POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001.
+.SH CAVEATS
Using
.BR longjmp (3)
from a signal handler or modifying the handling of
diff --git a/man3/slist.3 b/man3/slist.3
index 045a3f629..98ce85937 100644
--- a/man3/slist.3
+++ b/man3/slist.3
@@ -5,7 +5,7 @@
.\" SPDX-License-Identifier: BSD-3-Clause
.\"
.\"
-.TH SLIST 3 2022-10-30 "Linux man-pages 6.03"
+.TH SLIST 3 2023-05-03 "Linux man-pages 6.05.01"
.SH NAME
SLIST_EMPTY,
SLIST_ENTRY,
@@ -241,9 +241,9 @@ structure, respectively.
returns an initializer that can be assigned to the list
.IR head .
.SH STANDARDS
-Not in POSIX.1, POSIX.1-2001, or POSIX.1-2008.
-Present on the BSDs
-(SLIST macros first appeared in 4.4BSD).
+BSD.
+.SH HISTORY
+4.4BSD.
.SH BUGS
.BR SLIST_FOREACH ()
doesn't allow
@@ -263,53 +263,53 @@ without interfering with the traversal.
#include <stdio.h>
#include <stdlib.h>
#include <sys/queue.h>
-
+\&
struct entry {
int data;
SLIST_ENTRY(entry) entries; /* Singly linked list */
};
-
+\&
SLIST_HEAD(slisthead, entry);
-
+\&
int
main(void)
{
struct entry *n1, *n2, *n3, *np;
struct slisthead head; /* Singly linked list
head */
-
+\&
SLIST_INIT(&head); /* Initialize the queue */
-
+\&
n1 = malloc(sizeof(struct entry)); /* Insert at the head */
SLIST_INSERT_HEAD(&head, n1, entries);
-
+\&
n2 = malloc(sizeof(struct entry)); /* Insert after */
SLIST_INSERT_AFTER(n1, n2, entries);
-
+\&
SLIST_REMOVE(&head, n2, entry, entries);/* Deletion */
free(n2);
-
+\&
n3 = SLIST_FIRST(&head);
SLIST_REMOVE_HEAD(&head, entries); /* Deletion from the head */
free(n3);
-
+\&
for (unsigned int i = 0; i < 5; i++) {
n1 = malloc(sizeof(struct entry));
SLIST_INSERT_HEAD(&head, n1, entries);
n1\->data = i;
}
-
+\&
/* Forward traversal */
SLIST_FOREACH(np, &head, entries)
printf("%i\en", np\->data);
-
+\&
while (!SLIST_EMPTY(&head)) { /* List deletion */
n1 = SLIST_FIRST(&head);
SLIST_REMOVE_HEAD(&head, entries);
free(n1);
}
SLIST_INIT(&head);
-
+\&
exit(EXIT_SUCCESS);
}
.EE
diff --git a/man3/sockatmark.3 b/man3/sockatmark.3
index d9ea1e573..ca039108e 100644
--- a/man3/sockatmark.3
+++ b/man3/sockatmark.3
@@ -3,7 +3,7 @@
.\"
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
-.TH sockatmark 3 2022-12-15 "Linux man-pages 6.03"
+.TH sockatmark 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
sockatmark \- determine whether socket is at out-of-band mark
.SH LIBRARY
@@ -53,28 +53,26 @@ is not a valid file descriptor.
is not a file descriptor to which
.BR sockatmark ()
can be applied.
-.SH VERSIONS
-.BR sockatmark ()
-was added in glibc 2.2.4.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR sockatmark ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008.
+POSIX.1-2008.
+.SH HISTORY
+glibc 2.2.4.
+POSIX.1-2001.
.SH NOTES
If
.BR sockatmark ()
@@ -109,24 +107,24 @@ and then read the byte of data at the mark:
char buf[BUF_LEN];
char oobdata;
int atmark, s;
-
+\&
for (;;) {
atmark = sockatmark(sockfd);
if (atmark == \-1) {
perror("sockatmark");
break;
}
-
+\&
if (atmark)
break;
-
+\&
s = read(sockfd, buf, BUF_LEN);
if (s == \-1)
perror("read");
if (s <= 0)
break;
}
-
+\&
if (atmark == 1) {
if (recv(sockfd, &oobdata, 1, MSG_OOB) == \-1) {
perror("recv");
diff --git a/man3/sqrt.3 b/man3/sqrt.3
index 9860fe876..fac38c071 100644
--- a/man3/sqrt.3
+++ b/man3/sqrt.3
@@ -12,7 +12,7 @@
.\" Modified 1993-07-24 by Rik Faith (faith@cs.unc.edu)
.\" Modified 2002-07-27 by Walter Harms
.\" (walter.harms@informatik.uni-oldenburg.de)
-.TH sqrt 3 2023-02-05 "Linux man-pages 6.03"
+.TH sqrt 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
sqrt, sqrtf, sqrtl \- square root function
.SH LIBRARY
@@ -81,29 +81,29 @@ is raised.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR sqrt (),
.BR sqrtf (),
.BR sqrtl ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-C99, POSIX.1-2001, POSIX.1-2008.
+C11, POSIX.1-2008.
+.SH HISTORY
+C99, POSIX.1-2001.
.PP
The variant returning
.I double
also conforms to
-SVr4, 4.3BSD.
+SVr4, 4.3BSD, C89.
.SH SEE ALSO
.BR cbrt (3),
.BR csqrt (3),
diff --git a/man3/sscanf.3 b/man3/sscanf.3
index 3c668d6aa..223f4f557 100644
--- a/man3/sscanf.3
+++ b/man3/sscanf.3
@@ -22,7 +22,7 @@
.\" Add ERRORS section.
.\" Document the 'a' and 'm' modifiers for dynamic string allocation.
.\"
-.TH sscanf 3 2023-02-05 "Linux man-pages 6.03"
+.TH sscanf 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
sscanf, vsscanf \- input string format conversion
.SH LIBRARY
@@ -527,13 +527,6 @@ The value
.B EOF
is returned if the end of input is reached before either the first
successful conversion or a matching failure occurs.
-.B EOF
-is also returned if a read error occurs,
-in which case the error indicator for the stream (see
-.BR ferror (3))
-is set, and
-.I errno
-is set to indicate the error.
.SH ERRORS
.TP
.B EILSEQ
@@ -549,23 +542,23 @@ Out of memory.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR sscanf (),
.BR vsscanf ()
T} Thread safety MT-Safe locale
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-These functions conform to C99 and POSIX.1-2001.
+C11, POSIX.1-2008.
+.SH HISTORY
+C89, POSIX.1-2001.
.PP
The
.B q
@@ -721,7 +714,7 @@ the returned string, as in the following example:
.EX
char *p;
int n;
-
+\&
errno = 0;
n = sscanf(str, "%m[a\-z]", &p);
if (n == 1) {
diff --git a/man3/stailq.3 b/man3/stailq.3
index fc2973d08..2fca2406f 100644
--- a/man3/stailq.3
+++ b/man3/stailq.3
@@ -5,7 +5,7 @@
.\" SPDX-License-Identifier: BSD-3-Clause
.\"
.\"
-.TH STAILQ 3 2023-02-05 "Linux man-pages 6.03"
+.TH STAILQ 3 2023-05-03 "Linux man-pages 6.05.01"
.SH NAME
.\"SIMPLEQ_CONCAT,
SIMPLEQ_EMPTY,
@@ -284,11 +284,7 @@ structure, respectively.
.BR STAILQ_HEAD_INITIALIZER ()
returns an initializer that can be assigned to the queue
.IR head .
-.SH STANDARDS
-Not in POSIX.1, POSIX.1-2001, or POSIX.1-2008.
-Present on the BSDs
-(STAILQ macros first appeared in 4.4BSD).
-.SH NOTES
+.SH VERSIONS
Some BSDs provide SIMPLEQ instead of STAILQ.
They are identical, but for historical reasons
they were named differently on different BSDs.
@@ -309,6 +305,10 @@ fixes this limitation by allowing
.I var
to safely be removed from the list and freed from within the loop
without interfering with the traversal.
+.SH STANDARDS
+BSD.
+.SH HISTORY
+4.4BSD.
.SH EXAMPLES
.\" SRC BEGIN (stailq.c)
.EX
@@ -316,39 +316,39 @@ without interfering with the traversal.
#include <stdio.h>
#include <stdlib.h>
#include <sys/queue.h>
-
+\&
struct entry {
int data;
STAILQ_ENTRY(entry) entries; /* Singly linked tail queue */
};
-
+\&
STAILQ_HEAD(stailhead, entry);
-
+\&
int
main(void)
{
struct entry *n1, *n2, *n3, *np;
struct stailhead head; /* Singly linked tail queue
head */
-
+\&
STAILQ_INIT(&head); /* Initialize the queue */
-
+\&
n1 = malloc(sizeof(struct entry)); /* Insert at the head */
STAILQ_INSERT_HEAD(&head, n1, entries);
-
+\&
n1 = malloc(sizeof(struct entry)); /* Insert at the tail */
STAILQ_INSERT_TAIL(&head, n1, entries);
-
+\&
n2 = malloc(sizeof(struct entry)); /* Insert after */
STAILQ_INSERT_AFTER(&head, n1, n2, entries);
-
+\&
STAILQ_REMOVE(&head, n2, entry, entries); /* Deletion */
free(n2);
-
+\&
n3 = STAILQ_FIRST(&head);
STAILQ_REMOVE_HEAD(&head, entries); /* Deletion from the head */
free(n3);
-
+\&
n1 = STAILQ_FIRST(&head);
n1\->data = 0;
for (unsigned int i = 1; i < 5; i++) {
@@ -367,7 +367,7 @@ main(void)
n1 = n2;
}
STAILQ_INIT(&head);
-
+\&
exit(EXIT_SUCCESS);
}
.EE
diff --git a/man3/static_assert.3 b/man3/static_assert.3
index 334e73d6d..86c6673dc 100644
--- a/man3/static_assert.3
+++ b/man3/static_assert.3
@@ -2,7 +2,7 @@
.\"
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
-.TH static_assert 3 2023-01-26 "Linux man-pages 6.03"
+.TH static_assert 3 2023-05-03 "Linux man-pages 6.05.01"
.SH NAME
static_assert, _Static_assert \- fail compilation if assertion is false
.SH LIBRARY
@@ -67,7 +67,7 @@ The following program uses the macro to get the size of an array safely.
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-
+\&
/*
* This macro behaves like static_assert(), failing to
* compile if its argument is not true. However, it always
@@ -83,33 +83,33 @@ The following program uses the macro to get the size of an array safely.
} \e
) \e
)
-
+\&
#define is_same_type(a, b) \e
__builtin_types_compatible_p(typeof(a), typeof(b))
-
+\&
#define is_array(arr) (!is_same_type((arr), &*(arr)))
#define must_be_array(arr) must_be(is_array(arr))
-
+\&
#define sizeof_array(arr) (sizeof(arr) + must_be_array(arr))
#define nitems(arr) (sizeof((arr)) / sizeof((arr)[0]) \e
+ must_be_array(arr))
-
+\&
int foo[10];
int8_t bar[sizeof_array(foo)];
-
+\&
int
main(void)
{
for (size_t i = 0; i < nitems(foo); i++) {
foo[i] = i;
}
-
+\&
memcpy(bar, foo, sizeof_array(bar));
-
+\&
for (size_t i = 0; i < nitems(bar); i++) {
printf("%d,", bar[i]);
}
-
+\&
exit(EXIT_SUCCESS);
}
.EE
diff --git a/man3/statvfs.3 b/man3/statvfs.3
index 6cbe38d2f..9b1978bec 100644
--- a/man3/statvfs.3
+++ b/man3/statvfs.3
@@ -8,7 +8,7 @@
.\"
.\" Modified 2004-06-23 by Michael Kerrisk <mtk.manpages@gmail.com>
.\"
-.TH statvfs 3 2022-12-15 "Linux man-pages 6.03"
+.TH statvfs 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
statvfs, fstatvfs \- get filesystem statistics
.SH LIBRARY
@@ -176,24 +176,20 @@ Some values were too large to be represented in the returned struct.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR statvfs (),
.BR fstatvfs ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
-.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008.
-.PP
+.SH VERSIONS
Only the
.B ST_NOSUID
and
@@ -210,22 +206,6 @@ and
.BR fstatfs (2)
to support this library call.
.PP
-Before glibc 2.13,
-.\" glibc commit 3cdaa6adb113a088fdfb87aa6d7747557eccc58d
-.BR statvfs ()
-populated the bits of the
-.I f_flag
-field by scanning the mount options shown in
-.IR /proc/mounts .
-However, starting with Linux 2.6.36, the underlying
-.BR statfs (2)
-system call provides the necessary information via the
-.I f_flags
-field, and since glibc 2.13, the
-.BR statvfs ()
-function will use information from that field rather than scanning
-.IR /proc/mounts .
-.PP
The glibc implementations of
.PP
.in +4n
@@ -245,5 +225,33 @@ fields returned by a call to
.BR statvfs ()
with the argument
.IR path .
+.PP
+Under Linux,
+.I f_favail
+is always the same as
+.IR f_ffree ,
+and there's no way for a filesystem to report otherwise.
+This is not an issue,
+since no filesystems with an inode root reservation exist.
+.SH STANDARDS
+POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001.
+.PP
+Before glibc 2.13,
+.\" glibc commit 3cdaa6adb113a088fdfb87aa6d7747557eccc58d
+.BR statvfs ()
+populated the bits of the
+.I f_flag
+field by scanning the mount options shown in
+.IR /proc/mounts .
+However, starting with Linux 2.6.36, the underlying
+.BR statfs (2)
+system call provides the necessary information via the
+.I f_flags
+field, and since glibc 2.13, the
+.BR statvfs ()
+function will use information from that field rather than scanning
+.IR /proc/mounts .
.SH SEE ALSO
.BR statfs (2)
diff --git a/man3/stdarg.3 b/man3/stdarg.3
index 2f47409c0..f3762f7c1 100644
--- a/man3/stdarg.3
+++ b/man3/stdarg.3
@@ -13,7 +13,7 @@
.\" Converted for Linux, Mon Nov 29 15:11:11 1993, faith@cs.unc.edu
.\" Additions, 2001-10-14, aeb
.\"
-.TH stdarg 3 2023-02-05 "Linux man-pages 6.03"
+.TH stdarg 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
stdarg, va_start, va_arg, va_end, va_copy \- variable argument lists
.SH LIBRARY
@@ -204,28 +204,39 @@ instead, since that was the name used in the draft proposal.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR va_start (),
.BR va_end (),
.BR va_copy ()
T} Thread safety MT-Safe
T{
+.na
+.nh
.BR va_arg ()
T} Thread safety MT-Safe race:ap
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-C99.
-.SH BUGS
+C11, POSIX.1-2008.
+.SH HISTORY
+.TP
+.BR va_start ()
+.TQ
+.BR va_arg ()
+.TQ
+.BR va_end ()
+C89, POSIX.1-2001.
+.TP
+.BR va_copy ()
+C99, POSIX.1-2001.
+.SH CAVEATS
Unlike the historical
.B varargs
macros, the
@@ -250,16 +261,16 @@ with each format character based on the type.
.EX
#include <stdio.h>
#include <stdarg.h>
-
+\&
void
foo(char *fmt, ...) /* \[aq]...\[aq] is C syntax for a variadic function */
-
+\&
{
va_list ap;
int d;
char c;
char *s;
-
+\&
va_start(ap, fmt);
while (*fmt)
switch (*fmt++) {
diff --git a/man3/stdin.3 b/man3/stdin.3
index 7c21a299d..afe1fa5e0 100644
--- a/man3/stdin.3
+++ b/man3/stdin.3
@@ -10,7 +10,7 @@
.\" 2005-06-16 mtk, mentioned freopen()
.\" 2007-12-08, mtk, Converted from mdoc to man macros
.\"
-.TH stdin 3 2022-12-29 "Linux man-pages 6.03"
+.TH stdin 3 2023-03-30 "Linux man-pages 6.05.01"
.SH NAME
stdin, stdout, stderr \- standard I/O streams
.SH LIBRARY
@@ -114,14 +114,12 @@ The standard streams are closed by a call to
.BR exit (3)
and by normal program termination.
.SH STANDARDS
-The
-.IR stdin ,
-.IR stdout ,
-and
-.I stderr
-macros conform to C99
-and this standard also stipulates that these three
+C11, POSIX.1-2008.
+.PP
+The standards also stipulate that these three
streams shall be open at program startup.
+.SH HISTORY
+C89, POSIX.1-2001.
.SH NOTES
The stream
.I stderr
diff --git a/man3/stdio.3 b/man3/stdio.3
index d52a24556..3a5a447c7 100644
--- a/man3/stdio.3
+++ b/man3/stdio.3
@@ -9,7 +9,7 @@
.\" Converted for Linux, Mon Nov 29 16:07:22 1993, faith@cs.unc.edu
.\" Modified, 2001-12-26, aeb
.\"
-.TH stdio 3 2022-12-29 "Linux man-pages 6.03"
+.TH stdio 3 2023-07-30 "Linux man-pages 6.05.01"
.SH NAME
stdio \- standard input/output library functions
.SH LIBRARY
@@ -156,8 +156,6 @@ and
.B putchar
exist and will be used if the macros definitions are explicitly removed.
.SS List of functions
-.nh
-.ad l
.TS
;
lb lbx
@@ -330,12 +328,10 @@ T}
input format conversion
T}
.TE
-.ad
-.hy
.SH STANDARDS
-The
-.I stdio
-library conforms to C99.
+C11, POSIX.1-2008.
+.SH HISTORY
+C89, POSIX.1-2001.
.SH SEE ALSO
.BR close (2),
.BR open (2),
diff --git a/man3/stdio_ext.3 b/man3/stdio_ext.3
index b200a07e5..c154620bb 100644
--- a/man3/stdio_ext.3
+++ b/man3/stdio_ext.3
@@ -3,7 +3,7 @@
.\"
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
-.TH stdio_ext 3 2023-01-07 "Linux man-pages 6.03"
+.TH stdio_ext 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
__fbufsize, __flbf, __fpending, __fpurge, __freadable,
__freading, __fsetlocking, __fwritable, __fwriting, _flushlbf \-
@@ -108,20 +108,22 @@ function discards the contents of the stream's buffer.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR __fbufsize (),
.BR __fpending (),
.BR __fpurge (),
.BR __fsetlocking ()
T} Thread safety MT-Safe race:stream
T{
+.na
+.nh
.BR __flbf (),
.BR __freadable (),
.BR __freading (),
@@ -130,8 +132,6 @@ T{
.BR _flushlbf ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
.SH SEE ALSO
.BR flockfile (3),
diff --git a/man3/stpncpy.3 b/man3/stpncpy.3
index b097301f8..617eb9b53 100644
--- a/man3/stpncpy.3
+++ b/man3/stpncpy.3
@@ -3,7 +3,7 @@
.\"
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
-.TH stpncpy 3 2023-01-26 "Linux man-pages 6.03"
+.TH stpncpy 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
stpncpy, strncpy
\- zero a fixed-width buffer and
@@ -16,10 +16,10 @@ Standard C library
.nf
.B #include <string.h>
.PP
-.BI "char *stpncpy(char " dst "[restrict ." sz "], \
+.BI "char *strncpy(char " dst "[restrict ." sz "], \
const char *restrict " src ,
.BI " size_t " sz );
-.BI "char *strncpy(char " dst "[restrict ." sz "], \
+.BI "char *stpncpy(char " dst "[restrict ." sz "], \
const char *restrict " src ,
.BI " size_t " sz );
.fi
@@ -52,56 +52,60 @@ An implementation of these functions might be:
.in +4n
.EX
char *
-stpncpy(char *restrict dst, const char *restrict src, size_t sz)
-{
- bzero(dst, sz);
- return mempcpy(dst, src, strnlen(src, sz));
-}
-
-char *
strncpy(char *restrict dst, const char *restrict src, size_t sz)
{
stpncpy(dst, src, sz);
return dst;
}
+\&
+char *
+stpncpy(char *restrict dst, const char *restrict src, size_t sz)
+{
+ bzero(dst, sz);
+ return mempcpy(dst, src, strnlen(src, sz));
+}
.EE
.in
.SH RETURN VALUE
.TP
-.BR stpncpy ()
-returns a pointer to
-one after the last character in the destination character sequence.
-.TP
.BR strncpy ()
returns
.IR dst .
+.TP
+.BR stpncpy ()
+returns a pointer to
+one after the last character in the destination character sequence.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR stpncpy (),
.BR strncpy ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
.TP
+.BR strncpy ()
+C11, POSIX.1-2008.
+.TP
.BR stpncpy ()
POSIX.1-2008.
-.\" Before that, it was a GNU extension.
-.\" It first appeared in glibc 1.07 in 1993.
+.SH STANDARDS
.TP
.BR strncpy ()
-POSIX.1-2001, POSIX.1-2008, C99, SVr4, 4.3BSD.
+C89, POSIX.1-2001, SVr4, 4.3BSD.
+.TP
+.BR stpncpy ()
+glibc 1.07.
+POSIX.1-2008.
.SH CAVEATS
The name of these functions is confusing.
These functions produce a null-padded character sequence,
@@ -125,7 +129,7 @@ instead of its size.
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-
+\&
int
main(void)
{
@@ -133,23 +137,23 @@ main(void)
char buf1[20];
char buf2[20];
size_t len;
-
- if (sizeof(buf1) < strlen("Hello world!"))
- warnx("stpncpy: truncating character sequence");
- p = stpncpy(buf1, "Hello world!", sizeof(buf1));
- len = p \- buf1;
-
- printf("[len = %zu]: ", len);
- printf("%.*s\en", (int) len, buf1); // "Hello world!"
-
+\&
if (sizeof(buf2) < strlen("Hello world!"))
warnx("strncpy: truncating character sequence");
strncpy(buf2, "Hello world!", sizeof(buf2));
len = strnlen(buf2, sizeof(buf2));
-
+\&
printf("[len = %zu]: ", len);
printf("%.*s\en", (int) len, buf2); // "Hello world!"
-
+\&
+ if (sizeof(buf1) < strlen("Hello world!"))
+ warnx("stpncpy: truncating character sequence");
+ p = stpncpy(buf1, "Hello world!", sizeof(buf1));
+ len = p \- buf1;
+\&
+ printf("[len = %zu]: ", len);
+ printf("%.*s\en", (int) len, buf1); // "Hello world!"
+\&
exit(EXIT_SUCCESS);
}
.EE
diff --git a/man3/strcasecmp.3 b/man3/strcasecmp.3
index 83755fe80..f19a5dab8 100644
--- a/man3/strcasecmp.3
+++ b/man3/strcasecmp.3
@@ -8,7 +8,7 @@
.\" Lewine's _POSIX Programmer's Guide_ (O'Reilly & Associates, 1991)
.\" 386BSD man pages
.\" Modified Sat Jul 24 18:12:45 1993 by Rik Faith (faith@cs.unc.edu)
-.TH strcasecmp 3 2023-01-07 "Linux man-pages 6.03"
+.TH strcasecmp 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
strcasecmp, strncasecmp \- compare two strings ignoring case
.SH LIBRARY
@@ -61,24 +61,24 @@ respectively.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR strcasecmp (),
.BR strncasecmp ()
T} Thread safety MT-Safe locale
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-4.4BSD, POSIX.1-2001, POSIX.1-2008.
-.SH NOTES
+POSIX.1-2008.
+.SH HISTORY
+4.4BSD, POSIX.1-2001.
+.PP
The
.BR strcasecmp ()
and
diff --git a/man3/strchr.3 b/man3/strchr.3
index 7be7ce0f1..91bd8aad5 100644
--- a/man3/strchr.3
+++ b/man3/strchr.3
@@ -11,7 +11,7 @@
.\" 2006-05-19, Justin Pryzby <pryzbyj@justinpryzby.com>
.\" Document strchrnul(3).
.\"
-.TH strchr 3 2023-02-05 "Linux man-pages 6.03"
+.TH strchr 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
strchr, strrchr, strchrnul \- locate character in string
.SH LIBRARY
@@ -82,35 +82,41 @@ or a pointer to the null byte at the end of
(i.e.,
.IR "s+strlen(s)" )
if the character is not found.
-.SH VERSIONS
-.BR strchrnul ()
-was added in glibc 2.1.1.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR strchr (),
.BR strrchr (),
.BR strchrnul ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-.BR strchr (),
-.BR strrchr ():
-POSIX.1-2001, POSIX.1-2008, C99, SVr4, 4.3BSD.
-.PP
+.TP
+.BR strchr ()
+.TQ
+.BR strrchr ()
+C11, POSIX.1-2008.
+.TP
+.BR strchrnul ()
+GNU.
+.SH HISTORY
+.TP
+.BR strchr ()
+.TQ
+.BR strrchr ()
+POSIX.1-2001, C89, SVr4, 4.3BSD.
+.TP
.BR strchrnul ()
-is a GNU extension.
+glibc 2.1.1.
.SH SEE ALSO
.BR memchr (3),
.BR string (3),
diff --git a/man3/strcmp.3 b/man3/strcmp.3
index a37c3adfe..57b378e64 100644
--- a/man3/strcmp.3
+++ b/man3/strcmp.3
@@ -11,7 +11,7 @@
.\" Modified Sat Jul 24 18:08:52 1993 by Rik Faith (faith@cs.unc.edu)
.\" Modified 2001-08-31, aeb
.\"
-.TH strcmp 3 2023-02-05 "Linux man-pages 6.03"
+.TH strcmp 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
strcmp, strncmp \- compare two strings
.SH LIBRARY
@@ -79,24 +79,20 @@ match, or be greater than
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR strcmp (),
.BR strncmp ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
-.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, C99, SVr4, 4.3BSD.
-.SH NOTES
+.SH VERSIONS
POSIX.1 specifies only that:
.RS
.PP
@@ -114,6 +110,10 @@ the last compared byte in
from the last compared byte in
.IR s1 .
(If the two characters are equal, this difference is 0.)
+.SH STANDARDS
+C11, POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001, C89, SVr4, 4.3BSD.
.SH EXAMPLES
The program below can be used to demonstrate the operation of
.BR strcmp ()
@@ -160,28 +160,28 @@ $ \fB./string_comp ABC AB 2\fP
.\" SRC BEGIN (string_comp.c)
.EX
/* string_comp.c
-
+\&
Licensed under GNU General Public License v2 or later.
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-
+\&
int
main(int argc, char *argv[])
{
int res;
-
+\&
if (argc < 3) {
fprintf(stderr, "Usage: %s <str1> <str2> [<len>]\en", argv[0]);
exit(EXIT_FAILURE);
}
-
+\&
if (argc == 3)
res = strcmp(argv[1], argv[2]);
else
res = strncmp(argv[1], argv[2], atoi(argv[3]));
-
+\&
if (res == 0) {
printf("<str1> and <str2> are equal");
if (argc > 3)
@@ -192,7 +192,7 @@ main(int argc, char *argv[])
} else {
printf("<str1> is greater than <str2> (%d)\en", res);
}
-
+\&
exit(EXIT_SUCCESS);
}
.EE
diff --git a/man3/strcoll.3 b/man3/strcoll.3
index d6b18c625..e8146b7a1 100644
--- a/man3/strcoll.3
+++ b/man3/strcoll.3
@@ -8,7 +8,7 @@
.\" Lewine's _POSIX Programmer's Guide_ (O'Reilly & Associates, 1991)
.\" 386BSD man pages
.\" Modified Sun Jul 25 10:40:44 1993 by Rik Faith (faith@cs.unc.edu)
-.TH strcoll 3 2023-01-07 "Linux man-pages 6.03"
+.TH strcoll 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
strcoll \- compare two strings using the current locale
.SH LIBRARY
@@ -53,22 +53,22 @@ as appropriate for the current locale.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR strcoll ()
T} Thread safety MT-Safe locale
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, C99, SVr4, 4.3BSD.
+C11, POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001, C89, SVr4, 4.3BSD.
.SH NOTES
In the
.I "POSIX"
diff --git a/man3/strcpy.3 b/man3/strcpy.3
index d4cdcbf32..63ed1278d 100644
--- a/man3/strcpy.3
+++ b/man3/strcpy.3
@@ -3,7 +3,7 @@
.\"
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
-.TH strcpy 3 2023-02-05 "Linux man-pages 6.03"
+.TH strcpy 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
stpcpy, strcpy, strcat \- copy or catenate a string
.SH LIBRARY
@@ -63,20 +63,20 @@ char *
stpcpy(char *restrict dst, const char *restrict src)
{
char *p;
-
+\&
p = mempcpy(dst, src, strlen(src));
*p = \[aq]\e0\[aq];
-
+\&
return p;
}
-
+\&
char *
strcpy(char *restrict dst, const char *restrict src)
{
stpcpy(dst, src);
return dst;
}
-
+\&
char *
strcat(char *restrict dst, const char *restrict src)
{
@@ -99,21 +99,19 @@ These functions return
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR stpcpy (),
.BR strcpy (),
.BR strcat ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
.TP
@@ -123,7 +121,16 @@ POSIX.1-2008.
.BR strcpy ()
.TQ
.BR strcat ()
-POSIX.1-2001, POSIX.1-2008, C99, SVr4, 4.3BSD.
+C11, POSIX.1-2008.
+.SH STANDARDS
+.TP
+.BR stpcpy ()
+POSIX.1-2008.
+.TP
+.BR strcpy ()
+.TQ
+.BR strcat ()
+POSIX.1-2001, C89, SVr4, 4.3BSD.
.SH CAVEATS
The strings
.I src
@@ -151,7 +158,7 @@ Shlemiel the painter
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-
+\&
int
main(void)
{
@@ -159,7 +166,7 @@ main(void)
char *buf1;
char *buf2;
size_t len, maxsize;
-
+\&
maxsize = strlen("Hello ") + strlen("world") + strlen("!") + 1;
buf1 = malloc(sizeof(*buf1) * maxsize);
if (buf1 == NULL)
@@ -167,26 +174,26 @@ main(void)
buf2 = malloc(sizeof(*buf2) * maxsize);
if (buf2 == NULL)
err(EXIT_FAILURE, "malloc()");
-
+\&
p = buf1;
p = stpcpy(p, "Hello ");
p = stpcpy(p, "world");
p = stpcpy(p, "!");
len = p \- buf1;
-
+\&
printf("[len = %zu]: ", len);
puts(buf1); // "Hello world!"
free(buf1);
-
+\&
strcpy(buf2, "Hello ");
strcat(buf2, "world");
strcat(buf2, "!");
len = strlen(buf2);
-
+\&
printf("[len = %zu]: ", len);
puts(buf2); // "Hello world!"
free(buf2);
-
+\&
exit(EXIT_SUCCESS);
}
.EE
diff --git a/man3/strdup.3 b/man3/strdup.3
index efeb5921b..e78721949 100644
--- a/man3/strdup.3
+++ b/man3/strdup.3
@@ -9,7 +9,7 @@
.\" 386BSD man pages
.\" Modified Sun Jul 25 10:41:34 1993 by Rik Faith (faith@cs.unc.edu)
.\" Modified Wed Oct 17 01:12:26 2001 by John Levon <moz@compsoc.man.ac.uk>
-.TH strdup 3 2023-02-05 "Linux man-pages 6.03"
+.TH strdup 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
strdup, strndup, strdupa, strndupa \- duplicate a string
.SH LIBRARY
@@ -98,33 +98,44 @@ Insufficient memory available to allocate duplicate string.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR strdup (),
.BR strndup (),
.BR strdupa (),
.BR strndupa ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-.\" 4.3BSD-Reno, not (first) 4.3BSD.
+.TP
.BR strdup ()
-conforms to SVr4, 4.3BSD, POSIX.1-2001.
+.TQ
.BR strndup ()
-conforms to POSIX.1-2008.
+POSIX.1-2008.
+.TP
.BR strdupa ()
-and
+.TQ
+.BR strndupa ()
+GNU.
+.SH HISTORY
+.TP
+.BR strdup ()
+SVr4, 4.3BSD-Reno, POSIX.1-2001.
+.TP
+.BR strndup ()
+POSIX.1-2008.
+.TP
+.BR strdupa ()
+.TQ
.BR strndupa ()
-are GNU extensions.
+GNU.
.SH SEE ALSO
.BR alloca (3),
.BR calloc (3),
diff --git a/man3/strerror.3 b/man3/strerror.3
index 6240e48a6..5ed507e96 100644
--- a/man3/strerror.3
+++ b/man3/strerror.3
@@ -17,7 +17,7 @@
.\" 2005-12-13, mtk, Substantial rewrite of strerror_r() description
.\" Addition of extra material on portability and standards.
.\"
-.TH strerror 3 2023-02-05 "Linux man-pages 6.03"
+.TH strerror 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
strerror, strerrorname_np, strerrordesc_np, strerror_r, strerror_l \-
return string describing error number
@@ -216,62 +216,55 @@ is not a valid error number.
.TP
.B ERANGE
Insufficient storage was supplied to contain the error description string.
-.SH VERSIONS
-The
-.BR strerror_l ()
-function first appeared in glibc 2.6.
-.PP
-The
-.BR strerrorname_np ()
-and
-.BR strerrordesc_np ()
-functions first appeared in glibc 2.32.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lb lb lbx
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR strerror ()
T} Thread safety T{
+.na
+.nh
MT-Unsafe race:strerror
T}
T{
+.na
+.nh
.BR strerrorname_np (),
.BR strerrordesc_np ()
T} Thread safety MT-Safe
T{
+.na
+.nh
.BR strerror_r (),
.BR strerror_l ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
+.TP
.BR strerror ()
-is specified by POSIX.1-2001, POSIX.1-2008, and C99.
+C11, POSIX.1-2008.
+.TP
.BR strerror_r ()
-is specified by POSIX.1-2001 and POSIX.1-2008.
.\" FIXME . for later review when Issue 8 is one day released...
.\" A future POSIX.1 may remove strerror_r()
.\" http://austingroupbugs.net/tag_view_page.php?tag_id=8
.\" http://austingroupbugs.net/view.php?id=508
-.PP
+.TQ
.BR strerror_l ()
-is specified in POSIX.1-2008.
-.PP
-The GNU-specific functions
-.BR strerror_r (),
-.BR strerrorname_np (),
-and
+POSIX.1-2008.
+.TP
+.BR strerrorname_np ()
+.TQ
.BR strerrordesc_np ()
-are nonstandard extensions.
+GNU.
.PP
POSIX.1-2001 permits
.BR strerror ()
@@ -292,6 +285,22 @@ to
.B EINVAL
if the error number is unknown.
C99 and POSIX.1-2008 require the return value to be non-NULL.
+.SH HISTORY
+.TP
+.BR strerror ()
+POSIX.1-2001, C89.
+.TP
+.BR strerror_r ()
+POSIX.1-2001.
+.TP
+.BR strerror_l ()
+glibc 2.6.
+POSIX.1-2008.
+.TP
+.BR strerrorname_np ()
+.TQ
+.BR strerrordesc_np ()
+glibc 2.32.
.SH NOTES
The GNU C Library uses a buffer of 1024 characters for
.BR strerror ().
diff --git a/man3/strfmon.3 b/man3/strfmon.3
index 0a35adaf4..a8e34f560 100644
--- a/man3/strfmon.3
+++ b/man3/strfmon.3
@@ -3,7 +3,7 @@
.\"
.\" SPDX-License-Identifier: GPL-2.0-or-later
.\"
-.TH strfmon 3 2023-02-05 "Linux man-pages 6.03"
+.TH strfmon 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
strfmon, strfmon_l \- convert monetary value to a string
.SH LIBRARY
@@ -145,25 +145,27 @@ returns \-1, and the contents of the array is undefined.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR strfmon ()
T} Thread safety MT-Safe locale
T{
+.na
+.nh
.BR strfmon_l ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008.
+POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001.
.SH EXAMPLES
The call
.PP
diff --git a/man3/strfromd.3 b/man3/strfromd.3
index d5efa6fc0..6bcc11345 100644
--- a/man3/strfromd.3
+++ b/man3/strfromd.3
@@ -10,7 +10,7 @@
.\" ISO/IEC TS 18661-1 technical specification.
.\" snprintf and other man.3 pages.
.\"
-.TH strfromd 3 2023-02-05 "Linux man-pages 6.03"
+.TH strfromd 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
strfromd, strfromf, strfroml \- convert a floating-point value into
a string
@@ -148,13 +148,6 @@ not counting the terminating null byte.
Thus, a return value of
.I n
or greater means that the output was truncated.
-.SH VERSIONS
-The
-.BR strfromd (),
-.BR strfromf (),
-and
-.BR strfroml ()
-functions are available since glibc 2.25.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7)
@@ -162,14 +155,14 @@ and the
.B POSIX Safety Concepts
section in GNU C Library manual.
.PP
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR strfromd (),
.BR strfromf (),
.BR strfroml ()
@@ -177,19 +170,20 @@ T} Thread safety MT-Safe locale
\^ Async-signal safety AS-Unsafe heap
\^ Async-cancel safety AC-Unsafe mem
.TE
-.hy
-.ad
.sp 1
Note: these attributes are preliminary.
.SH STANDARDS
-C99, ISO/IEC TS 18661-1.
-.SH NOTES
-The
-.BR strfromd (),
-.BR strfromf (),
-and
+ISO/IEC TS 18661-1.
+.SH VERSIONS
+.TP
+.BR strfromd ()
+.TQ
+.BR strfromf ()
+.TQ
.BR strfroml ()
-functions take account of the
+glibc 2.25.
+.SH NOTES
+These functions take account of the
.B LC_NUMERIC
category of the current locale.
.SH EXAMPLES
diff --git a/man3/strfry.3 b/man3/strfry.3
index a52874c1c..74a342b17 100644
--- a/man3/strfry.3
+++ b/man3/strfry.3
@@ -8,7 +8,7 @@
.\" Lewine's _POSIX Programmer's Guide_ (O'Reilly & Associates, 1991)
.\" 386BSD man pages
.\" Modified Sun Jul 25 10:39:43 1993 by Rik Faith (faith@cs.unc.edu)
-.TH strfry 3 2022-12-15 "Linux man-pages 6.03"
+.TH strfry 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
strfry \- randomize a string
.SH LIBRARY
@@ -37,25 +37,20 @@ string.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR strfry ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-The
-.BR strfry ()
-function is unique to the
-GNU C Library.
+GNU.
.SH SEE ALSO
.BR memfrob (3),
.BR string (3)
diff --git a/man3/strftime.3 b/man3/strftime.3
index c16af1341..412ba064d 100644
--- a/man3/strftime.3
+++ b/man3/strftime.3
@@ -15,7 +15,7 @@
.\" 2005-11-22 mtk, added glibc Notes covering optional 'flag' and
.\" 'width' components of conversion specifications.
.\"
-.TH strftime 3 2023-02-05 "Linux man-pages 6.03"
+.TH strftime 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
strftime \- format date and time
.SH LIBRARY
@@ -525,33 +525,37 @@ are used.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR strftime (),
.BR strftime_l ()
T} Thread safety MT-Safe env locale
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-.BR strftime ():
-SVr4, C99.
-.PD 0
-.PP
-.PD
-.BR strftime_l ():
+.TP
+.BR strftime ()
+C11, POSIX.1-2008.
+.TP
+.BR strftime_l ()
POSIX.1-2008.
-.PP
+.SH HISTORY
+.TP
+.BR strftime ()
+SVr4, C89.
.\" FIXME strftime() is in POSIX.1-2001 and POSIX.1-2008, but the details
.\" in the standards changed across versions. Investigate and
.\" write up.
+.TP
+.BR strftime_l ()
+POSIX.1-2008.
+.PP
There are strict inclusions between the set of conversions
given in ANSI C (unmarked), those given in the Single UNIX Specification
(marked SU), those given in Olson's timezone package (marked TZ),
@@ -739,26 +743,26 @@ Result string is " 11"
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
-
+\&
int
main(int argc, char *argv[])
{
char outstr[200];
time_t t;
struct tm *tmp;
-
+\&
t = time(NULL);
tmp = localtime(&t);
if (tmp == NULL) {
perror("localtime");
exit(EXIT_FAILURE);
}
-
+\&
if (strftime(outstr, sizeof(outstr), argv[1], tmp) == 0) {
fprintf(stderr, "strftime returned 0");
exit(EXIT_FAILURE);
}
-
+\&
printf("Result string is \e"%s\e"\en", outstr);
exit(EXIT_SUCCESS);
}
diff --git a/man3/string.3 b/man3/string.3
index e6516f88f..dc1c4151f 100644
--- a/man3/string.3
+++ b/man3/string.3
@@ -7,7 +7,7 @@
.\" Lewine's _POSIX Programmer's Guide_ (O'Reilly & Associates, 1991)
.\" 386BSD man pages
.\" Modified Sun Jul 25 10:54:31 1993, Rik Faith (faith@cs.unc.edu)
-.TH string 3 2023-01-22 "Linux man-pages 6.03"
+.TH string 3 2023-01-22 "Linux man-pages 6.05.01"
.SH NAME
stpcpy, strcasecmp, strcat, strchr, strcmp, strcoll, strcpy, strcspn,
strdup, strfry, strlen, strncat, strncmp, strncpy, strncasecmp, strpbrk,
diff --git a/man3/strlen.3 b/man3/strlen.3
index 11f1f96c9..c5820bad0 100644
--- a/man3/strlen.3
+++ b/man3/strlen.3
@@ -8,7 +8,7 @@
.\" Lewine's _POSIX Programmer's Guide_ (O'Reilly & Associates, 1991)
.\" 386BSD man pages
.\" Modified Sat Jul 24 18:02:26 1993 by Rik Faith (faith@cs.unc.edu)
-.TH strlen 3 2023-02-05 "Linux man-pages 6.03"
+.TH strlen 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
strlen \- calculate the length of a string
.SH LIBRARY
@@ -34,22 +34,22 @@ function returns the number of bytes in the string pointed to by
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR strlen ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, C99, C11, SVr4, 4.3BSD.
+C11, POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001, C89, SVr4, 4.3BSD.
.SH NOTES
In cases where the input buffer may not contain
a terminating null byte,
diff --git a/man3/strncat.3 b/man3/strncat.3
index f6437190a..f53c9309a 100644
--- a/man3/strncat.3
+++ b/man3/strncat.3
@@ -3,7 +3,7 @@
.\"
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
-.TH strncat 3 2023-02-05 "Linux man-pages 6.03"
+.TH strncat 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
strncat \- concatenate a null-padded character sequence into a string
.SH LIBRARY
@@ -34,12 +34,12 @@ strncat(char *restrict dst, const char *restrict src, size_t sz)
{
int len;
char *p;
-
+\&
len = strnlen(src, sz);
p = dst + strlen(dst);
p = mempcpy(p, src, len);
*p = \[aq]\e0\[aq];
-
+\&
return dst;
}
.EE
@@ -51,22 +51,22 @@ returns
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR strncat ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, C99, SVr4, 4.3BSD.
+C11, POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001, C89, SVr4, 4.3BSD.
.SH CAVEATS
The name of this function is confusing.
This function has no relation to
@@ -91,34 +91,34 @@ Shlemiel the painter
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-
+\&
#define nitems(arr) (sizeof((arr)) / sizeof((arr)[0]))
-
+\&
int
main(void)
{
size_t maxsize;
-
+\&
// Null-padded fixed-width character sequences
char pre[4] = "pre.";
char new_post[50] = ".foo.bar";
-
+\&
// Strings
char post[] = ".post";
char src[] = "some_long_body.post";
char *dest;
-
+\&
maxsize = nitems(pre) + strlen(src) \- strlen(post) +
nitems(new_post) + 1;
dest = malloc(sizeof(*dest) * maxsize);
if (dest == NULL)
err(EXIT_FAILURE, "malloc()");
-
+\&
dest[0] = \[aq]\e0\[aq]; // There's no 'cpy' function to this 'cat'.
strncat(dest, pre, nitems(pre));
strncat(dest, src, strlen(src) \- strlen(post));
strncat(dest, new_post, nitems(new_post));
-
+\&
puts(dest); // "pre.some_long_body.foo.bar"
free(dest);
exit(EXIT_SUCCESS);
diff --git a/man3/strnlen.3 b/man3/strnlen.3
index d6d178665..eeaf3c6e0 100644
--- a/man3/strnlen.3
+++ b/man3/strnlen.3
@@ -6,7 +6,7 @@
.\" References consulted:
.\" GNU glibc-2 source code and manual
.\"
-.TH strnlen 3 2023-02-05 "Linux man-pages 6.03"
+.TH strnlen 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
strnlen \- determine the length of a fixed-size string
.SH LIBRARY
@@ -64,21 +64,21 @@ characters pointed to by
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR strnlen ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2008.
.SH SEE ALSO
.BR strlen (3)
diff --git a/man3/strpbrk.3 b/man3/strpbrk.3
index 185f02325..abdf5af6e 100644
--- a/man3/strpbrk.3
+++ b/man3/strpbrk.3
@@ -8,7 +8,7 @@
.\" Lewine's _POSIX Programmer's Guide_ (O'Reilly & Associates, 1991)
.\" 386BSD man pages
.\" Modified Sat Jul 24 18:01:24 1993 by Rik Faith (faith@cs.unc.edu)
-.TH strpbrk 3 2023-01-05 "Linux man-pages 6.03"
+.TH strpbrk 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
strpbrk \- search a string for any of a set of bytes
.SH LIBRARY
@@ -40,22 +40,22 @@ if no such byte is found.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR strpbrk ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, C99, SVr4, 4.3BSD.
+C11, POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001, C89, SVr4, 4.3BSD.
.SH SEE ALSO
.BR memchr (3),
.BR strchr (3),
diff --git a/man3/strptime.3 b/man3/strptime.3
index a4c48a652..6dd059045 100644
--- a/man3/strptime.3
+++ b/man3/strptime.3
@@ -9,7 +9,7 @@
.\" Modified, aeb, 2001-08-31
.\" Modified, wharms 2001-11-12, remark on white space and example
.\"
-.TH strptime 3 2023-02-05 "Linux man-pages 6.03"
+.TH strptime 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
strptime \- convert a string representation of time to a time tm structure
.SH LIBRARY
@@ -264,22 +264,22 @@ returns NULL.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR strptime ()
T} Thread safety MT-Safe env locale
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, SUSv2.
+POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001, SUSv2.
.SH NOTES
In principle, this function does not initialize
.I tm
@@ -391,13 +391,13 @@ and
#include <stdlib.h>
#include <string.h>
#include <time.h>
-
+\&
int
main(void)
{
struct tm tm;
char buf[255];
-
+\&
memset(&tm, 0, sizeof(tm));
strptime("2001\-11\-12 18:31:01", "%Y\-%m\-%d %H:%M:%S", &tm);
strftime(buf, sizeof(buf), "%d %b %Y %H:%M", &tm);
diff --git a/man3/strsep.3 b/man3/strsep.3
index 5cf99a450..bf86fcfbf 100644
--- a/man3/strsep.3
+++ b/man3/strsep.3
@@ -11,7 +11,7 @@
.\" Modified Mon Jan 20 12:04:18 1997 by Andries Brouwer (aeb@cwi.nl)
.\" Modified Tue Jan 23 20:23:07 2001 by Andries Brouwer (aeb@cwi.nl)
.\"
-.TH strsep 3 2023-02-05 "Linux man-pages 6.03"
+.TH strsep 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
strsep \- extract token from string
.SH LIBRARY
@@ -68,23 +68,23 @@ that is, it returns the original value of
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR strsep ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
+None.
+.SH HISTORY
4.4BSD.
-.SH NOTES
+.PP
The
.BR strsep ()
function was introduced as a replacement for
@@ -92,7 +92,7 @@ function was introduced as a replacement for
since the latter cannot handle empty fields.
However,
.BR strtok (3)
-conforms to C99 and hence is more portable.
+conforms to C89/C99 and hence is more portable.
.SH BUGS
Be cautious when using this function.
If you do use it, note that:
@@ -131,24 +131,24 @@ which, however, doesn't discard multiple delimiters or empty tokens:
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-
+\&
int
main(int argc, char *argv[])
{
char *token, *subtoken;
-
+\&
if (argc != 4) {
fprintf(stderr, "Usage: %s string delim subdelim\en", argv[0]);
exit(EXIT_FAILURE);
}
-
+\&
for (unsigned int j = 1; (token = strsep(&argv[1], argv[2])); j++) {
printf("%u: %s\en", j, token);
-
+\&
while ((subtoken = strsep(&token, argv[3])))
printf("\et \-\-> %s\en", subtoken);
}
-
+\&
exit(EXIT_SUCCESS);
}
.EE
diff --git a/man3/strsignal.3 b/man3/strsignal.3
index c25ef2099..3aaacecd6 100644
--- a/man3/strsignal.3
+++ b/man3/strsignal.3
@@ -9,7 +9,7 @@
.\" Lewine's _POSIX Programmer's Guide_ (O'Reilly & Associates, 1991)
.\" 386BSD man pages
.\" Modified Sat Jul 24 17:59:03 1993 by Rik Faith (faith@cs.unc.edu)
-.TH strsignal 3 2023-02-05 "Linux man-pages 6.03"
+.TH strsignal 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
strsignal, sigabbrev_np, sigdescr_np, sys_siglist \-
return string describing signal
@@ -109,52 +109,57 @@ functions return the appropriate description string.
The returned string is statically allocated and valid for
the lifetime of the program.
These functions return NULL for an invalid signal number.
-.SH VERSIONS
-.BR sigdescr_np ()
-and
-.BR sigabbrev_np ()
-first appeared in glibc 2.32.
-.PP
-Starting with glibc 2.32,
-.\" glibc commit b1ccfc061feee9ce616444ded8e1cd5acf9fa97f
-the
-.I sys_siglist
-symbol is no longer exported by glibc.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lb lb lbx
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR strsignal ()
T} Thread safety T{
+.na
+.nh
MT-Unsafe race:strsignal locale
T}
T{
+.na
+.nh
.BR sigdescr_np (),
.BR sigabbrev_np ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-.BR strsignal ():
+.TP
+.BR strsignal ()
POSIX.1-2008.
-Present on Solaris and the BSDs.
-.PP
+.TP
.BR sigdescr_np ()
-and
+.TQ
.BR sigabbrev_np ()
-are GNU extensions.
-.PP
+GNU.
+.TP
+.I sys_siglist
+None.
+.\" glibc commit b1ccfc061feee9ce616444ded8e1cd5acf9fa97f
+.SH HISTORY
+.TP
+.BR strsignal ()
+POSIX.1-2008.
+Solaris, BSD.
+.TP
+.BR sigdescr_np ()
+.TQ
+.BR sigabbrev_np ()
+glibc 2.32.
+.TP
.I sys_siglist
-is nonstandard, but present on many other systems.
+Removed in glibc 2.32.
.SH NOTES
.BR sigdescr_np ()
and
diff --git a/man3/strspn.3 b/man3/strspn.3
index ef66bf4de..53e546d60 100644
--- a/man3/strspn.3
+++ b/man3/strspn.3
@@ -8,7 +8,7 @@
.\" Lewine's _POSIX Programmer's Guide_ (O'Reilly & Associates, 1991)
.\" 386BSD man pages
.\" Modified Sat Jul 24 17:57:50 1993 by Rik Faith (faith@cs.unc.edu)
-.TH strspn 3 2023-01-05 "Linux man-pages 6.03"
+.TH strspn 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
strspn, strcspn \- get length of a prefix substring
.SH LIBRARY
@@ -57,23 +57,23 @@ which are not in the string
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR strspn (),
.BR strcspn ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, C99, SVr4, 4.3BSD.
+C11, POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001, C89, SVr4, 4.3BSD.
.SH SEE ALSO
.BR memchr (3),
.BR strchr (3),
diff --git a/man3/strstr.3 b/man3/strstr.3
index 7062e15d0..d07c0f488 100644
--- a/man3/strstr.3
+++ b/man3/strstr.3
@@ -11,7 +11,7 @@
.\" Added history, aeb, 980113.
.\" 2005-05-05 mtk: added strcasestr()
.\"
-.TH strstr 3 2023-02-05 "Linux man-pages 6.03"
+.TH strstr 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
strstr, strcasestr \- locate a substring
.SH LIBRARY
@@ -55,30 +55,37 @@ itself.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR strstr ()
T} Thread safety MT-Safe
T{
+.na
+.nh
.BR strcasestr ()
T} Thread safety MT-Safe locale
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-.BR strstr ():
-POSIX.1-2001, POSIX.1-2008, C99.
-.PP
-The
+.TP
+.BR strstr ()
+C11, POSIX.1-2008.
+.TP
+.BR strcasestr ()
+GNU.
+.SH HISTORY
+.TP
+.BR strstr ()
+POSIX.1-2001, C89.
+.TP
.BR strcasestr ()
-function is a nonstandard extension.
+GNU.
.SH SEE ALSO
.BR memchr (3),
.BR memmem (3),
diff --git a/man3/strtod.3 b/man3/strtod.3
index 0afc8d359..23e757883 100644
--- a/man3/strtod.3
+++ b/man3/strtod.3
@@ -15,7 +15,7 @@
.\" (michael@cantor.informatik.rwth-aachen.de)
.\" Added strof, strtold, aeb, 2001-06-07
.\"
-.TH strtod 3 2023-02-05 "Linux man-pages 6.03"
+.TH strtod 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
strtod, strtof, strtold \- convert ASCII string to floating-point number
.SH LIBRARY
@@ -140,34 +140,21 @@ Overflow or underflow occurred.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR strtod (),
.BR strtof (),
.BR strtold ()
T} Thread safety MT-Safe locale
.TE
-.hy
-.ad
.sp 1
-.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, C99.
-.SH NOTES
-Since
-0 can legitimately be returned
-on both success and failure, the calling program should set
-.I errno
-to 0 before the call,
-and then determine if an error occurred by checking whether
-.I errno
-has a nonzero value after the call.
-.PP
+.SH VERSIONS
In the glibc implementation, the
.I n-char-sequence
that optionally follows "NAN"
@@ -182,6 +169,26 @@ mantissa component of the returned value.
.\" something similar.
.\" C11 says: "An implementation may use the n-char sequence to determine
.\" extra information to be represented in the NaN's significant."
+.SH STANDARDS
+C11, POSIX.1-2008.
+.SH HISTORY
+.TP
+.BR strtod ()
+C89, POSIX.1-2001.
+.TP
+.BR strtof ()
+.TQ
+.BR strtold ()
+C99, POSIX.1-2001.
+.SH NOTES
+Since
+0 can legitimately be returned
+on both success and failure, the calling program should set
+.I errno
+to 0 before the call,
+and then determine if an error occurred by checking whether
+.I errno
+has a nonzero value after the call.
.SH EXAMPLES
See the example on the
.BR strtol (3)
diff --git a/man3/strtoimax.3 b/man3/strtoimax.3
index 3f8580ee4..88ce97303 100644
--- a/man3/strtoimax.3
+++ b/man3/strtoimax.3
@@ -3,7 +3,7 @@
.\"
.\" SPDX-License-Identifier: GPL-2.0-or-later
.\"
-.TH strtoimax 3 2022-12-15 "Linux man-pages 6.03"
+.TH strtoimax 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
strtoimax, strtoumax \- convert string to integer
.SH LIBRARY
@@ -44,23 +44,23 @@ is set to
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR strtoimax (),
.BR strtoumax ()
T} Thread safety MT-Safe locale
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, C99.
+C11, POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001, C99.
.SH SEE ALSO
.BR imaxabs (3),
.BR imaxdiv (3),
diff --git a/man3/strtok.3 b/man3/strtok.3
index 03fee85a7..6f015306e 100644
--- a/man3/strtok.3
+++ b/man3/strtok.3
@@ -10,7 +10,7 @@
.\" 2005-11-17, mtk: Substantial parts rewritten
.\" 2013-05-19, mtk: added much further detail on the operation of strtok()
.\"
-.TH strtok 3 2023-02-05 "Linux man-pages 6.03"
+.TH strtok 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
strtok, strtok_r \- extract tokens from strings
.SH LIBRARY
@@ -154,31 +154,24 @@ the next token, or NULL if there are no more tokens.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR strtok ()
T} Thread safety MT-Unsafe race:strtok
T{
+.na
+.nh
.BR strtok_r ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
-.SH STANDARDS
-.TP
-.BR strtok ()
-POSIX.1-2001, POSIX.1-2008, C99, SVr4, 4.3BSD.
-.TP
-.BR strtok_r ()
-POSIX.1-2001, POSIX.1-2008.
-.SH NOTES
+.SH VERSIONS
On some implementations,
.\" Tru64, according to its manual page
.I *saveptr
@@ -186,6 +179,20 @@ is required to be NULL on the first call to
.BR strtok_r ()
that is being used to parse
.IR str .
+.SH STANDARDS
+.TP
+.BR strtok ()
+C11, POSIX.1-2008.
+.TP
+.BR strtok_r ()
+POSIX.1-2008.
+.SH HISTORY
+.TP
+.BR strtok ()
+POSIX.1-2001, C89, SVr4, 4.3BSD.
+.TP
+.BR strtok_r ()
+POSIX.1-2001.
.SH BUGS
Be cautious when using these functions.
If you do use them, note that:
@@ -234,26 +241,26 @@ An example of the output produced by this program is the following:
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-
+\&
int
main(int argc, char *argv[])
{
char *str1, *str2, *token, *subtoken;
char *saveptr1, *saveptr2;
int j;
-
+\&
if (argc != 4) {
fprintf(stderr, "Usage: %s string delim subdelim\en",
argv[0]);
exit(EXIT_FAILURE);
}
-
+\&
for (j = 1, str1 = argv[1]; ; j++, str1 = NULL) {
token = strtok_r(str1, argv[2], &saveptr1);
if (token == NULL)
break;
printf("%d: %s\en", j, token);
-
+\&
for (str2 = token; ; str2 = NULL) {
subtoken = strtok_r(str2, argv[3], &saveptr2);
if (subtoken == NULL)
@@ -261,7 +268,7 @@ main(int argc, char *argv[])
printf("\et \-\-> %s\en", subtoken);
}
}
-
+\&
exit(EXIT_SUCCESS);
}
.EE
diff --git a/man3/strtol.3 b/man3/strtol.3
index 42f181bfb..fe5555a71 100644
--- a/man3/strtol.3
+++ b/man3/strtol.3
@@ -10,7 +10,7 @@
.\" 386BSD man pages
.\" Modified Sun Jul 25 10:53:39 1993 by Rik Faith (faith@cs.unc.edu)
.\" Added correction due to nsd@bbc.com (Nick Duffek) - aeb, 950610
-.TH strtol 3 2023-02-05 "Linux man-pages 6.03"
+.TH strtol 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
strtol, strtoll, strtoq \- convert a string to a long integer
.SH LIBRARY
@@ -143,28 +143,29 @@ no conversion was performed (no digits seen, and 0 returned).
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR strtol (),
.BR strtoll (),
.BR strtoq ()
T} Thread safety MT-Safe locale
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-.BR strtol ():
-POSIX.1-2001, POSIX.1-2008, C99, SVr4, 4.3BSD.
-.PP
-.BR strtoll ():
-POSIX.1-2001, POSIX.1-2008, C99.
+C11, POSIX.1-2008.
+.SH HISTORY
+.TP
+.BR strtol ()
+POSIX.1-2001, C89, SVr4, 4.3BSD.
+.TP
+.BR strtoll ()
+POSIX.1-2001, C99.
.SH NOTES
Since
.BR strtol ()
@@ -243,44 +244,44 @@ strtol: Numerical result out of range
#include <limits.h>
#include <stdio.h>
#include <stdlib.h>
-
+\&
int
main(int argc, char *argv[])
{
int base;
char *endptr, *str;
long val;
-
+\&
if (argc < 2) {
fprintf(stderr, "Usage: %s str [base]\en", argv[0]);
exit(EXIT_FAILURE);
}
-
+\&
str = argv[1];
base = (argc > 2) ? atoi(argv[2]) : 0;
-
+\&
errno = 0; /* To distinguish success/failure after call */
val = strtol(str, &endptr, base);
-
+\&
/* Check for various possible errors. */
-
+\&
if (errno != 0) {
perror("strtol");
exit(EXIT_FAILURE);
}
-
+\&
if (endptr == str) {
fprintf(stderr, "No digits were found\en");
exit(EXIT_FAILURE);
}
-
+\&
/* If we got here, strtol() successfully parsed a number. */
-
+\&
printf("strtol() returned %ld\en", val);
-
+\&
if (*endptr != \[aq]\e0\[aq]) /* Not necessarily an error... */
printf("Further characters after number: \e"%s\e"\en", endptr);
-
+\&
exit(EXIT_SUCCESS);
}
.EE
diff --git a/man3/strtoul.3 b/man3/strtoul.3
index 3c47b67be..a9a8d60d0 100644
--- a/man3/strtoul.3
+++ b/man3/strtoul.3
@@ -11,7 +11,7 @@
.\" Fixed typo, aeb, 950823
.\" 2002-02-22, joey, mihtjel: Added strtoull()
.\"
-.TH strtoul 3 2023-02-05 "Linux man-pages 6.03"
+.TH strtoul 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
strtoul, strtoull, strtouq \- convert a string to an unsigned long integer
.SH LIBRARY
@@ -143,28 +143,29 @@ no conversion was performed (no digits seen, and 0 returned).
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR strtoul (),
.BR strtoull (),
.BR strtouq ()
T} Thread safety MT-Safe locale
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-.BR strtoul ():
-POSIX.1-2001, POSIX.1-2008, C99, SVr4.
-.PP
-.BR strtoull ():
-POSIX.1-2001, POSIX.1-2008, C99.
+C11, POSIX.1-2008.
+.SH HISTORY
+.TP
+.BR strtoul ()
+POSIX.1-2001, C89, SVr4.
+.TP
+.BR strtoull ()
+POSIX.1-2001, C99.
.SH NOTES
Since
.BR strtoul ()
diff --git a/man3/strverscmp.3 b/man3/strverscmp.3
index 39d7b20cf..e33a569d3 100644
--- a/man3/strverscmp.3
+++ b/man3/strverscmp.3
@@ -4,7 +4,7 @@
.\"
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
-.TH strverscmp 3 2022-12-15 "Linux man-pages 6.03"
+.TH strverscmp 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
strverscmp \- compare two version strings
.SH LIBRARY
@@ -74,19 +74,17 @@ or later than
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR strverscmp ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
.\" FIXME: The marking is different from that in the glibc manual,
.\" which has:
@@ -99,7 +97,7 @@ T} Thread safety MT-Safe
.\" we may call isdigit() in macro, then strverscmp() should not have locale
.\" problem.
.SH STANDARDS
-This function is a GNU extension.
+GNU.
.SH EXAMPLES
The program below can be used to demonstrate the behavior of
.BR strverscmp ().
@@ -122,22 +120,22 @@ jan1 < jan10
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-
+\&
int
main(int argc, char *argv[])
{
int res;
-
+\&
if (argc != 3) {
fprintf(stderr, "Usage: %s <string1> <string2>\en", argv[0]);
exit(EXIT_FAILURE);
}
-
+\&
res = strverscmp(argv[1], argv[2]);
-
+\&
printf("%s %s %s\en", argv[1],
(res < 0) ? "<" : (res == 0) ? "==" : ">", argv[2]);
-
+\&
exit(EXIT_SUCCESS);
}
.EE
diff --git a/man3/strxfrm.3 b/man3/strxfrm.3
index 4766001e4..03ff0a8ea 100644
--- a/man3/strxfrm.3
+++ b/man3/strxfrm.3
@@ -8,7 +8,7 @@
.\" Lewine's _POSIX Programmer's Guide_ (O'Reilly & Associates, 1991)
.\" 386BSD man pages
.\" Modified Sun Jul 25 10:41:28 1993 by Rik Faith (faith@cs.unc.edu)
-.TH strxfrm 3 2023-02-05 "Linux man-pages 6.03"
+.TH strxfrm 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
strxfrm \- string transformation
.SH LIBRARY
@@ -62,22 +62,22 @@ are indeterminate.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR strxfrm ()
T} Thread safety MT-Safe locale
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, C99, SVr4, 4.3BSD.
+C11, POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001, C89, SVr4, 4.3BSD.
.SH SEE ALSO
.BR memcmp (3),
.BR setlocale (3),
diff --git a/man3/swab.3 b/man3/swab.3
index 85a487ac8..046c0f85e 100644
--- a/man3/swab.3
+++ b/man3/swab.3
@@ -9,7 +9,7 @@
.\" 386BSD man pages
.\" Modified Sat Jul 24 17:52:15 1993 by Rik Faith (faith@cs.unc.edu)
.\" Modified 2001-12-15, aeb
-.TH swab 3 2022-12-15 "Linux man-pages 6.03"
+.TH swab 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
swab \- swap adjacent bytes
.SH LIBRARY
@@ -57,21 +57,21 @@ function returns no value.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR swab ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, SVr4, 4.3BSD.
+POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001, SVr4, 4.3BSD.
.SH SEE ALSO
.BR bstring (3)
diff --git a/man3/sysconf.3 b/man3/sysconf.3
index e6170aa82..a4d14d3bd 100644
--- a/man3/sysconf.3
+++ b/man3/sysconf.3
@@ -5,7 +5,7 @@
.\"
.\" Modified Sat Jul 24 17:51:42 1993 by Rik Faith (faith@cs.unc.edu)
.\" Modified Tue Aug 17 11:42:20 1999 by Ariel Scolnicov (ariels@compugen.co.il)
-.TH sysconf 3 2023-02-05 "Linux man-pages 6.03"
+.TH sysconf 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
sysconf \- get configuration information at run time
.SH LIBRARY
@@ -355,22 +355,22 @@ is invalid.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR sysconf ()
T} Thread safety MT-Safe env
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008.
+POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001.
.SH BUGS
It is difficult to use
.B ARG_MAX
diff --git a/man3/syslog.3 b/man3/syslog.3
index 6552fb12e..e8c9dc43e 100644
--- a/man3/syslog.3
+++ b/man3/syslog.3
@@ -15,7 +15,7 @@
.\" Modified 13 Dec 2001, Martin Schulze <joey@infodrom.org>
.\" Modified 3 Jan 2002, Michael Kerrisk <mtk.manpages@gmail.com>
.\"
-.TH syslog 3 2023-02-05 "Linux man-pages 6.03"
+.TH syslog 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
closelog, openlog, syslog, vsyslog \- send messages to the system logger
.SH LIBRARY
@@ -261,34 +261,55 @@ can be used to restrict logging to specified levels only.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR openlog (),
.BR closelog ()
T} Thread safety MT-Safe
T{
+.na
+.nh
.BR syslog (),
.BR vsyslog ()
T} Thread safety MT-Safe env locale
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-The functions
-.BR openlog (),
-.BR closelog (),
-and
+.TP
+.BR syslog ()
+.TQ
+.BR openlog ()
+.TQ
+.BR closelog ()
+POSIX.1-2008.
+.TP
+.BR vsyslog ()
+None.
+.SH HISTORY
+.TP
.BR syslog ()
-(but not
-.BR vsyslog ())
-are specified in SUSv2, POSIX.1-2001, and POSIX.1-2008.
+4.2BSD, SUSv2, POSIX.1-2001.
+.TP
+.BR openlog ()
+.TQ
+.BR closelog ()
+4.3BSD, SUSv2, POSIX.1-2001.
+.\" .SH HISTORY
+.\" 4.3BSD documents
+.\" .BR setlogmask ().
+.TP
+.BR vsyslog ()
+4.3BSD-Reno.
+.\" Of course early v* functions used the
+.\" .I <varargs.h>
+.\" mechanism, which is not compatible with
+.\" .IR <stdarg.h> .
.PP
POSIX.1-2001 specifies only the
.B LOG_USER
@@ -310,22 +331,6 @@ value for
.I option
is not specified by POSIX.1-2001 or POSIX.1-2008, but is available
in most versions of UNIX.
-.\" .SH HISTORY
-.\" A
-.\" .BR syslog ()
-.\" function call appeared in 4.2BSD.
-.\" 4.3BSD documents
-.\" .BR openlog (),
-.\" .BR syslog (),
-.\" .BR closelog (),
-.\" and
-.\" .BR setlogmask ().
-.\" 4.3BSD-Reno also documents
-.\" .BR vsyslog ().
-.\" Of course early v* functions used the
-.\" .I <varargs.h>
-.\" mechanism, which is not compatible with
-.\" .IR <stdarg.h> .
.SH NOTES
The argument
.I ident
diff --git a/man3/system.3 b/man3/system.3
index a3b8932a6..8615623ee 100644
--- a/man3/system.3
+++ b/man3/system.3
@@ -9,7 +9,7 @@
.\" Modified 14 May 2001, 23 Sep 2001 by aeb
.\" 2004-12-20, mtk
.\"
-.TH system 3 2023-02-05 "Linux man-pages 6.03"
+.TH system 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
system \- execute a shell command
.SH LIBRARY
@@ -104,22 +104,22 @@ can fail with any of the same errors as
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR system ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, C99.
+C11, POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001, C89.
.SH NOTES
.BR system ()
provides simplicity and convenience:
@@ -165,7 +165,7 @@ For example:
.EX
while (something) {
int ret = system("foo");
-
+\&
if (WIFSIGNALED(ret) &&
(WTERMSIG(ret) == SIGINT || WTERMSIG(ret) == SIGQUIT))
break;
diff --git a/man3/sysv_signal.3 b/man3/sysv_signal.3
index 1928f108a..84d77fefa 100644
--- a/man3/sysv_signal.3
+++ b/man3/sysv_signal.3
@@ -3,7 +3,7 @@
.\"
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
-.TH sysv_signal 3 2022-12-15 "Linux man-pages 6.03"
+.TH sysv_signal 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
sysv_signal \- signal handling with System V semantics
.SH LIBRARY
@@ -45,23 +45,19 @@ As for
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR sysv_signal ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
-.SH STANDARDS
-This function is nonstandard.
-.SH NOTES
+.SH VERSIONS
Use of
.BR sysv_signal ()
should be avoided; use
@@ -86,6 +82,8 @@ this type is defined only if
the
.B _GNU_SOURCE
feature test macro is defined.
+.SH STANDARDS
+None.
.SH SEE ALSO
.BR sigaction (2),
.BR signal (2),
diff --git a/man3/tailq.3 b/man3/tailq.3
index e534479a0..15f9203dd 100644
--- a/man3/tailq.3
+++ b/man3/tailq.3
@@ -5,7 +5,7 @@
.\" SPDX-License-Identifier: BSD-3-Clause
.\"
.\"
-.TH TAILQ 3 2022-10-30 "Linux man-pages 6.03"
+.TH TAILQ 3 2023-05-03 "Linux man-pages 6.05.01"
.SH NAME
TAILQ_CONCAT,
TAILQ_EMPTY,
@@ -315,10 +315,10 @@ structure, respectively.
returns an initializer that can be assigned to the queue
.IR head .
.SH STANDARDS
-Not in POSIX.1, POSIX.1-2001, or POSIX.1-2008.
-Present on the BSDs.
-(TAILQ functions first appeared in 4.4BSD).
-.SH BUGS
+BSD.
+.SH HISTORY
+4.4BSD.
+.SH CAVEATS
.BR TAILQ_FOREACH ()
and
.BR TAILQ_FOREACH_REVERSE ()
@@ -341,35 +341,35 @@ without interfering with the traversal.
#include <stdio.h>
#include <stdlib.h>
#include <sys/queue.h>
-
+\&
struct entry {
int data;
TAILQ_ENTRY(entry) entries; /* Tail queue */
};
-
+\&
TAILQ_HEAD(tailhead, entry);
-
+\&
int
main(void)
{
struct entry *n1, *n2, *n3, *np;
struct tailhead head; /* Tail queue head */
int i;
-
+\&
TAILQ_INIT(&head); /* Initialize the queue */
-
+\&
n1 = malloc(sizeof(struct entry)); /* Insert at the head */
TAILQ_INSERT_HEAD(&head, n1, entries);
-
+\&
n1 = malloc(sizeof(struct entry)); /* Insert at the tail */
TAILQ_INSERT_TAIL(&head, n1, entries);
-
+\&
n2 = malloc(sizeof(struct entry)); /* Insert after */
TAILQ_INSERT_AFTER(&head, n1, n2, entries);
-
+\&
n3 = malloc(sizeof(struct entry)); /* Insert before */
TAILQ_INSERT_BEFORE(n2, n3, entries);
-
+\&
TAILQ_REMOVE(&head, n2, entries); /* Deletion */
free(n2);
/* Forward traversal */
@@ -387,7 +387,7 @@ main(void)
n1 = n2;
}
TAILQ_INIT(&head);
-
+\&
exit(EXIT_SUCCESS);
}
.EE
diff --git a/man3/tan.3 b/man3/tan.3
index a42c3de48..b0b185e9a 100644
--- a/man3/tan.3
+++ b/man3/tan.3
@@ -13,7 +13,7 @@
.\" Modified 2002-07-27 by Walter Harms
.\" (walter.harms@informatik.uni-oldenburg.de)
.\"
-.TH tan 3 2023-02-05 "Linux man-pages 6.03"
+.TH tan 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
tan, tanf, tanl \- tangent function
.SH LIBRARY
@@ -107,29 +107,29 @@ is raised.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR tan (),
.BR tanf (),
.BR tanl ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-C99, POSIX.1-2001, POSIX.1-2008.
+C11, POSIX.1-2008.
+.SH HISTORY
+C99, POSIX.1-2001.
.PP
The variant returning
.I double
also conforms to
-SVr4, 4.3BSD.
+SVr4, 4.3BSD, C89.
.SH BUGS
Before glibc 2.10, the glibc implementation did not set
.\" http://sourceware.org/bugzilla/show_bug.cgi?id=6782
diff --git a/man3/tanh.3 b/man3/tanh.3
index 2977e359a..dc4d8fc06 100644
--- a/man3/tanh.3
+++ b/man3/tanh.3
@@ -13,7 +13,7 @@
.\" Modified 2002-07-27 by Walter Harms
.\" (walter.harms@informatik.uni-oldenburg.de)
.\"
-.TH tanh 3 2023-02-05 "Linux man-pages 6.03"
+.TH tanh 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
tanh, tanhf, tanhl \- hyperbolic tangent function
.SH LIBRARY
@@ -74,29 +74,29 @@ No errors occur.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR tanh (),
.BR tanhf (),
.BR tanhl ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-C99, POSIX.1-2001, POSIX.1-2008.
+C11, POSIX.1-2008.
+.SH HISTORY
+C99, POSIX.1-2001.
.PP
The variant returning
.I double
also conforms to
-SVr4, 4.3BSD.
+SVr4, 4.3BSD, C89.
.SH SEE ALSO
.BR acosh (3),
.BR asinh (3),
diff --git a/man3/tcgetpgrp.3 b/man3/tcgetpgrp.3
index 83bdaac34..494ed43d6 100644
--- a/man3/tcgetpgrp.3
+++ b/man3/tcgetpgrp.3
@@ -3,7 +3,7 @@
.\"
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
-.TH tcgetpgrp 3 2022-12-15 "Linux man-pages 6.03"
+.TH tcgetpgrp 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
tcgetpgrp, tcsetpgrp \- get and set terminal foreground process group
.SH LIBRARY
@@ -94,30 +94,30 @@ process in the same session as the calling process.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR tcgetpgrp (),
.BR tcsetpgrp ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
-.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008.
-.SH NOTES
+.SH VERSIONS
These functions are implemented via the
.B TIOCGPGRP
and
.B TIOCSPGRP
ioctls.
-.SS History
+.SH STANDARDS
+POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001.
+.PP
The ioctls appeared in 4.2BSD.
The functions are POSIX inventions.
.SH SEE ALSO
diff --git a/man3/tcgetsid.3 b/man3/tcgetsid.3
index 8e78838b6..4fb349c90 100644
--- a/man3/tcgetsid.3
+++ b/man3/tcgetsid.3
@@ -3,7 +3,7 @@
.\"
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
-.TH tcgetsid 3 2022-12-15 "Linux man-pages 6.03"
+.TH tcgetsid 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
tcgetsid \- get session ID
.SH LIBRARY
@@ -44,29 +44,27 @@ is not a valid file descriptor.
The calling process does not have a controlling terminal, or
it has one but it is not described by
.IR fd .
-.SH VERSIONS
-.BR tcgetsid ()
-is provided since glibc 2.1.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR tcgetsid ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008.
-.SH NOTES
+POSIX.1-2008.
+.SH HISTORY
+glibc 2.1.
+POSIX.1-2001.
+.PP
This function is implemented via the
.B TIOCGSID
.BR ioctl (2),
diff --git a/man3/telldir.3 b/man3/telldir.3
index 16282f029..6bbd158e6 100644
--- a/man3/telldir.3
+++ b/man3/telldir.3
@@ -8,7 +8,7 @@
.\" Lewine's _POSIX Programmer's Guide_ (O'Reilly & Associates, 1991)
.\" 386BSD man pages
.\" Modified Sat Jul 24 17:48:42 1993 by Rik Faith (faith@cs.unc.edu)
-.TH telldir 3 2023-02-05 "Linux man-pages 6.03"
+.TH telldir 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
telldir \- return current location in directory stream
.SH LIBRARY
@@ -52,23 +52,23 @@ Invalid directory stream descriptor \fIdirp\fP.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR telldir ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, 4.3BSD.
-.SH NOTES
+POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001, 4.3BSD.
+.PP
Up to glibc 2.1.1, the return type of
.BR telldir ()
was
diff --git a/man3/tempnam.3 b/man3/tempnam.3
index b736285f6..fd6864311 100644
--- a/man3/tempnam.3
+++ b/man3/tempnam.3
@@ -3,7 +3,7 @@
.\"
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
-.TH tempnam 3 2023-02-05 "Linux man-pages 6.03"
+.TH tempnam 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
tempnam \- create a name for a temporary file
.SH LIBRARY
@@ -94,25 +94,23 @@ Allocation of storage failed.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR tempnam ()
T} Thread safety MT-Safe env
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
+POSIX.1-2008.
+.SH HISTORY
SVr4, 4.3BSD, POSIX.1-2001.
-POSIX.1-2008 marks
-.BR tempnam ()
-as obsolete.
+Obsoleted in POSIX.1-2008.
.SH NOTES
Although
.BR tempnam ()
diff --git a/man3/termios.3 b/man3/termios.3
index b6163c1b4..9e015d168 100644
--- a/man3/termios.3
+++ b/man3/termios.3
@@ -19,7 +19,7 @@
.\" Enhanced the discussion of "raw" mode for cfmakeraw().
.\" Document CMSPAR.
.\"
-.TH termios 3 2023-02-05 "Linux man-pages 6.03"
+.TH termios 3 2023-07-30 "Linux man-pages 6.05.01"
.SH NAME
termios, tcgetattr, tcsetattr, tcsendbreak, tcdrain, tcflush, tcflow,
cfmakeraw, cfgetospeed, cfgetispeed, cfsetispeed, cfsetospeed, cfsetspeed \-
@@ -1089,15 +1089,14 @@ to check that all changes have been performed successfully.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.nh
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR tcgetattr (),
.BR tcsetattr (),
.BR tcdrain (),
@@ -1112,8 +1111,6 @@ T{
.BR cfsetspeed ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
.\" FIXME: The markings are different from that in the glibc manual.
.\" markings in glibc manual are more detailed:
@@ -1124,25 +1121,60 @@ T} Thread safety MT-Safe
.\" glibc manual says /bsd indicate the preceding marker only applies
.\" when the underlying kernel is a BSD kernel.
.\" So, it is safety in Linux kernel.
-.hy
.SH STANDARDS
-.BR tcgetattr (),
-.BR tcsetattr (),
-.BR tcsendbreak (),
-.BR tcdrain (),
-.BR tcflush (),
-.BR tcflow (),
-.BR cfgetispeed (),
-.BR cfgetospeed (),
-.BR cfsetispeed (),
-and
+.TP
+.BR tcgetattr ()
+.TQ
+.BR tcsetattr ()
+.TQ
+.BR tcsendbreak ()
+.TQ
+.BR tcdrain ()
+.TQ
+.BR tcflush ()
+.TQ
+.BR tcflow ()
+.TQ
+.BR cfgetispeed ()
+.TQ
+.BR cfgetospeed ()
+.TQ
+.BR cfsetispeed ()
+.TQ
.BR cfsetospeed ()
-are specified in POSIX.1-2001.
-.PP
+POSIX.1-2008.
+.TP
.BR cfmakeraw ()
-and
+.TQ
+.BR cfsetspeed ()
+BSD.
+.SH HISTORY
+.TP
+.BR tcgetattr ()
+.TQ
+.BR tcsetattr ()
+.TQ
+.BR tcsendbreak ()
+.TQ
+.BR tcdrain ()
+.TQ
+.BR tcflush ()
+.TQ
+.BR tcflow ()
+.TQ
+.BR cfgetispeed ()
+.TQ
+.BR cfgetospeed ()
+.TQ
+.BR cfsetispeed ()
+.TQ
+.BR cfsetospeed ()
+POSIX.1-2001.
+.TP
+.BR cfmakeraw ()
+.TQ
.BR cfsetspeed ()
-are nonstandard, but available on the BSDs.
+BSD.
.SH NOTES
UNIX\ V7 and several later systems have a list of baud rates
where after the values
diff --git a/man3/tgamma.3 b/man3/tgamma.3
index b13d88580..d2c596934 100644
--- a/man3/tgamma.3
+++ b/man3/tgamma.3
@@ -9,7 +9,7 @@
.\" Modified 2004-11-15, fixed error noted by Fabian Kreutz
.\" <kreutz@dbs.uni-hannover.de>
.\"
-.TH tgamma 3 2023-02-10 "Linux man-pages 6.03"
+.TH tgamma 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
tgamma, tgammaf, tgammal \- true gamma function
.SH LIBRARY
@@ -156,29 +156,28 @@ is set to
.BR ERANGE .
.\" glibc (as at 2.8) also supports an inexact
.\" exception for various cases.
-.SH VERSIONS
-These functions were added in glibc 2.1.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR tgamma (),
.BR tgammaf (),
.BR tgammal ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-C99, POSIX.1-2001, POSIX.1-2008.
+C11, POSIX.1-2008.
+.SH HISTORY
+glibc 2.1.
+C99, POSIX.1-2001.
.SH NOTES
This function had to be called "true gamma function"
since there is already a function
@@ -188,7 +187,7 @@ that returns something else (see
for details).
.SH BUGS
Before glibc 2.18, the glibc implementation of these functions did not set
-.\" http://sources.redhat.com/bugzilla/show_bug.cgi?id=6809
+.\" https://www.sourceware.org/bugzilla/show_bug.cgi?id=6809
.I errno
to
.B EDOM
@@ -197,7 +196,7 @@ when
is negative infinity.
.PP
Before glibc 2.19,
-.\" http://sources.redhat.com/bugzilla/show_bug.cgi?id=6810
+.\" https://www.sourceware.org/bugzilla/show_bug.cgi?id=6810
the glibc implementation of these functions did not set
.I errno
to
diff --git a/man3/timegm.3 b/man3/timegm.3
index b2e898c53..659fc8a5a 100644
--- a/man3/timegm.3
+++ b/man3/timegm.3
@@ -3,7 +3,7 @@
.\"
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
-.TH timegm 3 2023-02-05 "Linux man-pages 6.03"
+.TH timegm 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
timegm, timelocal \- inverses of gmtime and localtime
.SH LIBRARY
@@ -13,7 +13,7 @@ Standard C library
.nf
.B #include <time.h>
.PP
-.BI "time_t timelocal(struct tm *" tm );
+.BI "[[deprecated]] time_t timelocal(struct tm *" tm );
.BI "time_t timegm(struct tm *" tm );
.PP
.fi
@@ -63,25 +63,24 @@ The result cannot be represented.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR timelocal (),
.BR timegm ()
T} Thread safety MT-Safe env locale
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-These functions are nonstandard GNU extensions
-that are also present on the BSDs.
-.SH NOTES
+BSD.
+.SH HISTORY
+GNU, BSD.
+.PP
The
.BR timelocal ()
function is equivalent to the POSIX standard function
diff --git a/man3/timeradd.3 b/man3/timeradd.3
index b18ac440f..d64f5b4d6 100644
--- a/man3/timeradd.3
+++ b/man3/timeradd.3
@@ -4,7 +4,7 @@
.\"
.\" 2007-07-31, mtk, Created
.\"
-.TH timeradd 3 2023-02-05 "Linux man-pages 6.03"
+.TH timeradd 3 2023-03-30 "Linux man-pages 6.05.01"
.SH NAME
timeradd, timersub, timercmp, timerclear, timerisset \- timeval operations
.SH LIBRARY
@@ -135,8 +135,9 @@ return true (nonzero) or false (0).
.SH ERRORS
No errors are defined.
.SH STANDARDS
-Not in POSIX.1.
-Present on most BSD derivatives.
+None.
+.SH HISTORY
+BSD.
.SH SEE ALSO
.BR gettimeofday (2),
.BR time (7)
diff --git a/man3/tmpfile.3 b/man3/tmpfile.3
index 30493fa7c..41999f56d 100644
--- a/man3/tmpfile.3
+++ b/man3/tmpfile.3
@@ -9,7 +9,7 @@
.\" 386BSD man pages
.\" Modified Sat Jul 24 17:46:57 1993 by Rik Faith (faith@cs.unc.edu)
.\" Modified 2001-11-17, aeb
-.TH tmpfile 3 2023-02-05 "Linux man-pages 6.03"
+.TH tmpfile 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
tmpfile \- create a temporary file
.SH LIBRARY
@@ -63,29 +63,19 @@ Read-only filesystem.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR tmpfile ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
-.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, C99, SVr4, 4.3BSD, SUSv2.
-.SH NOTES
-POSIX.1-2001 specifies:
-an error message may be written to
-.I stdout
-if the stream
-cannot be opened.
-.PP
+.SH VERSIONS
The standard does not specify the directory that
.BR tmpfile ()
will use.
@@ -96,6 +86,16 @@ in
.IR <stdio.h> ,
and if that fails, then the directory
.IR /tmp .
+.SH STANDARDS
+C11, POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001, C89, SVr4, 4.3BSD, SUSv2.
+.SH NOTES
+POSIX.1-2001 specifies:
+an error message may be written to
+.I stdout
+if the stream
+cannot be opened.
.SH SEE ALSO
.BR exit (3),
.BR mkstemp (3),
diff --git a/man3/tmpnam.3 b/man3/tmpnam.3
index 5198e2e4f..5798faad7 100644
--- a/man3/tmpnam.3
+++ b/man3/tmpnam.3
@@ -5,7 +5,7 @@
.\"
.\" 2003-11-15, aeb, added tmpnam_r
.\"
-.TH tmpnam 3 2022-12-29 "Linux man-pages 6.03"
+.TH tmpnam 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
tmpnam, tmpnam_r \- create a name for a temporary file
.SH LIBRARY
@@ -15,8 +15,8 @@ Standard C library
.nf
.B #include <stdio.h>
.PP
-.BI "char *tmpnam(char *" s );
-.BI "char *tmpnam_r(char *" s );
+.BI "[[deprecated]] char *tmpnam(char *" s );
+.BI "[[deprecated]] char *tmpnam_r(char *" s );
.fi
.PP
.RS -4
@@ -88,34 +88,38 @@ No errors are defined.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR tmpnam ()
T} Thread safety MT-Unsafe race:tmpnam/!s
T{
+.na
+.nh
.BR tmpnam_r ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-.BR tmpnam ():
-SVr4, 4.3BSD, C99, POSIX.1-2001.
-POSIX.1-2008 marks
+.TP
.BR tmpnam ()
-as obsolete.
-.PP
+C11, POSIX.1-2008.
+.TP
+.BR tmpnam_r ()
+None.
+.SH HISTORY
+.TP
+.BR tmpnam ()
+SVr4, 4.3BSD, C89, POSIX.1-2001.
+Obsolete in POSIX.1-2008.
+.TP
.BR tmpnam_r ()
-is a nonstandard extension that is also available
-.\" Appears to be on Solaris
-on a few other systems.
+Solaris.
.SH NOTES
The
.BR tmpnam ()
diff --git a/man3/toascii.3 b/man3/toascii.3
index 7f3f765af..4e64cb016 100644
--- a/man3/toascii.3
+++ b/man3/toascii.3
@@ -5,7 +5,7 @@
.\"
.\" Added BUGS section, aeb, 950919
.\"
-.TH toascii 3 2023-02-05 "Linux man-pages 6.03"
+.TH toascii 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
toascii \- convert character to ASCII
.SH LIBRARY
@@ -42,25 +42,23 @@ The value returned is that of the converted character.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR toascii ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
+POSIX.1-2008.
+.SH HISTORY
SVr4, BSD, POSIX.1-2001.
-POSIX.1-2008 marks
-.BR toascii ()
-as obsolete,
+Obsolete in POSIX.1-2008,
noting that it cannot be used portably in a localized application.
.SH BUGS
Many people will be unhappy if you use this function.
diff --git a/man3/toupper.3 b/man3/toupper.3
index 7fc48ed41..0eaa6935f 100644
--- a/man3/toupper.3
+++ b/man3/toupper.3
@@ -6,7 +6,7 @@
.\"
.\" Modified Sat Jul 24 17:45:39 1993 by Rik Faith (faith@cs.unc.edu)
.\" Modified 2000-02-13 by Nicolás Lichtmaier <nick@debian.org>
-.TH toupper 3 2022-12-29 "Linux man-pages 6.03"
+.TH toupper 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
toupper, tolower, toupper_l, tolower_l \- convert uppercase or lowercase
.SH LIBRARY
@@ -94,30 +94,42 @@ if the conversion was not possible.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR toupper (),
.BR tolower (),
.BR toupper_l (),
.BR tolower_l ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-.BR toupper (),
-.BR tolower ():
-C99, 4.3BSD, POSIX.1-2001, POSIX.1-2008.
-.PP
-.BR toupper_l (),
-.BR tolower_l ():
+.TP
+.BR toupper ()
+.TQ
+.BR tolower ()
+C11, POSIX.1-2008.
+.TP
+.BR toupper_l ()
+.TQ
+.BR tolower_l ()
+POSIX.1-2008.
+.SH HISTORY
+.TP
+.BR toupper ()
+.TQ
+.BR tolower ()
+C89, 4.3BSD, POSIX.1-2001.
+.TP
+.BR toupper_l ()
+.TQ
+.BR tolower_l ()
POSIX.1-2008.
.SH NOTES
The standards require that the argument
diff --git a/man3/towctrans.3 b/man3/towctrans.3
index 6ab80489f..bf507fac3 100644
--- a/man3/towctrans.3
+++ b/man3/towctrans.3
@@ -9,7 +9,7 @@
.\" OpenGroup's Single UNIX specification http://www.UNIX-systems.org/online.html
.\" ISO/IEC 9899:1999
.\"
-.TH towctrans 3 2022-12-15 "Linux man-pages 6.03"
+.TH towctrans 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
towctrans \- wide-character transliteration
.SH LIBRARY
@@ -54,22 +54,22 @@ is
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR towctrans ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, C99.
+C11, POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001, C99.
.SH NOTES
The behavior of
.BR towctrans ()
diff --git a/man3/towlower.3 b/man3/towlower.3
index 0e0da0680..974830315 100644
--- a/man3/towlower.3
+++ b/man3/towlower.3
@@ -10,7 +10,7 @@
.\" OpenGroup's Single UNIX specification http://www.UNIX-systems.org/online.html
.\" ISO/IEC 9899:1999
.\"
-.TH towlower 3 2022-12-15 "Linux man-pages 6.03"
+.TH towlower 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
towlower, towlower_l \- convert a wide character to lowercase
.SH LIBRARY
@@ -82,36 +82,41 @@ was convertible to lowercase,
returns its lowercase equivalent;
otherwise it returns
.IR wc .
-.SH VERSIONS
-The
-.BR towlower_l ()
-function first appeared in glibc 2.3.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR towlower ()
T} Thread safety MT-Safe locale
T{
+.na
+.nh
.BR towlower_l ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-.BR towlower ():
-C99, POSIX.1-2001 (XSI);
-present as an XSI extension in POSIX.1-2008, but marked obsolete.
-.PP
-.BR towlower_l ():
+.TP
+.BR towlower ()
+C11, POSIX.1-2008 (XSI).
+.TP
+.BR towlower_l ()
+POSIX.1-2008.
+.SH STANDARDS
+.TP
+.BR towlower ()
+C99, POSIX.1-2001 (XSI).
+Obsolete in POSIX.1-2008 (XSI).
+.TP
+.BR towlower_l ()
+glibc 2.3.
POSIX.1-2008.
.SH NOTES
The behavior of these functions depends on the
diff --git a/man3/towupper.3 b/man3/towupper.3
index b7a308842..0a9c1ddcf 100644
--- a/man3/towupper.3
+++ b/man3/towupper.3
@@ -9,7 +9,7 @@
.\" OpenGroup's Single UNIX specification http://www.UNIX-systems.org/online.html
.\" ISO/IEC 9899:1999
.\"
-.TH towupper 3 2022-12-15 "Linux man-pages 6.03"
+.TH towupper 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
towupper, towupper_l \- convert a wide character to uppercase
.SH LIBRARY
@@ -81,37 +81,42 @@ was convertible to uppercase,
returns its uppercase equivalent;
otherwise it returns
.IR wc .
-.SH VERSIONS
-The
-.BR towupper_l ()
-function first appeared in glibc 2.3.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR towupper ()
T} Thread safety MT-Safe locale
T{
+.na
+.nh
.BR towupper_l ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-.BR towupper ():
-C99, POSIX.1-2001 (XSI);
-present as an XSI extension in POSIX.1-2008, but marked obsolete.
-.PP
-.BR towupper_l ():
+.TP
+.BR towupper ()
+C11, POSIX.1-2008 (XSI).
+.TP
+.BR towupper_l ()
+POSIX.1-2008.
+.SH HISTORY
+.TP
+.BR towupper ()
+C99, POSIX.1-2001 (XSI).
+Obsolete in POSIX.1-2008 (XSI).
+.TP
+.BR towupper_l ()
POSIX.1-2008.
+glibc 2.3.
.SH NOTES
The behavior of these functions depends on the
.B LC_CTYPE
diff --git a/man3/trunc.3 b/man3/trunc.3
index 66571890f..4670f0314 100644
--- a/man3/trunc.3
+++ b/man3/trunc.3
@@ -3,7 +3,7 @@
.\"
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
-.TH trunc 3 2022-12-15 "Linux man-pages 6.03"
+.TH trunc 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
trunc, truncf, truncl \- round to integer, toward zero
.SH LIBRARY
@@ -44,29 +44,28 @@ is integral, infinite, or NaN,
itself is returned.
.SH ERRORS
No errors occur.
-.SH VERSIONS
-These functions were added in glibc 2.1.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR trunc (),
.BR truncf (),
.BR truncl ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-C99, POSIX.1-2001, POSIX.1-2008.
+C11, POSIX.1-2008.
+.SH HISTORY
+glibc 2.1.
+C99, POSIX.1-2001.
.SH NOTES
The integral value returned by these functions may be too large
to store in an integer type
diff --git a/man3/tsearch.3 b/man3/tsearch.3
index 9b72c998c..ff2030276 100644
--- a/man3/tsearch.3
+++ b/man3/tsearch.3
@@ -3,7 +3,7 @@
.\"
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
-.TH tsearch 3 2023-01-26 "Linux man-pages 6.03"
+.TH tsearch 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
tsearch, tfind, tdelete, twalk, twalk_r, tdestroy \- manage a binary search tree
.SH LIBRARY
@@ -192,44 +192,66 @@ also
return NULL if
.I rootp
was NULL on entry.
-.SH VERSIONS
-.BR twalk_r ()
-is available since glibc 2.30.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR tsearch (),
.BR tfind (),
.BR tdelete ()
T} Thread safety MT-Safe race:rootp
T{
+.na
+.nh
.BR twalk ()
T} Thread safety MT-Safe race:root
T{
+.na
+.nh
.BR twalk_r ()
T} Thread safety MT-Safe race:root
T{
+.na
+.nh
.BR tdestroy ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, SVr4.
-The functions
+.TP
+.BR tsearch ()
+.TQ
+.BR tfind ()
+.TQ
+.BR tdelete ()
+.TQ
+.BR twalk ()
+POSIX.1-2008.
+.TP
.BR tdestroy ()
-and
+.TQ
+.BR twalk_r ()
+GNU.
+.SH HISTORY
+.TP
+.BR tsearch ()
+.TQ
+.BR tfind ()
+.TQ
+.BR tdelete ()
+.TQ
+.BR twalk ()
+POSIX.1-2001, POSIX.1-2008, SVr4.
+.TP
.BR twalk_r ()
-are GNU extensions.
+glibc 2.30.
.SH NOTES
.BR twalk ()
takes a pointer to the root, while the other functions
@@ -260,21 +282,21 @@ in order.
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
-
+\&
static void *root = NULL;
-
+\&
static void *
xmalloc(size_t n)
{
void *p;
-
+\&
p = malloc(n);
if (p)
return p;
fprintf(stderr, "insufficient memory\en");
exit(EXIT_FAILURE);
}
-
+\&
static int
compare(const void *pa, const void *pb)
{
@@ -284,12 +306,12 @@ compare(const void *pa, const void *pb)
return 1;
return 0;
}
-
+\&
static void
action(const void *nodep, VISIT which, int depth)
{
int *datap;
-
+\&
switch (which) {
case preorder:
break;
@@ -305,13 +327,13 @@ action(const void *nodep, VISIT which, int depth)
break;
}
}
-
+\&
int
main(void)
{
int *ptr;
int **val;
-
+\&
srand(time(NULL));
for (unsigned int i = 0; i < 12; i++) {
ptr = xmalloc(sizeof(*ptr));
diff --git a/man3/ttyname.3 b/man3/ttyname.3
index 1354ea530..cfdbb22ab 100644
--- a/man3/ttyname.3
+++ b/man3/ttyname.3
@@ -6,7 +6,7 @@
.\" Modified 2001-12-13, Martin Schulze <joey@infodrom.org>
.\" Added ttyname_r, aeb, 2002-07-20
.\"
-.TH ttyname 3 2022-12-15 "Linux man-pages 6.03"
+.TH ttyname 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
ttyname, ttyname_r \- return name of a terminal
.SH LIBRARY
@@ -65,25 +65,27 @@ was too small to allow storing the pathname.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR ttyname ()
T} Thread safety MT-Unsafe race:ttyname
T{
+.na
+.nh
.BR ttyname_r ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, 4.2BSD.
+POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001, 4.2BSD.
.SH NOTES
A process that keeps a file descriptor that refers to a
.BR pts (4)
diff --git a/man3/ttyslot.3 b/man3/ttyslot.3
index ffebf6e6d..d50af49dc 100644
--- a/man3/ttyslot.3
+++ b/man3/ttyslot.3
@@ -6,7 +6,7 @@
.\" This replaces an earlier man page written by Walter Harms
.\" <walter.harms@informatik.uni-oldenburg.de>.
.\"
-.TH ttyslot 3 2023-02-05 "Linux man-pages 6.03"
+.TH ttyslot 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
ttyslot \- find the slot of the current user's terminal in some file
.SH LIBRARY
@@ -108,28 +108,28 @@ but \-1 on System V-like systems.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR ttyslot ()
T} Thread safety MT-Unsafe
.TE
-.hy
-.ad
.sp 1
-.SH STANDARDS
-SUSv1; marked as LEGACY in SUSv2; removed in POSIX.1-2001.
-SUSv2 requires \-1 on error.
-.SH NOTES
+.SH VERSIONS
The utmp file is found in various places on various systems, such as
.IR /etc/utmp ,
.IR /var/adm/utmp ,
.IR /var/run/utmp .
+.SH STANDARDS
+None.
+.SH HISTORY
+SUSv1; marked as LEGACY in SUSv2; removed in POSIX.1-2001.
+SUSv2 requires \-1 on error.
.PP
The glibc2 implementation of this function reads the file
.BR _PATH_TTYS ,
diff --git a/man3/tzset.3 b/man3/tzset.3
index a2770e577..4027bb357 100644
--- a/man3/tzset.3
+++ b/man3/tzset.3
@@ -11,7 +11,7 @@
.\" Modified 2001-11-13, aeb
.\" Modified 2004-12-01 mtk and Martin Schulze <joey@infodrom.org>
.\"
-.TH tzset 3 2023-02-05 "Linux man-pages 6.03"
+.TH tzset 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
tzset, tzname, timezone, daylight \- initialize time conversion information
.SH LIBRARY
@@ -212,23 +212,23 @@ configurable when glibc is compiled.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR tzset ()
T} Thread safety MT-Safe env locale
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, SVr4, 4.3BSD.
-.SH NOTES
+POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001, SVr4, 4.3BSD.
+.PP
4.3BSD had a function
.BI "char *timezone(" zone ", " dst )
that returned the
diff --git a/man3/ualarm.3 b/man3/ualarm.3
index 981eb85ae..55ca2d715 100644
--- a/man3/ualarm.3
+++ b/man3/ualarm.3
@@ -3,7 +3,7 @@
.\"
.\" SPDX-License-Identifier: GPL-2.0-or-later
.\"
-.TH ualarm 3 2023-02-05 "Linux man-pages 6.03"
+.TH ualarm 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
ualarm \- schedule signal after given number of microseconds
.SH LIBRARY
@@ -69,29 +69,27 @@ Interrupted by a signal; see
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR ualarm ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
+None.
+.SH HISTORY
4.3BSD, POSIX.1-2001.
-POSIX.1-2001 marks
-.BR ualarm ()
-as obsolete.
-POSIX.1-2008 removes the specification of
-.BR ualarm ().
+POSIX.1-2001 marks it as obsolete.
+Removed in POSIX.1-2008.
+.PP
4.3BSD, SUSv2, and POSIX do not define any errors.
-.SH NOTES
+.PP
POSIX.1-2001 does not specify what happens if the
.I usecs
argument is 0.
diff --git a/man3/ulimit.3 b/man3/ulimit.3
index 075672fde..8cd8f6dc9 100644
--- a/man3/ulimit.3
+++ b/man3/ulimit.3
@@ -5,7 +5,7 @@
.\"
.\" Moved to man3, aeb, 980612
.\"
-.TH ulimit 3 2022-12-15 "Linux man-pages 6.03"
+.TH ulimit 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
ulimit \- get and set user limits
.SH LIBRARY
@@ -64,25 +64,23 @@ An unprivileged process tried to increase a limit.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR ulimit ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
+POSIX.1-2008.
+.SH HISTORY
SVr4, POSIX.1-2001.
-POSIX.1-2008 marks
-.BR ulimit ()
-as obsolete.
+POSIX.1-2008 marks it as obsolete.
.SH SEE ALSO
.BR bash (1),
.BR getrlimit (2),
diff --git a/man3/undocumented.3 b/man3/undocumented.3
index d3b8b6816..8ee34845a 100644
--- a/man3/undocumented.3
+++ b/man3/undocumented.3
@@ -7,7 +7,7 @@
.\" 2004-10-31, aeb, changed maintainer address, updated list
.\" 2015-04-20, william@tuffbizz.com, updated list
.\"
-.TH undocumented 3 2022-10-30 "Linux man-pages 6.03"
+.TH undocumented 3 2022-10-30 "Linux man-pages 6.05.01"
.SH NAME
undocumented \- undocumented library functions
.SH SYNOPSIS
diff --git a/man3/ungetwc.3 b/man3/ungetwc.3
index 0f6b9781e..04d55632c 100644
--- a/man3/ungetwc.3
+++ b/man3/ungetwc.3
@@ -9,7 +9,7 @@
.\" OpenGroup's Single UNIX specification http://www.UNIX-systems.org/online.html
.\" ISO/IEC 9899:1999
.\"
-.TH ungetwc 3 2022-12-15 "Linux man-pages 6.03"
+.TH ungetwc 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
ungetwc \- push back a wide character onto a FILE stream
.SH LIBRARY
@@ -76,22 +76,22 @@ failure.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR ungetwc ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, C99.
+C11, POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001, C99.
.SH NOTES
The behavior of
.BR ungetwc ()
diff --git a/man3/unlocked_stdio.3 b/man3/unlocked_stdio.3
index 148e01da7..a74e6b2aa 100644
--- a/man3/unlocked_stdio.3
+++ b/man3/unlocked_stdio.3
@@ -3,7 +3,7 @@
.\"
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
-.TH unlocked_stdio 3 2023-02-05 "Linux man-pages 6.03"
+.TH unlocked_stdio 3 2023-07-30 "Linux man-pages 6.05.01"
.SH NAME
getc_unlocked, getchar_unlocked, putc_unlocked,
putchar_unlocked \- nonlocking stdio functions
@@ -23,7 +23,7 @@ Standard C library
.BI "int feof_unlocked(FILE *" stream );
.BI "int ferror_unlocked(FILE *" stream );
.BI "int fileno_unlocked(FILE *" stream );
-.BI "int fflush_unlocked(FILE *" stream );
+.BI "int fflush_unlocked(FILE *_Nullable " stream );
.PP
.BI "int fgetc_unlocked(FILE *" stream );
.BI "int fputc_unlocked(int " c ", FILE *" stream );
@@ -58,48 +58,44 @@ Standard C library
.RS -4
Feature Test Macro Requirements for glibc (see
.BR feature_test_macros (7)):
-.nh
.RE
-.ad l
.PP
-.BR getc_unlocked (),
-.BR getchar_unlocked (),
-.BR putc_unlocked (),
-.BR putchar_unlocked ():
+.BR \%getc_unlocked (),
+.BR \%getchar_unlocked (),
+.BR \%putc_unlocked (),
+.BR \%putchar_unlocked ():
.nf
/* glibc >= 2.24: */ _POSIX_C_SOURCE >= 199309L
|| /* glibc <= 2.23: */ _POSIX_C_SOURCE
|| /* glibc <= 2.19: */ _SVID_SOURCE || _BSD_SOURCE
.fi
.PP
-.BR clearerr_unlocked (),
-.BR feof_unlocked (),
-.BR ferror_unlocked (),
-.BR fileno_unlocked (),
-.BR fflush_unlocked (),
-.BR fgetc_unlocked (),
-.BR fputc_unlocked (),
-.BR fread_unlocked (),
-.BR fwrite_unlocked ():
+.BR \%clearerr_unlocked (),
+.BR \%feof_unlocked (),
+.BR \%ferror_unlocked (),
+.BR \%fileno_unlocked (),
+.BR \%fflush_unlocked (),
+.BR \%fgetc_unlocked (),
+.BR \%fputc_unlocked (),
+.BR \%fread_unlocked (),
+.BR \%fwrite_unlocked ():
.nf
/* glibc >= 2.19: */ _DEFAULT_SOURCE
|| /* glibc <= 2.19: */ _SVID_SOURCE || _BSD_SOURCE
.fi
.PP
-.BR fgets_unlocked (),
-.BR fputs_unlocked (),
-.BR getwc_unlocked (),
-.BR getwchar_unlocked (),
-.BR fgetwc_unlocked (),
-.BR fputwc_unlocked (),
-.BR putwchar_unlocked (),
-.BR fgetws_unlocked (),
-.BR fputws_unlocked ():
+.BR \%fgets_unlocked (),
+.BR \%fputs_unlocked (),
+.BR \%getwc_unlocked (),
+.BR \%getwchar_unlocked (),
+.BR \%fgetwc_unlocked (),
+.BR \%fputwc_unlocked (),
+.BR \%putwchar_unlocked (),
+.BR \%fgetws_unlocked (),
+.BR \%fputws_unlocked ():
.nf
_GNU_SOURCE
.fi
-.hy
-.ad
.SH DESCRIPTION
Each of these functions has the same behavior as its counterpart
without the "_unlocked" suffix, except that they do not use locking
@@ -110,14 +106,14 @@ See
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lb lb lbx
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR getc_unlocked (),
.BR putc_unlocked (),
.BR clearerr_unlocked (),
@@ -135,40 +131,62 @@ T{
.BR fgetws_unlocked (),
.BR fputws_unlocked ()
T} Thread safety T{
+.na
+.nh
MT-Safe race:stream
T}
T{
+.na
+.nh
.BR getchar_unlocked (),
.BR getwchar_unlocked ()
T} Thread safety T{
+.na
+.nh
MT-Unsafe race:stdin
T}
T{
+.na
+.nh
.BR putchar_unlocked (),
.BR putwchar_unlocked ()
T} Thread safety T{
+.na
+.nh
MT-Unsafe race:stdout
T}
T{
+.na
+.nh
.BR feof_unlocked (),
.BR ferror_unlocked (),
.BR fileno_unlocked ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-The four functions
-.BR getc_unlocked (),
-.BR getchar_unlocked (),
-.BR putc_unlocked (),
+.TP
+.BR getc_unlocked ()
+.TQ
+.BR getchar_unlocked ()
+.TQ
+.BR putc_unlocked ()
+.TQ
.BR putchar_unlocked ()
-are in POSIX.1-2001 and POSIX.1-2008.
-.PP
-The nonstandard
-.BR *_unlocked ()
-variants occur on a few UNIX systems, and are available in recent glibc.
+POSIX.1-2008.
+.TP
+Others:
+None.
+.SH HISTORY
+.TP
+.BR getc_unlocked ()
+.TQ
+.BR getchar_unlocked ()
+.TQ
+.BR putc_unlocked ()
+.TQ
+.BR putchar_unlocked ()
+POSIX.1-2001.
.\" E.g., in HP-UX 10.0. In HP-UX 10.30 they are called obsolescent, and
.\" moved to a compatibility library.
.\" Available in HP-UX 10.0: clearerr_unlocked, fclose_unlocked,
@@ -180,7 +198,6 @@ variants occur on a few UNIX systems, and are available in recent glibc.
.\" putchar_unlocked, puts_unlocked, putws_unlocked, putw_unlocked,
.\" putwc_unlocked, putwchar_unlocked, rewind_unlocked, setvbuf_unlocked,
.\" ungetc_unlocked, ungetwc_unlocked.
-They should probably not be used.
.SH SEE ALSO
.BR flockfile (3),
.BR stdio (3)
diff --git a/man3/unlockpt.3 b/man3/unlockpt.3
index 2d2dab185..1ed2ad9f7 100644
--- a/man3/unlockpt.3
+++ b/man3/unlockpt.3
@@ -3,7 +3,7 @@
.\" This page is in the public domain. - aeb
.\" %%%LICENSE_END
.\"
-.TH unlockpt 3 2023-02-05 "Linux man-pages 6.03"
+.TH unlockpt 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
unlockpt \- unlock a pseudoterminal master/slave pair
.SH LIBRARY
@@ -57,28 +57,26 @@ argument is not a file descriptor open for writing.
The
.I fd
argument is not associated with a master pseudoterminal.
-.SH VERSIONS
-.BR unlockpt ()
-is provided since glibc 2.1.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR unlockpt ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008.
+POSIX.1-2008.
+.SH HISTORY
+glibc 2.1.
+POSIX.1-2001.
.SH SEE ALSO
.BR grantpt (3),
.BR posix_openpt (3),
diff --git a/man3/updwtmp.3 b/man3/updwtmp.3
index 799412037..99113e825 100644
--- a/man3/updwtmp.3
+++ b/man3/updwtmp.3
@@ -8,7 +8,7 @@
.\" Added -lutil remark, 030718
.\" 2008-07-02, mtk, document updwtmpx()
.\"
-.TH updwtmp 3 2022-12-15 "Linux man-pages 6.03"
+.TH updwtmp 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
updwtmp, logwtmp \- append an entry to the wtmp file
.SH LIBRARY
@@ -42,25 +42,20 @@ database of past user logins
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR updwtmp (),
.BR logwtmp ()
T} Thread safety MT-Unsafe sig:ALRM timer
.TE
-.hy
-.ad
.sp 1
-.SH STANDARDS
-Not in POSIX.1.
-Present on Solaris, NetBSD, and perhaps other systems.
-.SH NOTES
+.SH VERSIONS
For consistency with the other "utmpx" functions (see
.BR getutxent (3)),
glibc provides (since glibc 2.1):
@@ -78,6 +73,10 @@ This function performs the same task as
but differs in that it takes a
.I utmpx
structure as its last argument.
+.SH STANDARDS
+None.
+.SH HISTORY
+Solaris, NetBSD.
.SH SEE ALSO
.BR getutxent (3),
.BR wtmp (5)
diff --git a/man3/uselocale.3 b/man3/uselocale.3
index 59c3af52f..19995c349 100644
--- a/man3/uselocale.3
+++ b/man3/uselocale.3
@@ -2,7 +2,7 @@
.\"
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
-.TH uselocale 3 2022-12-04 "Linux man-pages 6.03"
+.TH uselocale 3 2023-03-30 "Linux man-pages 6.05.01"
.SH NAME
uselocale \- set/get the locale for the calling thread
.SH LIBRARY
@@ -70,12 +70,11 @@ to indicate the error.
.B EINVAL
.I newloc
does not refer to a valid locale object.
-.SH VERSIONS
-The
-.BR uselocale ()
-function first appeared in glibc 2.3.
.SH STANDARDS
POSIX.1-2008.
+.SH HISTORY
+glibc 2.3.
+POSIX.1-2008.
.SH NOTES
Unlike
.BR setlocale (3),
diff --git a/man3/usleep.3 b/man3/usleep.3
index c8526556f..a05472d3c 100644
--- a/man3/usleep.3
+++ b/man3/usleep.3
@@ -11,7 +11,7 @@
.\" Modified 2001-04-01 by aeb
.\" Modified 2003-07-23 by aeb
.\"
-.TH usleep 3 2023-02-05 "Linux man-pages 6.03"
+.TH usleep 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
usleep \- suspend execution for microsecond intervals
.SH LIBRARY
@@ -66,27 +66,26 @@ Interrupted by a signal; see
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR usleep ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
+None.
+.SH HISTORY
4.3BSD, POSIX.1-2001.
-POSIX.1-2001 declares this function obsolete; use
+POSIX.1-2001 declares it obsolete, suggesting
.BR nanosleep (2)
instead.
-POSIX.1-2008 removes the specification of
-.BR usleep ().
+Removed in POSIX.1-2008.
.PP
On the original BSD implementation,
and before glibc 2.2.2, the return type of this function is
@@ -98,7 +97,7 @@ and this is also the prototype used since glibc 2.2.2.
Only the
.B EINVAL
error return is documented by SUSv2 and POSIX.1-2001.
-.SH NOTES
+.SH CAVEATS
The interaction of this function with the
.B SIGALRM
signal, and with other timer functions such as
diff --git a/man3/wcpcpy.3 b/man3/wcpcpy.3
index fd84bd0f9..dfdc0796f 100644
--- a/man3/wcpcpy.3
+++ b/man3/wcpcpy.3
@@ -8,7 +8,7 @@
.\" Dinkumware C library reference http://www.dinkumware.com/
.\" OpenGroup's Single UNIX specification http://www.UNIX-systems.org/online.html
.\"
-.TH wcpcpy 3 2023-02-05 "Linux man-pages 6.03"
+.TH wcpcpy 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
wcpcpy \- copy a wide-character string, returning a pointer to its end
.SH LIBRARY
@@ -61,19 +61,17 @@ that is, a pointer to the terminating null wide character.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR wcpcpy ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
POSIX.1-2008.
diff --git a/man3/wcpncpy.3 b/man3/wcpncpy.3
index bced38561..40538d03b 100644
--- a/man3/wcpncpy.3
+++ b/man3/wcpncpy.3
@@ -8,7 +8,7 @@
.\" Dinkumware C library reference http://www.dinkumware.com/
.\" OpenGroup's Single UNIX specification http://www.UNIX-systems.org/online.html
.\"
-.TH wcpncpy 3 2023-02-05 "Linux man-pages 6.03"
+.TH wcpncpy 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
wcpncpy \- copy a fixed-size string of wide characters,
returning a pointer to its end
@@ -88,19 +88,17 @@ returns a pointer to the last wide character written, that is,
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR wcpncpy ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
POSIX.1-2008.
diff --git a/man3/wcrtomb.3 b/man3/wcrtomb.3
index 02f1fa965..2732832dd 100644
--- a/man3/wcrtomb.3
+++ b/man3/wcrtomb.3
@@ -9,7 +9,7 @@
.\" OpenGroup's Single UNIX specification http://www.UNIX-systems.org/online.html
.\" ISO/IEC 9899:1999
.\"
-.TH wcrtomb 3 2023-02-05 "Linux man-pages 6.03"
+.TH wcrtomb 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
wcrtomb \- convert a wide character to a multibyte sequence
.SH LIBRARY
@@ -113,22 +113,22 @@ set to
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR wcrtomb ()
T} Thread safety MT-Unsafe race:wcrtomb/!ps
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, C99.
+C11, POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001, C99.
.SH NOTES
The behavior of
.BR wcrtomb ()
diff --git a/man3/wcscasecmp.3 b/man3/wcscasecmp.3
index a73cd33bc..252228cb1 100644
--- a/man3/wcscasecmp.3
+++ b/man3/wcscasecmp.3
@@ -8,7 +8,7 @@
.\" Dinkumware C library reference http://www.dinkumware.com/
.\" OpenGroup's Single UNIX specification http://www.UNIX-systems.org/online.html
.\"
-.TH wcscasecmp 3 2022-12-15 "Linux man-pages 6.03"
+.TH wcscasecmp 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
wcscasecmp \- compare two wide-character strings, ignoring case
.SH LIBRARY
@@ -69,31 +69,25 @@ is smaller
than
.IR s2 ,
ignoring case.
-.SH VERSIONS
-The
-.BR wcscasecmp ()
-function is provided since glibc 2.1.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR wcscasecmp ()
T} Thread safety MT-Safe locale
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
POSIX.1-2008.
-This function is not specified in POSIX.1-2001,
-and is not widely available on other systems.
+.SH HISTORY
+glibc 2.1.
.SH NOTES
The behavior of
.BR wcscasecmp ()
diff --git a/man3/wcscat.3 b/man3/wcscat.3
index 55671a7b3..6f3e5397e 100644
--- a/man3/wcscat.3
+++ b/man3/wcscat.3
@@ -9,7 +9,7 @@
.\" OpenGroup's Single UNIX specification http://www.UNIX-systems.org/online.html
.\" ISO/IEC 9899:1999
.\"
-.TH wcscat 3 2023-02-05 "Linux man-pages 6.03"
+.TH wcscat 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
wcscat \- concatenate two wide-character strings
.SH LIBRARY
@@ -48,22 +48,22 @@ returns
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR wcscat ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, C99.
+C11, POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001, C99.
.SH SEE ALSO
.BR strcat (3),
.BR wcpcpy (3),
diff --git a/man3/wcschr.3 b/man3/wcschr.3
index dbd125346..e4c1d76e5 100644
--- a/man3/wcschr.3
+++ b/man3/wcschr.3
@@ -9,7 +9,7 @@
.\" OpenGroup's Single UNIX specification http://www.UNIX-systems.org/online.html
.\" ISO/IEC 9899:1999
.\"
-.TH wcschr 3 2022-12-15 "Linux man-pages 6.03"
+.TH wcschr 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
wcschr \- search a wide character in a wide-character string
.SH LIBRARY
@@ -46,22 +46,22 @@ does not occur in the string.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR wcschr ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, C99.
+C11, POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001, C99.
.SH SEE ALSO
.BR strchr (3),
.BR wcspbrk (3),
diff --git a/man3/wcscmp.3 b/man3/wcscmp.3
index db087a69f..264bb09b3 100644
--- a/man3/wcscmp.3
+++ b/man3/wcscmp.3
@@ -9,7 +9,7 @@
.\" OpenGroup's Single UNIX specification http://www.UNIX-systems.org/online.html
.\" ISO/IEC 9899:1999
.\"
-.TH wcscmp 3 2022-12-15 "Linux man-pages 6.03"
+.TH wcscmp 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
wcscmp \- compare two wide-character strings
.SH LIBRARY
@@ -58,22 +58,22 @@ is less than
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR wcscmp ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, C99.
+C11, POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001, C99.
.SH SEE ALSO
.BR strcmp (3),
.BR wcscasecmp (3),
diff --git a/man3/wcscpy.3 b/man3/wcscpy.3
index 46ecced77..76882b5a5 100644
--- a/man3/wcscpy.3
+++ b/man3/wcscpy.3
@@ -9,7 +9,7 @@
.\" OpenGroup's Single UNIX specification http://www.UNIX-systems.org/online.html
.\" ISO/IEC 9899:1999
.\"
-.TH wcscpy 3 2023-02-05 "Linux man-pages 6.03"
+.TH wcscpy 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
wcscpy \- copy a wide-character string
.SH LIBRARY
@@ -49,22 +49,22 @@ returns
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR wcscpy ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, C99.
+C11, POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001, C99.
.SH SEE ALSO
.BR strcpy (3),
.BR wcpcpy (3),
diff --git a/man3/wcscspn.3 b/man3/wcscspn.3
index 84543bc30..20fe000e9 100644
--- a/man3/wcscspn.3
+++ b/man3/wcscspn.3
@@ -9,7 +9,7 @@
.\" OpenGroup's Single UNIX specification http://www.UNIX-systems.org/online.html
.\" ISO/IEC 9899:1999
.\"
-.TH wcscspn 3 2022-12-15 "Linux man-pages 6.03"
+.TH wcscspn 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
wcscspn \- search a wide-character string for any of a set of wide characters
.SH LIBRARY
@@ -60,22 +60,22 @@ if there is none.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR wcscspn ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, C99.
+C11, POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001, C99.
.SH SEE ALSO
.BR strcspn (3),
.BR wcspbrk (3),
diff --git a/man3/wcsdup.3 b/man3/wcsdup.3
index 261965148..8e7c71bc5 100644
--- a/man3/wcsdup.3
+++ b/man3/wcsdup.3
@@ -8,7 +8,7 @@
.\" Dinkumware C library reference http://www.dinkumware.com/
.\" OpenGroup's Single UNIX specification http://www.UNIX-systems.org/online.html
.\"
-.TH wcsdup 3 2022-12-15 "Linux man-pages 6.03"
+.TH wcsdup 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
wcsdup \- duplicate a wide-character string
.SH LIBRARY
@@ -63,25 +63,22 @@ Insufficient memory available to allocate duplicate string.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR wcsdup ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
POSIX.1-2008.
-This function is not specified in POSIX.1-2001,
-and is not widely available on other systems.
-.\" present in libc5 and glibc 2.0 and later
+.SH HISTORY
+libc5, glibc 2.0.
.SH SEE ALSO
.BR strdup (3),
.BR wcscpy (3)
diff --git a/man3/wcslen.3 b/man3/wcslen.3
index e0f39df7f..e716484af 100644
--- a/man3/wcslen.3
+++ b/man3/wcslen.3
@@ -9,7 +9,7 @@
.\" OpenGroup's Single UNIX specification http://www.UNIX-systems.org/online.html
.\" ISO/IEC 9899:1999
.\"
-.TH wcslen 3 2023-02-05 "Linux man-pages 6.03"
+.TH wcslen 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
wcslen \- determine the length of a wide-character string
.SH LIBRARY
@@ -41,22 +41,22 @@ number of wide characters in
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR wcslen ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, C99.
+C11, POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001, C99.
.SH NOTES
In cases where the input buffer may not contain
a terminating null wide character,
diff --git a/man3/wcsncasecmp.3 b/man3/wcsncasecmp.3
index d8eddbb6c..ad233b4d3 100644
--- a/man3/wcsncasecmp.3
+++ b/man3/wcsncasecmp.3
@@ -8,7 +8,7 @@
.\" Dinkumware C library reference http://www.dinkumware.com/
.\" OpenGroup's Single UNIX specification http://www.UNIX-systems.org/online.html
.\"
-.TH wcsncasecmp 3 2022-12-15 "Linux man-pages 6.03"
+.TH wcsncasecmp 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
wcsncasecmp \- compare two fixed-size wide-character strings, ignoring case
.SH LIBRARY
@@ -75,31 +75,25 @@ if truncated
is smaller than truncated
.IR s2 ,
ignoring case.
-.SH VERSIONS
-The
-.BR wcsncasecmp ()
-function is provided since glibc 2.1.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR wcsncasecmp ()
T} Thread safety MT-Safe locale
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
POSIX.1-2008.
-This function is not specified in POSIX.1-2001,
-and is not widely available on other systems.
+.SH HISTORY
+glibc 2.1.
.SH NOTES
The behavior of
.BR wcsncasecmp ()
diff --git a/man3/wcsncat.3 b/man3/wcsncat.3
index 28561617f..73ff7e8e3 100644
--- a/man3/wcsncat.3
+++ b/man3/wcsncat.3
@@ -9,7 +9,7 @@
.\" OpenGroup's Single UNIX specification http://www.UNIX-systems.org/online.html
.\" ISO/IEC 9899:1999
.\"
-.TH wcsncat 3 2023-02-05 "Linux man-pages 6.03"
+.TH wcsncat 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
wcsncat \- concatenate two wide-character strings
.SH LIBRARY
@@ -52,22 +52,22 @@ returns
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR wcsncat ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, C99.
+C11, POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001, C99.
.SH SEE ALSO
.BR strncat (3),
.BR wcscat (3)
diff --git a/man3/wcsncmp.3 b/man3/wcsncmp.3
index 9f0f9ac31..8e53bf2d4 100644
--- a/man3/wcsncmp.3
+++ b/man3/wcsncmp.3
@@ -9,7 +9,7 @@
.\" OpenGroup's Single UNIX specification http://www.UNIX-systems.org/online.html
.\" ISO/IEC 9899:1999
.\"
-.TH wcsncmp 3 2023-02-05 "Linux man-pages 6.03"
+.TH wcsncmp 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
wcsncmp \- compare two fixed-size wide-character strings
.SH LIBRARY
@@ -73,22 +73,22 @@ is less than
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR wcsncmp ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, C99.
+C11, POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001, C99.
.SH SEE ALSO
.BR strncmp (3),
.BR wcsncasecmp (3)
diff --git a/man3/wcsncpy.3 b/man3/wcsncpy.3
index 83aebe010..ee046771c 100644
--- a/man3/wcsncpy.3
+++ b/man3/wcsncpy.3
@@ -9,7 +9,7 @@
.\" OpenGroup's Single UNIX specification http://www.UNIX-systems.org/online.html
.\" ISO/IEC 9899:1999
.\"
-.TH wcsncpy 3 2023-02-05 "Linux man-pages 6.03"
+.TH wcsncpy 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
wcsncpy \- copy a fixed-size string of wide characters
.SH LIBRARY
@@ -70,21 +70,21 @@ returns
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR wcsncpy ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, C99.
+C11, POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001, C99.
.SH SEE ALSO
.BR strncpy (3)
diff --git a/man3/wcsnlen.3 b/man3/wcsnlen.3
index 2a5a1b871..8e2426da3 100644
--- a/man3/wcsnlen.3
+++ b/man3/wcsnlen.3
@@ -8,7 +8,7 @@
.\" Dinkumware C library reference http://www.dinkumware.com/
.\" OpenGroup's Single UNIX specification http://www.UNIX-systems.org/online.html
.\"
-.TH wcsnlen 3 2023-02-05 "Linux man-pages 6.03"
+.TH wcsnlen 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
wcsnlen \- determine the length of a fixed-size wide-character string
.SH LIBRARY
@@ -68,29 +68,25 @@ first
.I maxlen
wide characters pointed to by
.IR s .
-.SH VERSIONS
-The
-.BR wcsnlen ()
-function is provided since glibc 2.1.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR wcsnlen ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
POSIX.1-2008.
+.SH HISTORY
+glibc 2.1.
.SH SEE ALSO
.BR strnlen (3),
.BR wcslen (3)
diff --git a/man3/wcsnrtombs.3 b/man3/wcsnrtombs.3
index 8c4194b04..21ad0fa10 100644
--- a/man3/wcsnrtombs.3
+++ b/man3/wcsnrtombs.3
@@ -8,7 +8,7 @@
.\" Dinkumware C library reference http://www.dinkumware.com/
.\" OpenGroup's Single UNIX specification http://www.UNIX-systems.org/online.html
.\"
-.TH wcsnrtombs 3 2023-02-05 "Linux man-pages 6.03"
+.TH wcsnrtombs 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
wcsnrtombs \- convert a wide-character string to a multibyte string
.SH LIBRARY
@@ -155,21 +155,21 @@ set to
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lb lb lbx
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR wcsnrtombs ()
T} Thread safety T{
+.na
+.nh
MT-Unsafe race:wcsnrtombs/!ps
T}
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
POSIX.1-2008.
diff --git a/man3/wcspbrk.3 b/man3/wcspbrk.3
index 3012fdb34..539d881d7 100644
--- a/man3/wcspbrk.3
+++ b/man3/wcspbrk.3
@@ -9,7 +9,7 @@
.\" OpenGroup's Single UNIX specification http://www.UNIX-systems.org/online.html
.\" ISO/IEC 9899:1999
.\"
-.TH wcspbrk 3 2022-12-15 "Linux man-pages 6.03"
+.TH wcspbrk 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
wcspbrk \- search a wide-character string for any of a set of wide characters
.SH LIBRARY
@@ -48,22 +48,22 @@ contains none of these characters, NULL is returned.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR wcspbrk ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, C99.
+C11, POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001, C99.
.SH SEE ALSO
.BR strpbrk (3),
.BR wcschr (3),
diff --git a/man3/wcsrchr.3 b/man3/wcsrchr.3
index a7be62c3c..beae570c1 100644
--- a/man3/wcsrchr.3
+++ b/man3/wcsrchr.3
@@ -9,7 +9,7 @@
.\" OpenGroup's Single UNIX specification http://www.UNIX-systems.org/online.html
.\" ISO/IEC 9899:1999
.\"
-.TH wcsrchr 3 2022-12-15 "Linux man-pages 6.03"
+.TH wcsrchr 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
wcsrchr \- search a wide character in a wide-character string
.SH LIBRARY
@@ -46,22 +46,22 @@ does not occur in the string.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR wcsrchr ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, C99.
+C11, POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001, C99.
.SH SEE ALSO
.BR strrchr (3),
.BR wcschr (3)
diff --git a/man3/wcsrtombs.3 b/man3/wcsrtombs.3
index 8bf18f421..99304e406 100644
--- a/man3/wcsrtombs.3
+++ b/man3/wcsrtombs.3
@@ -9,7 +9,7 @@
.\" OpenGroup's Single UNIX specification http://www.UNIX-systems.org/online.html
.\" ISO/IEC 9899:1999
.\"
-.TH wcsrtombs 3 2023-02-05 "Linux man-pages 6.03"
+.TH wcsrtombs 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
wcsrtombs \- convert a wide-character string to a multibyte string
.SH LIBRARY
@@ -126,24 +126,26 @@ set to
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lb lb lbx
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR wcsrtombs ()
T} Thread safety T{
+.na
+.nh
MT-Unsafe race:wcsrtombs/!ps
T}
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, C99.
+C11, POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001, C99.
.SH NOTES
The behavior of
.BR wcsrtombs ()
diff --git a/man3/wcsspn.3 b/man3/wcsspn.3
index cd5c5a97d..aa9e2653d 100644
--- a/man3/wcsspn.3
+++ b/man3/wcsspn.3
@@ -9,7 +9,7 @@
.\" OpenGroup's Single UNIX specification http://www.UNIX-systems.org/online.html
.\" ISO/IEC 9899:1999
.\"
-.TH wcsspn 3 2022-12-15 "Linux man-pages 6.03"
+.TH wcsspn 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
wcsspn \- get length of a prefix wide-character substring
.SH LIBRARY
@@ -58,22 +58,22 @@ if there is none.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR wcsspn ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, C99.
+C11, POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001, C99.
.SH SEE ALSO
.BR strspn (3),
.BR wcscspn (3)
diff --git a/man3/wcsstr.3 b/man3/wcsstr.3
index 4bb4b4149..75b3d3b78 100644
--- a/man3/wcsstr.3
+++ b/man3/wcsstr.3
@@ -9,7 +9,7 @@
.\" OpenGroup's Single UNIX specification http://www.UNIX-systems.org/online.html
.\" ISO/IEC 9899:1999
.\"
-.TH wcsstr 3 2023-02-05 "Linux man-pages 6.03"
+.TH wcsstr 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
wcsstr \- locate a substring in a wide-character string
.SH LIBRARY
@@ -55,22 +55,22 @@ itself.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR wcsstr ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, C99.
+C11, POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001, C99.
.SH SEE ALSO
.BR strstr (3),
.BR wcschr (3)
diff --git a/man3/wcstoimax.3 b/man3/wcstoimax.3
index d81e06e93..e3e5ed1d9 100644
--- a/man3/wcstoimax.3
+++ b/man3/wcstoimax.3
@@ -3,7 +3,7 @@
.\"
.\" SPDX-License-Identifier: GPL-2.0-or-later
.\"
-.TH wcstoimax 3 2022-12-15 "Linux man-pages 6.03"
+.TH wcstoimax 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
wcstoimax, wcstoumax \- convert wide-character string to integer
.SH LIBRARY
@@ -32,23 +32,23 @@ respectively.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR wcstoimax (),
.BR wcstoumax ()
T} Thread safety MT-Safe locale
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, C99.
+C11, POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001, C99.
.SH SEE ALSO
.BR imaxabs (3),
.BR imaxdiv (3),
diff --git a/man3/wcstok.3 b/man3/wcstok.3
index ca4a03f2d..b63789c02 100644
--- a/man3/wcstok.3
+++ b/man3/wcstok.3
@@ -9,7 +9,7 @@
.\" OpenGroup's Single UNIX specification http://www.UNIX-systems.org/online.html
.\" ISO/IEC 9899:1999
.\"
-.TH wcstok 3 2023-02-05 "Linux man-pages 6.03"
+.TH wcstok 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
wcstok \- split wide-character string into tokens
.SH LIBRARY
@@ -79,22 +79,22 @@ or NULL if no further token was found.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR wcstok ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, C99.
+C11, POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001, C99.
.SH NOTES
The original
.I wcs
diff --git a/man3/wcstombs.3 b/man3/wcstombs.3
index db0a03cce..a813615f5 100644
--- a/man3/wcstombs.3
+++ b/man3/wcstombs.3
@@ -9,7 +9,7 @@
.\" OpenGroup's Single UNIX specification http://www.UNIX-systems.org/online.html
.\" ISO/IEC 9899:1999
.\"
-.TH wcstombs 3 2023-02-05 "Linux man-pages 6.03"
+.TH wcstombs 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
wcstombs \- convert a wide-character string to a multibyte string
.SH LIBRARY
@@ -91,22 +91,26 @@ is returned.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR wcstombs ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
+.SH VERSIONS
+The function
+.BR wcsrtombs (3)
+provides a better interface to the same functionality.
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, C99.
+C11, POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001, C99.
.SH NOTES
The behavior of
.BR wcstombs ()
@@ -114,10 +118,6 @@ depends on the
.B LC_CTYPE
category of the
current locale.
-.PP
-The function
-.BR wcsrtombs (3)
-provides a better interface to the same functionality.
.SH SEE ALSO
.BR mblen (3),
.BR mbstowcs (3),
diff --git a/man3/wcswidth.3 b/man3/wcswidth.3
index 690c558c9..a85254a6b 100644
--- a/man3/wcswidth.3
+++ b/man3/wcswidth.3
@@ -8,7 +8,7 @@
.\" Dinkumware C library reference http://www.dinkumware.com/
.\" OpenGroup's Single UNIX specification http://www.UNIX-systems.org/online.html
.\"
-.TH wcswidth 3 2022-12-15 "Linux man-pages 6.03"
+.TH wcswidth 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
wcswidth \- determine columns needed for a fixed-size wide-character string
.SH LIBRARY
@@ -46,22 +46,22 @@ truncated to at most length
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR wcswidth ()
T} Thread safety MT-Safe locale
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008.
+POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001.
.SH NOTES
The behavior of
.BR wcswidth ()
diff --git a/man3/wctob.3 b/man3/wctob.3
index 6b3adc5ac..c8a669db3 100644
--- a/man3/wctob.3
+++ b/man3/wctob.3
@@ -9,7 +9,7 @@
.\" OpenGroup's Single UNIX specification http://www.UNIX-systems.org/online.html
.\" ISO/IEC 9899:1999
.\"
-.TH wctob 3 2022-12-15 "Linux man-pages 6.03"
+.TH wctob 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
wctob \- try to represent a wide character as a single byte
.SH LIBRARY
@@ -49,22 +49,22 @@ otherwise.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR wctob ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, C99.
+C11, POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001, C99.
.SH NOTES
The behavior of
.BR wctob ()
diff --git a/man3/wctomb.3 b/man3/wctomb.3
index f99e27f71..70ddb28dd 100644
--- a/man3/wctomb.3
+++ b/man3/wctomb.3
@@ -9,7 +9,7 @@
.\" OpenGroup's Single UNIX specification http://www.UNIX-systems.org/online.html
.\" ISO/IEC 9899:1999
.\"
-.TH wctomb 3 2022-12-15 "Linux man-pages 6.03"
+.TH wctomb 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
wctomb \- convert a wide character to a multibyte sequence
.SH LIBRARY
@@ -83,22 +83,27 @@ encoding has nontrivial shift state, or zero if the encoding is stateless.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR wctomb ()
T} Thread safety MT-Unsafe race
.TE
-.hy
-.ad
.sp 1
+.SH VERSIONS
+The function
+.BR wcrtomb (3)
+provides
+a better interface to the same functionality.
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, C99.
+C11, POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001, C99.
.SH NOTES
The behavior of
.BR wctomb ()
@@ -106,11 +111,6 @@ depends on the
.B LC_CTYPE
category of the
current locale.
-.PP
-The function
-.BR wcrtomb (3)
-provides
-a better interface to the same functionality.
.SH SEE ALSO
.BR MB_CUR_MAX (3),
.BR mblen (3),
diff --git a/man3/wctrans.3 b/man3/wctrans.3
index 201db671e..ae1762996 100644
--- a/man3/wctrans.3
+++ b/man3/wctrans.3
@@ -9,7 +9,7 @@
.\" OpenGroup's Single UNIX specification http://www.UNIX-systems.org/online.html
.\" ISO/IEC 9899:1999
.\"
-.TH wctrans 3 2022-12-15 "Linux man-pages 6.03"
+.TH wctrans 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
wctrans \- wide-character translation mapping
.SH LIBRARY
@@ -62,22 +62,22 @@ Otherwise, it returns
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR wctrans ()
T} Thread safety MT-Safe locale
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, C99.
+C11, POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001, C99.
.SH NOTES
The behavior of
.BR wctrans ()
diff --git a/man3/wctype.3 b/man3/wctype.3
index cee254730..21de44213 100644
--- a/man3/wctype.3
+++ b/man3/wctype.3
@@ -9,7 +9,7 @@
.\" OpenGroup's Single UNIX specification http://www.UNIX-systems.org/online.html
.\" ISO/IEC 9899:1999
.\"
-.TH wctype 3 2022-12-15 "Linux man-pages 6.03"
+.TH wctype 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
wctype \- wide-character classification
.SH LIBRARY
@@ -74,22 +74,22 @@ Otherwise, it returns
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR wctype ()
T} Thread safety MT-Safe locale
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, C99.
+C11, POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001, C99.
.SH NOTES
The behavior of
.BR wctype ()
diff --git a/man3/wcwidth.3 b/man3/wcwidth.3
index 3114dfefc..127b3ed1b 100644
--- a/man3/wcwidth.3
+++ b/man3/wcwidth.3
@@ -8,7 +8,7 @@
.\" Dinkumware C library reference http://www.dinkumware.com/
.\" OpenGroup's Single UNIX specification http://www.UNIX-systems.org/online.html
.\"
-.TH wcwidth 3 2023-02-05 "Linux man-pages 6.03"
+.TH wcwidth 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
wcwidth \- determine columns needed for a wide character
.SH LIBRARY
@@ -44,22 +44,22 @@ column positions for
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR wcwidth ()
T} Thread safety MT-Safe locale
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008.
+POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001.
.PP
Note that before glibc 2.2.5, glibc used the prototype
.PP
diff --git a/man3/wmemchr.3 b/man3/wmemchr.3
index b687761e3..15cc1cf11 100644
--- a/man3/wmemchr.3
+++ b/man3/wmemchr.3
@@ -9,7 +9,7 @@
.\" OpenGroup's Single UNIX specification http://www.UNIX-systems.org/online.html
.\" ISO/IEC 9899:1999
.\"
-.TH wmemchr 3 2022-12-15 "Linux man-pages 6.03"
+.TH wmemchr 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
wmemchr \- search a wide character in a wide-character array
.SH LIBRARY
@@ -50,22 +50,22 @@ not occur among these.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR wmemchr ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, C99.
+C11, POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001, C99.
.SH SEE ALSO
.BR memchr (3),
.BR wcschr (3)
diff --git a/man3/wmemcmp.3 b/man3/wmemcmp.3
index 42d82c50d..ebc9cef19 100644
--- a/man3/wmemcmp.3
+++ b/man3/wmemcmp.3
@@ -8,7 +8,7 @@
.\" Dinkumware C library reference http://www.dinkumware.com/
.\" OpenGroup's Single UNIX specification http://www.UNIX-systems.org/online.html
.\"
-.TH wmemcmp 3 2022-12-15 "Linux man-pages 6.03"
+.TH wmemcmp 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
wmemcmp \- compare two arrays of wide-characters
.SH LIBRARY
@@ -70,22 +70,22 @@ is less than
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR wmemcmp ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, C99.
+C11, POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001, C99.
.SH SEE ALSO
.BR memcmp (3),
.BR wcscmp (3)
diff --git a/man3/wmemcpy.3 b/man3/wmemcpy.3
index 2d70a3a39..155a3d555 100644
--- a/man3/wmemcpy.3
+++ b/man3/wmemcpy.3
@@ -9,7 +9,7 @@
.\" OpenGroup's Single UNIX specification http://www.UNIX-systems.org/online.html
.\" ISO/IEC 9899:1999
.\"
-.TH wmemcpy 3 2022-12-15 "Linux man-pages 6.03"
+.TH wmemcpy 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
wmemcpy \- copy an array of wide-characters
.SH LIBRARY
@@ -53,22 +53,22 @@ returns
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR wmemcpy ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, C99.
+C11, POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001, C99.
.SH SEE ALSO
.BR memcpy (3),
.BR wcscpy (3),
diff --git a/man3/wmemmove.3 b/man3/wmemmove.3
index 29acf2a3e..ff518ad89 100644
--- a/man3/wmemmove.3
+++ b/man3/wmemmove.3
@@ -9,7 +9,7 @@
.\" OpenGroup's Single UNIX specification http://www.UNIX-systems.org/online.html
.\" ISO/IEC 9899:1999
.\"
-.TH wmemmove 3 2022-12-15 "Linux man-pages 6.03"
+.TH wmemmove 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
wmemmove \- copy an array of wide-characters
.SH LIBRARY
@@ -50,22 +50,22 @@ returns
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR wmemmove ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, C99.
+C11, POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001, C99.
.SH SEE ALSO
.BR memmove (3),
.BR wmemcpy (3)
diff --git a/man3/wmemset.3 b/man3/wmemset.3
index d04297528..4ef4cf92c 100644
--- a/man3/wmemset.3
+++ b/man3/wmemset.3
@@ -9,7 +9,7 @@
.\" OpenGroup's Single UNIX specification http://www.UNIX-systems.org/online.html
.\" ISO/IEC 9899:1999
.\"
-.TH wmemset 3 2022-12-15 "Linux man-pages 6.03"
+.TH wmemset 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
wmemset \- fill an array of wide-characters with a constant wide character
.SH LIBRARY
@@ -42,21 +42,21 @@ returns
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR wmemset ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, C99.
+C11, POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001, C99.
.SH SEE ALSO
.BR memset (3)
diff --git a/man3/wordexp.3 b/man3/wordexp.3
index b89963d8d..554c26604 100644
--- a/man3/wordexp.3
+++ b/man3/wordexp.3
@@ -3,7 +3,7 @@
.\"
.\" SPDX-License-Identifier: GPL-2.0-or-later
.\"
-.TH wordexp 3 2023-02-05 "Linux man-pages 6.03"
+.TH wordexp 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
wordexp, wordfree \- perform word expansion like a posix-shell
.SH LIBRARY
@@ -171,33 +171,30 @@ Out of memory.
.B WRDE_SYNTAX
Shell syntax error, such as unbalanced parentheses or
unmatched quotes.
-.SH VERSIONS
-.BR wordexp ()
-and
-.BR wordfree ()
-are provided since glibc 2.1.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lb lb lbx
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR wordexp ()
T} Thread safety T{
+.na
+.nh
MT-Unsafe race:utent const:env
env sig:ALRM timer locale
T}
T{
+.na
+.nh
.BR wordfree ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
In the above table,
.I utent
@@ -214,7 +211,10 @@ then data races could occur.
calls those functions,
so we use race:utent to remind users.
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008.
+POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001.
+glibc 2.1.
.SH EXAMPLES
The output of the following example program
is approximately that of "ls [a-c]*.c".
@@ -224,13 +224,13 @@ is approximately that of "ls [a-c]*.c".
#include <stdio.h>
#include <stdlib.h>
#include <wordexp.h>
-
+\&
int
main(void)
{
wordexp_t p;
char **w;
-
+\&
wordexp("[a\-c]*.c", &p, 0);
w = p.we_wordv;
for (size_t i = 0; i < p.we_wordc; i++)
diff --git a/man3/wprintf.3 b/man3/wprintf.3
index fb4edd519..95854a33f 100644
--- a/man3/wprintf.3
+++ b/man3/wprintf.3
@@ -9,7 +9,7 @@
.\" OpenGroup's Single UNIX specification http://www.UNIX-systems.org/online.html
.\" ISO/IEC 9899:1999
.\"
-.TH wprintf 3 2023-02-05 "Linux man-pages 6.03"
+.TH wprintf 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
wprintf, fwprintf, swprintf, vwprintf, vfwprintf, vswprintf \- formatted
wide-character output conversion
@@ -206,14 +206,14 @@ They return \-1 when an error occurs.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR wprintf (),
.BR fwprintf (),
.BR swprintf (),
@@ -222,11 +222,11 @@ T{
.BR vswprintf ()
T} Thread safety MT-Safe locale
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, C99.
+C11, POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001, C99.
.SH NOTES
The behavior of
.BR wprintf ()
@@ -250,7 +250,7 @@ This is because the
.I wchar_t
representation is platform- and locale-dependent.
(The glibc represents
-wide characters using their Unicode (ISO-10646) code point, but other
+wide characters using their Unicode (ISO/IEC 10646) code point, but other
platforms don't do this.
Also, the use of C99 universal character names
of the form \eunnnn does not solve this problem.)
diff --git a/man3/xcrypt.3 b/man3/xcrypt.3
index 74310f286..1a603274c 100644
--- a/man3/xcrypt.3
+++ b/man3/xcrypt.3
@@ -9,7 +9,7 @@
.\" 3. xencrypt() a hexstring
.\" to bad to be true :(
.\"
-.TH XCRYPT 3 2022-12-15 "Linux man-pages 6.03"
+.TH XCRYPT 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
xencrypt, xdecrypt, passwd2des \- RFS password encryption
.SH LIBRARY
@@ -71,27 +71,25 @@ The functions
and
.BR xdecrypt ()
return 1 on success and 0 on error.
-.SH VERSIONS
-These functions are available since glibc 2.1.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR passwd2des (),
.BR xencrypt (),
.BR xdecrypt ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
+.SH VERSIONS
+These functions are available since glibc 2.1.
.SH BUGS
The prototypes are missing from the abovementioned include file.
.SH SEE ALSO
diff --git a/man3/xdr.3 b/man3/xdr.3
index 56602bd4b..a3f9a0271 100644
--- a/man3/xdr.3
+++ b/man3/xdr.3
@@ -9,7 +9,7 @@
.\"
.\" 2007-12-30, mtk, Convert function prototypes to modern C syntax
.\"
-.TH xdr 3 2022-12-15 "Linux man-pages 6.03"
+.TH xdr 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
xdr \- library routines for external data representation
.SH LIBRARY
@@ -551,14 +551,14 @@ Returns one if it succeeds, zero otherwise.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR xdr_array (),
.BR xdr_bool (),
.BR xdr_bytes (),
@@ -594,8 +594,6 @@ T{
.BR xdr_wrapstring ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
.SH SEE ALSO
.BR rpc (3)
diff --git a/man3/y0.3 b/man3/y0.3
index 355c94900..16c20322b 100644
--- a/man3/y0.3
+++ b/man3/y0.3
@@ -14,7 +14,7 @@
.\" Modified 2004-11-12 as per suggestion by Fabian Kreutz/AEB
.\" 2008-07-24, mtk, created this page, based on material from j0.3.
.\"
-.TH y0 3 2023-02-05 "Linux man-pages 6.03"
+.TH y0 3 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
y0, y0f, y0l, y1, y1f, y1l, yn, ynf, ynl \-
Bessel functions of the second kind
@@ -181,7 +181,7 @@ No
.B FE_UNDERFLOW
exception is returned by
.\" This is intended behavior
-.\" See http://sources.redhat.com/bugzilla/show_bug.cgi?id=6806
+.\" See https://www.sourceware.org/bugzilla/show_bug.cgi?id=6806
.BR fetestexcept (3)
for this case.
.TP
@@ -197,38 +197,57 @@ is raised.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
-.ad l
-.nh
.TS
allbox;
lbx lb lb
l l l.
Interface Attribute Value
T{
+.na
+.nh
.BR y0 (),
.BR y0f (),
.BR y0l ()
T} Thread safety MT-Safe
T{
+.na
+.nh
.BR y1 (),
.BR y1f (),
.BR y1l ()
T} Thread safety MT-Safe
T{
+.na
+.nh
.BR yn (),
.BR ynf (),
.BR ynl ()
T} Thread safety MT-Safe
.TE
-.hy
-.ad
.sp 1
.SH STANDARDS
-The functions returning
-.I double
-conform to SVr4, 4.3BSD,
-POSIX.1-2001, POSIX.1-2008.
-The others are nonstandard functions that also exist on the BSDs.
+.TP
+.BR y0 ()
+.TQ
+.BR y1 ()
+.TQ
+.BR yn ()
+POSIX.1-2008.
+.TP
+Others:
+BSD.
+.SH HISTORY
+.TP
+.BR y0 ()
+.TQ
+.BR y1 ()
+.TQ
+.BR yn ()
+SVr4, 4.3BSD,
+POSIX.1-2001.
+.TP
+Others:
+BSD.
.SH BUGS
Before glibc 2.19,
.\" http://sourceware.org/bugzilla/show_bug.cgi?id=6807
@@ -243,7 +262,7 @@ and no
exception was raised.
.PP
Before glibc 2.17,
-.\" http://sources.redhat.com/bugzilla/show_bug.cgi?id=6808
+.\" https://www.sourceware.org/bugzilla/show_bug.cgi?id=6808
did not set
.I errno
for "range error: result underflow".
diff --git a/man3const/EOF.3const b/man3const/EOF.3const
index f61a0090a..ae644012f 100644
--- a/man3const/EOF.3const
+++ b/man3const/EOF.3const
@@ -3,7 +3,7 @@
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
.\"
-.TH EOF 3const 2023-02-05 "Linux man-pages 6.03"
+.TH EOF 3const 2023-02-05 "Linux man-pages 6.05.01"
.SH NAME
EOF \- end of file or error indicator
.SH LIBRARY
diff --git a/man3const/EXIT_SUCCESS.3const b/man3const/EXIT_SUCCESS.3const
index 9d959f540..b9e4c9a01 100644
--- a/man3const/EXIT_SUCCESS.3const
+++ b/man3const/EXIT_SUCCESS.3const
@@ -3,7 +3,7 @@
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
.\"
-.TH EXIT_SUCCESS 3const 2022-11-17 "Linux man-pages 6.03"
+.TH EXIT_SUCCESS 3const 2023-05-03 "Linux man-pages 6.05.01"
.SH NAME
EXIT_SUCCESS, EXIT_FAILURE \- termination status constants
.SH LIBRARY
@@ -32,24 +32,25 @@ POSIX.1-2001 and later.
.EX
#include <stdio.h>
#include <stdlib.h>
-
+\&
int
main(int argc, char *argv[])
{
FILE *fp;
-
+\&
if (argc != 2) {
fprintf(stderr, "Usage: %s <file>\en", argv[0]);
exit(EXIT_FAILURE);
}
-
- if ((fp = fopen(argv[1], "r")) == NULL) {
+\&
+ fp = fopen(argv[1], "r");
+ if (fp == NULL) {
perror(argv[1]);
exit(EXIT_FAILURE);
}
-
+\&
/* Other code omitted */
-
+\&
fclose(fp);
exit(EXIT_SUCCESS);
}
diff --git a/man3const/NULL.3const b/man3const/NULL.3const
index 275d37594..e043c1eba 100644
--- a/man3const/NULL.3const
+++ b/man3const/NULL.3const
@@ -3,7 +3,7 @@
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
.\"
-.TH NULL 3const 2023-02-05 "Linux man-pages 6.03"
+.TH NULL 3const 2023-02-05 "Linux man-pages 6.05.01"
.SH NAME
NULL \- null pointer constant
.SH LIBRARY
diff --git a/man3head/printf.h.3head b/man3head/printf.h.3head
index 934b222e5..1c6ad32cb 100644
--- a/man3head/printf.h.3head
+++ b/man3head/printf.h.3head
@@ -2,7 +2,7 @@
.\"
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
-.TH printf.h 3head 2022-09-18 "Linux man-pages 6.03"
+.TH printf.h 3head 2022-09-18 "Linux man-pages 6.05.01"
.SH NAME
printf.h,
\%register_printf_specifier,
@@ -159,14 +159,15 @@ The type is determined by using one of the following constants:
cast to
.IR char .
.TP
-.B PA_WCHAR wchar_t
+.B PA_WCHAR
+.IR wchar_t .
.TP
.B PA_STRING
-.I "const char\~*" ,
+.IR "const char\~*" ,
a \(aq\e0\(aq-terminated string.
.TP
.B PA_WSTRING
-.I "const wchar_t\~*" ,
+.IR "const wchar_t\~*" ,
a wide character L\(aq\e0\(aq-terminated string.
.TP
.B PA_POINTER
@@ -220,7 +221,9 @@ On error, it should return \-1.
.TP
.B EINVAL
The specifier was not a valid character.
-.SH VERSIONS
+.SH STANDARDS
+GNU.
+.SH HISTORY
.BR \%register_printf_function (3)
is an older function similar to
.BR \%register_printf_specifier (),
@@ -230,8 +233,6 @@ That function can't handle user-defined types.
.BR \%register_printf_specifier ()
superseeds
.BR \%register_printf_function (3).
-.SH STANDARDS
-These nonstandard functions are present in glibc.
.SH EXAMPLES
The following example program registers the 'b' and 'B' specifiers
to print integers in binary format,
@@ -241,7 +242,7 @@ This can be used to print in binary prior to C23.
.\" SRC BEGIN (register_printf_specifier.c)
.EX
/* This code is in the public domain */
-
+\&
#include <err.h>
#include <limits.h>
#include <stddef.h>
@@ -250,21 +251,21 @@ This can be used to print in binary prior to C23.
#include <stdlib.h>
#include <string.h>
#include <sys/param.h>
-
+\&
#include <printf.h>
-
+\&
#define GROUP_SEP \[aq]\e\[aq]\[aq]
-
+\&
struct Printf_Pad {
char ch;
size_t len;
};
-
+\&
static int b_printf(FILE *stream, const struct printf_info *info,
const void *const args[]);
static int b_arginf_sz(const struct printf_info *info,
size_t n, int argtypes[n], int size[n]);
-
+\&
static uintmax_t b_value(const struct printf_info *info,
const void *arg);
static size_t b_bin_repr(char bin[UINTMAX_WIDTH],
@@ -283,15 +284,15 @@ static ssize_t b_print_number(FILE *stream,
size_t min_len, size_t bin_len);
static char pad_ch(const struct printf_info *info);
static ssize_t pad_spaces(FILE *stream, size_t pad_len);
-
+\&
int
main(void)
{
- if (register_printf_specifier(\[aq]b\[aq], b_printf, b_arginf_sz) == -1)
+ if (register_printf_specifier(\[aq]b\[aq], b_printf, b_arginf_sz) == \-1)
err(EXIT_FAILURE, "register_printf_specifier(\[aq]b\[aq], ...)");
- if (register_printf_specifier(\[aq]B\[aq], b_printf, b_arginf_sz) == -1)
+ if (register_printf_specifier(\[aq]B\[aq], b_printf, b_arginf_sz) == \-1)
err(EXIT_FAILURE, "register_printf_specifier(\[aq]B\[aq], ...)");
-
+\&
printf("....----....----....----....----\en");
printf("%llb;\en", 0x5Ellu);
printf("%lB;\en", 0x5Elu);
@@ -341,10 +342,10 @@ main(void)
printf("%019B;\en", 0xAB);
printf("%#016b;\en", 0xAB);
printf("....----....----....----....----\en");
-
+\&
return 0;
}
-
+\&
static int
b_printf(FILE *stream, const struct printf_info *info,
const void *const args[])
@@ -353,16 +354,16 @@ b_printf(FILE *stream, const struct printf_info *info,
size_t min_len, bin_len;
ssize_t len, tmp;
struct Printf_Pad pad = {0};
-
+\&
len = 0;
-
+\&
min_len = b_bin_repr(bin, info, args[0]);
bin_len = b_bin_len(info, min_len);
-
+\&
pad.ch = pad_ch(info);
if (pad.ch == \[aq] \[aq])
pad.len = b_pad_len(info, bin_len);
-
+\&
/* Padding with \[aq] \[aq] (right aligned) */
if ((pad.ch == \[aq] \[aq]) && !info->left) {
tmp = pad_spaces(stream, pad.len);
@@ -370,7 +371,7 @@ b_printf(FILE *stream, const struct printf_info *info,
return EOF;
len += tmp;
}
-
+\&
/* "0b"/"0B" prefix */
if (info->alt) {
tmp = b_print_prefix(stream, info);
@@ -378,7 +379,7 @@ b_printf(FILE *stream, const struct printf_info *info,
return EOF;
len += tmp;
}
-
+\&
/* Padding with \[aq]0\[aq] */
if (pad.ch == \[aq]0\[aq]) {
tmp = b_pad_zeros(stream, info, min_len);
@@ -386,13 +387,13 @@ b_printf(FILE *stream, const struct printf_info *info,
return EOF;
len += tmp;
}
-
+\&
/* Print number (including leading 0s to fill precision) */
tmp = b_print_number(stream, info, bin, min_len, bin_len);
if (tmp == EOF)
return EOF;
len += tmp;
-
+\&
/* Padding with \[aq] \[aq] (left aligned) */
if (info\->left) {
tmp = pad_spaces(stream, pad.len);
@@ -400,27 +401,27 @@ b_printf(FILE *stream, const struct printf_info *info,
return EOF;
len += tmp;
}
-
+\&
return len;
}
-
+\&
static int
b_arginf_sz(const struct printf_info *info, size_t n, int argtypes[n],
[[maybe_unused]] int size[n])
{
if (n < 1)
- return -1;
-
+ return \-1;
+\&
if (info\->is_long_double)
argtypes[0] = PA_INT | PA_FLAG_LONG_LONG;
else if (info\->is_long)
argtypes[0] = PA_INT | PA_FLAG_LONG;
else
argtypes[0] = PA_INT;
-
+\&
return 1;
}
-
+\&
static uintmax_t
b_value(const struct printf_info *info, const void *arg)
{
@@ -428,54 +429,54 @@ b_value(const struct printf_info *info, const void *arg)
return *(const unsigned long long *)arg;
if (info\->is_long)
return *(const unsigned long *)arg;
-
+\&
/* short and char are both promoted to int */
return *(const unsigned int *)arg;
}
-
+\&
static size_t
b_bin_repr(char bin[UINTMAX_WIDTH],
const struct printf_info *info, const void *arg)
{
size_t min_len;
uintmax_t val;
-
+\&
val = b_value(info, arg);
-
+\&
bin[0] = \[aq]0\[aq];
for (min_len = 0; val; min_len++) {
bin[min_len] = \[aq]0\[aq] + (val % 2);
val >>= 1;
}
-
+\&
return MAX(min_len, 1);
}
-
+\&
static size_t
b_bin_len(const struct printf_info *info, ptrdiff_t min_len)
{
return MAX(info\->prec, min_len);
}
-
+\&
static size_t
b_pad_len(const struct printf_info *info, ptrdiff_t bin_len)
{
ptrdiff_t pad_len;
-
+\&
pad_len = info\->width \- bin_len;
if (info\->alt)
pad_len \-= 2;
if (info\->group)
pad_len \-= (bin_len \- 1) / 4;
-
+\&
return MAX(pad_len, 0);
}
-
+\&
static ssize_t
b_print_prefix(FILE *stream, const struct printf_info *info)
{
ssize_t len;
-
+\&
len = 0;
if (fputc(\[aq]0\[aq], stream) == EOF)
return EOF;
@@ -483,17 +484,17 @@ b_print_prefix(FILE *stream, const struct printf_info *info)
if (fputc(info\->spec, stream) == EOF)
return EOF;
len++;
-
+\&
return len;
}
-
+\&
static ssize_t
b_pad_zeros(FILE *stream, const struct printf_info *info,
ptrdiff_t min_len)
{
ssize_t len;
ptrdiff_t tmp;
-
+\&
len = 0;
tmp = info\->width \- (info\->alt * 2);
if (info\->group)
@@ -502,55 +503,55 @@ b_pad_zeros(FILE *stream, const struct printf_info *info,
if (fputc(\[aq]0\[aq], stream) == EOF)
return EOF;
len++;
-
+\&
if (!info\->group || (i % 4))
continue;
if (fputc(GROUP_SEP, stream) == EOF)
return EOF;
len++;
}
-
+\&
return len;
}
-
+\&
static ssize_t
b_print_number(FILE *stream, const struct printf_info *info,
const char bin[UINTMAX_WIDTH],
size_t min_len, size_t bin_len)
{
ssize_t len;
-
+\&
len = 0;
-
+\&
/* Print leading zeros to fill precision */
for (size_t i = bin_len \- 1; i > min_len \- 1; i\-\-) {
if (fputc(\[aq]0\[aq], stream) == EOF)
return EOF;
len++;
-
+\&
if (!info\->group || (i % 4))
continue;
if (fputc(GROUP_SEP, stream) == EOF)
return EOF;
len++;
}
-
+\&
/* Print number */
for (size_t i = min_len \- 1; i < min_len; i\-\-) {
if (fputc(bin[i], stream) == EOF)
return EOF;
len++;
-
+\&
if (!info\->group || (i % 4) || !i)
continue;
if (fputc(GROUP_SEP, stream) == EOF)
return EOF;
len++;
}
-
+\&
return len;
}
-
+\&
static char
pad_ch(const struct printf_info *info)
{
@@ -558,19 +559,19 @@ pad_ch(const struct printf_info *info)
return \[aq] \[aq];
return \[aq]0\[aq];
}
-
+\&
static ssize_t
pad_spaces(FILE *stream, size_t pad_len)
{
ssize_t len;
-
+\&
len = 0;
for (size_t i = pad_len - 1; i < pad_len; i\-\-) {
if (fputc(\[aq] \[aq], stream) == EOF)
return EOF;
len++;
}
-
+\&
return len;
}
.EE
diff --git a/man3head/sysexits.h.3head b/man3head/sysexits.h.3head
index 58529d2df..a1b8d08dd 100644
--- a/man3head/sysexits.h.3head
+++ b/man3head/sysexits.h.3head
@@ -8,7 +8,7 @@
.\"
.\" Rewritten for the Linux man-pages by Alejandro Colomar
.\"
-.TH sysexits.h 3head 2022-12-15 "Linux man-pages 6.03"
+.TH sysexits.h 3head 2023-03-30 "Linux man-pages 6.05.01"
.SH NAME
sysexits.h \- exit codes for programs
.SH LIBRARY
@@ -185,14 +185,14 @@ Something was found in an unconfigured or misconfigured state.
The numerical values corresponding to the symbolical ones
are given in parenthesis for easy reference.
.SH STANDARDS
-Not in POSIX.1.
-Present on the BSDs.
+BSD.
+.SH HISTORY
The
.I <sysexits.h>
file appeared in 4.0BSD for use by the deliverymail utility,
later renamed to
.BR sendmail (8).
-.SH BUGS
+.SH CAVEATS
The choice of an appropriate exit value is often ambiguous.
.SH SEE ALSO
.BR err (3),
diff --git a/man3type/FILE.3type b/man3type/FILE.3type
index d7e0ac21e..6edeeb413 100644
--- a/man3type/FILE.3type
+++ b/man3type/FILE.3type
@@ -4,7 +4,7 @@
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
.\"
-.TH FILE 3type 2022-10-30 "Linux man-pages 6.03"
+.TH FILE 3type 2023-03-30 "Linux man-pages 6.05.01"
.SH NAME
FILE \- input/output stream
.SH LIBRARY
@@ -19,8 +19,9 @@ Standard C library
.SH DESCRIPTION
An object type used for streams.
.SH STANDARDS
-C99 and later;
-POSIX.1-2001 and later.
+C11, POSIX.1-2008.
+.SH HISTORY
+C89, POSIX.1-2001.
.SH NOTES
The following header also provides this type:
.IR <wchar.h> .
diff --git a/man3type/aiocb.3type b/man3type/aiocb.3type
index 4b20b18e5..45739e2b4 100644
--- a/man3type/aiocb.3type
+++ b/man3type/aiocb.3type
@@ -4,7 +4,7 @@
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
.\"
-.TH aiocb 3type 2022-10-30 "Linux man-pages 6.03"
+.TH aiocb 3type 2023-03-30 "Linux man-pages 6.05.01"
.SH NAME
aiocb \- asynchronous I/O control block
.SH LIBRARY
@@ -28,7 +28,9 @@ Standard C library
For further information about this structure, see
.BR aio (7).
.SH STANDARDS
-POSIX.1-2001 and later.
+POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001.
.SH SEE ALSO
.BR aio_cancel (3),
.BR aio_error (3),
diff --git a/man3type/blkcnt_t.3type b/man3type/blkcnt_t.3type
index ee7910f7d..5cdacdc39 100644
--- a/man3type/blkcnt_t.3type
+++ b/man3type/blkcnt_t.3type
@@ -4,7 +4,7 @@
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
.\"
-.TH blkcnt_t 3type 2022-10-30 "Linux man-pages 6.03"
+.TH blkcnt_t 3type 2023-03-30 "Linux man-pages 6.05.01"
.SH NAME
blkcnt_t \- file block counts
.SH LIBRARY
@@ -20,7 +20,9 @@ Standard C library
Used for file block counts.
It is a signed integer type.
.SH STANDARDS
-POSIX.1-2001 and later.
+POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001.
.SH NOTES
The following header also provides this type:
.IR <sys/stat.h> .
diff --git a/man3type/blksize_t.3type b/man3type/blksize_t.3type
index b7d9da3c7..5406a8880 100644
--- a/man3type/blksize_t.3type
+++ b/man3type/blksize_t.3type
@@ -4,7 +4,7 @@
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
.\"
-.TH blksize_t 3type 2022-10-30 "Linux man-pages 6.03"
+.TH blksize_t 3type 2023-03-30 "Linux man-pages 6.05.01"
.SH NAME
blksize_t \- file block sizes
.SH LIBRARY
@@ -20,7 +20,9 @@ Standard C library
Used for file block sizes.
It is a signed integer type.
.SH STANDARDS
-POSIX.1-2001 and later.
+POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001.
.SH NOTES
The following header also provides this type:
.IR <sys/stat.h> .
diff --git a/man3type/cc_t.3type b/man3type/cc_t.3type
index aab111656..33d58297b 100644
--- a/man3type/cc_t.3type
+++ b/man3type/cc_t.3type
@@ -4,7 +4,7 @@
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
.\"
-.TH cc_t 3type 2022-10-30 "Linux man-pages 6.03"
+.TH cc_t 3type 2023-03-30 "Linux man-pages 6.05.01"
.SH NAME
cc_t, speed_t, tcflag_t \- terminal special characters, baud rates, modes
.SH LIBRARY
@@ -28,6 +28,8 @@ for modes.
.PP
All are unsigned integer types.
.SH STANDARDS
-POSIX.1-2001 and later.
+POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001.
.SH SEE ALSO
.BR termios (3)
diff --git a/man3type/clock_t.3type b/man3type/clock_t.3type
index 5ea990d09..e1346e3f4 100644
--- a/man3type/clock_t.3type
+++ b/man3type/clock_t.3type
@@ -4,7 +4,7 @@
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
.\"
-.TH clock_t 3type 2022-10-30 "Linux man-pages 6.03"
+.TH clock_t 3type 2023-03-30 "Linux man-pages 6.05.01"
.SH NAME
clock_t \- system time
.SH LIBRARY
@@ -24,7 +24,9 @@ Used for system time in clock ticks or
According to POSIX,
it is an integer type or a real-floating type.
.SH STANDARDS
-C99 and later; POSIX.1-2001 and later.
+C11, POSIX.1-2008.
+.SH HISTORY
+C89, POSIX.1-2001.
.SH NOTES
The following headers also provide this type:
.I <sys/types.h>
diff --git a/man3type/clockid_t.3type b/man3type/clockid_t.3type
index b77484937..bc9a3b88e 100644
--- a/man3type/clockid_t.3type
+++ b/man3type/clockid_t.3type
@@ -1,4 +1,4 @@
-.TH clockid_t 3type 2022-10-30 "Linux man-pages 6.03"
+.TH clockid_t 3type 2023-03-30 "Linux man-pages 6.05.01"
.SH NAME
clockid_t \- clock ID for the clock and timer functions
.SH LIBRARY
@@ -14,7 +14,9 @@ Standard C library
Used for clock ID type in the clock and timer functions.
It is defined as an arithmetic type.
.SH STANDARDS
-POSIX.1-2001 and later.
+POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001.
.SH NOTES
The following header also provides this type:
.IR <time.h> .
diff --git a/man3type/dev_t.3type b/man3type/dev_t.3type
index 74f479207..e4c4ae953 100644
--- a/man3type/dev_t.3type
+++ b/man3type/dev_t.3type
@@ -4,7 +4,7 @@
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
.\"
-.TH dev_t 3type 2022-10-30 "Linux man-pages 6.03"
+.TH dev_t 3type 2023-03-30 "Linux man-pages 6.05.01"
.SH NAME
dev_t \- device ID
.SH LIBRARY
@@ -22,7 +22,9 @@ It is an integer type.
For further details of this type, see
.BR makedev (3).
.SH STANDARDS
-POSIX.1-2001 and later.
+POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001.
.SH NOTES
The following header also provides this type:
.IR <sys/stat.h> .
diff --git a/man3type/div_t.3type b/man3type/div_t.3type
index b85aa45fa..f0bce13bb 100644
--- a/man3type/div_t.3type
+++ b/man3type/div_t.3type
@@ -4,7 +4,7 @@
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
.\"
-.TH div_t 3type 2022-10-30 "Linux man-pages 6.03"
+.TH div_t 3type 2023-03-30 "Linux man-pages 6.05.01"
.SH NAME
div_t, ldiv_t, lldiv_t, imaxdiv_t \-
quotient and remainder of an integer division
@@ -48,7 +48,9 @@ is the type of the value returned by the
.BR imaxdiv (3)
function.
.SH STANDARDS
-C99 and later; POSIX.1-2001 and later.
+C11, POSIX.1-2008.
+.SH HISTORY
+C99, POSIX.1-2001.
.SH SEE ALSO
.BR div (3),
.BR imaxdiv (3),
diff --git a/man3type/double_t.3type b/man3type/double_t.3type
index f46ad9769..ca200af34 100644
--- a/man3type/double_t.3type
+++ b/man3type/double_t.3type
@@ -5,7 +5,7 @@
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
.\"
-.TH double_t 3type 2022-12-15 "Linux man-pages 6.03"
+.TH double_t 3type 2023-03-30 "Linux man-pages 6.05.01"
.SH NAME
float_t, double_t \- most efficient floating types
.SH LIBRARY
@@ -48,7 +48,9 @@ and
.I double_t
are implementation-defined.
.SH STANDARDS
-C99 and later; POSIX.1-2001 and later.
+C11, POSIX.1-2008.
+.SH HISTORY
+C99, POSIX.1-2001.
.SH SEE ALSO
.BR float.h (0p),
.BR math.h (0p)
diff --git a/man3type/epoll_event.3type b/man3type/epoll_event.3type
index 017d2228f..0a9fa74be 100644
--- a/man3type/epoll_event.3type
+++ b/man3type/epoll_event.3type
@@ -3,7 +3,7 @@
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
.\"
-.TH epoll_event 3type 2022-10-30 "Linux man-pages 6.03"
+.TH epoll_event 3type 2023-07-08 "Linux man-pages 6.05.01"
.SH NAME
epoll_event, epoll_data, epoll_data_t
\- epoll event
@@ -33,9 +33,7 @@ The
.I epoll_event
structure specifies data that the kernel should save and
return when the corresponding file descriptor becomes ready.
-.SH STANDARDS
-This type is Linux-specific.
-.SH NOTES
+.SH VERSIONS
.SS C library/kernel differences
The Linux kernel headers also provide this type,
with a slightly different definition:
@@ -43,13 +41,15 @@ with a slightly different definition:
.in +4n
.EX
#include <linux/eventpoll.h>
-
+\&
struct epoll_event {
__poll_t events;
__u64 data;
};
.EE
.in
+.SH STANDARDS
+Linux.
.SH SEE ALSO
.BR epoll_wait (2),
-.BR epoll_ctl (7)
+.BR epoll_ctl (2)
diff --git a/man3type/fenv_t.3type b/man3type/fenv_t.3type
index c83a69354..95e036eb6 100644
--- a/man3type/fenv_t.3type
+++ b/man3type/fenv_t.3type
@@ -4,7 +4,7 @@
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
.\"
-.TH fenv_t 3type 2022-10-30 "Linux man-pages 6.03"
+.TH fenv_t 3type 2023-03-30 "Linux man-pages 6.05.01"
.SH NAME
fenv_t, fexcept_t \- floating-point environment
.SH LIBRARY
@@ -28,6 +28,8 @@ represents the floating-point status flags collectively.
For further details see
.BR fenv (3).
.SH STANDARDS
-C99 and later; POSIX.1-2001 and later.
+C11, POSIX.1-2008.
+.SH HISTORY
+C99, POSIX.1-2001.
.SH SEE ALSO
.BR fenv (3)
diff --git a/man3type/id_t.3type b/man3type/id_t.3type
index 27e411252..9b30e47f0 100644
--- a/man3type/id_t.3type
+++ b/man3type/id_t.3type
@@ -4,7 +4,7 @@
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
.\"
-.TH id_t 3type 2022-10-30 "Linux man-pages 6.03"
+.TH id_t 3type 2023-03-30 "Linux man-pages 6.05.01"
.SH NAME
pid_t, uid_t, gid_t, id_t \- process/user/group identifier
.SH LIBRARY
@@ -40,7 +40,9 @@ It is an integer type that can be used to contain a
or
.IR gid_t .
.SH STANDARDS
-POSIX.1-2001 and later.
+POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001.
.SH NOTES
The following headers also provide
.IR pid_t :
diff --git a/man3type/intN_t.3type b/man3type/intN_t.3type
index 5b3e8f428..56cd445b9 100644
--- a/man3type/intN_t.3type
+++ b/man3type/intN_t.3type
@@ -4,7 +4,7 @@
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
.\"
-.TH intN_t 3type 2023-01-31 "Linux man-pages 6.03"
+.TH intN_t 3type 2023-03-30 "Linux man-pages 6.05.01"
.SH NAME
intN_t, int8_t, int16_t, int32_t, int64_t,
uintN_t, uint8_t, uint16_t, uint32_t, uint64_t
@@ -156,8 +156,13 @@ for scanning
.I uint8_t
values.
.SH STANDARDS
-C99 and later;
-POSIX.1-2001 and later.
+C11, POSIX.1-2008.
+.SH HISTORY
+C99, POSIX.1-2001.
+.PP
+The
+.RB [ U ] INT \fIN\fP _WIDTH
+macros were added in C23.
.SH NOTES
The following header also provides these types:
.IR <inttypes.h> .
diff --git a/man3type/intmax_t.3type b/man3type/intmax_t.3type
index 91a91b375..9048e6300 100644
--- a/man3type/intmax_t.3type
+++ b/man3type/intmax_t.3type
@@ -4,7 +4,7 @@
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
.\"
-.TH intmax_t 3type 2022-10-30 "Linux man-pages 6.03"
+.TH intmax_t 3type 2023-03-30 "Linux man-pages 6.05.01"
.SH NAME
intmax_t, uintmax_t \- greatest-width basic integer types
.SH LIBRARY
@@ -81,7 +81,9 @@ for printing
.RI [ u ] intmax_t
values.
.SH STANDARDS
-C99 and later; POSIX.1-2001 and later.
+C11, POSIX.1-2008.
+.SH HISTORY
+C99, POSIX.1-2001.
.SH NOTES
The following header also provides these types:
.IR <inttypes.h> .
diff --git a/man3type/intptr_t.3type b/man3type/intptr_t.3type
index b7e8ead84..1bec12fde 100644
--- a/man3type/intptr_t.3type
+++ b/man3type/intptr_t.3type
@@ -4,7 +4,7 @@
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
.\"
-.TH intptr_t 3type 2022-10-30 "Linux man-pages 6.03"
+.TH intptr_t 3type 2023-03-30 "Linux man-pages 6.05.01"
.SH NAME
intptr_t, uintptr_t \- integer types wide enough to hold pointers
.SH LIBRARY
@@ -96,7 +96,9 @@ for scanning
.I uintptr_t
values.
.SH STANDARDS
-C99 and later; POSIX.1-2001 and later.
+C11, POSIX.1-2008.
+.SH HISTORY
+C99, POSIX.1-2001.
.SH NOTES
The following header also provides these types:
.IR <inttypes.h> .
diff --git a/man3type/iovec.3type b/man3type/iovec.3type
index 79a8f5b6b..c2786f55f 100644
--- a/man3type/iovec.3type
+++ b/man3type/iovec.3type
@@ -3,7 +3,7 @@
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
.\"
-.TH iovec 3type 2022-10-30 "Linux man-pages 6.03"
+.TH iovec 3type 2023-03-30 "Linux man-pages 6.05.01"
.SH NAME
iovec \- Vector I/O data structure
.SH LIBRARY
@@ -38,7 +38,9 @@ is limited by
or accessible via the call
.IR sysconf(_SC_IOV_MAX) ).
.SH STANDARDS
-POSIX.1-2001 and later.
+POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001.
.SH NOTES
The following header also provides this type:
.IR <sys/socket.h> .
diff --git a/man3type/itimerspec.3type b/man3type/itimerspec.3type
index 8335b7adb..7def42217 100644
--- a/man3type/itimerspec.3type
+++ b/man3type/itimerspec.3type
@@ -3,7 +3,7 @@
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
.\"
-.TH itimerspec 3type 2022-10-30 "Linux man-pages 6.03"
+.TH itimerspec 3type 2023-03-30 "Linux man-pages 6.05.01"
.SH NAME
timespec \- interval for a timer with nanosecond precision
.SH LIBRARY
@@ -23,7 +23,7 @@ Describes the initial expiration of a timer,
and its interval,
in seconds and nanoseconds.
.SH STANDARDS
-Linux-specific.
+Linux.
.SH NOTES
The following header also provides this type:
.IR <sys/timerfd.h> .
diff --git a/man3type/lconv.3type b/man3type/lconv.3type
index 4572ee7b4..f36522c5b 100644
--- a/man3type/lconv.3type
+++ b/man3type/lconv.3type
@@ -4,7 +4,7 @@
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
.\"
-.TH lconv 3type 2023-02-05 "Linux man-pages 6.03"
+.TH lconv 3type 2023-03-30 "Linux man-pages 6.05.01"
.SH NAME
lconv \- numeric formatting information
.SH LIBRARY
@@ -46,7 +46,9 @@ Contains members related to the formatting of numeric values.
In the "C" locale, its members have the values
shown in the comments above.
.SH STANDARDS
-C11 and later; POSIX.1-2001 and later.
+C11, POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001.
.SH SEE ALSO
.BR setlocale (3),
.BR localeconv (3),
diff --git a/man3type/mode_t.3type b/man3type/mode_t.3type
index 4419f2373..7d5610009 100644
--- a/man3type/mode_t.3type
+++ b/man3type/mode_t.3type
@@ -4,7 +4,7 @@
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
.\"
-.TH mode_t 3type 2022-10-30 "Linux man-pages 6.03"
+.TH mode_t 3type 2023-03-30 "Linux man-pages 6.05.01"
.SH NAME
mode_t \- file attributes
.SH LIBRARY
@@ -20,7 +20,9 @@ Standard C library
Used for some file attributes (e.g., file mode).
It is an integer type.
.SH STANDARDS
-POSIX.1-2001 and later.
+POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001.
.SH NOTES
The following headers also provide this type:
.IR <fcntl.h> ,
diff --git a/man3type/off_t.3type b/man3type/off_t.3type
index 5f693ff33..b544f66b6 100644
--- a/man3type/off_t.3type
+++ b/man3type/off_t.3type
@@ -4,7 +4,7 @@
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
.\"
-.TH off_t 3type 2022-10-30 "Linux man-pages 6.03"
+.TH off_t 3type 2023-03-30 "Linux man-pages 6.05.01"
.SH NAME
off_t, off64_t, loff_t \- file sizes
.SH LIBRARY
@@ -38,24 +38,27 @@ used in glibc.
.I loff_t
is a 64-bit version of the type,
introduced by the Linux kernel.
+.SH STANDARDS
+.TP
+.I off_t
+POSIX.1-2008.
+.TP
+.I off64_t
+GNU and some BSDs.
+.TP
+.I loff_t
+Linux.
.SH VERSIONS
+.TP
+.I off_t
+POSIX.1-2001.
+.PP
.I <aio.h>
and
.I <stdio.h>
define
.I off_t
since POSIX.1-2008.
-.SH STANDARDS
-.PD 0
-.IR off_t :
-POSIX.1-2001 and later.
-.PP
-.IR off64_t :
-Present in glibc and some BSDs.
-.PP
-.IR loff_t :
-Linux-specific.
-.PD
.SH NOTES
On some architectures,
the width of
diff --git a/man3type/ptrdiff_t.3type b/man3type/ptrdiff_t.3type
index 94f672e67..bb6b404c4 100644
--- a/man3type/ptrdiff_t.3type
+++ b/man3type/ptrdiff_t.3type
@@ -4,7 +4,7 @@
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
.\"
-.TH ptrdiff_t 3type 2022-10-30 "Linux man-pages 6.03"
+.TH ptrdiff_t 3type 2023-03-30 "Linux man-pages 6.05.01"
.SH NAME
ptrdiff_t \- count of elements or array index
.SH LIBRARY
@@ -40,7 +40,8 @@ for printing
.I ptrdiff_t
values.
.SH STANDARDS
-C99 and later;
-POSIX.1-2001 and later.
+C11, POSIX.1-2008.
+.SH HISTORY
+C89, POSIX.1-2001.
.SH SEE ALSO
.BR size_t (3type)
diff --git a/man3type/regex_t.3type b/man3type/regex_t.3type
index f71a80913..c0daaf0ff 100644
--- a/man3type/regex_t.3type
+++ b/man3type/regex_t.3type
@@ -1,61 +1 @@
-.\" Copyright (c) 2020-2022 by Alejandro Colomar <alx@kernel.org>
-.\" and Copyright (c) 2020 by Michael Kerrisk <mtk.manpages@gmail.com>
-.\"
-.\" SPDX-License-Identifier: Linux-man-pages-copyleft
-.\"
-.\"
-.TH regex_t 3type 2022-10-30 "Linux man-pages 6.03"
-.SH NAME
-regex_t, regmatch_t, regoff_t
-\- regular expression matching
-.SH LIBRARY
-Standard C library
-.RI ( libc )
-.SH SYNOPSIS
-.EX
-.B #include <regex.h>
-.PP
-.B typedef struct {
-.BR " size_t re_nsub;" " /* Number of parenthesized subexpressions */"
-.B } regex_t;
-.PP
-.B typedef struct {
-.BR " regoff_t rm_so;" " /* Byte offset from start of string"
- to start of substring */
-.BR " regoff_t rm_eo;" " /* Byte offset from start of string to"
- the first character after the end of
- substring */
-.B } regmatch_t;
-.PP
-.BR typedef " /* ... */ " regoff_t;
-.EE
-.SH DESCRIPTION
-.TP
-.I regex_t
-This is a structure type used in regular expression matching.
-It holds a compiled regular expression,
-compiled with
-.BR regcomp (3).
-.TP
-.I regmatch_t
-This is a structure type used in regular expression matching.
-.TP
-.I regoff_t
-It is a signed integer type
-capable of storing the largest value that can be stored in either an
-.I ptrdiff_t
-type or a
-.I ssize_t
-type.
-.SH VERSIONS
-Prior to POSIX.1-2008,
-the type was
-capable of storing the largest value that can be stored in either an
-.I off_t
-type or a
-.I ssize_t
-type.
-.SH STANDARDS
-POSIX.1-2001 and later.
-.SH SEE ALSO
-.BR regex (3)
+.so man3/regex.3
diff --git a/man3type/regmatch_t.3type b/man3type/regmatch_t.3type
index dc78f2cf2..c0daaf0ff 100644
--- a/man3type/regmatch_t.3type
+++ b/man3type/regmatch_t.3type
@@ -1 +1 @@
-.so man3type/regex_t.3type
+.so man3/regex.3
diff --git a/man3type/regoff_t.3type b/man3type/regoff_t.3type
index dc78f2cf2..c0daaf0ff 100644
--- a/man3type/regoff_t.3type
+++ b/man3type/regoff_t.3type
@@ -1 +1 @@
-.so man3type/regex_t.3type
+.so man3/regex.3
diff --git a/man3type/size_t.3type b/man3type/size_t.3type
index d15a948ef..9df433ab3 100644
--- a/man3type/size_t.3type
+++ b/man3type/size_t.3type
@@ -4,7 +4,7 @@
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
.\"
-.TH size_t 3type 2023-02-05 "Linux man-pages 6.03"
+.TH size_t 3type 2023-03-31 "Linux man-pages 6.05.01"
.SH NAME
size_t, ssize_t \- count of bytes
.SH LIBRARY
@@ -35,7 +35,7 @@ capable of storing values in the range
.I ssize_t
Used for a count of bytes or an error indication.
It is a signed integer type
-capable of storing values al least in the range
+capable of storing values at least in the range
.RB [ \-1 ,
.BR SSIZE_MAX ].
.SS Use with printf(3) and scanf(3)
@@ -84,9 +84,22 @@ by converting the value to
.I intmax_t
and using its length modifier
.RB ( j ).
-.SH VERSIONS
+.SH STANDARDS
.TP
.I size_t
+C11, POSIX.1-2008.
+.TP
+.I ssize_t
+POSIX.1-2008.
+.PD
+.SH HISTORY
+.TP
+.I size_t
+C89, POSIX.1-2001.
+.TP
+.I ssize_t
+POSIX.1-2001.
+.PP
.IR <aio.h> ,
.IR <glob.h> ,
.IR <grp.h> ,
@@ -99,8 +112,7 @@ and
define
.I size_t
since POSIX.1-2008.
-.TP
-.I ssize_t
+.PP
.IR <aio.h> ,
.IR <mqueue.h> ,
and
@@ -108,15 +120,6 @@ and
define
.I ssize_t
since POSIX.1-2008.
-.SH STANDARDS
-.PD 0
-.IR size_t :
-C99 and later;
-POSIX.1-2001 and later.
-.PP
-.IR ssize_t :
-POSIX.1-2001 and later.
-.PD
.SH NOTES
.TP
.I size_t
diff --git a/man3type/sockaddr.3type b/man3type/sockaddr.3type
index 9cee8cc9f..dacc9ad48 100644
--- a/man3type/sockaddr.3type
+++ b/man3type/sockaddr.3type
@@ -4,7 +4,7 @@
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
.\"
-.TH sockaddr 3type 2022-10-30 "Linux man-pages 6.03"
+.TH sockaddr 3type 2023-04-22 "Linux man-pages 6.05.01"
.SH NAME
sockaddr, sockaddr_storage, sockaddr_in, sockaddr_in6, sockaddr_un, socklen_t,
in_addr, in6_addr, in_addr_t, in_port_t,
@@ -109,7 +109,22 @@ stored in network byte order.
.I sockaddr_un
Describes a UNIX domain socket address.
.SH STANDARDS
-POSIX.1-2001 and later.
+POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001.
+.PP
+.I socklen_t
+was invented by POSIX.
+See also
+.BR accept (2).
+.PP
+These structures were invented before modern ISO C strict-aliasing rules.
+If aliasing rules are applied strictly,
+these structures would be extremely difficult to use
+without invoking Undefined Behavior.
+POSIX Issue 8 will fix this by requiring that implementations
+make sure that these structures
+can be safely used as they were designed.
.SH NOTES
.I socklen_t
is also defined in
diff --git a/man3type/stat.3type b/man3type/stat.3type
index 09caa2696..663064187 100644
--- a/man3type/stat.3type
+++ b/man3type/stat.3type
@@ -4,7 +4,7 @@
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
.\"
-.TH stat 3type 2023-02-05 "Linux man-pages 6.03"
+.TH stat 3type 2023-05-03 "Linux man-pages 6.05.01"
.SH NAME
stat \- file status
.SH LIBRARY
@@ -25,17 +25,17 @@ Standard C library
.BR " off_t st_size;" " /* Total size, in bytes */"
.BR " blksize_t st_blksize;" " /* Block size for filesystem I/O */"
.BR " blkcnt_t st_blocks;" " /* Number of 512 B blocks allocated */"
-
+\&
/* Since POSIX.1-2008, this structure supports nanosecond
precision for the following timestamp fields.
For the details before POSIX.1-2008, see VERSIONS. */
-
+\&
.BR " struct timespec st_atim;" " /* Time of last access */"
.BR " struct timespec st_mtim;" " /* Time of last modification */"
.BR " struct timespec st_ctim;" " /* Time of last status change */"
-
+\&
.BR "#define st_atime st_atim.tv_sec" " /* Backward compatibility */"
-.B "#define st_mtine st_mtim.tv_sec"
+.B "#define st_mtime st_mtim.tv_sec"
.B "#define st_ctime st_ctim.tv_sec"
.B };
.EE
@@ -116,7 +116,11 @@ This is the file's last status change timestamp
.PP
For further information on the above fields, see
.BR inode (7).
-.SH VERSIONS
+.SH STANDARDS
+POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001.
+.PP
Old kernels and old standards did not support nanosecond timestamp fields.
Instead, there were three timestamp
.RI fields\[em] st_atime ,
@@ -150,8 +154,6 @@ is defined.
If none of the aforementioned macros are defined,
then the nanosecond values are exposed with names of the form
.IR st_atimensec .
-.SH STANDARDS
-POSIX.1-2001 and later.
.SH NOTES
The following header also provides this type:
.IR <ftw.h> .
diff --git a/man3type/time_t.3type b/man3type/time_t.3type
index 4951fd1cb..2b087e54e 100644
--- a/man3type/time_t.3type
+++ b/man3type/time_t.3type
@@ -4,7 +4,7 @@
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
.\"
-.TH time_t 3type 2022-10-30 "Linux man-pages 6.03"
+.TH time_t 3type 2023-03-31 "Linux man-pages 6.05.01"
.SH NAME
time_t, suseconds_t, useconds_t \- integer time
.SH LIBRARY
@@ -35,48 +35,53 @@ it is an integer type.
.I suseconds_t
Used for time in microseconds.
It is a signed integer type
-capable of storing values al least in the range
+capable of storing values at least in the range
.RB [ \-1 ,
.BR 1000000 ].
.TP
.I useconds_t
Used for time in microseconds.
It is an unsigned integer type
-capable of storing values al least in the range
+capable of storing values at least in the range
.RB [ 0 ,
.BR 1000000 ].
-.SH VERSIONS
+.SH STANDARDS
+.TP
+.I time_t
+C11, POSIX.1-2008.
+.TP
+.I suseconds_t
+.TQ
+.I useconds_t
+POSIX.1-2008.
+.PD
+.SH HISTORY
.TP
.I time_t
+C89, POSIX.1-2001.
+.TP
+.I suseconds_t
+.TQ
+.I useconds_t
+POSIX.1-2001.
+.PP
.I <sched.h>
defines
.I time_t
since POSIX.1-2008.
-.TP
-.I suseconds_t
+.PP
POSIX.1-2001 defined
.I useconds_t
in
.I <unistd.h>
too.
-.SH STANDARDS
-.PD 0
-.IR time_t :
-C99 and later;
-POSIX.1-2001 and later.
-.PP
-.IR suseconds_t ,
-.IR useconds_t :
-POSIX.1-2001 and later.
-.PD
.SH NOTES
On some architectures,
the width of
.I time_t
can be controlled with the feature test macro
.BR _TIME_BITS .
-.TP
-.I time_t
+.PP
The following headers also provide
.IR time_t :
.IR <sched.h> ,
@@ -89,8 +94,7 @@ The following headers also provide
.IR <sys/types.h> ,
and
.IR <utime.h> .
-.TP
-.I suseconds_t
+.PP
The following headers also provide
.IR suseconds_t :
.I <sys/select.h>
diff --git a/man3type/timer_t.3type b/man3type/timer_t.3type
index 695db0548..8341ec1b9 100644
--- a/man3type/timer_t.3type
+++ b/man3type/timer_t.3type
@@ -4,7 +4,7 @@
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
.\"
-.TH timer_t 3type 2022-10-30 "Linux man-pages 6.03"
+.TH timer_t 3type 2023-03-30 "Linux man-pages 6.05.01"
.SH NAME
timer_t \- timer ID
.SH LIBRARY
@@ -20,7 +20,9 @@ Standard C library
Used for timer ID returned by
.BR timer_create (2).
.SH STANDARDS
-POSIX.1-2001 and later.
+POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001.
.SH NOTES
The following header also provides
.IR timer_t :
diff --git a/man3type/timespec.3type b/man3type/timespec.3type
index e08dde3cc..213c131dc 100644
--- a/man3type/timespec.3type
+++ b/man3type/timespec.3type
@@ -4,7 +4,7 @@
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
.\"
-.TH timespec 3type 2023-02-05 "Linux man-pages 6.03"
+.TH timespec 3type 2023-03-30 "Linux man-pages 6.05.01"
.SH NAME
timespec \- time in seconds and nanoseconds
.SH LIBRARY
@@ -24,21 +24,23 @@ Standard C library
Describes times in seconds and nanoseconds.
.PP
.I tv_nsec
-is of an implementation-defined signed type capable of holding the specified range.
+is of an implementation-defined signed type
+capable of holding the specified range.
Under glibc, this is usually
.IR long ,
and
.I long long
on X32.
It can be safely down-cast to any concrete 32-bit integer type for processing.
-.SH STANDARDS
-C11 and later;
-POSIX.1-2001 and later.
.SH VERSIONS
Prior to C23,
.I tv_nsec
was
.IR long .
+.SH STANDARDS
+C11, POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001.
.SH NOTES
The following headers also provide this type:
.IR <aio.h> ,
diff --git a/man3type/timeval.3type b/man3type/timeval.3type
index 47920d24b..97f450d36 100644
--- a/man3type/timeval.3type
+++ b/man3type/timeval.3type
@@ -4,7 +4,7 @@
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
.\"
-.TH timeval 3type 2022-10-30 "Linux man-pages 6.03"
+.TH timeval 3type 2023-03-30 "Linux man-pages 6.05.01"
.SH NAME
timeval \- time in seconds and microseconds
.SH LIBRARY
@@ -22,7 +22,9 @@ Standard C library
.SH DESCRIPTION
Describes times in seconds and microseconds.
.SH STANDARDS
-POSIX.1-2001 and later.
+POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001.
.SH NOTES
The following headers also provide this type:
.IR <sys/resource.h> ,
diff --git a/man3type/tm.3type b/man3type/tm.3type
index 4ceeec862..42cd1e3b7 100644
--- a/man3type/tm.3type
+++ b/man3type/tm.3type
@@ -3,7 +3,7 @@
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
.\"
-.TH tm 3type 2023-02-05 "Linux man-pages 6.03"
+.TH tm 3type 2023-03-30 "Linux man-pages 6.05.01"
.SH NAME
tm \- broken-down time
.SH LIBRARY
@@ -75,21 +75,6 @@ UTC doesn't permit double leap seconds,
so it was limited to
.B 60
in C99.
-.SH STANDARDS
-C90 and later;
-POSIX.1-2001 and later.
-.PP
-.I tm_gmtoff
-and
-.I tm_zone
-originate from 4.3BSD-Tahoe (where
-.I tm_zone
-is a
-.IR "char *" ).
-.SH NOTES
-.I tm_sec
-can represent a leap second with the value
-.BR 60 .
.PP
.BR timezone (3),
as a variable, is an XSI extension: some systems provide the V7-compatible
@@ -104,6 +89,22 @@ field provides an alternative (with the opposite sign) for those systems.
points to static storage and may be overridden on subsequent calls to
.BR localtime (3)
and similar functions (however, this never happens under glibc).
+.SH STANDARDS
+C11, POSIX.1-2008.
+.SH HISTORY
+C89, POSIX.1-2001.
+.PP
+.I tm_gmtoff
+and
+.I tm_zone
+originate from 4.3BSD-Tahoe (where
+.I tm_zone
+is a
+.IR "char *" ).
+.SH NOTES
+.I tm_sec
+can represent a leap second with the value
+.BR 60 .
.SH SEE ALSO
.BR ctime (3),
.BR strftime (3),
diff --git a/man3type/va_list.3type b/man3type/va_list.3type
index 5cef09e7e..3549829d2 100644
--- a/man3type/va_list.3type
+++ b/man3type/va_list.3type
@@ -4,7 +4,7 @@
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
.\"
-.TH va_list 3type 2022-10-30 "Linux man-pages 6.03"
+.TH va_list 3type 2023-03-30 "Linux man-pages 6.05.01"
.SH NAME
va_list \- variable argument list
.SH LIBRARY
@@ -28,8 +28,9 @@ and
.BR va_end (3)
to traverse the list of arguments.
.SH STANDARDS
-C99 and later;
-POSIX.1-2001 and later.
+C11, POSIX.1-2008.
+.SH HISTORY
+C89, POSIX.1-2001.
.SH NOTES
The following headers also provide
.IR va_list :
diff --git a/man3type/void.3type b/man3type/void.3type
index c4c28f5eb..45907e9b1 100644
--- a/man3type/void.3type
+++ b/man3type/void.3type
@@ -4,7 +4,7 @@
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
.\"
-.TH void 3type 2022-10-30 "Linux man-pages 6.03"
+.TH void 3type 2023-03-30 "Linux man-pages 6.05.01"
.SH NAME
void \- abstract type
.SH SYNOPSIS
@@ -65,8 +65,9 @@ The POSIX requirement about compatibility between
and function pointers was added in
POSIX.1-2008 Technical Corrigendum 1 (2013).
.SH STANDARDS
-C99 and later;
-POSIX.1-2001 and later.
+C11, POSIX.1-2008.
+.SH HISTORY
+C89, POSIX.1-2001.
.SH SEE ALSO
.BR malloc (3),
.BR memcmp (3),
diff --git a/man4/cciss.4 b/man4/cciss.4
index 164959a31..9194c8a9e 100644
--- a/man4/cciss.4
+++ b/man4/cciss.4
@@ -6,7 +6,7 @@
.\"
.\" shorthand for double quote that works everywhere.
.ds q \N'34'
-.TH cciss 4 2022-12-15 "Linux man-pages 6.03"
+.TH cciss 4 2023-05-03 "Linux man-pages 6.05.01"
.SH NAME
cciss \- HP Smart Array block driver
.SH SYNOPSIS
@@ -128,7 +128,7 @@ li l.
/dev/cciss/c0d0p1 Controller 0, disk 0, partition 1
/dev/cciss/c0d0p2 Controller 0, disk 0, partition 2
/dev/cciss/c0d0p3 Controller 0, disk 0, partition 3
-
+\&
/dev/cciss/c1d1 Controller 1, disk 1, whole device
/dev/cciss/c1d1p1 Controller 1, disk 1, partition 1
/dev/cciss/c1d1p2 Controller 1, disk 1, partition 2
@@ -161,46 +161,46 @@ Max Q depth since init: 1
Max # commands on controller since init: 2
Max SG entries since init: 32
Sequential access devices: 0
-
+\&
cciss/c2d0: 36.38GB RAID 0
.EE
.in
.\"
.SS Files in /sys
.TP
-.I /sys/bus/pci/devices/<dev>/ccissX/cXdY/model
+.IR /sys/bus/pci/devices/ dev /cciss X /c X d Y /model
Displays the SCSI INQUIRY page 0 model for logical drive
.I Y
of controller
.IR X .
.TP
-.I /sys/bus/pci/devices/<dev>/ccissX/cXdY/rev
+.IR /sys/bus/pci/devices/ dev /cciss X /c X d Y /rev
Displays the SCSI INQUIRY page 0 revision for logical drive
.I Y
of controller
.IR X .
.TP
-.I /sys/bus/pci/devices/<dev>/ccissX/cXdY/unique_id
+.IR /sys/bus/pci/devices/ dev /cciss X /c X d Y /unique_id
Displays the SCSI INQUIRY page 83 serial number for logical drive
.I Y
of controller
.IR X .
.TP
-.I /sys/bus/pci/devices/<dev>/ccissX/cXdY/vendor
+.IR /sys/bus/pci/devices/ dev /cciss X /c X d Y /vendor
Displays the SCSI INQUIRY page 0 vendor for logical drive
.I Y
of controller
.IR X .
.TP
-.I /sys/bus/pci/devices/<dev>/ccissX/cXdY/block:cciss!cXdY
+.IR /sys/bus/pci/devices/ dev /cciss X /c X d Y /block:cciss!c X d Y
A symbolic link to
-.IR /sys/block/cciss!cXdY .
+.IR /sys/block/cciss!c X d Y.
.TP
-.I /sys/bus/pci/devices/<dev>/ccissX/rescan
+.IR /sys/bus/pci/devices/ dev /cciss X /rescan
When this file is written to, the driver rescans the controller
to discover any new, removed, or modified logical drives.
.TP
-.I /sys/bus/pci/devices/<dev>/ccissX/resettable
+.IR /sys/bus/pci/devices/ dev /cciss X /resettable
A value of 1 displayed in this file indicates that
the "reset_devices=1" kernel parameter (used by
.BR kdump )
@@ -209,19 +209,19 @@ A value of 0 indicates that the
"reset_devices=1" kernel parameter will not be honored.
Some models of Smart Array are not able to honor this parameter.
.TP
-.I /sys/bus/pci/devices/<dev>/ccissX/cXdY/lunid
+.IR /sys/bus/pci/devices/ dev /cciss X /c X d Y /lunid
Displays the 8-byte LUN ID used to address logical drive
.I Y
of controller
.IR X .
.TP
-.I /sys/bus/pci/devices/<dev>/ccissX/cXdY/raid_level
+.IR /sys/bus/pci/devices/ dev /cciss X /c X d Y /raid_level
Displays the RAID level of logical drive
.I Y
of controller
.IR X .
.TP
-.I /sys/bus/pci/devices/<dev>/ccissX/cXdY/usage_count
+.IR /sys/bus/pci/devices/ dev /cciss X /c X d Y /usage_count
Displays the usage count (number of opens) of logical drive
.I Y
of controller
diff --git a/man4/console_codes.4 b/man4/console_codes.4
index 0d256a588..e2ac4e86b 100644
--- a/man4/console_codes.4
+++ b/man4/console_codes.4
@@ -15,7 +15,7 @@
.\"
.\" 2006-05-27, Several corrections - Thomas E. Dickey
.\"
-.TH console_codes 4 2023-02-05 "Linux man-pages 6.03"
+.TH console_codes 4 2023-02-05 "Linux man-pages 6.05.01"
.SH NAME
console_codes \- Linux console escape and control sequences
.SH DESCRIPTION
diff --git a/man4/cpuid.4 b/man4/cpuid.4
index a4dcbb6f3..3f7d184f8 100644
--- a/man4/cpuid.4
+++ b/man4/cpuid.4
@@ -3,7 +3,7 @@
.\"
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
-.TH cpuid 4 2022-10-30 "Linux man-pages 6.03"
+.TH cpuid 4 2022-10-30 "Linux man-pages 6.05.01"
.SH NAME
cpuid \- x86 CPUID access device
.SH DESCRIPTION
diff --git a/man4/dsp56k.4 b/man4/dsp56k.4
index f3f012a38..a7b2682ad 100644
--- a/man4/dsp56k.4
+++ b/man4/dsp56k.4
@@ -4,7 +4,7 @@
.\"
.\" Modified, Thu Jan 27 19:16:19 CET 2000, lars@nocrew.org
.\"
-.TH dsp56k 4 2023-02-05 "Linux man-pages 6.03"
+.TH dsp56k 4 2023-03-08 "Linux man-pages 6.05.01"
.SH NAME
dsp56k \- DSP56001 interface device
.SH SYNOPSIS
@@ -67,10 +67,10 @@ DSP56001.
.B DSP56K_SET_RX_WSIZE
sets the receive word size.
Allowed values are in the range 1 to 4,
-and is the number of bytes that will be received at a time from the
-DSP56001.
-These data quantities will either truncated, or padded with
-a null byte (\[aq]\e0\[aq]) to fit the native 24-bit data format of the DSP56001.
+and is the number of bytes that will be received at a time from the DSP56001.
+These data quantities will either truncated,
+or padded with a null byte (\[aq]\e0\[aq]),
+to fit the native 24-bit data format of the DSP56001.
.TP
.B DSP56K_HOST_FLAGS
read and write the host flags.
diff --git a/man4/fd.4 b/man4/fd.4
index 126ea7e3a..da04acb4b 100644
--- a/man4/fd.4
+++ b/man4/fd.4
@@ -6,7 +6,7 @@
.\"
.\" Modified, Sun Feb 26 15:00:02 1995, faith@cs.unc.edu
.\"
-.TH fd 4 2022-12-15 "Linux man-pages 6.03"
+.TH fd 4 2022-12-15 "Linux man-pages 6.05.01"
.SH NAME
fd \- floppy disk device
.SH CONFIGURATION
diff --git a/man4/full.4 b/man4/full.4
index 14c3b3c14..654b74b9f 100644
--- a/man4/full.4
+++ b/man4/full.4
@@ -3,7 +3,7 @@
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
.\" correction, aeb, 970825
-.TH full 4 2022-10-30 "Linux man-pages 6.03"
+.TH full 4 2022-10-30 "Linux man-pages 6.05.01"
.SH NAME
full \- always full device
.SH CONFIGURATION
diff --git a/man4/fuse.4 b/man4/fuse.4
index a23dd1de0..a68a7eaec 100644
--- a/man4/fuse.4
+++ b/man4/fuse.4
@@ -3,7 +3,7 @@
.\"
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
-.TH fuse 4 2023-02-05 "Linux man-pages 6.03"
+.TH fuse 4 2023-05-03 "Linux man-pages 6.05.01"
.SH NAME
fuse \- Filesystem in Userspace (FUSE) device
.SH SYNOPSIS
@@ -433,7 +433,7 @@ struct fuse_kstatfs {
uint32_t padding;
uint32_t spare[6];
};
-
+\&
struct fuse_statfs_out {
struct fuse_kstatfs st;
};
@@ -491,7 +491,7 @@ Returned from operations on a
.I /dev/fuse
file descriptor that has not been mounted.
.SH STANDARDS
-The FUSE filesystem is Linux-specific.
+Linux.
.SH NOTES
The following messages are not yet documented in this manual page:
.PP
diff --git a/man4/hd.4 b/man4/hd.4
index e13f866cb..4f91c6b9b 100644
--- a/man4/hd.4
+++ b/man4/hd.4
@@ -7,7 +7,7 @@
.\" Modified Mon Oct 21 21:38:51 1996 by Eric S. Raymond <esr@thyrsus.com>
.\" (and some more by aeb)
.\"
-.TH hd 4 2023-02-05 "Linux man-pages 6.03"
+.TH hd 4 2023-02-05 "Linux man-pages 6.05.01"
.SH NAME
hd \- MFM/IDE hard disk devices
.SH DESCRIPTION
diff --git a/man4/hpsa.4 b/man4/hpsa.4
index 95c821bcc..28ba8cfde 100644
--- a/man4/hpsa.4
+++ b/man4/hpsa.4
@@ -5,7 +5,7 @@
.\"
.\" shorthand for double quote that works everywhere.
.ds q \N'34'
-.TH hpsa 4 2022-10-30 "Linux man-pages 6.03"
+.TH hpsa 4 2022-10-30 "Linux man-pages 6.05.01"
.SH NAME
hpsa \- HP Smart Array SCSI driver
.SH SYNOPSIS
diff --git a/man4/initrd.4 b/man4/initrd.4
index 74f8a87fe..28a16ea88 100644
--- a/man4/initrd.4
+++ b/man4/initrd.4
@@ -12,7 +12,7 @@
.\" phone: (302)654-5478
.\"
.\" $Id: initrd.4,v 0.9 1997/11/07 05:05:32 kallal Exp kallal $
-.TH initrd 4 2023-02-05 "Linux man-pages 6.03"
+.TH initrd 4 2023-02-05 "Linux man-pages 6.05.01"
.SH NAME
initrd \- boot loader initialized RAM disk
.SH CONFIGURATION
diff --git a/man4/intro.4 b/man4/intro.4
index 06afcba7d..a2fa45e27 100644
--- a/man4/intro.4
+++ b/man4/intro.4
@@ -4,7 +4,7 @@
.\" SPDX-License-Identifier: GPL-2.0-or-later
.\"
.\" Modified Sat Jul 24 16:57:14 1993 by Rik Faith (faith@cs.unc.edu)
-.TH intro 4 2023-02-05 "Linux man-pages 6.03"
+.TH intro 4 2023-02-05 "Linux man-pages 6.05.01"
.SH NAME
intro \- introduction to special files
.SH DESCRIPTION
diff --git a/man4/lirc.4 b/man4/lirc.4
index 3a5576176..dcaae9ba8 100644
--- a/man4/lirc.4
+++ b/man4/lirc.4
@@ -2,7 +2,7 @@
.\" Copyright (c) 2018, Sean Young <sean@mess.org>
.\"
.\" SPDX-License-Identifier: GPL-2.0-or-later
-.TH lirc 4 2023-02-05 "Linux man-pages 6.03"
+.TH lirc 4 2023-05-03 "Linux man-pages 6.05.01"
.SH NAME
lirc \- lirc devices
.SH DESCRIPTION
@@ -116,7 +116,7 @@ device cannot transmit.
.SH IOCTL COMMANDS
.nf
#include <linux/lirc.h> /* But see BUGS */
-
+\&
int ioctl(int fd, int cmd, int *val);
.fi
.PP
diff --git a/man4/loop.4 b/man4/loop.4
index 6e2e3c56e..71c2e4a4a 100644
--- a/man4/loop.4
+++ b/man4/loop.4
@@ -3,7 +3,7 @@
.\"
.\" SPDX-License-Identifier: GPL-2.0-or-later
.\"
-.TH loop 4 2023-02-05 "Linux man-pages 6.03"
+.TH loop 4 2023-05-03 "Linux man-pages 6.05.01"
.SH NAME
loop, loop-control \- loop devices
.SH SYNOPSIS
@@ -313,44 +313,44 @@ loopname = /dev/loop5
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
-
+\&
#define errExit(msg) do { perror(msg); exit(EXIT_FAILURE); \e
} while (0)
-
+\&
int
main(int argc, char *argv[])
{
int loopctlfd, loopfd, backingfile;
long devnr;
char loopname[4096];
-
+\&
if (argc != 2) {
fprintf(stderr, "Usage: %s backing\-file\en", argv[0]);
exit(EXIT_FAILURE);
}
-
+\&
loopctlfd = open("/dev/loop\-control", O_RDWR);
if (loopctlfd == \-1)
errExit("open: /dev/loop\-control");
-
+\&
devnr = ioctl(loopctlfd, LOOP_CTL_GET_FREE);
if (devnr == \-1)
errExit("ioctl\-LOOP_CTL_GET_FREE");
-
+\&
sprintf(loopname, "/dev/loop%ld", devnr);
printf("loopname = %s\en", loopname);
-
+\&
loopfd = open(loopname, O_RDWR);
if (loopfd == \-1)
errExit("open: loopname");
-
+\&
backingfile = open(argv[1], O_RDWR);
if (backingfile == \-1)
errExit("open: backing\-file");
-
+\&
if (ioctl(loopfd, LOOP_SET_FD, backingfile) == \-1)
errExit("ioctl\-LOOP_SET_FD");
-
+\&
exit(EXIT_SUCCESS);
}
.EE
diff --git a/man4/lp.4 b/man4/lp.4
index 64bc10014..16288ec42 100644
--- a/man4/lp.4
+++ b/man4/lp.4
@@ -5,7 +5,7 @@
.\" SPDX-License-Identifier: GPL-2.0-or-later
.\"
.\" Modified, Sun Feb 26 15:02:58 1995, faith@cs.unc.edu
-.TH lp 4 2023-02-05 "Linux man-pages 6.03"
+.TH lp 4 2023-02-05 "Linux man-pages 6.05.01"
.SH NAME
lp \- line printer devices
.SH SYNOPSIS
diff --git a/man4/mem.4 b/man4/mem.4
index fb4aa05b6..4ccb82715 100644
--- a/man4/mem.4
+++ b/man4/mem.4
@@ -4,7 +4,7 @@
.\" SPDX-License-Identifier: GPL-2.0-or-later
.\"
.\" Modified Sat Jul 24 16:59:10 1993 by Rik Faith (faith@cs.unc.edu)
-.TH mem 4 2022-10-30 "Linux man-pages 6.03"
+.TH mem 4 2022-10-30 "Linux man-pages 6.05.01"
.SH NAME
mem, kmem, port \- system memory, kernel memory and system ports
.SH DESCRIPTION
diff --git a/man4/mouse.4 b/man4/mouse.4
index d2989c88c..69278a056 100644
--- a/man4/mouse.4
+++ b/man4/mouse.4
@@ -3,7 +3,7 @@
.\" Updates Nov 1998, Andries Brouwer
.\"
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
-.TH mouse 4 2023-02-05 "Linux man-pages 6.03"
+.TH mouse 4 2023-02-05 "Linux man-pages 6.05.01"
.SH NAME
mouse \- serial mouse interface
.SH CONFIGURATION
diff --git a/man4/msr.4 b/man4/msr.4
index 3f1218028..c499a6eb6 100644
--- a/man4/msr.4
+++ b/man4/msr.4
@@ -3,7 +3,7 @@
.\"
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
-.TH msr 4 2022-10-30 "Linux man-pages 6.03"
+.TH msr 4 2022-10-30 "Linux man-pages 6.05.01"
.SH NAME
msr \- x86 CPU MSR access device
.SH DESCRIPTION
diff --git a/man4/null.4 b/man4/null.4
index a08c7ff04..c1299fbaf 100644
--- a/man4/null.4
+++ b/man4/null.4
@@ -4,7 +4,7 @@
.\" SPDX-License-Identifier: GPL-2.0-or-later
.\"
.\" Modified Sat Jul 24 17:00:12 1993 by Rik Faith (faith@cs.unc.edu)
-.TH null 4 2023-02-05 "Linux man-pages 6.03"
+.TH null 4 2023-02-05 "Linux man-pages 6.05.01"
.SH NAME
null, zero \- data sink
.SH DESCRIPTION
diff --git a/man4/pts.4 b/man4/pts.4
index 963884b9a..d3309072a 100644
--- a/man4/pts.4
+++ b/man4/pts.4
@@ -5,7 +5,7 @@
.\" Redistribute and revise at will.
.\" %%%LICENSE_END
.\"
-.TH pts 4 2022-10-30 "Linux man-pages 6.03"
+.TH pts 4 2022-10-30 "Linux man-pages 6.05.01"
.SH NAME
ptmx, pts \- pseudoterminal master and slave
.SH DESCRIPTION
diff --git a/man4/ram.4 b/man4/ram.4
index 8bde755df..04ba49549 100644
--- a/man4/ram.4
+++ b/man4/ram.4
@@ -4,7 +4,7 @@
.\" SPDX-License-Identifier: GPL-2.0-or-later
.\"
.\" Modified Sat Jul 24 17:01:11 1993 by Rik Faith (faith@cs.unc.edu)
-.TH ram 4 2022-10-30 "Linux man-pages 6.03"
+.TH ram 4 2022-10-30 "Linux man-pages 6.05.01"
.SH NAME
ram \- ram disk device
.SH DESCRIPTION
diff --git a/man4/random.4 b/man4/random.4
index 48664a66e..0f0eb21c7 100644
--- a/man4/random.4
+++ b/man4/random.4
@@ -9,7 +9,7 @@
.\" 2008-06-20, George Spelvin <linux@horizon.com>,
.\" Matt Mackall <mpm@selenic.com>
.\"
-.TH random 4 2022-12-04 "Linux man-pages 6.03"
+.TH random 4 2023-04-18 "Linux man-pages 6.05.01"
.SH NAME
random, urandom \- kernel random number source devices
.SH SYNOPSIS
@@ -265,7 +265,7 @@ These values can be changed by writing to the files.
.TP
.IR uuid " and " boot_id
These read-only files
-contain random strings like 6fd5a44b-35f4-4ad4-a9b9-6b9be13e1fe9.
+contain random strings like 6fd5a44b\-35f4\-4ad4\-a9b9\-6b9be13e1fe9.
The former is generated afresh for each read, the latter was
generated once.
.\"
diff --git a/man4/rtc.4 b/man4/rtc.4
index 8f4d085b9..aae4fc2eb 100644
--- a/man4/rtc.4
+++ b/man4/rtc.4
@@ -8,7 +8,7 @@
.\" 2006-02-08 Various additions by mtk
.\" 2006-11-26 cleanup, cover the generic rtc framework; David Brownell
.\"
-.TH rtc 4 2023-02-05 "Linux man-pages 6.03"
+.TH rtc 4 2023-02-05 "Linux man-pages 6.05.01"
.SH NAME
rtc \- real-time clock
.SH SYNOPSIS
diff --git a/man4/sd.4 b/man4/sd.4
index 0a80ec595..b46512409 100644
--- a/man4/sd.4
+++ b/man4/sd.4
@@ -3,7 +3,7 @@
.\"
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
-.TH sd 4 2023-02-05 "Linux man-pages 6.03"
+.TH sd 4 2023-02-05 "Linux man-pages 6.05.01"
.SH NAME
sd \- driver for SCSI disk drives
.SH SYNOPSIS
diff --git a/man4/sk98lin.4 b/man4/sk98lin.4
index 3b09c86cb..a8cbbbc88 100644
--- a/man4/sk98lin.4
+++ b/man4/sk98lin.4
@@ -6,7 +6,7 @@
.\"
.\" This manpage can be viewed using `groff -Tascii -man sk98lin.4 | less`
.\"
-.TH sk98lin 4 2023-02-05 "Linux man-pages 6.03"
+.TH sk98lin 4 2023-07-28 "Linux man-pages 6.05.01"
.SH NAME
sk98lin \- Marvell/SysKonnect Gigabit Ethernet driver v6.21
.SH SYNOPSIS
@@ -152,14 +152,12 @@ IEEE standards 802.1, 802.1q, and 802.3ad.
Those features are available only after installation of open source modules
which can be found on the Internet:
.PP
-.IR VLAN \c
-:
+.IR VLAN :
.UR http://www.candelatech.com\:/\[ti]greear\:/vlan.html
.UE
.br
.I Link
-.IR Aggregation \c
-:
+.IR Aggregation :
.UR http://www.st.rim.or.jp\:/\[ti]yumo
.UE
.PP
diff --git a/man4/smartpqi.4 b/man4/smartpqi.4
index dca9d62e2..ce1f5b7cf 100644
--- a/man4/smartpqi.4
+++ b/man4/smartpqi.4
@@ -5,7 +5,7 @@
.\" Written by Kevin Barnett <kevin.barnett@microsemi.com>
.\"
.\" SPDX-License-Identifier: GPL-2.0-only
-.TH smartpqi 4 2022-12-15 "Linux man-pages 6.03"
+.TH smartpqi 4 2022-12-15 "Linux man-pages 6.05.01"
.SH NAME
smartpqi \- Microsemi Smart Family SCSI driver
.SH SYNOPSIS
diff --git a/man4/st.4 b/man4/st.4
index d17041a78..254aec022 100644
--- a/man4/st.4
+++ b/man4/st.4
@@ -2,7 +2,7 @@
.\" Copyright 1999-2005 Kai Mäkisara (Kai.Makisara@kolumbus.fi)
.\"
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
-.TH st 4 2023-02-05 "Linux man-pages 6.03"
+.TH st 4 2023-02-05 "Linux man-pages 6.05.01"
.SH NAME
st \- SCSI tape device
.SH SYNOPSIS
diff --git a/man4/tty.4 b/man4/tty.4
index 048ae5d91..1493e87f5 100644
--- a/man4/tty.4
+++ b/man4/tty.4
@@ -6,7 +6,7 @@
.\" Modified 1993-07-24 by Rik Faith (faith@cs.unc.edu)
.\" Modified 2003-04-07 by Michael Kerrisk
.\"
-.TH tty 4 2022-10-30 "Linux man-pages 6.03"
+.TH tty 4 2022-10-30 "Linux man-pages 6.05.01"
.SH NAME
tty \- controlling terminal
.SH DESCRIPTION
diff --git a/man4/ttyS.4 b/man4/ttyS.4
index f933cff9d..eadd6bd74 100644
--- a/man4/ttyS.4
+++ b/man4/ttyS.4
@@ -4,7 +4,7 @@
.\" SPDX-License-Identifier: GPL-2.0-or-later
.\"
.\" Modified Sat Jul 24 17:03:24 1993 by Rik Faith (faith@cs.unc.edu)
-.TH ttyS 4 2022-10-30 "Linux man-pages 6.03"
+.TH ttyS 4 2022-10-30 "Linux man-pages 6.05.01"
.SH NAME
ttyS \- serial terminal lines
.SH DESCRIPTION
diff --git a/man4/vcs.4 b/man4/vcs.4
index 5007fdc09..3aa352354 100644
--- a/man4/vcs.4
+++ b/man4/vcs.4
@@ -7,7 +7,7 @@
.\" 2007-12-17, Samuel Thibault <samuel.thibault@ens-lyon.org>:
.\" document the VT_GETHIFONTMASK ioctl
.\" "
-.TH vcs 4 2023-02-05 "Linux man-pages 6.03"
+.TH vcs 4 2023-05-03 "Linux man-pages 6.05.01"
.SH NAME
vcs, vcsa \- virtual console memory
.SH DESCRIPTION
@@ -123,7 +123,7 @@ there:
#include <fcntl.h>
#include <sys/ioctl.h>
#include <linux/vt.h>
-
+\&
int
main(void)
{
@@ -135,7 +135,7 @@ main(void)
unsigned short mask;
unsigned char attrib;
int ch;
-
+\&
fd = open(console, O_RDWR);
if (fd < 0) {
perror(console);
diff --git a/man4/veth.4 b/man4/veth.4
index ffbd1581e..cbb245646 100644
--- a/man4/veth.4
+++ b/man4/veth.4
@@ -5,7 +5,7 @@
.\" SPDX-License-Identifier: GPL-2.0-or-later
.\"
.\"
-.TH veth 4 2023-02-05 "Linux man-pages 6.03"
+.TH veth 4 2023-02-05 "Linux man-pages 6.05.01"
.SH NAME
veth \- Virtual Ethernet Device
.SH DESCRIPTION
diff --git a/man4/wavelan.4 b/man4/wavelan.4
index 60193b4ab..8ab01df6c 100644
--- a/man4/wavelan.4
+++ b/man4/wavelan.4
@@ -8,7 +8,7 @@
.\"
.\" SPDX-License-Identifier: GPL-1.0-or-later
.\"
-.TH wavelan 4 2023-02-05 "Linux man-pages 6.03"
+.TH wavelan 4 2023-02-05 "Linux man-pages 6.05.01"
.SH NAME
wavelan \- AT&T GIS WaveLAN ISA device driver
.SH SYNOPSIS
diff --git a/man5/acct.5 b/man5/acct.5
index 341ff9414..e1d88d4ad 100644
--- a/man5/acct.5
+++ b/man5/acct.5
@@ -2,7 +2,7 @@
.\"
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
-.TH acct 5 2022-12-04 "Linux man-pages 6.03"
+.TH acct 5 2023-05-03 "Linux man-pages 6.05.01"
.SH NAME
acct \- process accounting file
.SH SYNOPSIS
@@ -30,9 +30,9 @@ as follows:
.in +4n
.EX
#define ACCT_COMM 16
-
+\&
typedef u_int16_t comp_t;
-
+\&
struct acct {
char ac_flag; /* Accounting flags */
u_int16_t ac_uid; /* Accounting user ID */
@@ -56,7 +56,7 @@ struct acct {
executed command; null\-terminated) */
char ac_pad[\fIX\fP]; /* padding bytes */
};
-
+\&
enum { /* Bits that may be set in ac_flag field */
AFORK = 0x01, /* Has executed fork, but no exec */
ASU = 0x02, /* Used superuser privileges */
@@ -129,13 +129,14 @@ struct acct_v3 {
.EE
.in
.SH VERSIONS
-The
-.I acct_v3
-structure is defined since glibc 2.6.
-.SH STANDARDS
-Process accounting originated on BSD.
Although it is present on most systems, it is not standardized,
and the details vary somewhat between systems.
+.SH STANDARDS
+None.
+.SH HISTORY
+glibc 2.6.
+.PP
+Process accounting originated on BSD.
.SH NOTES
Records in the accounting file are ordered by termination time of
the process.
diff --git a/man5/charmap.5 b/man5/charmap.5
index 192d12d2e..280ba4e51 100644
--- a/man5/charmap.5
+++ b/man5/charmap.5
@@ -2,7 +2,7 @@
.\"
.\" SPDX-License-Identifier: GPL-2.0-or-later
.\"
-.TH charmap 5 2022-10-30 "Linux man-pages 6.03"
+.TH charmap 5 2022-10-30 "Linux man-pages 6.05.01"
.SH NAME
charmap \- character set description file
.SH DESCRIPTION
diff --git a/man5/core.5 b/man5/core.5
index cb8149b9d..c19846ee7 100644
--- a/man5/core.5
+++ b/man5/core.5
@@ -2,7 +2,7 @@
.\"
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
-.TH core 5 2023-02-05 "Linux man-pages 6.03"
+.TH core 5 2023-05-03 "Linux man-pages 6.05.01"
.SH NAME
core \- core dump file
.SH DESCRIPTION
@@ -620,7 +620,7 @@ Total bytes in core dump: 282624
\&
.EX
/* core_pattern_pipe_test.c */
-
+\&
#define _GNU_SOURCE
#include <sys/stat.h>
#include <fcntl.h>
@@ -628,9 +628,9 @@ Total bytes in core dump: 282624
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
-
+\&
#define BUF_SIZE 1024
-
+\&
int
main(int argc, char *argv[])
{
@@ -638,33 +638,33 @@ main(int argc, char *argv[])
char buf[BUF_SIZE];
FILE *fp;
char cwd[PATH_MAX];
-
+\&
/* Change our current working directory to that of the
crashing process. */
-
+\&
snprintf(cwd, PATH_MAX, "/proc/%s/cwd", argv[1]);
chdir(cwd);
-
+\&
/* Write output to file "core.info" in that directory. */
-
+\&
fp = fopen("core.info", "w+");
if (fp == NULL)
exit(EXIT_FAILURE);
-
+\&
/* Display command\-line arguments given to core_pattern
pipe program. */
-
+\&
fprintf(fp, "argc=%d\en", argc);
for (size_t j = 0; j < argc; j++)
fprintf(fp, "argc[%zu]=<%s>\en", j, argv[j]);
-
+\&
/* Count bytes in standard input (the core dump). */
-
+\&
tot = 0;
while ((nread = read(STDIN_FILENO, buf, BUF_SIZE)) > 0)
tot += nread;
fprintf(fp, "Total bytes in core dump: %zd\en", tot);
-
+\&
fclose(fp);
exit(EXIT_SUCCESS);
}
diff --git a/man5/dir_colors.5 b/man5/dir_colors.5
index 5fe75c15d..ccee2524e 100644
--- a/man5/dir_colors.5
+++ b/man5/dir_colors.5
@@ -1,16 +1,9 @@
'\" t
-.\" manpage for /etc/dir_colors, config file for dircolors(1)
-.\" extracted from color-ls 3.12.0.3 dircolors(1) manpage
+.\" Copyright (c) 2001 Martin Schulze <joey@infodrom.org>
.\"
-.\" %%%LICENSE_START(LDPv1)
-.\" This file may be copied under the conditions described
-.\" in the LDP GENERAL PUBLIC LICENSE, Version 1, September 1998
-.\" that should have been distributed together with this file.
-.\" %%%LICENSE_END
+.\" SPDX-License-Identifier: GPL-2.0-or-later
.\"
-.\" Modified Sat Dec 22 22:25:33 2001 by Martin Schulze <joey@infodrom.org>
-.\"
-.TH dir_colors 5 2023-02-05 "Linux man-pages 6.03"
+.TH dir_colors 5 2023-07-15 "Linux man-pages 6.05.01"
.SH NAME
dir_colors \- configuration file for dircolors(1)
.SH DESCRIPTION
diff --git a/man5/elf.5 b/man5/elf.5
index b96322341..6fa4ddf71 100644
--- a/man5/elf.5
+++ b/man5/elf.5
@@ -32,7 +32,7 @@
.\" 2007-10-11, Mike Frysinger <vapier@gentoo.org>, various fixes
.\" 2007-12-08, mtk, Converted from mdoc to man macros
.\"
-.TH ELF 5 2023-02-05 "Linux man-pages 6.03"
+.TH ELF 5 2023-05-03 "Linux man-pages 6.05.01"
.SH NAME
elf \- format of Executable and Linking Format (ELF) files
.SH SYNOPSIS
@@ -142,7 +142,7 @@ or
.in +4n
.EX
#define EI_NIDENT 16
-
+\&
typedef struct {
unsigned char e_ident[EI_NIDENT];
uint16_t e_type;
@@ -1871,19 +1871,19 @@ in memory:
.EX
void *memory, *name, *desc;
Elf64_Nhdr *note, *next_note;
-
+\&
/* The buffer is pointing to the start of the section/segment. */
note = memory;
-
+\&
/* If the name is defined, it follows the note. */
name = note\->n_namesz == 0 ? NULL : memory + sizeof(*note);
-
+\&
/* If the descriptor is defined, it follows the name
(with alignment). */
-
+\&
desc = note\->n_descsz == 0 ? NULL :
memory + sizeof(*note) + ALIGN_UP(note\->n_namesz, 4);
-
+\&
/* The next note follows both (with alignment). */
next_note = memory + sizeof(*note) +
ALIGN_UP(note\->n_namesz, 4) +
diff --git a/man5/erofs.5 b/man5/erofs.5
new file mode 100644
index 000000000..97edfdcdb
--- /dev/null
+++ b/man5/erofs.5
@@ -0,0 +1,97 @@
+.\" Copyright (c) 2016 by Michael Kerrisk <mtk.manpages@gmail.com>
+.\"
+.\" SPDX-License-Identifier: Linux-man-pages-copyleft
+.\"
+.TH erofs 5 2023-04-29 "Linux man-pages 6.05.01"
+.SH NAME
+erofs \- the Enhanced Read-Only File System
+.SH DESCRIPTION
+.B erofs
+is a create-once read-only filesystem,
+with support for compression and a multi-device backing store.
+.PP
+There are two inode formats:
+.IP \[bu] 3
+32-byte compact with 16-bit UID/GID,
+32-bit file size,
+and no file times
+.PD 0
+.IP \[bu]
+64-byte extended with 32-bit UID/GID,
+64-bit file size,
+and a modification time
+.RI ( st_mtim ).
+.PD
+.\" See fs/erofs/super.c:shmem_parse_options for options it supports.
+.SS Mount options
+.TP
+.B user_xattr
+.TQ
+.B nouser_xattr
+Controls whether
+.I user
+extended attributes are exposed.
+Defaults to yes.
+.TP
+.B acl
+.TQ
+.B noacl
+Controls whether POSIX
+.BR acl (5)s
+are exposed.
+Defaults to yes.
+.TP
+.BR cache_strategy = disabled | readahead | readaround
+Cache allocation for compressed files:
+never, if reading from start of file, regardless of position.
+Defaults to
+.BR readaround .
+.TP
+.B dax
+.TQ
+.BR dax = always | never
+Direct Access control.
+If
+.B always
+and the source device supports DAX, uncompressed non-inlined files
+will be read directly, without going through the page cache.
+.B dax
+is a synonym for
+.BR always .
+Defaults to unset, which is equivalent to
+.BR never .
+.TP
+.BR device = \fIblobdev\fP
+Add extra device holding some of the data.
+Must be given as many times and in the same order as
+.B \-\-blobdev
+was to
+.BR mkfs.erofs (1).
+.\" Nominally there's a device_table feature and it somehow scans(?) for them,
+.\" cf. super.c:erofs_scan_devices(), but I haven't gotten it to work
+.TP
+.BR domain_id = \fIdid\fP
+.TQ
+.BR fsid = \fIid\fP
+Control CacheFiles on-demand read support.
+To be documented.
+.SH VERSIONS
+.B erofs
+images are versioned through the use of feature flags;
+these are listed in the
+.B \-E
+section of
+.BR mkfs.erofs (1),
+.SH CONFIGURATION
+Linux must be configured with the
+.B CONFIG_EROFS_FS
+option to mount EROFS filesystems.
+There are sub-configuration items that restrict the availability
+of some of the parameters above.
+.SH SEE ALSO
+.BR mkfs.erofs (1),
+.BR fsck.erofs (1),
+.BR dump.erofs (1)
+.PP
+.I Documentation/filesystems/erofs.txt
+in the Linux source.
diff --git a/man5/filesystems.5 b/man5/filesystems.5
index 502c0f2d8..cc7669922 100644
--- a/man5/filesystems.5
+++ b/man5/filesystems.5
@@ -4,7 +4,7 @@
.\"
.\" 2007-12-14 mtk Added Reiserfs, XFS, JFS.
.\"
-.TH filesystems 5 2022-12-05 "Linux man-pages 6.03"
+.TH filesystems 5 2023-04-10 "Linux man-pages 6.05.01"
.nh
.SH NAME
filesystems \- Linux filesystem types: ext, ext2, ext3, ext4, hpfs, iso9660,
@@ -47,7 +47,13 @@ short description of the available or historically available
filesystems in the Linux kernel.
See the kernel documentation for a comprehensive
description of all options and limitations.
-.TP 10
+.TP
+.B erofs
+is the Enhanced Read-Only File System, stable since Linux 5.4.
+.\" commit 47e4937a4a7ca4184fd282791dfee76c6799966a moves it out of staging
+See
+.BR erofs (5).
+.TP
.B ext
is an elaborate extension of the
.B minix
diff --git a/man5/ftpusers.5 b/man5/ftpusers.5
index e328003fe..9af5c5216 100644
--- a/man5/ftpusers.5
+++ b/man5/ftpusers.5
@@ -2,7 +2,7 @@
.\"
.\" SPDX-License-Identifier: GPL-2.0-or-later
.\"
-.TH ftpusers 5 2022-10-30 "Linux man-pages 6.03"
+.TH ftpusers 5 2022-10-30 "Linux man-pages 6.05.01"
.SH NAME
ftpusers \- list of users that may not log in via the FTP daemon
.SH DESCRIPTION
diff --git a/man5/gai.conf.5 b/man5/gai.conf.5
index d39014f20..bba44807f 100644
--- a/man5/gai.conf.5
+++ b/man5/gai.conf.5
@@ -3,7 +3,7 @@
.\"
.\" SPDX-License-Identifier: GPL-2.0-only
.\"
-.TH gai.conf 5 2023-02-05 "Linux man-pages 6.03"
+.TH gai.conf 5 2023-02-05 "Linux man-pages 6.05.01"
.SH NAME
gai.conf \- getaddrinfo(3) configuration file
.SH DESCRIPTION
diff --git a/man5/group.5 b/man5/group.5
index e2eefddb7..d39f8434d 100644
--- a/man5/group.5
+++ b/man5/group.5
@@ -4,7 +4,7 @@
.\" SPDX-License-Identifier: GPL-2.0-or-later
.\"
.\" Modified Sat Jul 24 17:06:03 1993 by Rik Faith (faith@cs.unc.edu)
-.TH group 5 2022-10-30 "Linux man-pages 6.03"
+.TH group 5 2022-10-30 "Linux man-pages 6.05.01"
.SH NAME
group \- user group file
.SH DESCRIPTION
diff --git a/man5/host.conf.5 b/man5/host.conf.5
index 21aa80924..8f6455125 100644
--- a/man5/host.conf.5
+++ b/man5/host.conf.5
@@ -4,7 +4,7 @@
.\" SPDX-License-Identifier: GPL-2.0-or-later
.\"
.\" 2003-08-23 Martin Schulze <joey@infodrom.org> Updated according to glibc 2.3.2
-.TH host.conf 5 2023-02-05 "Linux man-pages 6.03"
+.TH host.conf 5 2023-03-08 "Linux man-pages 6.05.01"
.SH NAME
host.conf \- resolver configuration file
.SH DESCRIPTION
@@ -83,14 +83,18 @@ Overrides the
command.
.TP
.B RESOLV_ADD_TRIM_DOMAINS
-A list of domains, separated by colons (\[aq]:\[aq]), semicolons (\[aq];\[aq]), or
-commas (\[aq],\[aq]), with the leading dot, which will be added to the list of
-domains that should be trimmed.
+A list of domains,
+separated by
+colons (\[aq]:\[aq]), semicolons (\[aq];\[aq]), or commas (\[aq],\[aq]),
+with the leading dot,
+which will be added to the list of domains that should be trimmed.
.TP
.B RESOLV_OVERRIDE_TRIM_DOMAINS
-A list of domains, separated by colons (\[aq]:\[aq]), semicolons (\[aq];\[aq]), or
-commas (\[aq],\[aq]), with the leading dot, which will replace the list of
-domains that should be trimmed.
+A list of domains,
+separated by
+colons (\[aq]:\[aq]), semicolons (\[aq];\[aq]), or commas (\[aq],\[aq]),
+with the leading dot,
+which will replace the list of domains that should be trimmed.
Overrides the
.I trim
command.
diff --git a/man5/hosts.5 b/man5/hosts.5
index 519102820..7e1781494 100644
--- a/man5/hosts.5
+++ b/man5/hosts.5
@@ -5,7 +5,7 @@
.\" Minor polishing, aeb
.\" Modified, 2002-06-16, Mike Coleman
.\"
-.TH hosts 5 2022-10-30 "Linux man-pages 6.03"
+.TH hosts 5 2023-05-03 "Linux man-pages 6.05.01"
.SH NAME
hosts \- static table lookup for hostnames
.SH SYNOPSIS
@@ -94,14 +94,14 @@ I just found three, from 92,
.EX
# The following lines are desirable for IPv4 capable hosts
127.0.0.1 localhost
-
+\&
# 127.0.1.1 is often used for the FQDN of the machine
127.0.1.1 thishost.example.org thishost
192.168.1.10 foo.example.org foo
192.168.1.13 bar.example.org bar
146.82.138.7 master.debian.org master
209.237.226.90 www.opensource.org
-
+\&
# The following lines are desirable for IPv6 capable hosts
::1 localhost ip6\-localhost ip6\-loopback
ff02::1 ip6\-allnodes
diff --git a/man5/hosts.equiv.5 b/man5/hosts.equiv.5
index 2048cafd1..a9521da3d 100644
--- a/man5/hosts.equiv.5
+++ b/man5/hosts.equiv.5
@@ -1,7 +1,7 @@
.\" Copyright (c) 1995 Peter Tobias <tobias@et-inf.fho-emden.de>
.\"
.\" SPDX-License-Identifier: GPL-1.0-or-later
-.TH hosts.equiv 5 2023-02-05 "Linux man-pages 6.03"
+.TH hosts.equiv 5 2023-02-05 "Linux man-pages 6.05.01"
.SH NAME
hosts.equiv \- list of hosts and users that are granted "trusted"
.B r
diff --git a/man5/intro.5 b/man5/intro.5
index dc8351258..d30e194c2 100644
--- a/man5/intro.5
+++ b/man5/intro.5
@@ -5,7 +5,7 @@
.\"
.\" Modified Sat Jul 24 17:06:52 1993 by Rik Faith (faith@cs.unc.edu)
.\" Modified Sun Jan 14 00:34:09 1996 by Andries Brouwer (aeb@cwi.nl)
-.TH intro 5 2022-10-30 "Linux man-pages 6.03"
+.TH intro 5 2022-10-30 "Linux man-pages 6.05.01"
.SH NAME
intro \- introduction to file formats and filesystems
.SH DESCRIPTION
diff --git a/man5/issue.5 b/man5/issue.5
index 113ee942a..98dfe68e3 100644
--- a/man5/issue.5
+++ b/man5/issue.5
@@ -5,7 +5,7 @@
.\"
.\" Modified Sun Jul 25 11:06:22 1993 by Rik Faith <faith@cs.unc.edu>
.\" Modified Mon Oct 21 17:47:19 EDT 1996 by Eric S. Raymond <esr@thyrsus.com>
-.TH issue 5 2022-10-30 "Linux man-pages 6.03"
+.TH issue 5 2022-10-30 "Linux man-pages 6.05.01"
.SH NAME
issue \- prelogin message and identification file
.SH DESCRIPTION
diff --git a/man5/locale.5 b/man5/locale.5
index 7af9acafe..051e5edfb 100644
--- a/man5/locale.5
+++ b/man5/locale.5
@@ -7,7 +7,7 @@
.\" 2008-06-17 Petr Baudis <pasky@suse.cz>
.\" LC_TIME: Describe first_weekday and first_workday
.\"
-.TH locale 5 2023-02-05 "Linux man-pages 6.03"
+.TH locale 5 2023-02-05 "Linux man-pages 6.05.01"
.SH NAME
locale \- describes a locale definition file
.SH DESCRIPTION
diff --git a/man5/motd.5 b/man5/motd.5
index b8dac6b58..b506c95cb 100644
--- a/man5/motd.5
+++ b/man5/motd.5
@@ -5,7 +5,7 @@
.\"
.\" Modified Sat Jul 24 17:08:16 1993 by Rik Faith <faith@cs.unc.edu>
.\" Modified Mon Oct 21 17:47:19 EDT 1996 by Eric S. Raymond <esr@thyrsus.com>
-.TH motd 5 2022-10-30 "Linux man-pages 6.03"
+.TH motd 5 2022-10-30 "Linux man-pages 6.05.01"
.SH NAME
motd \- message of the day
.SH DESCRIPTION
diff --git a/man5/networks.5 b/man5/networks.5
index 9b78308e4..cf660e34a 100644
--- a/man5/networks.5
+++ b/man5/networks.5
@@ -4,7 +4,7 @@
.\"
.\" 2008-09-04, mtk, taken from Debian downstream, with a few light edits
.\"
-.TH networks 5 2022-10-30 "Linux man-pages 6.03"
+.TH networks 5 2022-10-30 "Linux man-pages 6.05.01"
.SH NAME
networks \- network name information
.SH DESCRIPTION
diff --git a/man5/nologin.5 b/man5/nologin.5
index 4d18acb9e..af006f526 100644
--- a/man5/nologin.5
+++ b/man5/nologin.5
@@ -5,7 +5,7 @@
.\"
.\" Modified Sun Jul 25 11:06:34 1993 by Rik Faith (faith@cs.unc.edu)
.\" Corrected Mon Oct 21 17:47:19 EDT 1996 by Eric S. Raymond (esr@thyrsus.com)
-.TH nologin 5 2022-10-30 "Linux man-pages 6.03"
+.TH nologin 5 2022-10-30 "Linux man-pages 6.05.01"
.SH NAME
nologin \- prevent unprivileged users from logging into the system
.SH DESCRIPTION
diff --git a/man5/nscd.conf.5 b/man5/nscd.conf.5
index 00852e2f0..041793ead 100644
--- a/man5/nscd.conf.5
+++ b/man5/nscd.conf.5
@@ -4,7 +4,7 @@
.\"
.\" SPDX-License-Identifier: GPL-2.0-or-later
.\"
-.TH nscd.conf 5 2023-02-05 "Linux man-pages 6.03"
+.TH nscd.conf 5 2023-02-05 "Linux man-pages 6.05.01"
.SH NAME
nscd.conf \- name service cache daemon configuration file
.SH DESCRIPTION
diff --git a/man5/nss.5 b/man5/nss.5
index 33bdeed5c..d53e1cd53 100644
--- a/man5/nss.5
+++ b/man5/nss.5
@@ -3,7 +3,7 @@
.\"
.\" SPDX-License-Identifier: GPL-2.0-only
.\"
-.TH nss 5 2023-02-05 "Linux man-pages 6.03"
+.TH nss 5 2023-02-05 "Linux man-pages 6.05.01"
.SH NAME
nss \- Name Service Switch configuration file
.SH DESCRIPTION
diff --git a/man5/nsswitch.conf.5 b/man5/nsswitch.conf.5
index 940cefd23..49b288ef5 100644
--- a/man5/nsswitch.conf.5
+++ b/man5/nsswitch.conf.5
@@ -3,7 +3,7 @@
.\"
.\" SPDX-License-Identifier: GPL-2.0-or-later
.\"
-.TH nsswitch.conf 5 2023-02-05 "Linux man-pages 6.03"
+.TH nsswitch.conf 5 2023-05-03 "Linux man-pages 6.05.01"
.SH NAME
nsswitch.conf \- Name Service Switch configuration file
.SH DESCRIPTION
@@ -110,7 +110,7 @@ file:
passwd: compat
group: compat
shadow: compat
-
+\&
hosts: dns [!UNAVAIL=return] files
networks: nis [NOTFOUND=return] files
ethers: nis [NOTFOUND=return] files
diff --git a/man5/passwd.5 b/man5/passwd.5
index 8e47f1fb4..9b9a13681 100644
--- a/man5/passwd.5
+++ b/man5/passwd.5
@@ -8,7 +8,7 @@
.\" Modified Sun Jun 18 01:53:57 1995 by Andries Brouwer (aeb@cwi.nl)
.\" Modified Mon Jan 5 20:24:40 MET 1998 by Michael Haardt
.\" (michael@cantor.informatik.rwth-aachen.de)
-.TH passwd 5 2023-02-05 "Linux man-pages 6.03"
+.TH passwd 5 2023-02-05 "Linux man-pages 6.05.01"
.SH NAME
passwd \- password file
.SH DESCRIPTION
diff --git a/man5/proc.5 b/man5/proc.5
index dce1eaa5d..9a488419a 100644
--- a/man5/proc.5
+++ b/man5/proc.5
@@ -34,9 +34,9 @@
.\" to see what information could be imported from that file
.\" into this file.
.\"
-.TH proc 5 2023-02-10 "Linux man-pages 6.03"
+.TH proc 5 2023-07-08 "Linux man-pages 6.05.01"
.SH NAME
-proc \- process information pseudo-filesystem
+proc \- process information, system information, and sysctl pseudo-filesystem
.SH DESCRIPTION
The
.B proc
@@ -497,10 +497,21 @@ unless the process is a zombie.
.\" In Linux 2.3.26, this also used to be true if the process was swapped out.
In the latter case, there is nothing in this file:
that is, a read on this file will return 0 characters.
-The command-line arguments appear in this file as a set of
-strings separated by null bytes (\[aq]\e0\[aq]),
+.IP
+For processes which are still running,
+the command-line arguments appear in this file
+in the same layout as they do in process memory:
+If the process is well-behaved,
+it is a set of strings separated by null bytes (\[aq]\e0\[aq]),
with a further null byte after the last string.
.IP
+This is the common case,
+but processes have the freedom to
+override the memory region and
+break assumptions about the contents or format of the
+.IR /proc/ pid /cmdline
+file.
+.IP
If, after an
.BR execve (2),
the process modifies its
@@ -634,7 +645,7 @@ to run another copy of the same executable that is being run by
process
.IR pid .
If the pathname has been unlinked, the symbolic link will contain the
-string \[aq](deleted)\[aq] appended to the original pathname.
+string \[aq]\ (deleted)\[aq] appended to the original pathname.
.\" The following was still true as at kernel 2.6.13
In a multithreaded process, the contents of this symbolic link
are not available if the main thread has already terminated
@@ -1268,7 +1279,7 @@ since Linux 5.9, the reading process must have either
.B CAP_SYS_ADMIN
or
.B CAP_CHECKPOINT_RESTORE
-in the user namespace where it resides.
+in the initial (i.e. root) user namespace.
.TP
.IR /proc/ pid /maps
A file containing the currently mapped memory regions and their access
@@ -1633,10 +1644,14 @@ a new process inherits its parent's
setting.
A process must be privileged
.RB ( CAP_SYS_RESOURCE )
-to update this file.
+to update this file,
+although a process can always increase its own
+.I oom_adj
+setting (since Linux 2.6.20).
.IP
Since Linux 2.6.36, use of this file is deprecated in favor of
-.IR /proc/ pid /oom_score_adj .
+.IR /proc/ pid /oom_score_adj ,
+and finally removed in Linux 3.7.
.TP
.IR /proc/ pid /oom_score " (since Linux 2.6.11)"
.\" See mm/oom_kill.c::badness() before Linux 2.6.36 sources
@@ -3140,6 +3155,9 @@ Often done via a boot manager such as
.BR lilo (8)
or
.BR grub (8).
+Any arguments embedded in the kernel image or initramfs via
+.B CONFIG_BOOT_CONFIG
+will also be displayed.
.TP
.IR /proc/config.gz " (since Linux 2.6)"
This file exposes the configuration options that were used
@@ -3216,7 +3234,8 @@ channels in use.
Empty subdirectory.
.TP
.I /proc/execdomains
-List of the execution domains (ABI personalities).
+Used to list ABI personalities before Linux 4.1;
+now contains a constant string for userspace compatibility.
.TP
.I /proc/fb
Frame buffer information when
@@ -3395,6 +3414,8 @@ r l l l.
.\" KPF_ZERO_PAGE: commit 56873f43abdcd574b25105867a990f067747b2f4
25 - KPF_IDLE (since Linux 4.3)
.\" KPF_IDLE: commit f074a8f49eb87cde95ac9d040ad5e7ea4f029738
+26 - KPF_PGTABLE (since Linux 4.18)
+.\" KPF_PGTABLE: commit 1d40a5ea01d53251c23c7be541d3f4a656cfc537
.TE
.RE
.IP
@@ -4992,7 +5013,7 @@ When the value is greater than zero, Linux's reaction to a Vulcan
Nerve Pinch (tm) will be an immediate reboot, without even
syncing its dirty buffers.
Note: when a program (like dosemu) has the keyboard in "raw"
-mode, the ctrl-alt-del is intercepted by the program before it
+mode, the Ctrl-Alt-Del is intercepted by the program before it
ever reaches the kernel tty layer, and it's up to the program
to decide what to do with it.
.TP
diff --git a/man5/protocols.5 b/man5/protocols.5
index bdb5ae504..7939407a6 100644
--- a/man5/protocols.5
+++ b/man5/protocols.5
@@ -7,7 +7,7 @@
.\" 2002-09-22 Seth W. Klein <sk@sethwklein.net>
.\" * protocol numbers are now assigned by the IANA
.\"
-.TH protocols 5 2022-10-30 "Linux man-pages 6.03"
+.TH protocols 5 2022-10-30 "Linux man-pages 6.05.01"
.SH NAME
protocols \- protocols definition file
.SH DESCRIPTION
diff --git a/man5/repertoiremap.5 b/man5/repertoiremap.5
index de0775fe4..bf1238d7e 100644
--- a/man5/repertoiremap.5
+++ b/man5/repertoiremap.5
@@ -1,6 +1,6 @@
.\" SPDX-License-Identifier: GPL-2.0-or-later
.\"
-.TH repertoiremap 5 2022-10-30 "Linux man-pages 6.03"
+.TH repertoiremap 5 2022-10-30 "Linux man-pages 6.05.01"
.SH NAME
repertoiremap \- map symbolic character names to Unicode code points
.SH DESCRIPTION
diff --git a/man5/resolv.conf.5 b/man5/resolv.conf.5
index 3acb50642..1ea918d28 100644
--- a/man5/resolv.conf.5
+++ b/man5/resolv.conf.5
@@ -20,7 +20,7 @@
.\"
.\" Added ndots remark by Bernhard R. Link - debian bug #182886
.\"
-.TH resolv.conf 5 2023-02-05 "Linux man-pages 6.03"
+.TH resolv.conf 5 2023-05-05 "Linux man-pages 6.05.01"
.UC 4
.SH NAME
resolv.conf \- resolver configuration file
@@ -200,6 +200,29 @@ which causes round-robin selection of name servers from among those listed.
This has the effect of spreading the query load among all listed servers,
rather than having all clients try the first listed server first every time.
.TP
+.B no\-aaaa (since glibc 2.36)
+.\" f282cdbe7f436c75864e5640a409a10485e9abb2
+Sets
+.B RES_NOAAAA
+in
+.IR _res.options ,
+which suppresses AAAA queries made by the stub resolver,
+including AAAA lookups triggered by NSS-based interfaces such as
+.BR getaddrinfo (3).
+Only DNS lookups are affected: IPv6 data in
+.BR hosts (5)
+is still used,
+.BR getaddrinfo (3)
+with
+.B AI_PASSIVE
+will still produce IPv6 addresses,
+and configured IPv6 name servers are still used.
+To produce correct Name Error (NXDOMAIN) results,
+AAAA queries are translated to A queries.
+This option is intended preliminary for diagnostic purposes,
+to rule out that AAAA DNS queries have adverse impact.
+It is incompatible with EDNS0 usage and DNSSEC validation by applications.
+.TP
.B no\-check\-names
.\" since glibc 2.2
Sets
diff --git a/man5/rpc.5 b/man5/rpc.5
index a9dacf428..4f1fe2c8f 100644
--- a/man5/rpc.5
+++ b/man5/rpc.5
@@ -5,7 +5,7 @@
.\" %%%LICENSE_END
.\"
.\" @(#)rpc.5 2.2 88/08/03 4.0 RPCSRC; from 1.4 87/11/27 SMI;
-.TH rpc 5 2023-02-05 "Linux man-pages 6.03"
+.TH rpc 5 2023-02-05 "Linux man-pages 6.05.01"
.SH NAME
rpc \- RPC program number data base
.SH SYNOPSIS
diff --git a/man5/securetty.5 b/man5/securetty.5
index d583010fb..a32db97d2 100644
--- a/man5/securetty.5
+++ b/man5/securetty.5
@@ -4,7 +4,7 @@
.\" SPDX-License-Identifier: GPL-2.0-or-later
.\"
.\" Modified Sun Jul 25 11:06:27 1993 by Rik Faith (faith@cs.unc.edu)
-.TH securetty 5 2022-10-30 "Linux man-pages 6.03"
+.TH securetty 5 2022-10-30 "Linux man-pages 6.05.01"
.SH NAME
securetty \- list of terminals on which root is allowed to login
.SH DESCRIPTION
diff --git a/man5/services.5 b/man5/services.5
index 0bd69b859..5003f6154 100644
--- a/man5/services.5
+++ b/man5/services.5
@@ -11,7 +11,7 @@
.\" Thu Jan 11 12:14:41 1996 Austin Donnelly <and1000@cam.ac.uk>
.\" * Merged two services(5) manpages
.\"
-.TH services 5 2022-10-30 "Linux man-pages 6.03"
+.TH services 5 2022-10-30 "Linux man-pages 6.05.01"
.SH NAME
services \- Internet network services list
.SH DESCRIPTION
diff --git a/man5/shells.5 b/man5/shells.5
index 36a236060..fcbbd22e4 100644
--- a/man5/shells.5
+++ b/man5/shells.5
@@ -6,7 +6,7 @@
.\" Modified Sat Jul 24 17:11:07 1993 by Rik Faith (faith@cs.unc.edu)
.\" Modified Sun Nov 21 10:49:38 1993 by Michael Haardt
.\" Modified Sun Feb 26 15:09:15 1995 by Rik Faith (faith@cs.unc.edu)
-.TH shells 5 2022-10-30 "Linux man-pages 6.03"
+.TH shells 5 2022-10-30 "Linux man-pages 6.05.01"
.SH NAME
shells \- pathnames of valid login shells
.SH DESCRIPTION
diff --git a/man5/slabinfo.5 b/man5/slabinfo.5
index 476fdb26c..e27ff80f3 100644
--- a/man5/slabinfo.5
+++ b/man5/slabinfo.5
@@ -3,7 +3,7 @@
.\"
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
-.TH slabinfo 5 2023-02-05 "Linux man-pages 6.03"
+.TH slabinfo 5 2023-02-05 "Linux man-pages 6.05.01"
.SH NAME
slabinfo \- kernel slab allocator statistics
.SH SYNOPSIS
diff --git a/man5/sysfs.5 b/man5/sysfs.5
index 12ed1f359..2edd582eb 100644
--- a/man5/sysfs.5
+++ b/man5/sysfs.5
@@ -2,7 +2,7 @@
.\"
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
-.TH sysfs 5 2022-10-30 "Linux man-pages 6.03"
+.TH sysfs 5 2023-03-30 "Linux man-pages 6.05.01"
.SH NAME
sysfs \- a filesystem for exporting kernel objects
.SH DESCRIPTION
@@ -251,14 +251,10 @@ This information is mainly used for debugging.
.TP
.I /sys/power
[To be documented]
-.SH VERSIONS
-The
-.B sysfs
-filesystem first appeared in Linux 2.6.0.
.SH STANDARDS
-The
-.B sysfs
-filesystem is Linux-specific.
+Linux.
+.SH HISTORY
+Linux 2.6.0.
.SH NOTES
This manual page is incomplete, possibly inaccurate, and is the kind
of thing that needs to be updated very often.
diff --git a/man5/termcap.5 b/man5/termcap.5
index 8e62ac407..880c957fc 100644
--- a/man5/termcap.5
+++ b/man5/termcap.5
@@ -9,7 +9,7 @@
.\" If mistakes in the capabilities are found, please send a bug report to:
.\" michael@moria.de
.\" Modified Mon Oct 21 17:47:19 EDT 1996 by Eric S. Raymond (esr@thyrsus.com)
-.TH termcap 5 2023-02-05 "Linux man-pages 6.03"
+.TH termcap 5 2023-03-08 "Linux man-pages 6.05.01"
.SH NAME
termcap \- terminal capability database
.SH DESCRIPTION
@@ -404,7 +404,8 @@ Do ASCII output of this parameter with a field with of 3
%
Print a \[aq]%\[aq]
.PP
-If you use binary output, then you should avoid the null character (\[aq]\e0\[aq])
+If you use binary output,
+then you should avoid the null character (\[aq]\e0\[aq])
because it terminates the string.
You should reset tabulator expansion
if a tabulator can be the binary output of a parameter.
diff --git a/man5/tmpfs.5 b/man5/tmpfs.5
index 64439a1a1..8e4d063a0 100644
--- a/man5/tmpfs.5
+++ b/man5/tmpfs.5
@@ -2,7 +2,7 @@
.\"
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
-.TH tmpfs 5 2023-02-05 "Linux man-pages 6.03"
+.TH tmpfs 5 2023-07-28 "Linux man-pages 6.05.01"
.SH NAME
tmpfs \- a virtual memory filesystem
.SH DESCRIPTION
@@ -115,7 +115,7 @@ Set the initial user ID of the root directory.
.BR huge "=\fIhuge_option\fR (since Linux 4.7.0)"
.\" commit 5a6e75f8110c97e2a5488894d4e922187e6cb343
Set the huge table memory allocation policy for all files in this instance (if
-.B CONFIG_TRANSPARENT_HUGE_PAGECACHE
+.B CONFIG_TRANSPARENT_HUGEPAGE
is enabled).
.IP
The
diff --git a/man5/ttytype.5 b/man5/ttytype.5
index 375e810c2..94030e8bb 100644
--- a/man5/ttytype.5
+++ b/man5/ttytype.5
@@ -7,7 +7,7 @@
.\" Modified Thu Oct 19 21:25:21 MET 1995 by Martin Schulze <joey@infodrom.north.de>
.\" Modified Mon Oct 21 17:47:19 EDT 1996 by Eric S. Raymond
.\" <esr@thyrsus.com>xk
-.TH ttytype 5 2023-01-22 "Linux man-pages 6.03"
+.TH ttytype 5 2023-01-22 "Linux man-pages 6.05.01"
.SH NAME
ttytype \- terminal device to default terminal type mapping
.SH DESCRIPTION
diff --git a/man5/tzfile.5 b/man5/tzfile.5
index aa2170479..59d9f6ba9 100644
--- a/man5/tzfile.5
+++ b/man5/tzfile.5
@@ -1,21 +1,18 @@
-.\" %%%LICENSE_START(PUBLIC_DOMAIN)
.\" This file is in the public domain, so clarified as of
-.\" 1996-06-05 by Arthur David Olson <arthur_david_olson@nih.gov>.
-.\" %%%LICENSE_END
-.\"
-.TH tzfile 5 2022-09-09 Linux "Linux Programmer's Manual"
+.\" 1996-06-05 by Arthur David Olson.
+.TH tzfile 5 "" "Time Zone Database"
.SH NAME
tzfile \- timezone information
.SH DESCRIPTION
-.ie '\[lq]'' .ds lq \&"\"
-.el .ds lq \[lq]\"
-.ie '\[rq]'' .ds rq \&"\"
-.el .ds rq \[rq]\"
+.ie '\(lq'' .ds lq \&"\"
+.el .ds lq \(lq\"
+.ie '\(rq'' .ds rq \&"\"
+.el .ds rq \(rq\"
.de q
\\$3\*(lq\\$1\*(rq\\$2
..
-.ie \n(.g .ds - \f(CW-\fP
-.el ds - \-
+.ie \n(.g .ds - \f(CR-\fP
+.el .ds - \-
The timezone information files used by
.BR tzset (3)
are typically found under a directory with a name like
@@ -35,35 +32,36 @@ The magic four-byte ASCII sequence
identifies the file as a timezone information file.
.IP *
A byte identifying the version of the file's format
-(as of 2017, either an ASCII NUL, or
+(as of 2021, either an ASCII NUL,
.q "2",
+.q "3",
or
-.q "3" ).
+.q "4" ).
.IP *
Fifteen bytes containing zeros reserved for future use.
.IP *
Six four-byte integer values, in the following order:
.RS
.TP
-.I tzh_ttisutcnt
+.B tzh_ttisutcnt
The number of UT/local indicators stored in the file.
(UT is Universal Time.)
.TP
-.I tzh_ttisstdcnt
+.B tzh_ttisstdcnt
The number of standard/wall indicators stored in the file.
.TP
-.I tzh_leapcnt
+.B tzh_leapcnt
The number of leap seconds for which data entries are stored in the file.
.TP
-.I tzh_timecnt
+.B tzh_timecnt
The number of transition times for which data entries are stored
in the file.
.TP
-.I tzh_typecnt
+.B tzh_typecnt
The number of local time types for which data entries are stored
in the file (must not be zero).
.TP
-.I tzh_charcnt
+.B tzh_charcnt
The number of bytes of time zone abbreviation strings
stored in the file.
.RE
@@ -71,14 +69,14 @@ stored in the file.
The above header is followed by the following fields, whose lengths
depend on the contents of the header:
.IP * 2
-.I tzh_timecnt
+.B tzh_timecnt
four-byte signed integer values sorted in ascending order.
These values are written in network byte order.
Each is used as a transition time (as returned by
.BR time (2))
at which the rules for computing local time change.
.IP *
-.I tzh_timecnt
+.B tzh_timecnt
one-byte unsigned integer values;
each one but the last tells which of the different types of local time types
described in the file is associated with the time period
@@ -88,8 +86,8 @@ and continuing up to but not including the next transition time.
POSIX-style TZ string described below.)
These values serve as indices into the next field.
.IP *
-.I tzh_typecnt
-.I ttinfo
+.B tzh_typecnt
+.B ttinfo
entries, each defined as follows:
.in +.5i
.sp
@@ -104,55 +102,78 @@ struct ttinfo {
.fi
.sp
Each structure is written as a four-byte signed integer value for
-.IR tt_utoff ,
+.BR tt_utoff ,
in network byte order, followed by a one-byte boolean for
-.I tt_isdst
+.B tt_isdst
and a one-byte value for
-.IR tt_desigidx .
+.BR tt_desigidx .
In each structure,
-.I tt_utoff
+.B tt_utoff
gives the number of seconds to be added to UT,
-.I tt_isdst
+.B tt_isdst
tells whether
-.I tm_isdst
+.B tm_isdst
should be set by
.BR localtime (3)
and
-.I tt_desigidx
+.B tt_desigidx
serves as an index into the array of time zone abbreviation bytes
that follow the
-.I ttinfo
-structure(s) in the file.
+.B ttinfo
+entries in the file; if the designated string is "\*-00", the
+.B ttinfo
+entry is a placeholder indicating that local time is unspecified.
The
-.I tt_utoff
+.B tt_utoff
value is never equal to \-2**31, to let 32-bit clients negate it without
overflow.
Also, in realistic applications
-.I tt_utoff
+.B tt_utoff
is in the range [\-89999, 93599] (i.e., more than \-25 hours and less
than 26 hours); this allows easy support by implementations that
already support the POSIX-required range [\-24:59:59, 25:59:59].
.IP *
-.I tzh_leapcnt
+.B tzh_charcnt
+bytes that represent time zone designations,
+which are null-terminated byte strings, each indexed by the
+.B tt_desigidx
+values mentioned above.
+The byte strings can overlap if one is a suffix of the other.
+The encoding of these strings is not specified.
+.IP *
+.B tzh_leapcnt
pairs of four-byte values, written in network byte order;
the first value of each pair gives the nonnegative time
(as returned by
.BR time (2))
-at which a leap second occurs;
-the second is a signed integer specifying the
+at which a leap second occurs or at which the leap second table expires;
+the second is a signed integer specifying the correction, which is the
.I total
number of leap seconds to be applied during the time period
starting at the given time.
-The pairs of values are sorted in ascending order by time.
-Each transition is for one leap second, either positive or negative;
-transitions always separated by at least 28 days minus 1 second.
+The pairs of values are sorted in strictly ascending order by time.
+Each pair denotes one leap second, either positive or negative,
+except that if the last pair has the same correction as the previous one,
+the last pair denotes the leap second table's expiration time.
+Each leap second is at the end of a UTC calendar month.
+The first leap second has a nonnegative occurrence time,
+and is a positive leap second if and only if its correction is positive;
+the correction for each leap second after the first differs
+from the previous leap second by either 1 for a positive leap second,
+or \-1 for a negative leap second.
+If the leap second table is empty, the leap-second correction is zero
+for all timestamps;
+otherwise, for timestamps before the first occurrence time,
+the leap-second correction is zero if the first pair's correction is 1 or \-1,
+and is unspecified otherwise (which can happen only in files
+truncated at the start).
.IP *
-.I tzh_ttisstdcnt
+.B tzh_ttisstdcnt
standard/wall indicators, each stored as a one-byte boolean;
they tell whether the transition times associated with local time types
were specified as standard time or local (wall clock) time.
.IP *
-.I tzh_ttisutcnt
+.B tzh_ttisutcnt
UT/local indicators, each stored as a one-byte boolean;
they tell whether the transition times associated with local time types
were specified as UT or local time.
@@ -178,10 +199,10 @@ The
.BR localtime (3)
function
normally uses the first
-.I ttinfo
+.B ttinfo
structure in the file
if either
-.I tzh_timecnt
+.B tzh_timecnt
is zero or the time argument is less than the first transition time recorded
in the file.
.SS Version 2 format
@@ -195,11 +216,11 @@ POSIX-TZ-environment-variable-style string for use in handling instants
after the last transition time stored in the file
or for all instants if the file has no transitions.
The POSIX-style TZ string is empty (i.e., nothing between the newlines)
-if there is no POSIX representation for such instants.
+if there is no POSIX-style representation for such instants.
If nonempty, the POSIX-style TZ string must agree with the local time
type after the last transition time if present in the eight-byte data;
for example, given the string
-.q "WET0WEST,M3.5.0,M10.5.0/3"
+.q "WET0WEST,M3.5.0/1,M10.5.0"
then if a last transition time is in July, the transition's local time
type must specify a daylight-saving time abbreviated
.q "WEST"
@@ -217,33 +238,52 @@ from 0 through 24.
Second, DST is in effect all year if it starts
January 1 at 00:00 and ends December 31 at 24:00 plus the difference
between daylight saving and standard time.
+.SS Version 4 format
+For version-4-format TZif files,
+the first leap second record can have a correction that is neither
++1 nor \-1, to represent truncation of the TZif file at the start.
+Also, if two or more leap second transitions are present and the last
+entry's correction equals the previous one, the last entry
+denotes the expiration of the leap second table instead of a leap second;
+timestamps after this expiration are unreliable in that future
+releases will likely add leap second entries after the expiration, and
+the added leap seconds will change how post-expiration timestamps are treated.
.SS Interoperability considerations
Future changes to the format may append more data.
.PP
Version 1 files are considered a legacy format and
-should be avoided, as they do not support transition
+should not be generated, as they do not support transition
times after the year 2038.
-Readers that only understand Version 1 must ignore
+Readers that understand only Version 1 must ignore
any data that extends beyond the calculated end of the version
1 data block.
.PP
-Writers should generate a version 3 file if
+Other than version 1, writers should generate
+the lowest version number needed by a file's data.
+For example, a writer should generate a version 4 file
+only if its leap second table either expires or is truncated at the start.
+Likewise, a writer not generating a version 4 file
+should generate a version 3 file only if
TZ string extensions are necessary to accurately
model transition times.
-Otherwise, version 2 files should be generated.
.PP
The sequence of time changes defined by the version 1
-header and data block should be a contiguous subsequence
+header and data block should be a contiguous sub-sequence
of the time changes defined by the version 2+ header and data
block, and by the footer.
This guideline helps obsolescent version 1 readers
agree with current readers about timestamps within the
-contiguous subsequence. It also lets writers not
+contiguous sub-sequence. It also lets writers not
supporting obsolescent readers use a
-.I tzh_timecnt
+.B tzh_timecnt
of zero
in the version 1 data block to save space.
.PP
+When a TZif file contains a leap second table expiration
+time, TZif readers should either refuse to process
+post-expiration timestamps, or process them as if the expiration
+time did not exist (possibly with an error indication).
+.PP
Time zone designations should consist of at least three (3)
and no more than six (6) ASCII characters from the set of
alphanumerics,
@@ -253,13 +293,20 @@ and
This is for compatibility with POSIX requirements for
time zone abbreviations.
.PP
-When reading a version 2 or 3 file, readers
+When reading a version 2 or higher file, readers
should ignore the version 1 header and data block except for
the purpose of skipping over them.
.PP
Readers should calculate the total lengths of the
headers and data blocks and check that they all fit within
the actual file size, as part of a validity check for the file.
+.PP
+When a positive leap second occurs, readers should append an extra
+second to the local minute containing the second just before the leap
+second. If this occurs when the UTC offset is not a multiple of 60
+seconds, the leap second occurs earlier than the last second of the
+local minute and the minute's remaining local seconds are numbered
+through 60 instead of the usual 59; the UTC offset is unaffected.
.SS Common interoperability issues
This section documents common problems in reading or writing TZif files.
Most of these are problems in generating TZif files for use by
@@ -280,7 +327,7 @@ design goal has been that a reader can successfully use a TZif
file even if the file is of a later TZif version than what the
reader was designed for.
When complete compatibility was not achieved, an attempt was
-made to limit glitches to rarely used timestamps, and to allow
+made to limit glitches to rarely used timestamps and allow
simple partial workarounds in writers designed to generate
new-version data useful even for older-version readers.
This section attempts to document these compatibility issues and
@@ -297,20 +344,33 @@ version 2+ data even if the reader's native timestamps have only
32 bits.
.IP *
Some readers designed for version 2 might mishandle
-timestamps after a version 3 file's last transition, because
+timestamps after a version 3 or higher file's last transition, because
they cannot parse extensions to POSIX in the TZ-like string.
As a partial workaround, a writer can output more transitions
than necessary, so that only far-future timestamps are
mishandled by version 2 readers.
.IP *
Some readers designed for version 2 do not support
-permanent daylight saving time, e.g., a TZ string
+permanent daylight saving time with transitions after 24:00
+\(en e.g., a TZ string
.q "EST5EDT,0/0,J365/25"
-denoting permanent Eastern Daylight Time (\-04).
-As a partial workaround, a writer can substitute standard time
-for the next time zone east, e.g.,
+denoting permanent Eastern Daylight Time
+(\-04).
+As a workaround, a writer can substitute standard time
+for two time zones east, e.g.,
+.q "XXX3EDT4,0/0,J365/23"
+for a time zone with a never-used standard time (XXX, \-03)
+and negative daylight saving time (EDT, \-04) all year.
+Alternatively,
+as a partial workaround a writer can substitute standard time
+for the next time zone east \(en e.g.,
.q "AST4"
-for permanent Atlantic Standard Time (\-04).
+for permanent
+Atlantic Standard Time (\-04).
+.IP *
+Some readers designed for version 2 or 3, and that require strict
+conformance to RFC 8536, reject version 4 files whose leap second
+tables are truncated at the start or that end in expiration times.
.IP *
Some readers ignore the footer, and instead predict future
timestamps from the time type of the last transition.
@@ -375,6 +435,17 @@ thus swapping standard and daylight saving time.
Although this workaround misidentifies which part of the year
uses daylight saving time, it records UT offsets and time zone
abbreviations correctly.
+.IP *
+Some readers generate ambiguous timestamps for positive leap seconds
+that occur when the UTC offset is not a multiple of 60 seconds.
+For example, in a timezone with UTC offset +01:23:45 and with
+a positive leap second 78796801 (1972-06-30 23:59:60 UTC), some readers will
+map both 78796800 and 78796801 to 01:23:45 local time the next day
+instead of mapping the latter to 01:23:46, and they will map 78796815 to
+01:23:59 instead of to 01:23:60.
+This has not yet been a practical problem, since no civil authority
+has observed such UTC offsets since leap seconds were
+introduced in 1972.
.PP
Some interoperability problems are reader bugs that
are listed here mostly as warnings to developers of readers.
@@ -417,11 +488,9 @@ of one hour, or of 15 minutes, or of 1 minute.
.PP
Olson A, Eggert P, Murchison K. The Time Zone Information Format (TZif).
2019 Feb.
-.UR https://\:www.rfc-editor.org/\:info/\:rfc8536
+.UR https://\:datatracker.ietf.org/\:doc/\:html/\:rfc8536
Internet RFC 8536
.UE
.UR https://\:doi.org/\:10.17487/\:RFC8536
doi:10.17487/RFC8536
.UE .
-.\" This file is in the public domain, so clarified as of
-.\" 1996-06-05 by Arthur David Olson.
diff --git a/man5/utmp.5 b/man5/utmp.5
index f79e33e6a..4a0296409 100644
--- a/man5/utmp.5
+++ b/man5/utmp.5
@@ -8,7 +8,7 @@
.\" Modified 1996-07-20 by Michael Haardt
.\" Modified 1997-07-02 by Nicolás Lichtmaier <nick@debian.org>
.\" Modified 2004-10-31 by aeb, following Gwenole Beauchesne
-.TH utmp 5 2023-02-05 "Linux man-pages 6.03"
+.TH utmp 5 2023-05-03 "Linux man-pages 6.05.01"
.SH NAME
utmp, wtmp \- login records
.SH SYNOPSIS
@@ -44,7 +44,7 @@ around; details depend on the version of libc):
.in +4n
.EX
/* Values for ut_type field, below */
-
+\&
#define EMPTY 0 /* Record does not contain valid info
(formerly known as UT_UNKNOWN on Linux) */
#define RUN_LVL 1 /* Change in system run\-level (see
@@ -59,16 +59,16 @@ around; details depend on the version of libc):
#define USER_PROCESS 7 /* Normal process */
#define DEAD_PROCESS 8 /* Terminated process */
#define ACCOUNTING 9 /* Not implemented */
-
+\&
#define UT_LINESIZE 32
#define UT_NAMESIZE 32
#define UT_HOSTSIZE 256
-
+\&
struct exit_status { /* Type for ut_exit, below */
short e_termination; /* Process termination status */
short e_exit; /* Process exit status */
};
-
+\&
struct utmp {
short ut_type; /* Type of record */
pid_t ut_pid; /* PID of login process */
@@ -96,13 +96,13 @@ struct utmp {
long ut_session; /* Session ID */
struct timeval ut_tv; /* Time entry was made */
#endif
-
+\&
int32_t ut_addr_v6[4]; /* Internet address of remote
host; IPv4 address uses
just ut_addr_v6[0] */
char __unused[20]; /* Reserved for future use */
};
-
+\&
/* Backward compatibility hacks */
#define ut_name ut_user
#ifndef _NO_UT_TIME
@@ -176,7 +176,8 @@ with null bytes.
and other terminal emulators directly create a
\fBUSER_PROCESS\fP record and generate the \fIut_id\fP by using the
string that suffix part of the terminal name (the characters
-following \fI/dev/[pt]ty\fP).
+following
+.IR /dev/ [pt] ty ).
If they find a \fBDEAD_PROCESS\fP for this ID,
they recycle it, otherwise they create a new entry.
If they can, they
@@ -217,7 +218,7 @@ removed, record-keeping is turned off.
.I /var/run/utmp
.br
.I /var/log/wtmp
-.SH STANDARDS
+.SH VERSIONS
POSIX.1 does not specify a
.I utmp
structure, but rather one named
@@ -242,7 +243,9 @@ Linux defines the
structure to be the same as the
.I utmp
structure.
-.SS Comparison with historical systems
+.SH STANDARDS
+Linux.
+.SH HISTORY
Linux utmp entries conform neither to v7/BSD nor to System V; they are a
mix of the two.
.PP
@@ -313,7 +316,7 @@ the following method of setting this field is recommended:
.EX
struct utmp ut;
struct timeval tv;
-
+\&
gettimeofday(&tv, NULL);
ut.ut_tv.tv_sec = tv.tv_sec;
ut.ut_tv.tv_usec = tv.tv_usec;
diff --git a/man6/intro.6 b/man6/intro.6
index b7cc3e444..97f23ae31 100644
--- a/man6/intro.6
+++ b/man6/intro.6
@@ -4,7 +4,7 @@
.\" SPDX-License-Identifier: GPL-2.0-or-later
.\"
.\" Modified Sat Jul 24 17:19:57 1993 by Rik Faith (faith@cs.unc.edu)
-.TH intro 6 2022-10-30 "Linux man-pages 6.03"
+.TH intro 6 2022-10-30 "Linux man-pages 6.05.01"
.SH NAME
intro \- introduction to games
.SH DESCRIPTION
diff --git a/man7/address_families.7 b/man7/address_families.7
index 71f09d59b..4a75b7235 100644
--- a/man7/address_families.7
+++ b/man7/address_families.7
@@ -3,7 +3,7 @@
.\"
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
-.TH address_families 7 2023-01-22 "Linux man-pages 6.03"
+.TH address_families 7 2023-01-22 "Linux man-pages 6.05.01"
.SH NAME
address_families \- socket address families (domains)
.SH SYNOPSIS
diff --git a/man7/aio.7 b/man7/aio.7
index 8b7308232..64c0db165 100644
--- a/man7/aio.7
+++ b/man7/aio.7
@@ -2,7 +2,7 @@
.\"
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
-.TH AIO 7 2023-02-05 "Linux man-pages 6.03"
+.TH AIO 7 2023-05-03 "Linux man-pages 6.05.01"
.SH NAME
aio \- POSIX asynchronous I/O overview
.SH DESCRIPTION
@@ -60,10 +60,10 @@ This structure has the following form:
.in +4n
.EX
#include <aiocb.h>
-
+\&
struct aiocb {
/* The order of these fields is implementation\-dependent */
-
+\&
int aio_fildes; /* File descriptor */
off_t aio_offset; /* File offset */
volatile void *aio_buf; /* Location of buffer */
@@ -72,12 +72,12 @@ struct aiocb {
struct sigevent aio_sigevent; /* Notification method */
int aio_lio_opcode; /* Operation to be performed;
lio_listio() only */
-
+\&
/* Various implementation\-internal fields not shown */
};
-
+\&
/* Operation codes for \[aq]aio_lio_opcode\[aq]: */
-
+\&
enum { LIO_READ, LIO_WRITE, LIO_NOP };
.EE
.in
@@ -139,10 +139,11 @@ field of the
structure was less than 0,
or was greater than the limit returned by the call
.IR sysconf(_SC_AIO_PRIO_DELTA_MAX) .
-.SH VERSIONS
-The POSIX AIO interfaces are provided by glibc since glibc 2.1.
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008.
+POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001.
+glibc 2.1.
.SH NOTES
It is a good idea to zero out the control block buffer before use (see
.BR memset (3)).
@@ -232,43 +233,43 @@ aio_return():
#include <errno.h>
#include <aio.h>
#include <signal.h>
-
+\&
#define BUF_SIZE 20 /* Size of buffers for read operations */
-
+\&
#define errExit(msg) do { perror(msg); exit(EXIT_FAILURE); } while (0)
-
+\&
struct ioRequest { /* Application\-defined structure for tracking
I/O requests */
int reqNum;
int status;
struct aiocb *aiocbp;
};
-
+\&
static volatile sig_atomic_t gotSIGQUIT = 0;
/* On delivery of SIGQUIT, we attempt to
cancel all outstanding I/O requests */
-
+\&
static void /* Handler for SIGQUIT */
quitHandler(int sig)
{
gotSIGQUIT = 1;
}
-
+\&
#define IO_SIGNAL SIGUSR1 /* Signal used to notify I/O completion */
-
+\&
static void /* Handler for I/O completion signal */
aioSigHandler(int sig, siginfo_t *si, void *ucontext)
{
if (si\->si_code == SI_ASYNCIO) {
write(STDOUT_FILENO, "I/O completion signal received\en", 31);
-
+\&
/* The corresponding ioRequest structure would be available as
struct ioRequest *ioReq = si\->si_value.sival_ptr;
and the file descriptor would then be available via
ioReq\->aiocbp\->aio_fildes */
}
}
-
+\&
int
main(int argc, char *argv[])
{
@@ -276,57 +277,57 @@ main(int argc, char *argv[])
int s;
int numReqs; /* Total number of queued I/O requests */
int openReqs; /* Number of I/O requests still in progress */
-
+\&
if (argc < 2) {
fprintf(stderr, "Usage: %s <pathname> <pathname>...\en",
argv[0]);
exit(EXIT_FAILURE);
}
-
+\&
numReqs = argc \- 1;
-
+\&
/* Allocate our arrays. */
-
+\&
struct ioRequest *ioList = calloc(numReqs, sizeof(*ioList));
if (ioList == NULL)
errExit("calloc");
-
+\&
struct aiocb *aiocbList = calloc(numReqs, sizeof(*aiocbList));
if (aiocbList == NULL)
errExit("calloc");
-
+\&
/* Establish handlers for SIGQUIT and the I/O completion signal. */
-
+\&
sa.sa_flags = SA_RESTART;
sigemptyset(&sa.sa_mask);
-
+\&
sa.sa_handler = quitHandler;
if (sigaction(SIGQUIT, &sa, NULL) == \-1)
errExit("sigaction");
-
+\&
sa.sa_flags = SA_RESTART | SA_SIGINFO;
sa.sa_sigaction = aioSigHandler;
if (sigaction(IO_SIGNAL, &sa, NULL) == \-1)
errExit("sigaction");
-
+\&
/* Open each file specified on the command line, and queue
a read request on the resulting file descriptor. */
-
+\&
for (size_t j = 0; j < numReqs; j++) {
ioList[j].reqNum = j;
ioList[j].status = EINPROGRESS;
ioList[j].aiocbp = &aiocbList[j];
-
+\&
ioList[j].aiocbp\->aio_fildes = open(argv[j + 1], O_RDONLY);
if (ioList[j].aiocbp\->aio_fildes == \-1)
errExit("open");
printf("opened %s on descriptor %d\en", argv[j + 1],
ioList[j].aiocbp\->aio_fildes);
-
+\&
ioList[j].aiocbp\->aio_buf = malloc(BUF_SIZE);
if (ioList[j].aiocbp\->aio_buf == NULL)
errExit("malloc");
-
+\&
ioList[j].aiocbp\->aio_nbytes = BUF_SIZE;
ioList[j].aiocbp\->aio_reqprio = 0;
ioList[j].aiocbp\->aio_offset = 0;
@@ -334,27 +335,27 @@ main(int argc, char *argv[])
ioList[j].aiocbp\->aio_sigevent.sigev_signo = IO_SIGNAL;
ioList[j].aiocbp\->aio_sigevent.sigev_value.sival_ptr =
&ioList[j];
-
+\&
s = aio_read(ioList[j].aiocbp);
if (s == \-1)
errExit("aio_read");
}
-
+\&
openReqs = numReqs;
-
+\&
/* Loop, monitoring status of I/O requests. */
-
+\&
while (openReqs > 0) {
sleep(3); /* Delay between each monitoring step */
-
+\&
if (gotSIGQUIT) {
-
+\&
/* On receipt of SIGQUIT, attempt to cancel each of the
outstanding I/O requests, and display status returned
from the cancelation requests. */
-
+\&
printf("got SIGQUIT; canceling I/O requests: \en");
-
+\&
for (size_t j = 0; j < numReqs; j++) {
if (ioList[j].status == EINPROGRESS) {
printf(" Request %zu on descriptor %d:", j,
@@ -371,20 +372,20 @@ main(int argc, char *argv[])
perror("aio_cancel");
}
}
-
+\&
gotSIGQUIT = 0;
}
-
+\&
/* Check the status of each I/O request that is still
in progress. */
-
+\&
printf("aio_error():\en");
for (size_t j = 0; j < numReqs; j++) {
if (ioList[j].status == EINPROGRESS) {
printf(" for request %zu (descriptor %d): ",
j, ioList[j].aiocbp\->aio_fildes);
ioList[j].status = aio_error(ioList[j].aiocbp);
-
+\&
switch (ioList[j].status) {
case 0:
printf("I/O succeeded\en");
@@ -399,26 +400,26 @@ main(int argc, char *argv[])
perror("aio_error");
break;
}
-
+\&
if (ioList[j].status != EINPROGRESS)
openReqs\-\-;
}
}
}
-
+\&
printf("All I/O requests completed\en");
-
+\&
/* Check status return of all I/O requests. */
-
+\&
printf("aio_return():\en");
for (size_t j = 0; j < numReqs; j++) {
ssize_t s;
-
+\&
s = aio_return(ioList[j].aiocbp);
printf(" for request %zu (descriptor %d): %zd\en",
j, ioList[j].aiocbp\->aio_fildes, s);
}
-
+\&
exit(EXIT_SUCCESS);
}
.EE
diff --git a/man7/armscii-8.7 b/man7/armscii-8.7
index e159adbe5..2ef36ab7f 100644
--- a/man7/armscii-8.7
+++ b/man7/armscii-8.7
@@ -3,7 +3,7 @@
.\"
.\" SPDX-License-Identifier: GPL-2.0-or-later
.\"
-.TH ARMSCII-8 7 2022-12-15 "Linux man-pages 6.03"
+.TH ARMSCII-8 7 2022-12-15 "Linux man-pages 6.05.01"
.SH NAME
armscii-8 \- Armenian character set encoded in octal, decimal,
and hexadecimal
diff --git a/man7/arp.7 b/man7/arp.7
index cf9055e9c..a4ca6a601 100644
--- a/man7/arp.7
+++ b/man7/arp.7
@@ -1,16 +1,12 @@
'\" t
+.\" SPDX-License-Identifier: Linux-man-pages-1-para
+.\"
.\" This man page is Copyright (C) 1999 Matthew Wilcox <willy@bofh.ai>.
-.\" %%%LICENSE_START(VERBATIM_ONE_PARA)
-.\" Permission is granted to distribute possibly modified copies
-.\" of this page provided the header is included verbatim,
-.\" and in case of nontrivial modification author and date
-.\" of the modification is added to the header.
-.\" %%%LICENSE_END
.\"
.\" Modified June 1999 Andi Kleen
.\" $Id: arp.7,v 1.10 2000/04/27 19:31:38 ak Exp $
.\"
-.TH arp 7 2022-12-15 "Linux man-pages 6.03"
+.TH arp 7 2023-07-15 "Linux man-pages 6.05.01"
.SH NAME
arp \- Linux ARP kernel module.
.SH DESCRIPTION
diff --git a/man7/ascii.7 b/man7/ascii.7
index 40b0ae754..13f557882 100644
--- a/man7/ascii.7
+++ b/man7/ascii.7
@@ -13,7 +13,7 @@
.\" Modified 1999-08-08 by Michael Haardt (michael@moria.de)
.\" Modified 2004-04-01 by aeb
.\"
-.TH ascii 7 2023-02-05 "Linux man-pages 6.03"
+.TH ascii 7 2023-05-02 "Linux man-pages 6.05.01"
.SH NAME
ascii \- ASCII character set encoded in octal, decimal,
and hexadecimal
@@ -26,9 +26,8 @@ The international counterpart of ASCII is known as ISO 646-IRV.
The following table contains the 128 ASCII characters.
.PP
C program \f(CW\[aq]\eX\[aq]\fP escapes are noted.
-.if t \{\
-.ft CW
-\}
+.PP
+.EX
.TS
l l l l | l l l l.
Oct Dec Hex Char Oct Dec Hex Char
@@ -98,18 +97,11 @@ _
076 62 3E > 176 126 7E \[ti]
077 63 3F ? 177 127 7F DEL
.TE
-.if t \{\
-.in
-.ft P
-\}
+.EE
.SS Tables
For convenience, below are more compact tables in hex and decimal.
.PP
-.nf
-.if t \{\
-.in 1i
-.ft CW
-\}
+.EX
2 3 4 5 6 7 30 40 50 60 70 80 90 100 110 120
------------- ---------------------------------
0: 0 @ P \` p 0: ( 2 < F P Z d n x
@@ -128,11 +120,7 @@ C: , < L \e l |
D: \- = M ] m }
E: . > N \[ha] n \[ti]
F: / ? O _ o DEL
-.if t \{\
-.in
-.ft P
-\}
-.fi
+.EE
.SH NOTES
.SS History
/etc/ascii (VII) appears in the UNIX Programmer's Manual.
diff --git a/man7/attributes.7 b/man7/attributes.7
index 512963ca4..b32fe545a 100644
--- a/man7/attributes.7
+++ b/man7/attributes.7
@@ -2,7 +2,7 @@
.\" Written by Alexandre Oliva <aoliva@redhat.com>
.\"
.\" SPDX-License-Identifier: GPL-2.0-or-later
-.TH attributes 7 2022-10-30 "Linux man-pages 6.03"
+.TH attributes 7 2023-03-18 "Linux man-pages 6.05.01"
.SH NAME
attributes \- POSIX safety concepts
.SH DESCRIPTION
@@ -67,7 +67,7 @@ safe for inlining.
.\" .I AC-Safe
.\" or Async-Cancel-Safe functions are safe to call when
.\" asynchronous cancelation is enabled.
-.\" AC in AC-Safe stands for Asynchronous Cancellation.
+.\" AC in AC-Safe stands for Asynchronous Cancelation.
.\"
.\" The POSIX standard defines only three functions to be AC-Safe, namely
.\" .BR pthread_cancel (3),
diff --git a/man7/boot.7 b/man7/boot.7
index 9f782fff9..f69e8c1c1 100644
--- a/man7/boot.7
+++ b/man7/boot.7
@@ -10,7 +10,7 @@
.\"
.\" Modified 2004-11-03 patch from Martin Schulze <joey@infodrom.org>
.\"
-.TH boot 7 2023-02-05 "Linux man-pages 6.03"
+.TH boot 7 2023-07-08 "Linux man-pages 6.05.01"
.SH NAME
boot \- System bootup process based on UNIX System V Release 4
.SH DESCRIPTION
@@ -82,10 +82,10 @@ a primary OS loader and a secondary OS loader; this secondary
OS loader may be located within a larger portion of persistent
storage, such as a disk partition.
.PP
-In Linux, the OS loader is often either
-.BR lilo (8)
-or
-.BR grub (8).
+In Linux, the OS loader is often
+.BR grub (8)
+(an alternative is
+.BR lilo (8)).
.SS Kernel
When the kernel is loaded, it initializes various components of
the computer and operating system; each portion of software
@@ -128,16 +128,19 @@ starts, it reads
for further instructions.
This file defines what should be run when the
.I /sbin/init
-program is instructed to enter a particular \fIrun-level\fR, giving
+program is instructed to enter a particular run level, giving
the administrator an easy way to establish an environment
-for some usage; each run-level is associated with a set of services
-(for example, run-level \fBS\fR is \fIsingle-user\fR mode,
-and run-level \fB2\fR entails running most network services).
-.PP
-The administrator may change the current
-run-level via
+for some usage; each run level is associated with a set of services
+(for example, run level
+.B S
+is single-user mode,
+and run level
+.B 2
+entails running most network services).
+.PP
+The administrator may change the current run level via
.BR init (1),
-and query the current run-level via
+and query the current run level via
.BR runlevel (8).
.PP
However, since it is not convenient to manage individual services
@@ -165,7 +168,7 @@ start, "status" to display the service status, etc.).
Running the script
without parameters displays the possible arguments.
.SS Sequencing directories
-To make specific scripts start/stop at specific run-levels and in a
+To make specific scripts start/stop at specific run levels and in a
specific order, there are \fIsequencing directories\fR, normally
of the form \fI/etc/rc[0\-6S].d\fR.
In each of these directories,
@@ -181,17 +184,19 @@ the argument "start" (thereby starting the service).
Each link whose name begins with \[aq]K\[aq] is called with
the argument "stop" (thereby stopping the service).
.PP
-To define the starting or stopping order within the same run-level,
+To define the starting or stopping order within the same run level,
the name of a link contains an \fBorder-number\fR.
Also, for clarity, the name of a link usually
ends with the name of the service to which it refers.
For example,
-the link \fI/etc/rc2.d/S80sendmail\fR starts the sendmail service on
-runlevel 2.
+the link \fI/etc/rc2.d/S80sendmail\fR starts the
+.BR sendmail (8)
+service on
+run level 2.
This happens after \fI/etc/rc2.d/S12syslog\fR is run
but before \fI/etc/rc2.d/S90xfs\fR is run.
.PP
-To manage these links is to manage the boot order and run-levels;
+To manage these links is to manage the boot order and run levels;
under many systems, there are tools to help with this task
(e.g.,
.BR chkconfig (8)).
diff --git a/man7/bootparam.7 b/man7/bootparam.7
index 85de1315e..5514aca24 100644
--- a/man7/bootparam.7
+++ b/man7/bootparam.7
@@ -6,7 +6,7 @@
.\" (dated v1.0.1, 15/08/95).
.\" Major update, aeb, 970114.
.\"
-.TH bootparam 7 2023-02-05 "Linux man-pages 6.03"
+.TH bootparam 7 2023-02-05 "Linux man-pages 6.05.01"
.SH NAME
bootparam \- introduction to boot time parameters of the Linux kernel
.SH DESCRIPTION
diff --git a/man7/bpf-helpers.7 b/man7/bpf-helpers.7
index 14523f025..26ddf8369 100644
--- a/man7/bpf-helpers.7
+++ b/man7/bpf-helpers.7
@@ -27,7 +27,7 @@ level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
..
-.TH "BPF-HELPERS" 7 "2022-09-26" "Linux v6.1"
+.TH "BPF-HELPERS" 7 "2023-04-11" "Linux v6.2"
.SH NAME
BPF-HELPERS \- list of eBPF helper functions
.\" Copyright (C) All BPF authors and contributors from 2014 to present.
@@ -53,8 +53,8 @@ BPF-HELPERS \- list of eBPF helper functions
The extended Berkeley Packet Filter (eBPF) subsystem consists in programs
written in a pseudo\-assembly language, then attached to one of the several
kernel hooks and run in reaction of specific events. This framework differs
-from the older, \[dq]classic\[dq] BPF (or \[dq]cBPF\[dq]) in several aspects, one of them being
-the ability to call special functions (or \[dq]helpers\[dq]) from within a program.
+from the older, \(dqclassic\(dq BPF (or \(dqcBPF\(dq) in several aspects, one of them being
+the ability to call special functions (or \(dqhelpers\(dq) from within a program.
These functions are restricted to a white\-list of helpers defined in the
kernel.
.sp
@@ -154,7 +154,7 @@ Current \fIktime\fP\&.
.INDENT 7.0
.TP
.B Description
-This helper is a \[dq]printk()\-like\[dq] facility for debugging. It
+This helper is a \(dqprintk()\-like\(dq facility for debugging. It
prints a message defined by format \fIfmt\fP (of size \fIfmt_size\fP)
to file \fI/sys/kernel/debug/tracing/trace\fP from DebugFS, if
available. It can take up to three additional \fBu64\fP
@@ -174,7 +174,7 @@ defaults to something like:
.sp
.nf
.ft C
-telnet\-470 [001] .N.. 419421.045894: 0x00000001: <formatted msg>
+telnet\-470 [001] .N.. 419421.045894: 0x00000001: <fmt>
.ft P
.fi
.UNINDENT
@@ -184,28 +184,27 @@ In the above:
.INDENT 7.0
.INDENT 3.5
.INDENT 0.0
-.IP \[bu] 2
+.IP \(bu 2
\fBtelnet\fP is the name of the current task.
-.IP \[bu] 2
+.IP \(bu 2
\fB470\fP is the PID of the current task.
-.IP \[bu] 2
+.IP \(bu 2
\fB001\fP is the CPU number on which the task is
running.
-.IP \[bu] 2
+.IP \(bu 2
In \fB\&.N..\fP, each character refers to a set of
options (whether irqs are enabled, scheduling
options, whether hard/softirqs are running, level of
preempt_disabled respectively). \fBN\fP means that
\fBTIF_NEED_RESCHED\fP and \fBPREEMPT_NEED_RESCHED\fP
are set.
-.IP \[bu] 2
+.IP \(bu 2
\fB419421.045894\fP is a timestamp.
-.IP \[bu] 2
+.IP \(bu 2
\fB0x00000001\fP is a fake value used by BPF for the
instruction pointer register.
-.IP \[bu] 2
-\fB<formatted msg>\fP is the message formatted with
-\fIfmt\fP\&.
+.IP \(bu 2
+\fB<fmt>\fP is the message formatted with \fIfmt\fP\&.
.UNINDENT
.UNINDENT
.UNINDENT
@@ -221,7 +220,7 @@ encounters an unknown specifier.
Also, note that \fBbpf_trace_printk\fP() is slow, and should
only be used for debugging purposes. For this reason, a notice
block (spanning several lines) is printed to kernel logs and
-states that the helper should not be used \[dq]for production use\[dq]
+states that the helper should not be used \(dqfor production use\(dq
the first time this helper is used (or more precisely, when
\fBtrace_printk\fP() buffers are allocated). For passing values
to user space, perf events should be preferred.
@@ -349,7 +348,7 @@ direct packet access.
.INDENT 7.0
.TP
.B Description
-This special helper is used to trigger a \[dq]tail call\[dq], or in
+This special helper is used to trigger a \(dqtail call\(dq, or in
other words, to jump into another eBPF program. The same stack
frame is used (but values on stack and in registers for the
caller are not accessible to the callee). This mechanism allows
@@ -471,7 +470,7 @@ only hold data for one version of cgroups at a time).
.sp
This helper is only available is the kernel was compiled with
the \fBCONFIG_CGROUP_NET_CLASSID\fP configuration option set to
-\[dq]\fBy\fP\[dq] or to \[dq]\fBm\fP\[dq].
+\(dq\fBy\fP\(dq or to \(dq\fBm\fP\(dq.
.TP
.B Return
The classid, or 0 for the default unconfigured classid.
@@ -528,14 +527,14 @@ The \fBstruct bpf_tunnel_key\fP is an object that generalizes the
principal parameters used by various tunneling protocols into a
single struct. This way, it can be used to easily make a
decision based on the contents of the encapsulation header,
-\[dq]summarized\[dq] in this struct. In particular, it holds the IP
+\(dqsummarized\(dq in this struct. In particular, it holds the IP
address of the remote end (IPv4 or IPv6, depending on the case)
in \fIkey\fP\fB\->remote_ipv4\fP or \fIkey\fP\fB\->remote_ipv6\fP\&. Also,
this struct exposes the \fIkey\fP\fB\->tunnel_id\fP, which is
generally mapped to a VNI (Virtual Network Identifier), making
it programmable together with the \fBbpf_skb_set_tunnel_key\fP() helper.
.sp
-Let\[aq]s imagine that the following code is part of a program
+Let\(aqs imagine that the following code is part of a program
attached to the TC ingress interface, on one end of a GRE
tunnel, and is supposed to filter out all messages coming from
remote ends with IPv4 address other than 10.0.0.1:
@@ -561,9 +560,9 @@ return TC_ACT_OK; // accept packet
.UNINDENT
.sp
This interface can also be used with all encapsulation devices
-that can operate in \[dq]collect metadata\[dq] mode: instead of having
-one network device per specific configuration, the \[dq]collect
-metadata\[dq] mode only requires a single device where the
+that can operate in \(dqcollect metadata\(dq mode: instead of having
+one network device per specific configuration, the \(dqcollect
+metadata\(dq mode only requires a single device where the
configuration can be extracted from this helper.
.sp
This can be used together with various tunnels such as VXLan,
@@ -752,11 +751,11 @@ and can be used with programs attached to TC or XDP as well,
where it allows for passing data to user space listeners. Data
can be:
.INDENT 7.0
-.IP \[bu] 2
+.IP \(bu 2
Only custom structs,
-.IP \[bu] 2
+.IP \(bu 2
Only the packet payload, or
-.IP \[bu] 2
+.IP \(bu 2
A combination of both.
.UNINDENT
.TP
@@ -774,7 +773,7 @@ the packet associated to \fIskb\fP, into the buffer pointed by
\fIto\fP\&.
.sp
Since Linux 4.7, usage of this helper has mostly been replaced
-by \[dq]direct packet access\[dq], enabling packet data to be
+by \(dqdirect packet access\(dq, enabling packet data to be
manipulated with \fIskb\fP\fB\->data\fP and \fIskb\fP\fB\->data_end\fP
pointing respectively to the first byte of packet data and to
the byte after the last byte of packet data. However, it
@@ -854,13 +853,13 @@ to the helper).
.sp
This is flexible enough to be used in several ways:
.INDENT 7.0
-.IP \[bu] 2
+.IP \(bu 2
With \fIfrom_size\fP == 0, \fIto_size\fP > 0 and \fIseed\fP set to
checksum, it can be used when pushing new data.
-.IP \[bu] 2
+.IP \(bu 2
With \fIfrom_size\fP > 0, \fIto_size\fP == 0 and \fIseed\fP set to
checksum, it can be used when removing data from a packet.
-.IP \[bu] 2
+.IP \(bu 2
With \fIfrom_size\fP > 0, \fIto_size\fP > 0 and \fIseed\fP set to 0, it
can be used to compute a diff. Note that \fIfrom_size\fP and
\fIto_size\fP do not need to be equal.
@@ -885,7 +884,7 @@ Retrieve tunnel options metadata for the packet associated to
of \fIsize\fP\&.
.sp
This helper can be used with encapsulation devices that can
-operate in \[dq]collect metadata\[dq] mode (please refer to the related
+operate in \(dqcollect metadata\(dq mode (please refer to the related
note in the description of \fBbpf_skb_get_tunnel_key\fP() for
more details). A particular example where this can be used is
in combination with the Geneve encapsulation protocol, where it
@@ -987,11 +986,11 @@ Check whether \fIskb\fP is a descendant of the cgroup2 held by
.B Return
The return value depends on the result of the test, and can be:
.INDENT 7.0
-.IP \[bu] 2
+.IP \(bu 2
0, if the \fIskb\fP failed the cgroup2 descendant test.
-.IP \[bu] 2
+.IP \(bu 2
1, if the \fIskb\fP succeeded the cgroup2 descendant test.
-.IP \[bu] 2
+.IP \(bu 2
A negative error code, if an error occurred.
.UNINDENT
.UNINDENT
@@ -1060,11 +1059,11 @@ subset of the cgroup2 hierarchy. The cgroup2 to test is held by
.B Return
The return value depends on the result of the test, and can be:
.INDENT 7.0
-.IP \[bu] 2
+.IP \(bu 2
1, if current task belongs to the cgroup2.
-.IP \[bu] 2
+.IP \(bu 2
0, if current task does not belong to the cgroup2.
-.IP \[bu] 2
+.IP \(bu 2
A negative error code, if an error occurred.
.UNINDENT
.UNINDENT
@@ -1332,9 +1331,9 @@ The option value of length \fIoptlen\fP is pointed by \fIoptval\fP\&.
.sp
\fIbpf_socket\fP should be one of the following:
.INDENT 7.0
-.IP \[bu] 2
+.IP \(bu 2
\fBstruct bpf_sock_ops\fP for \fBBPF_PROG_TYPE_SOCK_OPS\fP\&.
-.IP \[bu] 2
+.IP \(bu 2
\fBstruct bpf_sock_addr\fP for \fBBPF_CGROUP_INET4_CONNECT\fP
and \fBBPF_CGROUP_INET6_CONNECT\fP\&.
.UNINDENT
@@ -1342,21 +1341,26 @@ and \fBBPF_CGROUP_INET6_CONNECT\fP\&.
This helper actually implements a subset of \fBsetsockopt()\fP\&.
It supports the following \fIlevel\fPs:
.INDENT 7.0
-.IP \[bu] 2
+.IP \(bu 2
\fBSOL_SOCKET\fP, which supports the following \fIoptname\fPs:
\fBSO_RCVBUF\fP, \fBSO_SNDBUF\fP, \fBSO_MAX_PACING_RATE\fP,
\fBSO_PRIORITY\fP, \fBSO_RCVLOWAT\fP, \fBSO_MARK\fP,
-\fBSO_BINDTODEVICE\fP, \fBSO_KEEPALIVE\fP\&.
-.IP \[bu] 2
+\fBSO_BINDTODEVICE\fP, \fBSO_KEEPALIVE\fP, \fBSO_REUSEADDR\fP,
+\fBSO_REUSEPORT\fP, \fBSO_BINDTOIFINDEX\fP, \fBSO_TXREHASH\fP\&.
+.IP \(bu 2
\fBIPPROTO_TCP\fP, which supports the following \fIoptname\fPs:
\fBTCP_CONGESTION\fP, \fBTCP_BPF_IW\fP,
\fBTCP_BPF_SNDCWND_CLAMP\fP, \fBTCP_SAVE_SYN\fP,
\fBTCP_KEEPIDLE\fP, \fBTCP_KEEPINTVL\fP, \fBTCP_KEEPCNT\fP,
-\fBTCP_SYNCNT\fP, \fBTCP_USER_TIMEOUT\fP, \fBTCP_NOTSENT_LOWAT\fP\&.
-.IP \[bu] 2
+\fBTCP_SYNCNT\fP, \fBTCP_USER_TIMEOUT\fP, \fBTCP_NOTSENT_LOWAT\fP,
+\fBTCP_NODELAY\fP, \fBTCP_MAXSEG\fP, \fBTCP_WINDOW_CLAMP\fP,
+\fBTCP_THIN_LINEAR_TIMEOUTS\fP, \fBTCP_BPF_DELACK_MAX\fP,
+\fBTCP_BPF_RTO_MIN\fP\&.
+.IP \(bu 2
\fBIPPROTO_IP\fP, which supports \fIoptname\fP \fBIP_TOS\fP\&.
-.IP \[bu] 2
-\fBIPPROTO_IPV6\fP, which supports \fIoptname\fP \fBIPV6_TCLASS\fP\&.
+.IP \(bu 2
+\fBIPPROTO_IPV6\fP, which supports the following \fIoptname\fPs:
+\fBIPV6_TCLASS\fP, \fBIPV6_AUTOFLOWLABEL\fP\&.
.UNINDENT
.TP
.B Return
@@ -1374,18 +1378,18 @@ By default, the helper will reset any offloaded checksum
indicator of the skb to CHECKSUM_NONE. This can be avoided
by the following flag:
.INDENT 7.0
-.IP \[bu] 2
+.IP \(bu 2
\fBBPF_F_ADJ_ROOM_NO_CSUM_RESET\fP: Do not reset offloaded
checksum data of the skb to CHECKSUM_NONE.
.UNINDENT
.sp
There are two supported modes at this time:
.INDENT 7.0
-.IP \[bu] 2
+.IP \(bu 2
\fBBPF_ADJ_ROOM_MAC\fP: Adjust room at the mac layer
(room space is added or removed between the layer 2 and
layer 3 headers).
-.IP \[bu] 2
+.IP \(bu 2
\fBBPF_ADJ_ROOM_NET\fP: Adjust room at the network layer
(room space is added or removed between the layer 3 and
layer 4 headers).
@@ -1393,23 +1397,23 @@ layer 4 headers).
.sp
The following flags are supported at this time:
.INDENT 7.0
-.IP \[bu] 2
+.IP \(bu 2
\fBBPF_F_ADJ_ROOM_FIXED_GSO\fP: Do not adjust gso_size.
Adjusting mss in this way is not allowed for datagrams.
-.IP \[bu] 2
+.IP \(bu 2
\fBBPF_F_ADJ_ROOM_ENCAP_L3_IPV4\fP,
\fBBPF_F_ADJ_ROOM_ENCAP_L3_IPV6\fP:
Any new space is reserved to hold a tunnel header.
Configure skb offsets and other fields accordingly.
-.IP \[bu] 2
+.IP \(bu 2
\fBBPF_F_ADJ_ROOM_ENCAP_L4_GRE\fP,
\fBBPF_F_ADJ_ROOM_ENCAP_L4_UDP\fP:
Use with ENCAP_L3 flags to further specify the tunnel type.
-.IP \[bu] 2
+.IP \(bu 2
\fBBPF_F_ADJ_ROOM_ENCAP_L2\fP(\fIlen\fP):
Use with ENCAP_L3/L4 flags to further specify the tunnel
type; \fIlen\fP is the length of the inner MAC header.
-.IP \[bu] 2
+.IP \(bu 2
\fBBPF_F_ADJ_ROOM_ENCAP_L2_ETH\fP:
Use with BPF_F_ADJ_ROOM_ENCAP_L2 flag to further specify the
L2 type as Ethernet.
@@ -1425,7 +1429,7 @@ direct packet access.
0 on success, or a negative error in case of failure.
.UNINDENT
.TP
-.B \fBlong bpf_redirect_map(struct bpf_map *\fP\fImap\fP\fB, u32\fP \fIkey\fP\fB, u64\fP \fIflags\fP\fB)\fP
+.B \fBlong bpf_redirect_map(struct bpf_map *\fP\fImap\fP\fB, u64\fP \fIkey\fP\fB, u64\fP \fIflags\fP\fB)\fP
.INDENT 7.0
.TP
.B Description
@@ -1447,7 +1451,7 @@ interfaces in the map, with BPF_F_EXCLUDE_INGRESS the ingress
interface will be excluded when do broadcasting.
.sp
See also \fBbpf_redirect\fP(), which only supports redirecting
-to an ifindex, but doesn\[aq]t require a map to do so.
+to an ifindex, but doesn\(aqt require a map to do so.
.TP
.B Return
\fBXDP_REDIRECT\fP on success, or the value of the two lower bits
@@ -1616,24 +1620,18 @@ The retrieved value is stored in the structure pointed by
.sp
\fIbpf_socket\fP should be one of the following:
.INDENT 7.0
-.IP \[bu] 2
+.IP \(bu 2
\fBstruct bpf_sock_ops\fP for \fBBPF_PROG_TYPE_SOCK_OPS\fP\&.
-.IP \[bu] 2
+.IP \(bu 2
\fBstruct bpf_sock_addr\fP for \fBBPF_CGROUP_INET4_CONNECT\fP
and \fBBPF_CGROUP_INET6_CONNECT\fP\&.
.UNINDENT
.sp
This helper actually implements a subset of \fBgetsockopt()\fP\&.
-It supports the following \fIlevel\fPs:
-.INDENT 7.0
-.IP \[bu] 2
-\fBIPPROTO_TCP\fP, which supports \fIoptname\fP
-\fBTCP_CONGESTION\fP\&.
-.IP \[bu] 2
-\fBIPPROTO_IP\fP, which supports \fIoptname\fP \fBIP_TOS\fP\&.
-.IP \[bu] 2
-\fBIPPROTO_IPV6\fP, which supports \fIoptname\fP \fBIPV6_TCLASS\fP\&.
-.UNINDENT
+It supports the same set of \fIoptname\fPs that is supported by
+the \fBbpf_setsockopt\fP() helper. The exceptions are
+\fBTCP_BPF_*\fP is \fBbpf_setsockopt\fP() only and
+\fBTCP_SAVED_SYN\fP is \fBbpf_getsockopt\fP() only.
.TP
.B Return
0 on success, or a negative error in case of failure.
@@ -1688,13 +1686,13 @@ supported in the current kernel.
.sp
\fIargval\fP is a flag array which can combine these flags:
.INDENT 7.0
-.IP \[bu] 2
+.IP \(bu 2
\fBBPF_SOCK_OPS_RTO_CB_FLAG\fP (retransmission time out)
-.IP \[bu] 2
+.IP \(bu 2
\fBBPF_SOCK_OPS_RETRANS_CB_FLAG\fP (retransmission)
-.IP \[bu] 2
+.IP \(bu 2
\fBBPF_SOCK_OPS_STATE_CB_FLAG\fP (TCP state change)
-.IP \[bu] 2
+.IP \(bu 2
\fBBPF_SOCK_OPS_RTT_CB_FLAG\fP (every RTT)
.UNINDENT
.sp
@@ -1710,15 +1708,15 @@ callback:
Here are some examples of where one could call such eBPF
program:
.INDENT 7.0
-.IP \[bu] 2
+.IP \(bu 2
When RTO fires.
-.IP \[bu] 2
+.IP \(bu 2
When a packet is retransmitted.
-.IP \[bu] 2
+.IP \(bu 2
When the connection terminates.
-.IP \[bu] 2
+.IP \(bu 2
When a packet is sent.
-.IP \[bu] 2
+.IP \(bu 2
When a packet is received.
.UNINDENT
.TP
@@ -1756,11 +1754,11 @@ the next \fIbytes\fP (number of bytes) of message \fImsg\fP\&.
.sp
For example, this helper can be used in the following cases:
.INDENT 7.0
-.IP \[bu] 2
+.IP \(bu 2
A single \fBsendmsg\fP() or \fBsendfile\fP() system call
contains multiple logical messages that the eBPF program is
supposed to read and for which it should apply a verdict.
-.IP \[bu] 2
+.IP \(bu 2
An eBPF program only cares to read the first \fIbytes\fP of a
\fImsg\fP\&. If the message has a large payload, then setting up
and calling the eBPF program repeatedly for all bytes, even
@@ -1856,7 +1854,7 @@ single IP address on a host that has multiple IP configured.
.sp
This helper works for IPv4 and IPv6, TCP and UDP sockets. The
domain (\fIaddr\fP\fB\->sa_family\fP) must be \fBAF_INET\fP (or
-\fBAF_INET6\fP). It\[aq]s advised to pass zero port (\fBsin_port\fP
+\fBAF_INET6\fP). It\(aqs advised to pass zero port (\fBsin_port\fP
or \fBsin6_port\fP) which triggers IP_BIND_ADDRESS_NO_PORT\-like
behavior and lets the kernel efficiently pick up an unused
port as long as 4\-tuple is unique. Passing non\-zero port might
@@ -1889,7 +1887,7 @@ direct packet access.
.TP
.B Description
Retrieve the XFRM state (IP transform framework, see also
-\fBip\-xfrm(8)\fP) at \fIindex\fP in XFRM \[dq]security path\[dq] for \fIskb\fP\&.
+\fBip\-xfrm(8)\fP) at \fIindex\fP in XFRM \(dqsecurity path\(dq for \fIskb\fP\&.
.sp
The retrieved value is stored in the \fBstruct bpf_xfrm_state\fP
pointed by \fIxfrm_state\fP and of length \fIsize\fP\&.
@@ -1931,11 +1929,11 @@ specified.
\fIfile_offset\fP is an offset relative to the beginning
of the executable or shared object file backing the vma
which the \fIip\fP falls in. It is \fInot\fP an offset relative
-to that object\[aq]s base address. Accordingly, it must be
+to that object\(aqs base address. Accordingly, it must be
adjusted by adding (sh_addr \- sh_offset), where
sh_{addr,offset} correspond to the executable section
containing \fIfile_offset\fP in the object, for comparisons
-to symbols\[aq] st_value to be valid.
+to symbols\(aq st_value to be valid.
.UNINDENT
.sp
\fBbpf_get_stack\fP() can collect up to
@@ -1973,16 +1971,16 @@ base offset to start from. \fIstart_header\fP can be one of:
.INDENT 7.0
.TP
.B \fBBPF_HDR_START_MAC\fP
-Base offset to load data from is \fIskb\fP\[aq]s mac header.
+Base offset to load data from is \fIskb\fP\(aqs mac header.
.TP
.B \fBBPF_HDR_START_NET\fP
-Base offset to load data from is \fIskb\fP\[aq]s network header.
+Base offset to load data from is \fIskb\fP\(aqs network header.
.UNINDENT
.sp
-In general, \[dq]direct packet access\[dq] is the preferred method to
+In general, \(dqdirect packet access\(dq is the preferred method to
access packet data, however, this helper is in particular useful
in socket filters where \fIskb\fP\fB\->data\fP does not always point
-to the start of the mac header and where \[dq]direct packet access\[dq]
+to the start of the mac header and where \(dqdirect packet access\(dq
is not available.
.TP
.B Return
@@ -2022,11 +2020,11 @@ ingress).
.TP
.B Return
.INDENT 7.0
-.IP \[bu] 2
+.IP \(bu 2
< 0 if any input argument is invalid
-.IP \[bu] 2
+.IP \(bu 2
0 on success (packet is forwarded, nexthop neighbor exists)
-.IP \[bu] 2
+.IP \(bu 2
> 0 one of \fBBPF_FIB_LKUP_RET_\fP codes explaining why the
packet is not forwarded or needs assist from full stack
.UNINDENT
@@ -2237,7 +2235,7 @@ the program.
.sp
This helper is only available is the kernel was compiled with
the \fBCONFIG_BPF_LIRC_MODE2\fP configuration option set to
-\[dq]\fBy\fP\[dq].
+\(dq\fBy\fP\(dq.
.TP
.B Return
0
@@ -2267,7 +2265,7 @@ The \fIprotocol\fP is the decoded protocol number (see
.sp
This helper is only available is the kernel was compiled with
the \fBCONFIG_BPF_LIRC_MODE2\fP configuration option set to
-\[dq]\fBy\fP\[dq].
+\(dq\fBy\fP\(dq.
.TP
.B Return
0
@@ -2546,7 +2544,7 @@ the program.
.sp
This helper is only available is the kernel was compiled with
the \fBCONFIG_BPF_LIRC_MODE2\fP configuration option set to
-\[dq]\fBy\fP\[dq].
+\(dq\fBy\fP\(dq.
.TP
.B Return
0
@@ -2565,55 +2563,55 @@ spinlock can (and must) later be released with a call to
Spinlocks in BPF programs come with a number of restrictions
and constraints:
.INDENT 7.0
-.IP \[bu] 2
+.IP \(bu 2
\fBbpf_spin_lock\fP objects are only allowed inside maps of
types \fBBPF_MAP_TYPE_HASH\fP and \fBBPF_MAP_TYPE_ARRAY\fP (this
list could be extended in the future).
-.IP \[bu] 2
+.IP \(bu 2
BTF description of the map is mandatory.
-.IP \[bu] 2
+.IP \(bu 2
The BPF program can take ONE lock at a time, since taking two
or more could cause dead locks.
-.IP \[bu] 2
+.IP \(bu 2
Only one \fBstruct bpf_spin_lock\fP is allowed per map element.
-.IP \[bu] 2
+.IP \(bu 2
When the lock is taken, calls (either BPF to BPF or helpers)
are not allowed.
-.IP \[bu] 2
+.IP \(bu 2
The \fBBPF_LD_ABS\fP and \fBBPF_LD_IND\fP instructions are not
allowed inside a spinlock\-ed region.
-.IP \[bu] 2
+.IP \(bu 2
The BPF program MUST call \fBbpf_spin_unlock\fP() to release
the lock, on all execution paths, before it returns.
-.IP \[bu] 2
+.IP \(bu 2
The BPF program can access \fBstruct bpf_spin_lock\fP only via
the \fBbpf_spin_lock\fP() and \fBbpf_spin_unlock\fP()
helpers. Loading or storing data into the \fBstruct
bpf_spin_lock\fP \fIlock\fP\fB;\fP field of a map is not allowed.
-.IP \[bu] 2
+.IP \(bu 2
To use the \fBbpf_spin_lock\fP() helper, the BTF description
of the map value must be a struct and have \fBstruct
bpf_spin_lock\fP \fIanyname\fP\fB;\fP field at the top level.
Nested lock inside another struct is not allowed.
-.IP \[bu] 2
+.IP \(bu 2
The \fBstruct bpf_spin_lock\fP \fIlock\fP field in a map value must
be aligned on a multiple of 4 bytes in that value.
-.IP \[bu] 2
+.IP \(bu 2
Syscall with command \fBBPF_MAP_LOOKUP_ELEM\fP does not copy
the \fBbpf_spin_lock\fP field to user space.
-.IP \[bu] 2
+.IP \(bu 2
Syscall with command \fBBPF_MAP_UPDATE_ELEM\fP, or update from
a BPF program, do not update the \fBbpf_spin_lock\fP field.
-.IP \[bu] 2
+.IP \(bu 2
\fBbpf_spin_lock\fP cannot be on the stack or inside a
networking packet (it can only be inside of a map values).
-.IP \[bu] 2
+.IP \(bu 2
\fBbpf_spin_lock\fP is available to root only.
-.IP \[bu] 2
+.IP \(bu 2
Tracing programs and socket filter programs cannot use
\fBbpf_spin_lock\fP() due to insufficient preemption checks
(but this may change in the future).
-.IP \[bu] 2
+.IP \(bu 2
\fBbpf_spin_lock\fP is not allowed in inner maps of map\-in\-map.
.UNINDENT
.TP
@@ -2732,16 +2730,16 @@ error otherwise.
Get name of sysctl in /proc/sys/ and copy it into provided by
program buffer \fIbuf\fP of size \fIbuf_len\fP\&.
.sp
-The buffer is always NUL terminated, unless it\[aq]s zero\-sized.
+The buffer is always NUL terminated, unless it\(aqs zero\-sized.
.sp
-If \fIflags\fP is zero, full name (e.g. \[dq]net/ipv4/tcp_mem\[dq]) is
+If \fIflags\fP is zero, full name (e.g. \(dqnet/ipv4/tcp_mem\(dq) is
copied. Use \fBBPF_F_SYSCTL_BASE_NAME\fP flag to copy base name
-only (e.g. \[dq]tcp_mem\[dq]).
+only (e.g. \(dqtcp_mem\(dq).
.TP
.B Return
Number of character copied (not including the trailing NUL).
.sp
-\fB\-E2BIG\fP if the buffer wasn\[aq]t big enough (\fIbuf\fP will contain
+\fB\-E2BIG\fP if the buffer wasn\(aqt big enough (\fIbuf\fP will contain
truncated name in this case).
.UNINDENT
.TP
@@ -2756,12 +2754,12 @@ by program buffer \fIbuf\fP of size \fIbuf_len\fP\&.
The whole value is copied, no matter what file position user
space issued e.g. sys_read at.
.sp
-The buffer is always NUL terminated, unless it\[aq]s zero\-sized.
+The buffer is always NUL terminated, unless it\(aqs zero\-sized.
.TP
.B Return
Number of character copied (not including the trailing NUL).
.sp
-\fB\-E2BIG\fP if the buffer wasn\[aq]t big enough (\fIbuf\fP will contain
+\fB\-E2BIG\fP if the buffer wasn\(aqt big enough (\fIbuf\fP will contain
truncated name in this case).
.sp
\fB\-EINVAL\fP if current value was unavailable, e.g. because
@@ -2778,12 +2776,12 @@ provided by program buffer \fIbuf\fP of size \fIbuf_len\fP\&.
.sp
User space may write new value at file position > 0.
.sp
-The buffer is always NUL terminated, unless it\[aq]s zero\-sized.
+The buffer is always NUL terminated, unless it\(aqs zero\-sized.
.TP
.B Return
Number of character copied (not including the trailing NUL).
.sp
-\fB\-E2BIG\fP if the buffer wasn\[aq]t big enough (\fIbuf\fP will contain
+\fB\-E2BIG\fP if the buffer wasn\(aqt big enough (\fIbuf\fP will contain
truncated name in this case).
.sp
\fB\-EINVAL\fP if sysctl is being read.
@@ -2820,7 +2818,7 @@ and save the result in \fIres\fP\&.
.sp
The string may begin with an arbitrary amount of white space
(as determined by \fBisspace\fP(3)) followed by a single
-optional \[aq]\fB\-\fP\[aq] sign.
+optional \(aq\fB\-\fP\(aq sign.
.sp
Five least significant bits of \fIflags\fP encode base, other bits
are currently unused.
@@ -2880,7 +2878,7 @@ be a \fBBPF_MAP_TYPE_SK_STORAGE\fP also.
.sp
Underneath, the value is stored locally at \fIsk\fP instead of
the \fImap\fP\&. The \fImap\fP is used as the bpf\-local\-storage
-\[dq]type\[dq]. The bpf\-local\-storage \[dq]type\[dq] (i.e. the \fImap\fP) is
+\(dqtype\(dq. The bpf\-local\-storage \(dqtype\(dq (i.e. the \fImap\fP) is
searched against all bpf\-local\-storages residing at \fIsk\fP\&.
.sp
\fIsk\fP is a kernel \fBstruct sock\fP pointer for LSM program.
@@ -2918,7 +2916,7 @@ Delete a bpf\-local\-storage from a \fIsk\fP\&.
.TP
.B Description
Send signal \fIsig\fP to the process of the current task.
-The signal may be delivered to any of this process\[aq]s threads.
+The signal may be delivered to any of this process\(aqs threads.
.TP
.B Return
0 on success or successfully queued.
@@ -3033,12 +3031,14 @@ get its length at runtime. See the following snippet:
.sp
.nf
.ft C
-SEC(\[dq]kprobe/sys_open\[dq])
+SEC(\(dqkprobe/sys_open\(dq)
void bpf_sys_open(struct pt_regs *ctx)
{
char buf[PATHLEN]; // PATHLEN is defined to 256
- int res = bpf_probe_read_user_str(buf, sizeof(buf),
- ctx\->di);
+ int res;
+
+ res = bpf_probe_read_user_str(buf, sizeof(buf),
+ ctx\->di);
// Consume buf, for example push it to
// userspace via bpf_perf_event_output(); we
@@ -3150,7 +3150,7 @@ Returns 0 on success, values for \fIpid\fP and \fItgid\fP as seen from the curre
.B Return
0 on success, or one of the following in case of failure:
.sp
-\fB\-EINVAL\fP if dev and inum supplied don\[aq]t match dev_t and inode number
+\fB\-EINVAL\fP if dev and inum supplied don\(aqt match dev_t and inode number
with nsfs of current task, or if dev conversion to dev_t lost high bits.
.sp
\fB\-ENOENT\fP if pidns does not exists for the current task.
@@ -3281,11 +3281,11 @@ selection.
.sp
\fIflags\fP argument can combination of following values:
.INDENT 7.0
-.IP \[bu] 2
+.IP \(bu 2
\fBBPF_SK_LOOKUP_F_REPLACE\fP to override the previous
socket selection, potentially done by a BPF program
that ran before us.
-.IP \[bu] 2
+.IP \(bu 2
\fBBPF_SK_LOOKUP_F_NO_REUSEPORT\fP to skip
load\-balancing within reuseport group for the socket
being selected.
@@ -3296,20 +3296,20 @@ On success \fIctx\->sk\fP will point to the selected socket.
.B Return
0 on success, or a negative errno in case of failure.
.INDENT 7.0
-.IP \[bu] 2
+.IP \(bu 2
\fB\-EAFNOSUPPORT\fP if socket family (\fIsk\->family\fP) is
not compatible with packet family (\fIctx\->family\fP).
-.IP \[bu] 2
+.IP \(bu 2
\fB\-EEXIST\fP if socket has been already selected,
potentially by another program, and
\fBBPF_SK_LOOKUP_F_REPLACE\fP flag was not specified.
-.IP \[bu] 2
+.IP \(bu 2
\fB\-EINVAL\fP if unsupported flags were specified.
-.IP \[bu] 2
+.IP \(bu 2
\fB\-EPROTOTYPE\fP if socket L4 protocol
-(\fIsk\->protocol\fP) doesn\[aq]t match packet protocol
+(\fIsk\->protocol\fP) doesn\(aqt match packet protocol
(\fIctx\->protocol\fP).
-.IP \[bu] 2
+.IP \(bu 2
\fB\-ESOCKTNOSUPPORT\fP if socket is not in allowed
state (TCP listening or UDP unconnected).
.UNINDENT
@@ -3459,7 +3459,7 @@ of new data availability is sent unconditionally.
If \fB0\fP is specified in \fIflags\fP, an adaptive notification
of new data availability is sent.
.sp
-See \[aq]bpf_ringbuf_output()\[aq] for the definition of adaptive notification.
+See \(aqbpf_ringbuf_output()\(aq for the definition of adaptive notification.
.TP
.B Return
Nothing. Always succeeds.
@@ -3477,7 +3477,7 @@ of new data availability is sent unconditionally.
If \fB0\fP is specified in \fIflags\fP, an adaptive notification
of new data availability is sent.
.sp
-See \[aq]bpf_ringbuf_output()\[aq] for the definition of adaptive notification.
+See \(aqbpf_ringbuf_output()\(aq for the definition of adaptive notification.
.TP
.B Return
Nothing. Always succeeds.
@@ -3490,13 +3490,13 @@ Nothing. Always succeeds.
Query various characteristics of provided ring buffer. What
exactly is queries is determined by \fIflags\fP:
.INDENT 7.0
-.IP \[bu] 2
+.IP \(bu 2
\fBBPF_RB_AVAIL_DATA\fP: Amount of data not yet consumed.
-.IP \[bu] 2
+.IP \(bu 2
\fBBPF_RB_RING_SIZE\fP: The size of ring buffer.
-.IP \[bu] 2
+.IP \(bu 2
\fBBPF_RB_CONS_POS\fP: Consumer position (can wrap around).
-.IP \[bu] 2
+.IP \(bu 2
\fBBPF_RB_PROD_POS\fP: Producer(s) position (can wrap around).
.UNINDENT
.sp
@@ -3529,16 +3529,16 @@ stack instead of just egressing at tc.
.sp
There are three supported level settings at this time:
.INDENT 7.0
-.IP \[bu] 2
+.IP \(bu 2
\fBBPF_CSUM_LEVEL_INC\fP: Increases skb\->csum_level for skbs
with CHECKSUM_UNNECESSARY.
-.IP \[bu] 2
+.IP \(bu 2
\fBBPF_CSUM_LEVEL_DEC\fP: Decreases skb\->csum_level for skbs
with CHECKSUM_UNNECESSARY.
-.IP \[bu] 2
+.IP \(bu 2
\fBBPF_CSUM_LEVEL_RESET\fP: Resets skb\->csum_level to 0 and
sets CHECKSUM_NONE to force checksum validation by the stack.
-.IP \[bu] 2
+.IP \(bu 2
\fBBPF_CSUM_LEVEL_QUERY\fP: No\-op, returns the current
skb\->csum_level.
.UNINDENT
@@ -3662,12 +3662,12 @@ kind that it wants to search.
.sp
If the searching kind is an experimental kind
(i.e. 253 or 254 according to RFC6994). It also
-needs to specify the \[dq]magic\[dq] which is either
+needs to specify the \(dqmagic\(dq which is either
2 bytes or 4 bytes. It then also needs to
specify the size of the magic by using
-the 2nd byte which is \[dq]kind\-length\[dq] of a TCP
-header option and the \[dq]kind\-length\[dq] also
-includes the first 2 bytes \[dq]kind\[dq] and \[dq]kind\-length\[dq]
+the 2nd byte which is \(dqkind\-length\(dq of a TCP
+header option and the \(dqkind\-length\(dq also
+includes the first 2 bytes \(dqkind\(dq and \(dqkind\-length\(dq
itself as a normal TCP header option also does.
.sp
For example, to search experimental kind 254 with
@@ -3686,7 +3686,7 @@ of a header option.
.sp
Supported flags:
.INDENT 7.0
-.IP \[bu] 2
+.IP \(bu 2
\fBBPF_LOAD_HDR_OPT_TCP_SYN\fP to search from the
saved_syn packet or the just\-received syn packet.
.UNINDENT
@@ -3789,7 +3789,7 @@ be a \fBBPF_MAP_TYPE_INODE_STORAGE\fP\&.
.sp
Underneath, the value is stored locally at \fIinode\fP instead of
the \fImap\fP\&. The \fImap\fP is used as the bpf\-local\-storage
-\[dq]type\[dq]. The bpf\-local\-storage \[dq]type\[dq] (i.e. the \fImap\fP) is
+\(dqtype\(dq. The bpf\-local\-storage \(dqtype\(dq (i.e. the \fImap\fP) is
searched against all bpf_local_storage residing at \fIinode\fP\&.
.sp
An optional \fIflags\fP (\fBBPF_LOCAL_STORAGE_GET_F_CREATE\fP) can be
@@ -3906,7 +3906,7 @@ Use BTF to write to seq_write a string representation of
.B Description
See \fBbpf_get_cgroup_classid\fP() for the main description.
This helper differs from \fBbpf_get_cgroup_classid\fP() in that
-the cgroup v1 net_cls class is retrieved only from the \fIskb\fP\[aq]s
+the cgroup v1 net_cls class is retrieved only from the \fIskb\fP\(aqs
associated socket instead of the current process.
.TP
.B Return
@@ -3923,7 +3923,7 @@ is somewhat similar to \fBbpf_redirect\fP(), except that it
populates L2 addresses as well, meaning, internally, the helper
relies on the neighbor lookup for the L2 address of the nexthop.
.sp
-The helper will perform a FIB lookup based on the skb\[aq]s
+The helper will perform a FIB lookup based on the skb\(aqs
networking header to get the address of the next hop, unless
this is supplied by the caller in the \fIparams\fP argument. The
\fIplen\fP argument indicates the len of \fIparams\fP and should be set
@@ -3944,7 +3944,7 @@ The helper returns \fBTC_ACT_REDIRECT\fP on success or
.B Description
Take a pointer to a percpu ksym, \fIpercpu_ptr\fP, and return a
pointer to the percpu kernel variable on \fIcpu\fP\&. A ksym is an
-extern variable decorated with \[aq]__ksym\[aq]. For ksym, there is a
+extern variable decorated with \(aq__ksym\(aq. For ksym, there is a
global var (either static or global) defined of the same name
in the kernel. The ksym is percpu if the global var is percpu.
The returned pointer points to the global percpu var on \fIcpu\fP\&.
@@ -3965,7 +3965,7 @@ NULL, if \fIcpu\fP is invalid.
.B Description
Take a pointer to a percpu ksym, \fIpercpu_ptr\fP, and return a
pointer to the percpu kernel variable on this cpu. See the
-description of \[aq]ksym\[aq] in \fBbpf_per_cpu_ptr\fP().
+description of \(aqksym\(aq in \fBbpf_per_cpu_ptr\fP().
.sp
bpf_this_cpu_ptr() has the same semantic as this_cpu_ptr() in
the kernel. Different from \fBbpf_per_cpu_ptr\fP(), it would
@@ -3981,9 +3981,9 @@ A pointer pointing to the kernel percpu variable on this cpu.
.B Description
Redirect the packet to another net device of index \fIifindex\fP\&.
This helper is somewhat similar to \fBbpf_redirect\fP(), except
-that the redirection happens to the \fIifindex\fP\[aq] peer device and
+that the redirection happens to the \fIifindex\fP\(aq peer device and
the netns switch takes place from ingress to ingress without
-going through the CPU\[aq]s backlog queue.
+going through the CPU\(aqs backlog queue.
.sp
The \fIflags\fP argument is reserved and must be 0. The helper is
currently only supported for tc BPF program types at the ingress
@@ -4010,7 +4010,7 @@ be a \fBBPF_MAP_TYPE_TASK_STORAGE\fP\&.
.sp
Underneath, the value is stored locally at \fItask\fP instead of
the \fImap\fP\&. The \fImap\fP is used as the bpf\-local\-storage
-\[dq]type\[dq]. The bpf\-local\-storage \[dq]type\[dq] (i.e. the \fImap\fP) is
+\(dqtype\(dq. The bpf\-local\-storage \(dqtype\(dq (i.e. the \fImap\fP) is
searched against all bpf_local_storage residing at \fItask\fP\&.
.sp
An optional \fIflags\fP (\fBBPF_LOCAL_STORAGE_GET_F_CREATE\fP) can be
@@ -4043,7 +4043,7 @@ Delete a bpf_local_storage from a \fItask\fP\&.
.INDENT 7.0
.TP
.B Description
-Return a BTF pointer to the \[dq]current\[dq] task.
+Return a BTF pointer to the \(dqcurrent\(dq task.
This pointer can also be used in helpers that accept an
\fIARG_PTR_TO_BTF_ID\fP of type \fItask_struct\fP\&.
.TP
@@ -4083,7 +4083,7 @@ Current \fIktime\fP\&.
.INDENT 7.0
.TP
.B Description
-Returns the stored IMA hash of the \fIinode\fP (if it\[aq]s available).
+Returns the stored IMA hash of the \fIinode\fP (if it\(aqs available).
If the hash is larger than \fIsize\fP, then only \fIsize\fP
bytes will be copied to \fIdst\fP
.TP
@@ -4123,7 +4123,7 @@ planned size change; therefore the responsibility for catching
a negative packet size belongs in those helpers.
.sp
Specifying \fIifindex\fP zero means the MTU check is performed
-against the current net device. This is practical if this isn\[aq]t
+against the current net device. This is practical if this isn\(aqt
used prior to redirect.
.sp
On input \fImtu_len\fP must be a valid pointer, else verifier will
@@ -4166,9 +4166,9 @@ MTU value in your BPF\-code.
.TP
.B Return
.INDENT 7.0
-.IP \[bu] 2
+.IP \(bu 2
0 on success, and populate MTU value in \fImtu_len\fP pointer.
-.IP \[bu] 2
+.IP \(bu 2
< 0 if any input argument is invalid (\fImtu_len\fP not updated)
.UNINDENT
.sp
@@ -4176,9 +4176,9 @@ MTU violations return positive values, but also populate MTU
value in \fImtu_len\fP pointer, as this can be needed for
implementing PMTU handing:
.INDENT 7.0
-.IP \[bu] 2
+.IP \(bu 2
\fBBPF_MTU_CHK_RET_FRAG_NEEDED\fP
-.IP \[bu] 2
+.IP \(bu 2
\fBBPF_MTU_CHK_RET_SEGS_TOOBIG\fP
.UNINDENT
.UNINDENT
@@ -4260,7 +4260,7 @@ A syscall result.
.INDENT 7.0
.TP
.B Description
-Find BTF type with given name and kind in vmlinux BTF or in module\[aq]s BTFs.
+Find BTF type with given name and kind in vmlinux BTF or in module\(aqs BTFs.
.TP
.B Return
Returns btf_id and btf_obj_fd in lower and upper 32 bits.
@@ -4291,7 +4291,7 @@ the same \fImap\fP\&.
0 on success.
\fB\-EBUSY\fP if \fItimer\fP is already initialized.
\fB\-EINVAL\fP if invalid \fIflags\fP are passed.
-\fB\-EPERM\fP if \fItimer\fP is in a map that doesn\[aq]t have any user references.
+\fB\-EPERM\fP if \fItimer\fP is in a map that doesn\(aqt have any user references.
The user space should either hold a file descriptor to a map with timers
or pin such map in bpffs. When map is unpinned or file descriptor is
closed all timers in the map will be cancelled and freed.
@@ -4306,7 +4306,7 @@ Configure the timer to call \fIcallback_fn\fP static function.
.B Return
0 on success.
\fB\-EINVAL\fP if \fItimer\fP was not initialized with bpf_timer_init() earlier.
-\fB\-EPERM\fP if \fItimer\fP is in a map that doesn\[aq]t have any user references.
+\fB\-EPERM\fP if \fItimer\fP is in a map that doesn\(aqt have any user references.
The user space should either hold a file descriptor to a map with timers
or pin such map in bpffs. When map is unpinned or file descriptor is
closed all timers in the map will be cancelled and freed.
@@ -4324,9 +4324,9 @@ Since struct bpf_timer is a field inside map element the map
owns the timer. The bpf_timer_set_callback() will increment refcnt
of BPF program to make sure that callback_fn code stays valid.
When user space reference to a map reaches zero all timers
-in a map are cancelled and corresponding program\[aq]s refcnts are
+in a map are cancelled and corresponding program\(aqs refcnts are
decremented. This is done to make sure that Ctrl\-C of a user
-process doesn\[aq]t leave any timers running. If map is pinned in
+process doesn\(aqt leave any timers running. If map is pinned in
bpffs the callback_fn can re\-arm itself indefinitely.
bpf_map_update/delete_elem() helpers and user space sys_bpf commands
cancel and free the timer in the given map element.
@@ -4378,11 +4378,11 @@ Expects BPF program context \fIctx\fP as a first argument.
.TP
.B Supported for the following program types:
.INDENT 7.0
-.IP \[bu] 2
+.IP \(bu 2
kprobe/uprobe;
-.IP \[bu] 2
+.IP \(bu 2
tracepoint;
-.IP \[bu] 2
+.IP \(bu 2
perf_event.
.UNINDENT
.UNINDENT
@@ -4522,7 +4522,7 @@ The number of loops performed, \fB\-EINVAL\fP for invalid \fBflags\fP,
.INDENT 7.0
.TP
.B Description
-Do strncmp() between \fBs1\fP and \fBs2\fP\&. \fBs1\fP doesn\[aq]t need
+Do strncmp() between \fBs1\fP and \fBs2\fP\&. \fBs1\fP doesn\(aqt need
to be null\-terminated and \fBs1_sz\fP is the maximum storage
size of \fBs1\fP\&. \fBs2\fP must be a read\-only string.
.TP
@@ -4571,26 +4571,26 @@ The number of argument registers of the traced function.
.INDENT 7.0
.TP
.B Description
-Get the BPF program\[aq]s return value that will be returned to the upper layers.
+Get the BPF program\(aqs return value that will be returned to the upper layers.
.sp
This helper is currently supported by cgroup programs and only by the hooks
-where BPF program\[aq]s return value is returned to the userspace via errno.
+where BPF program\(aqs return value is returned to the userspace via errno.
.TP
.B Return
-The BPF program\[aq]s return value.
+The BPF program\(aqs return value.
.UNINDENT
.TP
.B \fBint bpf_set_retval(int\fP \fIretval\fP\fB)\fP
.INDENT 7.0
.TP
.B Description
-Set the BPF program\[aq]s return value that will be returned to the upper layers.
+Set the BPF program\(aqs return value that will be returned to the upper layers.
.sp
This helper is currently supported by cgroup programs and only by the hooks
-where BPF program\[aq]s return value is returned to the userspace via errno.
+where BPF program\(aqs return value is returned to the userspace via errno.
.sp
Note that there is the following corner case where the program exports an error
-via bpf_set_retval but signals success via \[aq]return 1\[aq]:
+via bpf_set_retval but signals success via \(aqreturn 1\(aq:
.INDENT 7.0
.INDENT 3.5
bpf_set_retval(\-EPERM);
@@ -4598,8 +4598,8 @@ return 1;
.UNINDENT
.UNINDENT
.sp
-In this case, the BPF program\[aq]s return value will use helper\[aq]s \-EPERM. This
-still holds true for cgroup/bind{4,6} which supports extra \[aq]return 3\[aq] success case.
+In this case, the BPF program\(aqs return value will use helper\(aqs \-EPERM. This
+still holds true for cgroup/bind{4,6} which supports extra \(aqreturn 3\(aq success case.
.TP
.B Return
0 on success, or a negative error in case of failure.
@@ -4643,7 +4643,7 @@ associated to \fIxdp_md\fP, at \fIoffset\fP\&.
.INDENT 7.0
.TP
.B Description
-Read \fIsize\fP bytes from user space address \fIuser_ptr\fP in \fItsk\fP\[aq]s
+Read \fIsize\fP bytes from user space address \fIuser_ptr\fP in \fItsk\fP\(aqs
address space, and stores the data in \fIdst\fP\&. \fIflags\fP is not
used yet and is provided for future extensibility. This helper
can only be used by sleepable programs.
@@ -4777,7 +4777,7 @@ through the dynptr interface. This is a no\-op if the dynptr is
invalid/null.
.sp
For more information on \fIflags\fP, please see
-\[aq]bpf_ringbuf_submit\[aq].
+\(aqbpf_ringbuf_submit\(aq.
.TP
.B Return
Nothing. Always succeeds.
@@ -4791,13 +4791,13 @@ Discard reserved ring buffer sample through the dynptr
interface. This is a no\-op if the dynptr is invalid/null.
.sp
For more information on \fIflags\fP, please see
-\[aq]bpf_ringbuf_discard\[aq].
+\(aqbpf_ringbuf_discard\(aq.
.TP
.B Return
Nothing. Always succeeds.
.UNINDENT
.TP
-.B \fBlong bpf_dynptr_read(void *\fP\fIdst\fP\fB, u32\fP \fIlen\fP\fB, struct bpf_dynptr *\fP\fIsrc\fP\fB, u32\fP \fIoffset\fP\fB, u64\fP \fIflags\fP\fB)\fP
+.B \fBlong bpf_dynptr_read(void *\fP\fIdst\fP\fB, u32\fP \fIlen\fP\fB, const struct bpf_dynptr *\fP\fIsrc\fP\fB, u32\fP \fIoffset\fP\fB, u64\fP \fIflags\fP\fB)\fP
.INDENT 7.0
.TP
.B Description
@@ -4807,11 +4807,11 @@ into \fIsrc\fP\&.
.TP
.B Return
0 on success, \-E2BIG if \fIoffset\fP + \fIlen\fP exceeds the length
-of \fIsrc\fP\[aq]s data, \-EINVAL if \fIsrc\fP is an invalid dynptr or if
+of \fIsrc\fP\(aqs data, \-EINVAL if \fIsrc\fP is an invalid dynptr or if
\fIflags\fP is not 0.
.UNINDENT
.TP
-.B \fBlong bpf_dynptr_write(struct bpf_dynptr *\fP\fIdst\fP\fB, u32\fP \fIoffset\fP\fB, void *\fP\fIsrc\fP\fB, u32\fP \fIlen\fP\fB, u64\fP \fIflags\fP\fB)\fP
+.B \fBlong bpf_dynptr_write(const struct bpf_dynptr *\fP\fIdst\fP\fB, u32\fP \fIoffset\fP\fB, void *\fP\fIsrc\fP\fB, u32\fP \fIlen\fP\fB, u64\fP \fIflags\fP\fB)\fP
.INDENT 7.0
.TP
.B Description
@@ -4821,11 +4821,11 @@ into \fIdst\fP\&.
.TP
.B Return
0 on success, \-E2BIG if \fIoffset\fP + \fIlen\fP exceeds the length
-of \fIdst\fP\[aq]s data, \-EINVAL if \fIdst\fP is an invalid dynptr or if \fIdst\fP
+of \fIdst\fP\(aqs data, \-EINVAL if \fIdst\fP is an invalid dynptr or if \fIdst\fP
is a read\-only dynptr or if \fIflags\fP is not 0.
.UNINDENT
.TP
-.B \fBvoid *bpf_dynptr_data(struct bpf_dynptr *\fP\fIptr\fP\fB, u32\fP \fIoffset\fP\fB, u32\fP \fIlen\fP\fB)\fP
+.B \fBvoid *bpf_dynptr_data(const struct bpf_dynptr *\fP\fIptr\fP\fB, u32\fP \fIoffset\fP\fB, u32\fP \fIlen\fP\fB)\fP
.INDENT 7.0
.TP
.B Description
@@ -4952,7 +4952,7 @@ Current \fIktime\fP\&.
Drain samples from the specified user ring buffer, and invoke
the provided callback for each such sample:
.sp
-long (*callback_fn)(struct bpf_dynptr *dynptr, void *ctx);
+long (*callback_fn)(const struct bpf_dynptr *dynptr, void *ctx);
.sp
If \fBcallback_fn\fP returns 0, the helper will continue to try
and drain the next sample, up to a maximum of
@@ -4986,15 +4986,61 @@ position not matching the advertised length of a sample.
larger than the size of the ring buffer, or which cannot fit
within a struct bpf_dynptr.
.UNINDENT
+.TP
+.B \fBvoid *bpf_cgrp_storage_get(struct bpf_map *\fP\fImap\fP\fB, struct cgroup *\fP\fIcgroup\fP\fB, void *\fP\fIvalue\fP\fB, u64\fP \fIflags\fP\fB)\fP
+.INDENT 7.0
+.TP
+.B Description
+Get a bpf_local_storage from the \fIcgroup\fP\&.
+.sp
+Logically, it could be thought of as getting the value from
+a \fImap\fP with \fIcgroup\fP as the \fBkey\fP\&. From this
+perspective, the usage is not much different from
+\fBbpf_map_lookup_elem\fP(\fImap\fP, \fB&\fP\fIcgroup\fP) except this
+helper enforces the key must be a cgroup struct and the map must also
+be a \fBBPF_MAP_TYPE_CGRP_STORAGE\fP\&.
+.sp
+In reality, the local\-storage value is embedded directly inside of the
+\fIcgroup\fP object itself, rather than being located in the
+\fBBPF_MAP_TYPE_CGRP_STORAGE\fP map. When the local\-storage value is
+queried for some \fImap\fP on a \fIcgroup\fP object, the kernel will perform an
+O(n) iteration over all of the live local\-storage values for that
+\fIcgroup\fP object until the local\-storage value for the \fImap\fP is found.
+.sp
+An optional \fIflags\fP (\fBBPF_LOCAL_STORAGE_GET_F_CREATE\fP) can be
+used such that a new bpf_local_storage will be
+created if one does not exist. \fIvalue\fP can be used
+together with \fBBPF_LOCAL_STORAGE_GET_F_CREATE\fP to specify
+the initial value of a bpf_local_storage. If \fIvalue\fP is
+\fBNULL\fP, the new bpf_local_storage will be zero initialized.
+.TP
+.B Return
+A bpf_local_storage pointer is returned on success.
+.sp
+\fBNULL\fP if not found or there was an error in adding
+a new bpf_local_storage.
+.UNINDENT
+.TP
+.B \fBlong bpf_cgrp_storage_delete(struct bpf_map *\fP\fImap\fP\fB, struct cgroup *\fP\fIcgroup\fP\fB)\fP
+.INDENT 7.0
+.TP
+.B Description
+Delete a bpf_local_storage from a \fIcgroup\fP\&.
+.TP
+.B Return
+0 on success.
+.sp
+\fB\-ENOENT\fP if the bpf_local_storage cannot be found.
+.UNINDENT
.UNINDENT
.SH EXAMPLES
.sp
Example usage for most of the eBPF helpers listed in this manual page are
available within the Linux kernel sources, at the following locations:
.INDENT 0.0
-.IP \[bu] 2
+.IP \(bu 2
\fIsamples/bpf/\fP
-.IP \[bu] 2
+.IP \(bu 2
\fItools/testing/selftests/bpf/\fP
.UNINDENT
.SH LICENSE
@@ -5002,7 +5048,7 @@ available within the Linux kernel sources, at the following locations:
eBPF programs can have an associated license, passed along with the bytecode
instructions to the kernel when the programs are loaded. The format for that
string is identical to the one in use for kernel modules (Dual licenses, such
-as \[dq]Dual BSD/GPL\[dq], may be used). Some helper functions are only accessible to
+as \(dqDual BSD/GPL\(dq, may be used). Some helper functions are only accessible to
programs that are compatible with the GNU Privacy License (GPL).
.sp
In order to use such helpers, the eBPF program must be loaded with the correct
@@ -5014,7 +5060,7 @@ similar to the following:
.sp
.nf
.ft C
-char ____license[] __attribute__((section(\[dq]license\[dq]), used)) = \[dq]GPL\[dq];
+char ____license[] __attribute__((section(\(dqlicense\(dq), used)) = \(dqGPL\(dq;
.ft P
.fi
.UNINDENT
@@ -5030,23 +5076,23 @@ check by yourself what helper functions exist in your kernel, or what types of
programs they can support, here are some files among the kernel tree that you
may be interested in:
.INDENT 0.0
-.IP \[bu] 2
+.IP \(bu 2
\fIinclude/uapi/linux/bpf.h\fP is the main BPF header. It contains the full list
of all helper functions, as well as many other BPF definitions including most
of the flags, structs or constants used by the helpers.
-.IP \[bu] 2
+.IP \(bu 2
\fInet/core/filter.c\fP contains the definition of most network\-related helper
functions, and the list of program types from which they can be used.
-.IP \[bu] 2
+.IP \(bu 2
\fIkernel/trace/bpf_trace.c\fP is the equivalent for most tracing program\-related
helpers.
-.IP \[bu] 2
+.IP \(bu 2
\fIkernel/bpf/verifier.c\fP contains the functions used to check that valid types
of eBPF maps are used with a given helper function.
-.IP \[bu] 2
+.IP \(bu 2
\fIkernel/bpf/\fP directory contains other files in which additional helpers are
defined (for cgroups, sockmaps, etc.).
-.IP \[bu] 2
+.IP \(bu 2
The bpftool utility can be used to probe the availability of helper functions
on the system (as well as supported program and map types, and a number of
other parameters). To do so, run \fBbpftool feature probe\fP (see
diff --git a/man7/capabilities.7 b/man7/capabilities.7
index ff2907876..c8766d2c2 100644
--- a/man7/capabilities.7
+++ b/man7/capabilities.7
@@ -25,7 +25,7 @@
.\" other capabilities where the permitted or inheritable bit is set.
.\" 2011-09-07, mtk/Serge hallyn: Add CAP_SYSLOG
.\"
-.TH Capabilities 7 2023-02-05 "Linux man-pages 6.03"
+.TH Capabilities 7 2023-05-03 "Linux man-pages 6.05.01"
.SH NAME
capabilities \- overview of Linux capabilities
.SH DESCRIPTION
@@ -1180,14 +1180,14 @@ the process using the following algorithm:
.in +4n
.EX
P'(ambient) = (file is privileged) ? 0 : P(ambient)
-
+\&
P'(permitted) = (P(inheritable) & F(inheritable)) |
(F(permitted) & P(bounding)) | P'(ambient)
-
+\&
P'(effective) = F(effective) ? P'(permitted) : P'(ambient)
-
+\&
P'(inheritable) = P(inheritable) [i.e., unchanged]
-
+\&
P'(bounding) = P(bounding) [i.e., unchanged]
.EE
.in
@@ -1323,7 +1323,7 @@ permitted capabilities simplifies to:
.in +4n
.EX
P'(permitted) = P(inheritable) | P(bounding)
-
+\&
P'(effective) = P'(permitted)
.EE
.in
@@ -1758,8 +1758,9 @@ capabilities and user namespaces, see
.BR user_namespaces (7).
.SH STANDARDS
No standards govern capabilities, but the Linux capability implementation
-is based on the withdrawn POSIX.1e draft standard; see
-.UR https://archive.org\:/details\:/posix_1003.1e-990310
+is based on the withdrawn
+.UR https://archive.org\:/details\:/posix_1003.1e\-990310
+POSIX.1e draft standard
.UE .
.SH NOTES
When attempting to
diff --git a/man7/cgroup_namespaces.7 b/man7/cgroup_namespaces.7
index 8ac9888eb..c1162fe5a 100644
--- a/man7/cgroup_namespaces.7
+++ b/man7/cgroup_namespaces.7
@@ -3,7 +3,7 @@
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
.\"
-.TH cgroup_namespaces 7 2023-02-05 "Linux man-pages 6.03"
+.TH cgroup_namespaces 7 2023-03-30 "Linux man-pages 6.05.01"
.SH NAME
cgroup_namespaces \- overview of Linux cgroup namespaces
.SH DESCRIPTION
@@ -161,7 +161,7 @@ sh2# \fBcat /proc/self/mountinfo | grep freezer\fP
.in
.\"
.SH STANDARDS
-Namespaces are a Linux-specific feature.
+Linux.
.SH NOTES
Use of cgroup namespaces requires a kernel that is configured with the
.B CONFIG_CGROUPS
diff --git a/man7/cgroups.7 b/man7/cgroups.7
index 497b411cd..c070ca747 100644
--- a/man7/cgroups.7
+++ b/man7/cgroups.7
@@ -3,7 +3,7 @@
.\"
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
-.TH cgroups 7 2023-02-05 "Linux man-pages 6.03"
+.TH cgroups 7 2023-04-03 "Linux man-pages 6.05.01"
.SH NAME
cgroups \- Linux control groups
.SH DESCRIPTION
@@ -1796,7 +1796,7 @@ or 0 if it has been disabled (via the
kernel command-line boot parameter).
.RE
.TP
-.IR /proc/[pid]/cgroup " (since Linux 2.6.24)"
+.IR /proc/ pid /cgroup " (since Linux 2.6.24)"
This file describes control groups to which the process
with the corresponding PID belongs.
The displayed information differs for
diff --git a/man7/charsets.7 b/man7/charsets.7
index b8d7a3972..0692d8d8b 100644
--- a/man7/charsets.7
+++ b/man7/charsets.7
@@ -8,7 +8,7 @@
.\"
.\" Changes also by David Starner <dstarner98@aasaa.ofe.org>.
.\"
-.TH charsets 7 2023-02-05 "Linux man-pages 6.03"
+.TH charsets 7 2023-03-12 "Linux man-pages 6.05.01"
.SH NAME
charsets \- character set standards and internationalization
.SH DESCRIPTION
@@ -67,7 +67,7 @@ Norwegian, Portuguese, Spanish, and Swedish.
The lack of the ligatures
Dutch IJ/ij,
French Å“,
-and old-style „German“ quotation marks
+and „German“ quotation marks
was considered tolerable.
.TP
8859-2 (Latin-2)
@@ -260,7 +260,7 @@ of ASCII.
In the same fashion as the ISO 8859 series, Thai characters are mapped into
0xa1\[en]0xfe.
.SS Unicode
-Unicode (ISO 10646) is a standard which aims to unambiguously represent
+Unicode (ISO/IEC 10646) is a standard which aims to unambiguously represent
every character in every human language.
Unicode's structure permits 20.1 bits to encode every character.
Since most computers don't include 20.1-bit integers, Unicode is
@@ -288,7 +288,7 @@ is assembled into 00000xxx xxyyyyyy.
A byte 1110xxxx is the start
of a 3-byte code, and 1110xxxx 10yyyyyy 10zzzzzz is assembled
into xxxxyyyy yyzzzzzz.
-(When UTF-8 is used to code the 31-bit ISO 10646
+(When UTF-8 is used to code the 31-bit ISO/IEC 10646
then this progression continues up to 6-byte codes.)
.PP
For most texts in ISO 8859 character sets, this means that the
@@ -305,12 +305,14 @@ While there are algorithmic conversions from some character sets
carrying around conversion tables, which can be quite large for 16-bit
codes.
.PP
-Note that UTF-8 is self-synchronizing: 10xxxxxx is a tail, any other
-byte is the head of a code.
-Note that the only way ASCII bytes occur
-in a UTF-8 stream, is as themselves.
-In particular, there are no
-embedded NULs (\[aq]\e0\[aq]) or \[aq]/\[aq]s that form part of some larger code.
+Note that UTF-8 is self-synchronizing:
+10xxxxxx is a tail,
+any other byte is the head of a code.
+Note that the only way ASCII bytes occur in a UTF-8 stream,
+is as themselves.
+In particular,
+there are no embedded NULs (\[aq]\e0\[aq]) or \[aq]/\[aq]s
+that form part of some larger code.
.PP
Since ASCII, and, in particular, NUL and \[aq]/\[aq], are unchanged, the
kernel does not notice that UTF-8 is being used.
diff --git a/man7/complex.7 b/man7/complex.7
index b21d91a15..3685a8dd0 100644
--- a/man7/complex.7
+++ b/man7/complex.7
@@ -2,9 +2,12 @@
.\"
.\" SPDX-License-Identifier: GPL-1.0-or-later
.\"
-.TH complex 7 2022-10-30 "Linux man-pages 6.03"
+.TH complex 7 2023-07-18 "Linux man-pages 6.05.01"
.SH NAME
complex \- basics of complex mathematics
+.SH LIBRARY
+Math library
+.RI ( libm ", " \-lm )
.SH SYNOPSIS
.nf
.B #include <complex.h>
@@ -35,7 +38,6 @@ Nearly all math function have a complex counterpart but there are
some complex-only functions.
.SH EXAMPLES
Your C-compiler can work with complex numbers if it supports the C99 standard.
-Link with \fI\-lm\fP.
The imaginary unit is represented by I.
.PP
.EX
@@ -43,7 +45,7 @@ The imaginary unit is represented by I.
#include <math.h> /* for atan */
#include <stdio.h>
#include <complex.h>
-
+\&
int
main(void)
{
diff --git a/man7/cp1251.7 b/man7/cp1251.7
index d16757391..6dd88c292 100644
--- a/man7/cp1251.7
+++ b/man7/cp1251.7
@@ -3,7 +3,7 @@
.\"
.\" SPDX-License-Identifier: GPL-2.0-or-later
.\"
-.TH cp1251 7 2022-12-15 "Linux man-pages 6.03"
+.TH cp1251 7 2022-12-15 "Linux man-pages 6.05.01"
.SH NAME
cp1251 \- CP\ 1251 character set encoded in octal, decimal,
and hexadecimal
diff --git a/man7/cp1252.7 b/man7/cp1252.7
index 063d7b5ee..2522b1d5d 100644
--- a/man7/cp1252.7
+++ b/man7/cp1252.7
@@ -3,7 +3,7 @@
.\"
.\" SPDX-License-Identifier: GPL-2.0-or-later
.\"
-.TH cp1252 7 2022-12-15 "Linux man-pages 6.03"
+.TH cp1252 7 2022-12-15 "Linux man-pages 6.05.01"
.SH NAME
cp1252 \- CP\ 1252 character set encoded in octal, decimal,
and hexadecimal
diff --git a/man7/cpuset.7 b/man7/cpuset.7
index fa2cb6239..800e4da3e 100644
--- a/man7/cpuset.7
+++ b/man7/cpuset.7
@@ -4,7 +4,7 @@
.\"
.\" SPDX-License-Identifier: GPL-2.0-only
.\"
-.TH cpuset 7 2023-02-05 "Linux man-pages 6.03"
+.TH cpuset 7 2023-07-18 "Linux man-pages 6.05.01"
.SH NAME
cpuset \- confine processes to processor and memory node subsets
.SH DESCRIPTION
@@ -342,13 +342,13 @@ See \fBScheduler Relax Domain Level\fR, below, for further details.
In addition to the above pseudo-files in each directory below
.IR /dev/cpuset ,
each process has a pseudo-file,
-.IR /proc/<pid>/cpuset ,
+.IR /proc/ pid /cpuset ,
that displays the path of the process's cpuset directory
relative to the root of the cpuset filesystem.
.\" ================== proc status ==================
.PP
Also the
-.I /proc/<pid>/status
+.IR /proc/ pid /status
file for each process has four added lines,
displaying the process's
.I Cpus_allowed
@@ -845,8 +845,12 @@ In the case of multiple overlapping cpusets which have conflicting
values, then the highest such value
applies to all CPUs in any of the overlapping cpusets.
In such cases,
-the value \fBminus one (\-1)\fR is the lowest value, overridden by any
-other value, and the value \fBzero (0)\fR is the next lowest value.
+.B \-1
+is the lowest value,
+overridden by any other value,
+and
+.B 0
+is the next lowest value.
.SH FORMATS
The following formats are used to represent sets of
CPUs and memory nodes.
@@ -854,7 +858,7 @@ CPUs and memory nodes.
.SS Mask format
The \fBMask Format\fR is used to represent CPU and memory-node bit masks
in the
-.I /proc/<pid>/status
+.IR /proc/ pid /status
file.
.PP
This format displays each 32-bit
@@ -1240,7 +1244,7 @@ a cpuset into a different directory.
Attempted to
.BR read (2)
a
-.I /proc/<pid>/cpuset
+.IR /proc/ pid /cpuset
file for a cpuset path that is longer than the kernel page size.
.TP
.B ENAMETOOLONG
diff --git a/man7/credentials.7 b/man7/credentials.7
index bab8bd124..653e7a332 100644
--- a/man7/credentials.7
+++ b/man7/credentials.7
@@ -4,7 +4,7 @@
.\"
.\" 2007-06-13 Creation
.\"
-.TH credentials 7 2023-02-05 "Linux man-pages 6.03"
+.TH credentials 7 2023-03-30 "Linux man-pages 6.05.01"
.SH NAME
credentials \- process identifiers
.SH DESCRIPTION
@@ -302,6 +302,7 @@ Process IDs, parent process IDs, process group IDs, and session IDs
are specified in POSIX.1.
The real, effective, and saved set user and groups IDs,
and the supplementary group IDs, are specified in POSIX.1.
+.PP
The filesystem user and group IDs are a Linux extension.
.SH NOTES
Various fields in the
diff --git a/man7/ddp.7 b/man7/ddp.7
index 97bb15d99..0b7eb1549 100644
--- a/man7/ddp.7
+++ b/man7/ddp.7
@@ -1,15 +1,10 @@
.\" This man page is Copyright (C) 1998 Alan Cox.
.\"
-.\" %%%LICENSE_START(VERBATIM_ONE_PARA)
-.\" Permission is granted to distribute possibly modified copies
-.\" of this page provided the header is included verbatim,
-.\" and in case of nontrivial modification author and date
-.\" of the modification is added to the header.
-.\" %%%LICENSE_END
+.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
.\" $Id: ddp.7,v 1.3 1999/05/13 11:33:22 freitag Exp $
.\"
-.TH ddp 7 2023-02-05 "Linux man-pages 6.03"
+.TH ddp 7 2023-05-26 "Linux man-pages 6.05.01"
.SH NAME
ddp \- Linux AppleTalk protocol implementation
.SH SYNOPSIS
@@ -72,7 +67,7 @@ struct at_addr {
unsigned short s_net;
unsigned char s_node;
};
-
+\&
struct sockaddr_atalk {
sa_family_t sat_family; /* address family */
unsigned char sat_port; /* port */
diff --git a/man7/environ.7 b/man7/environ.7
index 2c9a8a94f..345b350b4 100644
--- a/man7/environ.7
+++ b/man7/environ.7
@@ -12,7 +12,7 @@
.\" Modified Wed Jan 24 06:37:24 2001 by Eric S. Raymond (esr@thyrsus.com)
.\" Modified Thu Dec 13 23:53:27 2001 by Martin Schulze <joey@infodrom.org>
.\"
-.TH environ 7 2023-02-05 "Linux man-pages 6.03"
+.TH environ 7 2023-02-05 "Linux man-pages 6.05.01"
.SH NAME
environ \- user environment
.SH SYNOPSIS
diff --git a/man7/epoll.7 b/man7/epoll.7
index bc101b799..02a53e97f 100644
--- a/man7/epoll.7
+++ b/man7/epoll.7
@@ -4,7 +4,7 @@
.\"
.\" Davide Libenzi <davidel@xmailserver.org>
.\"
-.TH epoll 7 2023-02-05 "Linux man-pages 6.03"
+.TH epoll 7 2023-05-03 "Linux man-pages 6.05.01"
.SH NAME
epoll \- I/O event notification facility
.SH SYNOPSIS
@@ -290,30 +290,30 @@ from where it stopped before.
#define MAX_EVENTS 10
struct epoll_event ev, events[MAX_EVENTS];
int listen_sock, conn_sock, nfds, epollfd;
-
+\&
/* Code to set up listening socket, \[aq]listen_sock\[aq],
(socket(), bind(), listen()) omitted. */
-
+\&
epollfd = epoll_create1(0);
if (epollfd == \-1) {
perror("epoll_create1");
exit(EXIT_FAILURE);
}
-
+\&
ev.events = EPOLLIN;
ev.data.fd = listen_sock;
if (epoll_ctl(epollfd, EPOLL_CTL_ADD, listen_sock, &ev) == \-1) {
perror("epoll_ctl: listen_sock");
exit(EXIT_FAILURE);
}
-
+\&
for (;;) {
nfds = epoll_wait(epollfd, events, MAX_EVENTS, \-1);
if (nfds == \-1) {
perror("epoll_wait");
exit(EXIT_FAILURE);
}
-
+\&
for (n = 0; n < nfds; ++n) {
if (events[n].data.fd == listen_sock) {
conn_sock = accept(listen_sock,
@@ -574,20 +574,18 @@ event for file descriptor 13 in your batch processing,
you will discover the file descriptor had been
previously removed and there will be no confusion.
.SH VERSIONS
-The
-.B epoll
-API was introduced in Linux kernel 2.5.44.
-.\" Its interface should be finalized in Linux kernel 2.5.66.
-Support was added in glibc 2.3.2.
-.SH STANDARDS
-The
-.B epoll
-API is Linux-specific.
-Some other systems provide similar
-mechanisms, for example, FreeBSD has
+Some other systems provide similar mechanisms;
+for example,
+FreeBSD has
.IR kqueue ,
and Solaris has
.IR /dev/poll .
+.SH STANDARDS
+Linux.
+.SH HISTORY
+Linux 2.5.44.
+.\" Its interface should be finalized in Linux 2.5.66.
+glibc 2.3.2.
.SH NOTES
The set of file descriptors that is being monitored via
an epoll file descriptor can be viewed via the entry for
diff --git a/man7/fanotify.7 b/man7/fanotify.7
index d60c42b65..eea8835ec 100644
--- a/man7/fanotify.7
+++ b/man7/fanotify.7
@@ -2,7 +2,7 @@
.\" and Copyright (C) 2014, Michael Kerrisk <mtk.manpages@gmail.com>
.\"
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
-.TH fanotify 7 2023-02-05 "Linux man-pages 6.03"
+.TH fanotify 7 2023-05-03 "Linux man-pages 6.05.01"
.SH NAME
fanotify \- monitoring filesystem events
.SH DESCRIPTION
@@ -815,7 +815,7 @@ Upon
outstanding permission events will be set to allowed.
.SS /proc interfaces
The file
-.I /proc/[pid]/fdinfo/[fd]
+.IR /proc/ pid /fdinfo/ fd
contains information about fanotify marks for file descriptor
.I fd
of process
@@ -906,12 +906,12 @@ The file descriptor
in the response structure is not valid.
This may occur when a response for the permission event has already been
written.
-.SH VERSIONS
+.SH STANDARDS
+Linux.
+.SH HISTORY
The fanotify API was introduced in Linux 2.6.36 and
enabled in Linux 2.6.37.
-Fdinfo support was added in Linux 3.8.
-.SH STANDARDS
-The fanotify API is Linux-specific.
+fdinfo support was added in Linux 3.8.
.SH NOTES
The fanotify API is available only if the kernel was built with the
.B CONFIG_FANOTIFY
@@ -1030,7 +1030,7 @@ Press enter key to terminate.
Listening for events.
FAN_OPEN_PERM: File /home/user/temp/notes
FAN_CLOSE_WRITE: File /home/user/temp/notes
-
+\&
Listening for events stopped.
.EE
.in
@@ -1046,9 +1046,9 @@ Listening for events stopped.
#include <stdlib.h>
#include <sys/fanotify.h>
#include <unistd.h>
-
+\&
/* Read all available fanotify events from the file descriptor \[aq]fd\[aq]. */
-
+\&
static void
handle_events(int fd)
{
@@ -1059,65 +1059,65 @@ handle_events(int fd)
ssize_t path_len;
char procfd_path[PATH_MAX];
struct fanotify_response response;
-
+\&
/* Loop while events can be read from fanotify file descriptor. */
-
+\&
for (;;) {
-
+\&
/* Read some events. */
-
+\&
len = read(fd, buf, sizeof(buf));
if (len == \-1 && errno != EAGAIN) {
perror("read");
exit(EXIT_FAILURE);
}
-
+\&
/* Check if end of available data reached. */
-
+\&
if (len <= 0)
break;
-
+\&
/* Point to the first event in the buffer. */
-
+\&
metadata = buf;
-
+\&
/* Loop over all events in the buffer. */
-
+\&
while (FAN_EVENT_OK(metadata, len)) {
-
+\&
/* Check that run\-time and compile\-time structures match. */
-
+\&
if (metadata\->vers != FANOTIFY_METADATA_VERSION) {
fprintf(stderr,
"Mismatch of fanotify metadata version.\en");
exit(EXIT_FAILURE);
}
-
+\&
/* metadata\->fd contains either FAN_NOFD, indicating a
queue overflow, or a file descriptor (a nonnegative
integer). Here, we simply ignore queue overflow. */
-
+\&
if (metadata\->fd >= 0) {
-
+\&
/* Handle open permission event. */
-
+\&
if (metadata\->mask & FAN_OPEN_PERM) {
printf("FAN_OPEN_PERM: ");
-
+\&
/* Allow file to be opened. */
-
+\&
response.fd = metadata\->fd;
response.response = FAN_ALLOW;
write(fd, &response, sizeof(response));
}
-
+\&
/* Handle closing of writable file event. */
-
+\&
if (metadata\->mask & FAN_CLOSE_WRITE)
printf("FAN_CLOSE_WRITE: ");
-
+\&
/* Retrieve and print pathname of the accessed file. */
-
+\&
snprintf(procfd_path, sizeof(procfd_path),
"/proc/self/fd/%d", metadata\->fd);
path_len = readlink(procfd_path, path,
@@ -1126,22 +1126,22 @@ handle_events(int fd)
perror("readlink");
exit(EXIT_FAILURE);
}
-
+\&
path[path_len] = \[aq]\e0\[aq];
printf("File %s\en", path);
-
+\&
/* Close the file descriptor of the event. */
-
+\&
close(metadata\->fd);
}
-
+\&
/* Advance to next event. */
-
+\&
metadata = FAN_EVENT_NEXT(metadata, len);
}
}
}
-
+\&
int
main(int argc, char *argv[])
{
@@ -1149,80 +1149,80 @@ main(int argc, char *argv[])
int fd, poll_num;
nfds_t nfds;
struct pollfd fds[2];
-
+\&
/* Check mount point is supplied. */
-
+\&
if (argc != 2) {
fprintf(stderr, "Usage: %s MOUNT\en", argv[0]);
exit(EXIT_FAILURE);
}
-
+\&
printf("Press enter key to terminate.\en");
-
+\&
/* Create the file descriptor for accessing the fanotify API. */
-
+\&
fd = fanotify_init(FAN_CLOEXEC | FAN_CLASS_CONTENT | FAN_NONBLOCK,
O_RDONLY | O_LARGEFILE);
if (fd == \-1) {
perror("fanotify_init");
exit(EXIT_FAILURE);
}
-
+\&
/* Mark the mount for:
\- permission events before opening files
\- notification events after closing a write\-enabled
file descriptor. */
-
+\&
if (fanotify_mark(fd, FAN_MARK_ADD | FAN_MARK_MOUNT,
FAN_OPEN_PERM | FAN_CLOSE_WRITE, AT_FDCWD,
argv[1]) == \-1) {
perror("fanotify_mark");
exit(EXIT_FAILURE);
}
-
+\&
/* Prepare for polling. */
-
+\&
nfds = 2;
-
+\&
fds[0].fd = STDIN_FILENO; /* Console input */
fds[0].events = POLLIN;
-
+\&
fds[1].fd = fd; /* Fanotify input */
fds[1].events = POLLIN;
-
+\&
/* This is the loop to wait for incoming events. */
-
+\&
printf("Listening for events.\en");
-
+\&
while (1) {
poll_num = poll(fds, nfds, \-1);
if (poll_num == \-1) {
if (errno == EINTR) /* Interrupted by a signal */
continue; /* Restart poll() */
-
+\&
perror("poll"); /* Unexpected error */
exit(EXIT_FAILURE);
}
-
+\&
if (poll_num > 0) {
if (fds[0].revents & POLLIN) {
-
+\&
/* Console input is available: empty stdin and quit. */
-
+\&
while (read(STDIN_FILENO, &buf, 1) > 0 && buf != \[aq]\en\[aq])
continue;
break;
}
-
+\&
if (fds[1].revents & POLLIN) {
-
+\&
/* Fanotify events are available. */
-
+\&
handle_events(fd);
}
}
}
-
+\&
printf("Listening for events stopped.\en");
exit(EXIT_SUCCESS);
}
@@ -1263,7 +1263,7 @@ FAN_CREATE (file created):
Directory /home/user has been modified.
Entry \[aq]testfile.txt\[aq] is not a subdirectory.
All events processed successfully. Program exiting.
-
+\&
$ \fBtouch /home/user/testfile.txt\fP # In another terminal
.EE
.in
@@ -1286,7 +1286,7 @@ FAN_CREATE | FAN_ONDIR (subdirectory created):
Directory /home/user has been modified.
Entry \[aq]testdir\[aq] is a subdirectory.
All events processed successfully. Program exiting.
-
+\&
$ \fBmkdir \-p /home/user/testdir\fP # In another terminal
.EE
.in
@@ -1303,9 +1303,9 @@ $ \fBmkdir \-p /home/user/testdir\fP # In another terminal
#include <sys/stat.h>
#include <sys/fanotify.h>
#include <unistd.h>
-
+\&
#define BUF_SIZE 256
-
+\&
int
main(int argc, char *argv[])
{
@@ -1319,31 +1319,30 @@ main(int argc, char *argv[])
struct fanotify_event_info_fid *fid;
const char *file_name;
struct stat sb;
-
+\&
if (argc != 2) {
fprintf(stderr, "Invalid number of command line arguments.\en");
exit(EXIT_FAILURE);
}
-
+\&
mount_fd = open(argv[1], O_DIRECTORY | O_RDONLY);
if (mount_fd == \-1) {
perror(argv[1]);
exit(EXIT_FAILURE);
}
-
-
+\&
/* Create an fanotify file descriptor with FAN_REPORT_DFID_NAME as
a flag so that program can receive fid events with directory
entry name. */
-
+\&
fd = fanotify_init(FAN_CLASS_NOTIF | FAN_REPORT_DFID_NAME, 0);
if (fd == \-1) {
perror("fanotify_init");
exit(EXIT_FAILURE);
}
-
+\&
/* Place a mark on the filesystem object supplied in argv[1]. */
-
+\&
ret = fanotify_mark(fd, FAN_MARK_ADD | FAN_MARK_ONLYDIR,
FAN_CREATE | FAN_ONDIR,
AT_FDCWD, argv[1]);
@@ -1351,27 +1350,27 @@ main(int argc, char *argv[])
perror("fanotify_mark");
exit(EXIT_FAILURE);
}
-
+\&
printf("Listening for events.\en");
-
+\&
/* Read events from the event queue into a buffer. */
-
+\&
len = read(fd, events_buf, sizeof(events_buf));
if (len == \-1 && errno != EAGAIN) {
perror("read");
exit(EXIT_FAILURE);
}
-
+\&
/* Process all events within the buffer. */
-
+\&
for (metadata = (struct fanotify_event_metadata *) events_buf;
FAN_EVENT_OK(metadata, len);
metadata = FAN_EVENT_NEXT(metadata, len)) {
fid = (struct fanotify_event_info_fid *) (metadata + 1);
file_handle = (struct file_handle *) fid\->handle;
-
+\&
/* Ensure that the event info is of the correct type. */
-
+\&
if (fid\->hdr.info_type == FAN_EVENT_INFO_TYPE_FID ||
fid\->hdr.info_type == FAN_EVENT_INFO_TYPE_DFID) {
file_name = NULL;
@@ -1382,13 +1381,13 @@ main(int argc, char *argv[])
fprintf(stderr, "Received unexpected event info type.\en");
exit(EXIT_FAILURE);
}
-
+\&
if (metadata\->mask == FAN_CREATE)
printf("FAN_CREATE (file created):\en");
-
+\&
if (metadata\->mask == (FAN_CREATE | FAN_ONDIR))
printf("FAN_CREATE | FAN_ONDIR (subdirectory created):\en");
-
+\&
/* metadata\->fd is set to FAN_NOFD when the group identifies
objects by file handles. To obtain a file descriptor for
the file object corresponding to an event you can use the
@@ -1397,7 +1396,7 @@ main(int argc, char *argv[])
open_by_handle_at(2) system call. A check for ESTALE is
done to accommodate for the situation where the file handle
for the object was deleted prior to this system call. */
-
+\&
event_fd = open_by_handle_at(mount_fd, file_handle, O_RDONLY);
if (event_fd == \-1) {
if (errno == ESTALE) {
@@ -1409,21 +1408,21 @@ main(int argc, char *argv[])
exit(EXIT_FAILURE);
}
}
-
+\&
snprintf(procfd_path, sizeof(procfd_path), "/proc/self/fd/%d",
event_fd);
-
+\&
/* Retrieve and print the path of the modified dentry. */
-
+\&
path_len = readlink(procfd_path, path, sizeof(path) \- 1);
if (path_len == \-1) {
perror("readlink");
exit(EXIT_FAILURE);
}
-
+\&
path[path_len] = \[aq]\e0\[aq];
printf("\etDirectory \[aq]%s\[aq] has been modified.\en", path);
-
+\&
if (file_name) {
ret = fstatat(event_fd, file_name, &sb, 0);
if (ret == \-1) {
@@ -1439,12 +1438,12 @@ main(int argc, char *argv[])
file_name);
}
}
-
+\&
/* Close associated file descriptor for this event. */
-
+\&
close(event_fd);
}
-
+\&
printf("All events processed successfully. Program exiting.\en");
exit(EXIT_SUCCESS);
}
diff --git a/man7/feature_test_macros.7 b/man7/feature_test_macros.7
index fa76bbeab..4e264d8c6 100644
--- a/man7/feature_test_macros.7
+++ b/man7/feature_test_macros.7
@@ -2,7 +2,7 @@
.\"
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
-.TH feature_test_macros 7 2023-02-05 "Linux man-pages 6.03"
+.TH feature_test_macros 7 2023-07-15 "Linux man-pages 6.05.01"
.SH NAME
feature_test_macros \- feature test macros
.SH DESCRIPTION
@@ -113,15 +113,16 @@ feature test macro requirements (this example from
.RS +4
.EX
.B #define _GNU_SOURCE
+.B #define _FILE_OFFSET_BITS 64
.B #include <fcntl.h>
.PP
-.BI "ssize_t readahead(int " fd ", off64_t *" offset ", size_t " count );
+.BI "ssize_t readahead(int " fd ", off_t *" offset ", size_t " count );
.EE
.RE
.PP
-This format is employed in cases where only a single
-feature test macro can be used to expose the function
-declaration, and that macro is not defined by default.
+This format is employed when the feature test macros ensure
+that the proper function declarations are visible,
+and the macros are not defined by default.
.SS Feature test macros understood by glibc
The paragraphs below explain how feature test macros are handled
in glibc 2.\fIx\fP,
@@ -406,6 +407,9 @@ related to file I/O and filesystem operations into references to
their 64-bit counterparts.
This is useful for performing I/O on large files (> 2 Gigabytes)
on 32-bit systems.
+It is also useful when calling functions like
+.BR copy_file_range (2)
+that were added more recently and that come only in 64-bit flavors.
(Defining this macro permits correctly written programs to use
large files with only a recompilation being required.)
.IP
@@ -655,15 +659,15 @@ For example, a program where
size argument is variable
can now be fortified.
.IP
-Use of this macro requires compiler support, available with
-.BR gcc (1)
-since glibc 4.0.
-.IP
+Use of this macro requires compiler support, available since
+gcc 4.0 and clang 2.6.
Use of
.B _FORTIFY_SOURCE
-set to 3 requires
-.BR gcc (1)
-version 12.0 or later.
+set to 3 requires gcc 12.0 or later, or clang 9.0 or later,
+in conjunction with glibc 2.33 or later.
+.\" glibc is not an absolute requirement (gcc has libssp; NetBSD/newlib
+.\" and Darwin each have their own implementation), but let's keep it
+.\" simple.
.SS Default definitions, implicit definitions, and combining definitions
If no feature test macros are explicitly defined,
then the following feature test macros are defined by default:
@@ -765,8 +769,6 @@ POSIX.1 specifies
and
.BR _XOPEN_SOURCE .
.PP
-.B _XOPEN_SOURCE_EXTENDED
-was specified by XPG4v2 (aka SUSv1), but is not present in SUSv2 and later.
.B _FILE_OFFSET_BITS
is not specified by any standard,
but is employed on some other implementations.
@@ -780,7 +782,10 @@ but is employed on some other implementations.
.BR _REENTRANT ,
and
.B _THREAD_SAFE
-are specific to Linux (glibc).
+are specific to glibc.
+.SH HISTORY
+.B _XOPEN_SOURCE_EXTENDED
+was specified by XPG4v2 (aka SUSv1), but is not present in SUSv2 and later.
.SH NOTES
.I <features.h>
is a Linux/glibc-specific header file.
@@ -839,84 +844,84 @@ _GNU_SOURCE defined
\&
.EX
/* ftm.c */
-
+\&
#include <stdint.h>
#include <stdio.h>
#include <unistd.h>
#include <stdlib.h>
-
+\&
int
main(int argc, char *argv[])
{
#ifdef _POSIX_SOURCE
printf("_POSIX_SOURCE defined\en");
#endif
-
+\&
#ifdef _POSIX_C_SOURCE
printf("_POSIX_C_SOURCE defined: %jdL\en",
(intmax_t) _POSIX_C_SOURCE);
#endif
-
+\&
#ifdef _ISOC99_SOURCE
printf("_ISOC99_SOURCE defined\en");
#endif
-
+\&
#ifdef _ISOC11_SOURCE
printf("_ISOC11_SOURCE defined\en");
#endif
-
+\&
#ifdef _XOPEN_SOURCE
printf("_XOPEN_SOURCE defined: %d\en", _XOPEN_SOURCE);
#endif
-
+\&
#ifdef _XOPEN_SOURCE_EXTENDED
printf("_XOPEN_SOURCE_EXTENDED defined\en");
#endif
-
+\&
#ifdef _LARGEFILE64_SOURCE
printf("_LARGEFILE64_SOURCE defined\en");
#endif
-
+\&
#ifdef _FILE_OFFSET_BITS
printf("_FILE_OFFSET_BITS defined: %d\en", _FILE_OFFSET_BITS);
#endif
-
+\&
#ifdef _TIME_BITS
printf("_TIME_BITS defined: %d\en", _TIME_BITS);
#endif
-
+\&
#ifdef _BSD_SOURCE
printf("_BSD_SOURCE defined\en");
#endif
-
+\&
#ifdef _SVID_SOURCE
printf("_SVID_SOURCE defined\en");
#endif
-
+\&
#ifdef _DEFAULT_SOURCE
printf("_DEFAULT_SOURCE defined\en");
#endif
-
+\&
#ifdef _ATFILE_SOURCE
printf("_ATFILE_SOURCE defined\en");
#endif
-
+\&
#ifdef _GNU_SOURCE
printf("_GNU_SOURCE defined\en");
#endif
-
+\&
#ifdef _REENTRANT
printf("_REENTRANT defined\en");
#endif
-
+\&
#ifdef _THREAD_SAFE
printf("_THREAD_SAFE defined\en");
#endif
-
+\&
#ifdef _FORTIFY_SOURCE
printf("_FORTIFY_SOURCE defined\en");
#endif
-
+\&
exit(EXIT_SUCCESS);
}
.EE
diff --git a/man7/fifo.7 b/man7/fifo.7
index ae0bfea82..f27dcc761 100644
--- a/man7/fifo.7
+++ b/man7/fifo.7
@@ -1,15 +1,10 @@
-.\" This man page is Copyright (C) 1999 Claus Fischer.
+.\" SPDX-License-Identifier: Linux-man-pages-1-para
.\"
-.\" %%%LICENSE_START(VERBATIM_ONE_PARA)
-.\" Permission is granted to distribute possibly modified copies
-.\" of this page provided the header is included verbatim,
-.\" and in case of nontrivial modification author and date
-.\" of the modification is added to the header.
-.\" %%%LICENSE_END
+.\" This man page is Copyright (C) 1999 Claus Fischer.
.\"
.\" 990620 - page created - aeb@cwi.nl
.\"
-.TH fifo 7 2023-02-05 "Linux man-pages 6.03"
+.TH fifo 7 2023-07-15 "Linux man-pages 6.05.01"
.SH NAME
fifo \- first-in first-out special file, named pipe
.SH DESCRIPTION
diff --git a/man7/futex.7 b/man7/futex.7
index 8dda8e4b6..233933b9a 100644
--- a/man7/futex.7
+++ b/man7/futex.7
@@ -6,7 +6,7 @@
.\"
.\" SPDX-License-Identifier: MIT
.\"
-.TH futex 7 2022-10-30 "Linux man-pages 6.03"
+.TH futex 7 2022-10-30 "Linux man-pages 6.05.01"
.SH NAME
futex \- fast user-space locking
.SH SYNOPSIS
diff --git a/man7/glob.7 b/man7/glob.7
index 80e306508..466701ce7 100644
--- a/man7/glob.7
+++ b/man7/glob.7
@@ -4,7 +4,7 @@
.\"
.\" 2003-08-24 fix for / by John Kristoff + joey
.\"
-.TH glob 7 2023-02-05 "Linux man-pages 6.03"
+.TH glob 7 2023-03-08 "Linux man-pages 6.05.01"
.SH NAME
glob \- globbing pathnames
.SH DESCRIPTION
@@ -46,14 +46,15 @@ three characters \[aq][\[aq], \[aq]]\[aq], and \[aq]!\[aq].)
.PP
There is one special convention:
two characters separated by \[aq]\-\[aq] denote a range.
-(Thus, "\fI[A\-Fa\-f0\-9]\fP"
-is equivalent to "\fI[ABCDEFabcdef0123456789]\fP".)
-One may include \[aq]\-\[aq] in its literal meaning by making it the
-first or last character between the brackets.
-(Thus, "\fI[]\-]\fP" matches just the two characters \[aq]]\[aq] and \[aq]\-\[aq],
+(Thus,
+"\fI[A\-Fa\-f0\-9]\fP" is equivalent to "\fI[ABCDEFabcdef0123456789]\fP".)
+One may include \[aq]\-\[aq] in its literal meaning
+by making it the first or last character between the brackets.
+(Thus,
+"\fI[]\-]\fP" matches just the two characters \[aq]]\[aq] and \[aq]\-\[aq],
and "\fI[\-\-0]\fP" matches the
-three characters \[aq]\-\[aq], \[aq].\[aq], \[aq]0\[aq], since \[aq]/\[aq]
-cannot be matched.)
+three characters \[aq]\-\[aq], \[aq].\[aq], and \[aq]0\[aq],
+since \[aq]/\[aq] cannot be matched.)
.PP
.B Complementation
.PP
@@ -63,9 +64,11 @@ by removing the first \[aq]!\[aq] from it.
(Thus, "\fI[!]a\-]\fP" matches any
single character except \[aq]]\[aq], \[aq]a\[aq], and \[aq]\-\[aq].)
.PP
-One can remove the special meaning of \[aq]?\[aq], \[aq]*\[aq], and \[aq][\[aq] by
-preceding them by a backslash, or, in case this is part of
-a shell command line, enclosing them in quotes.
+One can remove the special meaning of \[aq]?\[aq], \[aq]*\[aq], and \[aq][\[aq]
+by preceding them by a backslash,
+or,
+in case this is part of a shell command line,
+enclosing them in quotes.
Between brackets these characters stand for themselves.
Thus, "\fI[[?*\e]\fP" matches the
four characters \[aq][\[aq], \[aq]?\[aq], \[aq]*\[aq], and \[aq]\e\[aq].
diff --git a/man7/hier.7 b/man7/hier.7
index 9ea463dff..314d28a95 100644
--- a/man7/hier.7
+++ b/man7/hier.7
@@ -8,7 +8,7 @@
.\" Modified Mon Feb 6 16:41:00 1999 by Nicolás Lichtmaier <nick@debian.org>
.\" Modified Tue Feb 8 16:46:45 2000 by Chris Pepper <pepper@tgg.com>
.\" Modified Fri Sep 7 20:32:45 2001 by Tammy Fox <tfox@redhat.com>
-.TH hier 7 2022-10-30 "Linux man-pages 6.03"
+.TH hier 7 2023-04-18 "Linux man-pages 6.05.01"
.SH NAME
hier \- description of the filesystem hierarchy
.SH DESCRIPTION
@@ -273,7 +273,7 @@ and
point at a random kernel tree.
Debian systems don't do this
and use headers from a known good kernel
-version, provided in the libc*-dev package.)
+version, provided in the libc*\-dev package.)
.TP
.I /usr/include/g++
Include files to use with the GNU C++ compiler.
@@ -293,7 +293,7 @@ These directories are variants of
.I /usr/lib
on system which support more than one binary format requiring separate
libraries, except that the symbolic link
-.I /usr/lib<qual>/X11
+.IR /usr/lib qual /X11
is not required (optional).
.TP
.I /usr/lib/X11
@@ -404,7 +404,7 @@ Locale information goes here (optional).
.I /usr/share/man
Manual pages go here in subdirectories according to the man page sections.
.TP
-.I /usr/share/man/<locale>/man[1\-9]
+.IR /usr/share/man/ locale /man[1\-9]
These directories contain manual pages for the
specific locale in source code form.
Systems which use a unique language and code set for all manual pages
@@ -637,9 +637,10 @@ this directory holds temporary files stored for an unspecified duration.
Database files for NIS,
formerly known as the Sun Yellow Pages (YP).
.SH STANDARDS
-The Filesystem Hierarchy Standard (FHS), Version 3.0, published March 19, 2015
.UR https://refspecs.linuxfoundation.org/fhs.shtml
-.UE .
+The Filesystem Hierarchy Standard (FHS), Version 3.0
+.UE ,
+published March 19, 2015
.SH BUGS
This list is not exhaustive;
different distributions and systems may be configured differently.
diff --git a/man7/hostname.7 b/man7/hostname.7
index 947068276..60940ba01 100644
--- a/man7/hostname.7
+++ b/man7/hostname.7
@@ -8,7 +8,7 @@
.\"
.\" 2008-06-11, mtk, Taken from FreeBSD 6.2 and modified for Linux.
.\"
-.TH hostname 7 2022-10-30 "Linux man-pages 6.03"
+.TH hostname 7 2022-10-30 "Linux man-pages 6.05.01"
.SH NAME
hostname \- hostname resolution description
.SH DESCRIPTION
diff --git a/man7/icmp.7 b/man7/icmp.7
index 5a4e84665..cd54614de 100644
--- a/man7/icmp.7
+++ b/man7/icmp.7
@@ -1,16 +1,11 @@
'\" t
-.\" This man page is Copyright (C) 1999 Andi Kleen <ak@muc.de>.
+.\" SPDX-License-Identifier: Linux-man-pages-1-para
.\"
-.\" %%%LICENSE_START(VERBATIM_ONE_PARA)
-.\" Permission is granted to distribute possibly modified copies
-.\" of this page provided the header is included verbatim,
-.\" and in case of nontrivial modification author and date
-.\" of the modification is added to the header.
-.\" %%%LICENSE_END
+.\" This man page is Copyright (C) 1999 Andi Kleen <ak@muc.de>.
.\"
.\" $Id: icmp.7,v 1.6 2000/08/14 08:03:45 ak Exp $
.\"
-.TH icmp 7 2022-12-15 "Linux man-pages 6.03"
+.TH icmp 7 2023-07-15 "Linux man-pages 6.05.01"
.SH NAME
icmp \- Linux IPv4 ICMP kernel module.
.SH DESCRIPTION
diff --git a/man7/inode.7 b/man7/inode.7
index 307c62d8c..3cbdeeead 100644
--- a/man7/inode.7
+++ b/man7/inode.7
@@ -3,7 +3,7 @@
.\"
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
-.TH inode 7 2023-02-05 "Linux man-pages 6.03"
+.TH inode 7 2023-07-30 "Linux man-pages 6.05.01"
.SH NAME
inode \- file inode information
.SH DESCRIPTION
@@ -345,8 +345,6 @@ the file mode component of the
.I st_mode
field:
.in +4n
-.nh
-.ad l
.TS
lB l lx.
S_ISUID 04000 T{
@@ -398,8 +396,6 @@ S_IXOTH 00001 T{
others have execute permission
T}
.TE
-.ad
-.hy
.in
.PP
The set-group-ID bit
@@ -426,17 +422,9 @@ in that directory can be renamed or deleted only by the owner
of the file, by the owner of the directory, and by a privileged
process.
.SH STANDARDS
-If you need to obtain the definition of the
-.I blkcnt_t
-or
-.I blksize_t
-types from
-.IR <sys/stat.h> ,
-then define
-.B _XOPEN_SOURCE
-with the value 500 or greater (before including
-.I any
-header files).
+POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001.
.PP
POSIX.1-1990 did not describe the
.BR S_IFMT ,
@@ -453,16 +441,13 @@ constants, but instead specified the use of
the macros
.BR S_ISDIR ()
and so on.
-The
-.B S_IF*
-constants are present in POSIX.1-2001 and later.
.PP
The
.BR S_ISLNK ()
and
.BR S_ISSOCK ()
macros were not in
-POSIX.1-1996, but both are present in POSIX.1-2001;
+POSIX.1-1996;
the former is from SVID 4, the latter from SUSv2.
.PP
UNIX\ V7 (and later systems) had
diff --git a/man7/inotify.7 b/man7/inotify.7
index 1f555a438..73a6ab05b 100644
--- a/man7/inotify.7
+++ b/man7/inotify.7
@@ -3,7 +3,7 @@
.\"
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
-.TH inotify 7 2023-02-05 "Linux man-pages 6.03"
+.TH inotify 7 2023-07-08 "Linux man-pages 6.05.01"
.SH NAME
inotify \- monitoring filesystem events
.SH DESCRIPTION
@@ -90,7 +90,7 @@ struct inotify_event {
.\" FIXME . The type of the 'wd' field should probably be "int32_t".
.\" I submitted a patch to fix this. See the LKML thread
.\" "[patch] Fix type errors in inotify interfaces", 18 Nov 2008
-.\" glibc bug filed: http://sources.redhat.com/bugzilla/show_bug.cgi?id=7040
+.\" glibc bug filed: https://www.sourceware.org/bugzilla/show_bug.cgi?id=7040
uint32_t mask; /* Mask describing event */
uint32_t cookie; /* Unique cookie associating related
events (for rename(2)) */
@@ -126,8 +126,8 @@ field is present only when an event is returned
for a file inside a watched directory;
it identifies the filename within the watched directory.
This filename is null-terminated,
-and may include further null bytes (\[aq]\e0\[aq]) to align subsequent reads to a
-suitable address boundary.
+and may include further null bytes (\[aq]\e0\[aq])
+to align subsequent reads to a suitable address boundary.
.PP
The
.I len
@@ -575,7 +575,9 @@ that can be created per real user ID.
.I /proc/sys/fs/inotify/max_user_watches
This specifies an upper limit on the number of watches
that can be created per real user ID.
-.SH VERSIONS
+.SH STANDARDS
+Linux.
+.SH HISTORY
Inotify was merged into Linux 2.6.13.
The required library interfaces were added in glibc 2.4.
.RB ( IN_DONT_FOLLOW ,
@@ -583,8 +585,6 @@ The required library interfaces were added in glibc 2.4.
and
.B IN_ONLYDIR
were added in glibc 2.5.)
-.SH STANDARDS
-The inotify API is Linux-specific.
.SH NOTES
Inotify file descriptors can be monitored using
.BR select (2),
@@ -838,7 +838,7 @@ that contains it is unmounted),
any pending unread events for that watch descriptor remain available to read.
As watch descriptors are subsequently allocated with
.BR inotify_add_watch (2),
-the kernel cycles through the range of possible watch descriptors (0 to
+the kernel cycles through the range of possible watch descriptors (1 to
.BR INT_MAX )
incrementally.
When allocating a free watch descriptor, no check is made to see whether that
@@ -893,7 +893,7 @@ IN_OPEN: /home/user/temp/foo [file]
IN_CLOSE_WRITE: /home/user/temp/foo [file]
IN_OPEN: /tmp/ [directory]
IN_CLOSE_NOWRITE: /tmp/ [directory]
-
+\&
Listening for events stopped.
.EE
.in
@@ -907,13 +907,13 @@ Listening for events stopped.
#include <sys/inotify.h>
#include <unistd.h>
#include <string.h>
-
+\&
/* Read all available inotify events from the file descriptor \[aq]fd\[aq].
wd is the table of watch descriptors for the directories in argv.
argc is the length of wd and argv.
argv is the list of watched directories.
Entry 0 of wd and argv is unused. */
-
+\&
static void
handle_events(int fd, int *wd, int argc, char* argv[])
{
@@ -922,63 +922,63 @@ handle_events(int fd, int *wd, int argc, char* argv[])
decrease performance. Hence, the buffer used for reading from
the inotify file descriptor should have the same alignment as
struct inotify_event. */
-
+\&
char buf[4096]
__attribute__ ((aligned(__alignof__(struct inotify_event))));
const struct inotify_event *event;
ssize_t len;
-
+\&
/* Loop while events can be read from inotify file descriptor. */
-
+\&
for (;;) {
-
+\&
/* Read some events. */
-
+\&
len = read(fd, buf, sizeof(buf));
if (len == \-1 && errno != EAGAIN) {
perror("read");
exit(EXIT_FAILURE);
}
-
+\&
/* If the nonblocking read() found no events to read, then
it returns \-1 with errno set to EAGAIN. In that case,
we exit the loop. */
-
+\&
if (len <= 0)
break;
-
+\&
/* Loop over all events in the buffer. */
-
+\&
for (char *ptr = buf; ptr < buf + len;
ptr += sizeof(struct inotify_event) + event\->len) {
-
+\&
event = (const struct inotify_event *) ptr;
-
+\&
/* Print event type. */
-
+\&
if (event\->mask & IN_OPEN)
printf("IN_OPEN: ");
if (event\->mask & IN_CLOSE_NOWRITE)
printf("IN_CLOSE_NOWRITE: ");
if (event\->mask & IN_CLOSE_WRITE)
printf("IN_CLOSE_WRITE: ");
-
+\&
/* Print the name of the watched directory. */
-
+\&
for (size_t i = 1; i < argc; ++i) {
if (wd[i] == event\->wd) {
printf("%s/", argv[i]);
break;
}
}
-
+\&
/* Print the name of the file. */
-
+\&
if (event\->len)
printf("%s", event\->name);
-
+\&
/* Print type of filesystem object. */
-
+\&
if (event\->mask & IN_ISDIR)
printf(" [directory]\en");
else
@@ -986,7 +986,7 @@ handle_events(int fd, int *wd, int argc, char* argv[])
}
}
}
-
+\&
int
main(int argc, char* argv[])
{
@@ -995,34 +995,34 @@ main(int argc, char* argv[])
int *wd;
nfds_t nfds;
struct pollfd fds[2];
-
+\&
if (argc < 2) {
printf("Usage: %s PATH [PATH ...]\en", argv[0]);
exit(EXIT_FAILURE);
}
-
+\&
printf("Press ENTER key to terminate.\en");
-
+\&
/* Create the file descriptor for accessing the inotify API. */
-
+\&
fd = inotify_init1(IN_NONBLOCK);
if (fd == \-1) {
perror("inotify_init1");
exit(EXIT_FAILURE);
}
-
+\&
/* Allocate memory for watch descriptors. */
-
+\&
wd = calloc(argc, sizeof(int));
if (wd == NULL) {
perror("calloc");
exit(EXIT_FAILURE);
}
-
+\&
/* Mark directories for events
\- file was opened
\- file was closed */
-
+\&
for (i = 1; i < argc; i++) {
wd[i] = inotify_add_watch(fd, argv[i],
IN_OPEN | IN_CLOSE);
@@ -1032,19 +1032,19 @@ main(int argc, char* argv[])
exit(EXIT_FAILURE);
}
}
-
+\&
/* Prepare for polling. */
-
+\&
nfds = 2;
-
+\&
fds[0].fd = STDIN_FILENO; /* Console input */
fds[0].events = POLLIN;
-
+\&
fds[1].fd = fd; /* Inotify input */
fds[1].events = POLLIN;
-
+\&
/* Wait for events and/or terminal input. */
-
+\&
printf("Listening for events.\en");
while (1) {
poll_num = poll(fds, nfds, \-1);
@@ -1054,33 +1054,33 @@ main(int argc, char* argv[])
perror("poll");
exit(EXIT_FAILURE);
}
-
+\&
if (poll_num > 0) {
-
+\&
if (fds[0].revents & POLLIN) {
-
+\&
/* Console input is available. Empty stdin and quit. */
-
+\&
while (read(STDIN_FILENO, &buf, 1) > 0 && buf != \[aq]\en\[aq])
continue;
break;
}
-
+\&
if (fds[1].revents & POLLIN) {
-
+\&
/* Inotify events are available. */
-
+\&
handle_events(fd, wd, argc, argv);
}
}
}
-
+\&
printf("Listening for events stopped.\en");
-
+\&
/* Close inotify file descriptor. */
-
+\&
close(fd);
-
+\&
free(wd);
exit(EXIT_SUCCESS);
}
diff --git a/man7/intro.7 b/man7/intro.7
index 19a3eb4cb..e12ff9d05 100644
--- a/man7/intro.7
+++ b/man7/intro.7
@@ -6,7 +6,7 @@
.\"
.\" Modified by Thomas Koenig (ig25@rz.uni-karlsruhe.de) 24 Apr 1993
.\" Modified Sat Jul 24 17:28:08 1993 by Rik Faith (faith@cs.unc.edu)
-.TH intro 7 2022-10-30 "Linux man-pages 6.03"
+.TH intro 7 2022-10-30 "Linux man-pages 6.05.01"
.SH NAME
intro \- introduction to overview and miscellany section
.SH DESCRIPTION
diff --git a/man7/ip.7 b/man7/ip.7
index 4ab4dec7d..d96afc71d 100644
--- a/man7/ip.7
+++ b/man7/ip.7
@@ -1,12 +1,7 @@
'\" t
-.\" This man page is Copyright (C) 1999 Andi Kleen <ak@muc.de>.
+.\" SPDX-License-Identifier: Linux-man-pages-1-para
.\"
-.\" %%%LICENSE_START(VERBATIM_ONE_PARA)
-.\" Permission is granted to distribute possibly modified copies
-.\" of this page provided the header is included verbatim,
-.\" and in case of nontrivial modification author and date
-.\" of the modification is added to the header.
-.\" %%%LICENSE_END
+.\" This man page is Copyright (C) 1999 Andi Kleen <ak@muc.de>.
.\"
.\" $Id: ip.7,v 1.19 2000/12/20 18:10:31 ak Exp $
.\"
@@ -40,7 +35,7 @@
.\" commit 76e21053b5bf33a07c76f99d27a74238310e3c71
.\" Author: Erich E. Hoover <ehoover@mines.edu>
.\"
-.TH ip 7 2023-02-05 "Linux man-pages 6.03"
+.TH ip 7 2023-07-15 "Linux man-pages 6.05.01"
.SH NAME
ip \- Linux IPv4 protocol implementation
.SH SYNOPSIS
@@ -164,7 +159,7 @@ struct sockaddr_in {
in_port_t sin_port; /* port in network byte order */
struct in_addr sin_addr; /* internet address */
};
-
+\&
/* Internet address */
struct in_addr {
uint32_t s_addr; /* address in network byte order */
@@ -237,19 +232,79 @@ In particular, this means that you need to call
on the number that is assigned to a port.
All address/port manipulation
functions in the standard library work in network byte order.
-.PP
+.SS Special and reserved addresses
There are several special addresses:
-.B INADDR_LOOPBACK
-(127.0.0.1)
+.TP
+.BR INADDR_LOOPBACK " (127.0.0.1)"
always refers to the local host via the loopback device;
+.TP
+.BR INADDR_ANY " (0.0.0.0)"
+means any address for socket binding;
+.TP
+.BR INADDR_BROADCAST " (255.255.255.255)"
+has the same effect on
+.BR bind (2)
+as
.B INADDR_ANY
-(0.0.0.0)
-means any address for binding;
+for historical reasons.
+A packet addressed to
.B INADDR_BROADCAST
-(255.255.255.255)
-means any host and has the same effect on bind as
+through a socket which has
+.B SO_BROADCAST
+set will be broadcast to all hosts on the local network segment,
+as long as the link is broadcast-capable.
+.TP
+Highest-numbered address
+.TQ
+Lowest-numbered address
+On any locally-attached non-point-to-point IP subnet
+with a link type that supports broadcasts,
+the highest-numbered address
+(e.g., the .255 address on a subnet with netmask 255.255.255.0)
+is designated as a broadcast address.
+It cannot usefully be assigned to an individual interface,
+and can only be addressed with a socket on which the
+.B SO_BROADCAST
+option has been set.
+Internet standards have historically
+also reserved the lowest-numbered address
+(e.g., the .0 address on a subnet with netmask 255.255.255.0)
+for broadcast, though they call it "obsolete" for this purpose.
+(Some sources also refer to this as the "network address.")
+Since Linux 5.14,
+.\" commit 58fee5fc83658aaacf60246aeab738946a9ba516
+it is treated as an ordinary unicast address
+and can be assigned to an interface.
+.PP
+Internet standards have traditionally also reserved various addresses
+for particular uses, though Linux no longer treats
+some of these specially.
+.TP
+[0.0.0.1, 0.255.255.255]
+.TQ
+[240.0.0.0, 255.255.255.254]
+Addresses in these ranges (0/8 and 240/4) are reserved globally.
+Since Linux 5.3
+.\" commit 96125bf9985a75db00496dd2bc9249b777d2b19b
+and Linux 2.6.25,
+.\" commit 1e637c74b0f84eaca02b914c0b8c6f67276e9697
+respectively,
+the 0/8 and 240/4 addresses, other than
.B INADDR_ANY
-for historical reasons.
+and
+.BR INADDR_BROADCAST ,
+are treated as ordinary unicast addresses.
+Systems that follow the traditional behaviors may not
+interoperate with these historically reserved addresses.
+.TP
+[127.0.0.1, 127.255.255.254]
+Addresses in this range (127/8) are treated as loopback addresses
+akin to the standardized local loopback address
+.B INADDR_LOOPBACK
+(127.0.0.1);
+.TP
+[224.0.0.0, 239.255.255.255]
+Addresses in this range (224/4) are dedicated to multicast use.
.SS Socket options
IP supports some protocol-specific socket options that can be set with
.BR setsockopt (2)
@@ -272,7 +327,7 @@ Join a multicast group.
Argument is an
.I ip_mreqn
structure.
-.PP
+.IP
.in +4n
.EX
struct ip_mreqn {
@@ -284,7 +339,7 @@ struct ip_mreqn {
};
.EE
.in
-.PP
+.IP
.I imr_multiaddr
contains the address of the multicast group the application
wants to join or leave.
@@ -330,7 +385,7 @@ from a specified source.
Argument is an
.I ip_mreq_source
structure.
-.PP
+.IP
.in +4n
.EX
struct ip_mreq_source {
@@ -343,7 +398,7 @@ struct ip_mreq_source {
};
.EE
.in
-.PP
+.IP
The
.I ip_mreq_source
structure is similar to
@@ -439,12 +494,38 @@ and
.B IP_TOS
are ignored.
.TP
+.BR IP_LOCAL_PORT_RANGE " (since Linux 6.3)"
+Set or get the per-socket default local port range.
+This option can be used to clamp down the global local port range,
+defined by the
+.I ip_local_port_range
+.I /proc
+interface described below, for a given socket.
+.IP
+The option takes an
+.I uint32_t
+value with
+the high 16 bits set to the upper range bound,
+and the low 16 bits set to the lower range bound.
+Range bounds are inclusive.
+The 16-bit values should be in host byte order.
+.IP
+The lower bound has to be less than the upper bound
+when both bounds are not zero.
+Otherwise, setting the option fails with EINVAL.
+.IP
+If either bound is outside of the global local port range, or is zero,
+then that bound has no effect.
+.IP
+To reset the setting,
+pass zero as both the upper and the lower bound.
+.TP
.BR IP_MSFILTER " (since Linux 2.4.22 / 2.5.68)"
This option provides access to the advanced full-state filtering API.
Argument is an
.I ip_msfilter
structure.
-.PP
+.IP
.in +4n
.EX
struct ip_msfilter {
@@ -453,7 +534,7 @@ struct ip_msfilter {
struct in_addr imsf_interface; /* IP address of local
interface */
uint32_t imsf_fmode; /* Filter\-mode */
-
+\&
uint32_t imsf_numsrc; /* Number of sources in
the following array */
struct in_addr imsf_slist[1]; /* Array of source
@@ -461,7 +542,7 @@ struct ip_msfilter {
};
.EE
.in
-.PP
+.IP
There are two macros,
.B MCAST_INCLUDE
and
@@ -574,10 +655,7 @@ that wish to deliberately send probe packets larger than
the observed Path MTU.
.TP
.BR IP_MULTICAST_ALL " (since Linux 2.6.31)"
-This option can be used to modify the delivery policy of multicast messages
-to sockets bound to the wildcard
-.B INADDR_ANY
-address.
+This option can be used to modify the delivery policy of multicast messages.
The argument is a boolean integer (defaults to 1).
If set to 1,
the socket will receive messages from all the groups that have been joined
@@ -785,7 +863,7 @@ structure:
#define SO_EE_ORIGIN_LOCAL 1
#define SO_EE_ORIGIN_ICMP 2
#define SO_EE_ORIGIN_ICMP6 3
-
+\&
struct sock_extended_err {
uint32_t ee_errno; /* error number */
uint8_t ee_origin; /* where the error originated */
@@ -796,7 +874,7 @@ struct sock_extended_err {
uint32_t ee_data; /* other data */
/* More data may follow */
};
-
+\&
struct sockaddr *SO_EE_OFFENDER(struct sock_extended_err *);
.EE
.in
@@ -1346,6 +1424,10 @@ with careless broadcasts.
For new application protocols
it is better to use a multicast group instead of broadcasting.
Broadcasting is discouraged.
+See RFC 6762 for an example of a protocol (mDNS)
+using the more modern multicast approach
+to communicating with an open-ended
+group of hosts on the local network.
.PP
Some other BSD sockets implementations provide
.B IP_RCVDSTADDR
diff --git a/man7/ipc_namespaces.7 b/man7/ipc_namespaces.7
index 8d54f36ab..0b13f073f 100644
--- a/man7/ipc_namespaces.7
+++ b/man7/ipc_namespaces.7
@@ -3,7 +3,7 @@
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
.\"
-.TH ipc_namespaces 7 2023-02-05 "Linux man-pages 6.03"
+.TH ipc_namespaces 7 2023-02-05 "Linux man-pages 6.05.01"
.SH NAME
ipc_namespaces \- overview of Linux IPC namespaces
.SH DESCRIPTION
diff --git a/man7/ipv6.7 b/man7/ipv6.7
index 29688e84f..e6f9d54a3 100644
--- a/man7/ipv6.7
+++ b/man7/ipv6.7
@@ -1,11 +1,6 @@
-.\" This man page is Copyright (C) 2000 Andi Kleen <ak@muc.de>.
+.\" SPDX-License-Identifier: Linux-man-pages-1-para
.\"
-.\" %%%LICENSE_START(VERBATIM_ONE_PARA)
-.\" Permission is granted to distribute possibly modified copies
-.\" of this page provided the header is included verbatim,
-.\" and in case of nontrivial modification author and date
-.\" of the modification is added to the header.
-.\" %%%LICENSE_END
+.\" This man page is Copyright (C) 2000 Andi Kleen <ak@muc.de>.
.\"
.\" $Id: ipv6.7,v 1.3 2000/12/20 18:10:31 ak Exp $
.\"
@@ -83,7 +78,7 @@
.\" commit c4062dfc425e94290ac427a98d6b4721dd2bc91f
.\" Author: Erich E. Hoover <ehoover@mines.edu>
.\"
-.TH ipv6 7 2023-02-05 "Linux man-pages 6.03"
+.TH ipv6 7 2023-07-30 "Linux man-pages 6.05.01"
.SH NAME
ipv6 \- Linux IPv6 protocol implementation
.SH SYNOPSIS
@@ -148,7 +143,7 @@ struct sockaddr_in6 {
struct in6_addr sin6_addr; /* IPv6 address */
uint32_t sin6_scope_id; /* Scope ID (new in Linux 2.4) */
};
-
+\&
struct in6_addr {
unsigned char s6_addr[16]; /* IPv6 address */
};
@@ -272,9 +267,8 @@ or
sockets.
Argument is a pointer to a boolean value in an integer.
.TP
-.nh
-.B IPV6_RTHDR, IPV6_AUTHHDR, IPV6_DSTOPTS, IPV6_HOPOPTS, IPV6_FLOWINFO, IPV6_HOPLIMIT
-.hy
+.B \%IPV6_RTHDR, \%IPV6_AUTHHDR, \%IPV6_DSTOPTS, \%IPV6_HOPOPTS, \
+\%IPV6_FLOWINFO, \%IPV6_HOPLIMIT
Set delivery of control messages for incoming datagrams containing
extension headers from the received packet.
.B IPV6_RTHDR
diff --git a/man7/iso_8859-1.7 b/man7/iso_8859-1.7
index cc3a1e781..7534a8553 100644
--- a/man7/iso_8859-1.7
+++ b/man7/iso_8859-1.7
@@ -5,7 +5,7 @@
.\"
.\" Slightly rearranged, aeb, 950713
.\" Updated, dpo, 990531
-.TH ISO_8859-1 7 2022-12-15 "Linux man-pages 6.03"
+.TH ISO_8859-1 7 2022-12-15 "Linux man-pages 6.05.01"
.SH NAME
iso_8859-1 \- ISO 8859-1 character set encoded in octal, decimal,
and hexadecimal
diff --git a/man7/iso_8859-10.7 b/man7/iso_8859-10.7
index 15cdf2042..d43a00a87 100644
--- a/man7/iso_8859-10.7
+++ b/man7/iso_8859-10.7
@@ -3,7 +3,7 @@
.\"
.\" SPDX-License-Identifier: GPL-2.0-or-later
.\"
-.TH ISO_8859-10 7 2022-12-15 "Linux man-pages 6.03"
+.TH ISO_8859-10 7 2022-12-15 "Linux man-pages 6.05.01"
.SH NAME
iso_8859-10 \- ISO 8859-10 character set encoded in octal, decimal,
and hexadecimal
diff --git a/man7/iso_8859-11.7 b/man7/iso_8859-11.7
index 9ab5a741e..e4886067b 100644
--- a/man7/iso_8859-11.7
+++ b/man7/iso_8859-11.7
@@ -5,7 +5,7 @@
.\"
.\"Thanomsub Noppaburana <donga.nb@gmail.com> made valuable suggestions.
.\"
-.TH ISO_8859-11 7 2022-12-15 "Linux man-pages 6.03"
+.TH ISO_8859-11 7 2022-12-15 "Linux man-pages 6.05.01"
.SH NAME
iso_8859-11 \- ISO 8859-11 character set encoded in octal, decimal,
and hexadecimal
diff --git a/man7/iso_8859-13.7 b/man7/iso_8859-13.7
index 14d928860..115834796 100644
--- a/man7/iso_8859-13.7
+++ b/man7/iso_8859-13.7
@@ -3,7 +3,7 @@
.\"
.\" SPDX-License-Identifier: GPL-2.0-or-later
.\"
-.TH ISO_8859-13 7 2022-12-15 "Linux man-pages 6.03"
+.TH ISO_8859-13 7 2022-12-15 "Linux man-pages 6.05.01"
.SH NAME
iso_8859-13 \- ISO 8859-13 character set encoded in octal, decimal,
and hexadecimal
diff --git a/man7/iso_8859-14.7 b/man7/iso_8859-14.7
index 79abf3283..eedac8224 100644
--- a/man7/iso_8859-14.7
+++ b/man7/iso_8859-14.7
@@ -3,7 +3,7 @@
.\"
.\" SPDX-License-Identifier: GPL-2.0-or-later
.\"
-.TH ISO_8859-14 7 2022-12-15 "Linux man-pages 6.03"
+.TH ISO_8859-14 7 2022-12-15 "Linux man-pages 6.05.01"
.SH NAME
iso_8859-14 \- ISO 8859-14 character set encoded in octal, decimal,
and hexadecimal
diff --git a/man7/iso_8859-15.7 b/man7/iso_8859-15.7
index 24227aeb8..908bb9be4 100644
--- a/man7/iso_8859-15.7
+++ b/man7/iso_8859-15.7
@@ -4,7 +4,7 @@
.\"
.\" SPDX-License-Identifier: GPL-2.0-or-later
.\"
-.TH ISO_8859-15 7 2022-12-15 "Linux man-pages 6.03"
+.TH ISO_8859-15 7 2022-12-15 "Linux man-pages 6.05.01"
.SH NAME
iso_8859-15 \- ISO 8859-15 character set encoded in octal, decimal,
and hexadecimal
diff --git a/man7/iso_8859-16.7 b/man7/iso_8859-16.7
index 91870226c..697a3f9cb 100644
--- a/man7/iso_8859-16.7
+++ b/man7/iso_8859-16.7
@@ -3,7 +3,7 @@
.\"
.\" SPDX-License-Identifier: GPL-2.0-or-later
.\"
-.TH ISO_8859-16 7 2022-12-15 "Linux man-pages 6.03"
+.TH ISO_8859-16 7 2022-12-15 "Linux man-pages 6.05.01"
.SH NAME
iso_8859-16 \- ISO 8859-16 character set encoded in octal, decimal,
and hexadecimal
diff --git a/man7/iso_8859-2.7 b/man7/iso_8859-2.7
index 822f4e80e..403e85e56 100644
--- a/man7/iso_8859-2.7
+++ b/man7/iso_8859-2.7
@@ -6,7 +6,7 @@
.\"
.\" Slightly rearranged, aeb, 950713
.\" Updated, dpo, 990531
-.TH ISO_8859-2 7 2022-12-15 "Linux man-pages 6.03"
+.TH ISO_8859-2 7 2022-12-15 "Linux man-pages 6.05.01"
.SH NAME
iso_8859-2 \- ISO 8859-2 character set encoded in octal, decimal,
and hexadecimal
diff --git a/man7/iso_8859-3.7 b/man7/iso_8859-3.7
index 14512a604..8eb9a24b4 100644
--- a/man7/iso_8859-3.7
+++ b/man7/iso_8859-3.7
@@ -3,7 +3,7 @@
.\"
.\" SPDX-License-Identifier: GPL-2.0-or-later
.\"
-.TH ISO_8859-3 7 2022-12-15 "Linux man-pages 6.03"
+.TH ISO_8859-3 7 2022-12-15 "Linux man-pages 6.05.01"
.SH NAME
iso_8859-3 \- ISO 8859-3 character set encoded in octal, decimal,
and hexadecimal
diff --git a/man7/iso_8859-4.7 b/man7/iso_8859-4.7
index 291f65222..b209bf14f 100644
--- a/man7/iso_8859-4.7
+++ b/man7/iso_8859-4.7
@@ -3,7 +3,7 @@
.\"
.\" SPDX-License-Identifier: GPL-2.0-or-later
.\"
-.TH ISO_8859-4 7 2022-12-15 "Linux man-pages 6.03"
+.TH ISO_8859-4 7 2022-12-15 "Linux man-pages 6.05.01"
.SH NAME
iso_8859-4 \- ISO 8859-4 character set encoded in octal, decimal,
and hexadecimal
diff --git a/man7/iso_8859-5.7 b/man7/iso_8859-5.7
index aca56d2e9..1fbb26624 100644
--- a/man7/iso_8859-5.7
+++ b/man7/iso_8859-5.7
@@ -3,7 +3,7 @@
.\"
.\" SPDX-License-Identifier: GPL-2.0-or-later
.\"
-.TH ISO_8859-5 7 2022-12-15 "Linux man-pages 6.03"
+.TH ISO_8859-5 7 2022-12-15 "Linux man-pages 6.05.01"
.SH NAME
iso_8859-5 \- ISO 8859-5 character set encoded in octal, decimal,
and hexadecimal
diff --git a/man7/iso_8859-6.7 b/man7/iso_8859-6.7
index b24eb421c..b73e846e8 100644
--- a/man7/iso_8859-6.7
+++ b/man7/iso_8859-6.7
@@ -3,7 +3,7 @@
.\"
.\" SPDX-License-Identifier: GPL-2.0-or-later
.\"
-.TH ISO_8859-6 7 2022-12-15 "Linux man-pages 6.03"
+.TH ISO_8859-6 7 2022-12-15 "Linux man-pages 6.05.01"
.SH NAME
iso_8859-6 \- ISO 8859-6 character set encoded in octal, decimal,
and hexadecimal
diff --git a/man7/iso_8859-7.7 b/man7/iso_8859-7.7
index 6ba25ff87..a66a28e8e 100644
--- a/man7/iso_8859-7.7
+++ b/man7/iso_8859-7.7
@@ -3,7 +3,7 @@
.\"
.\" SPDX-License-Identifier: GPL-2.0-or-later
.\"
-.TH ISO_8859-7 7 2022-12-15 "Linux man-pages 6.03"
+.TH ISO_8859-7 7 2022-12-15 "Linux man-pages 6.05.01"
.SH NAME
iso_8859-7 \- ISO 8859-7 character set encoded in octal, decimal,
and hexadecimal
diff --git a/man7/iso_8859-8.7 b/man7/iso_8859-8.7
index 9de5d6e67..d85411625 100644
--- a/man7/iso_8859-8.7
+++ b/man7/iso_8859-8.7
@@ -5,7 +5,7 @@
.\"
.\" Eli Zaretskii <eliz@gnu.org> made valuable suggestions
.\"
-.TH ISO_8859-8 7 2022-12-15 "Linux man-pages 6.03"
+.TH ISO_8859-8 7 2022-12-15 "Linux man-pages 6.05.01"
.SH NAME
iso_8859-8 \- ISO 8859-8 character set encoded in octal, decimal,
and hexadecimal
diff --git a/man7/iso_8859-9.7 b/man7/iso_8859-9.7
index e7f1eb147..6386144e1 100644
--- a/man7/iso_8859-9.7
+++ b/man7/iso_8859-9.7
@@ -3,7 +3,7 @@
.\"
.\" SPDX-License-Identifier: GPL-2.0-or-later
.\"
-.TH ISO_8859-9 7 2022-12-15 "Linux man-pages 6.03"
+.TH ISO_8859-9 7 2022-12-15 "Linux man-pages 6.05.01"
.SH NAME
iso_8859-9 \- ISO 8859-9 character set encoded in octal, decimal,
and hexadecimal
diff --git a/man7/kernel_lockdown.7 b/man7/kernel_lockdown.7
index 9b7c50076..aac19aa02 100644
--- a/man7/kernel_lockdown.7
+++ b/man7/kernel_lockdown.7
@@ -4,7 +4,7 @@
.\"
.\" SPDX-License-Identifier: GPL-2.0-or-later
.\"
-.TH kernel_lockdown 7 2023-02-05 "Linux man-pages 6.03"
+.TH kernel_lockdown 7 2023-02-05 "Linux man-pages 6.05.01"
.SH NAME
kernel_lockdown \- kernel image access prevention feature
.SH DESCRIPTION
diff --git a/man7/keyrings.7 b/man7/keyrings.7
index b09aa1984..1ebd25fe1 100644
--- a/man7/keyrings.7
+++ b/man7/keyrings.7
@@ -4,7 +4,7 @@
.\"
.\" SPDX-License-Identifier: GPL-2.0-or-later
.\"
-.TH keyrings 7 2023-02-05 "Linux man-pages 6.03"
+.TH keyrings 7 2023-02-05 "Linux man-pages 6.05.01"
.SH NAME
keyrings \- in-kernel key management and retention facility
.SH DESCRIPTION
diff --git a/man7/koi8-r.7 b/man7/koi8-r.7
index f5188d66e..65fc642b8 100644
--- a/man7/koi8-r.7
+++ b/man7/koi8-r.7
@@ -3,7 +3,7 @@
.\"
.\" SPDX-License-Identifier: GPL-2.0-or-later
.\"
-.TH KOI8-R 7 2022-12-15 "Linux man-pages 6.03"
+.TH KOI8-R 7 2022-12-15 "Linux man-pages 6.05.01"
.SH NAME
koi8-r \- Russian character set encoded in octal, decimal,
and hexadecimal
diff --git a/man7/koi8-u.7 b/man7/koi8-u.7
index d02bba862..c515c2a5a 100644
--- a/man7/koi8-u.7
+++ b/man7/koi8-u.7
@@ -5,7 +5,7 @@
.\"
.\" 2009-01-15, mtk, Some edits
.\"
-.TH KOI8-U 7 2022-12-15 "Linux man-pages 6.03"
+.TH KOI8-U 7 2022-12-15 "Linux man-pages 6.05.01"
.SH NAME
koi8-u \- Ukrainian character set encoded in octal, decimal,
and hexadecimal
diff --git a/man7/landlock.7 b/man7/landlock.7
index 1f886af28..96f821742 100644
--- a/man7/landlock.7
+++ b/man7/landlock.7
@@ -1,10 +1,11 @@
+'\" t
.\" Copyright © 2017-2020 Mickaël Salaün <mic@digikod.net>
.\" Copyright © 2019-2020 ANSSI
.\" Copyright © 2021 Microsoft Corporation
.\"
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
-.TH Landlock 7 2023-02-05 "Linux man-pages 6.03"
+.TH Landlock 7 2023-05-03 "Linux man-pages 6.05.01"
.SH NAME
Landlock \- unprivileged access-control
.SH DESCRIPTION
@@ -23,7 +24,7 @@ A Landlock security policy is a set of access rights
tied to a file hierarchy.
Such policy can be configured and enforced by processes for themselves
using three system calls:
-.IP \[bu] 2
+.IP \[bu] 3
.BR landlock_create_ruleset (2)
creates a new ruleset;
.IP \[bu]
@@ -64,9 +65,39 @@ Execute a file.
.TP
.B LANDLOCK_ACCESS_FS_WRITE_FILE
Open a file with write access.
+.IP
+When opening files for writing,
+you will often additionally need the
+.B LANDLOCK_ACCESS_FS_TRUNCATE
+right.
+In many cases,
+these system calls truncate existing files when overwriting them
+(e.g.,
+.BR creat (2)).
.TP
.B LANDLOCK_ACCESS_FS_READ_FILE
Open a file with read access.
+.TP
+.B LANDLOCK_ACCESS_FS_TRUNCATE
+Truncate a file with
+.BR truncate (2),
+.BR ftruncate (2),
+.BR creat (2),
+or
+.BR open (2)
+with
+.BR O_TRUNC .
+Whether an opened file can be truncated with
+.BR ftruncate (2)
+is determined during
+.BR open (2),
+in the same way as read and write permissions are checked during
+.BR open (2)
+using
+.B LANDLOCK_ACCESS_FS_READ_FILE
+and
+.BR LANDLOCK_ACCESS_FS_WRITE_FILE .
+This access right is available since the third version of the Landlock ABI.
.PP
A directory can receive access rights related to files or directories.
The following access right is applied to the directory itself,
@@ -105,6 +136,56 @@ Create (or rename or link) a block device.
.TP
.B LANDLOCK_ACCESS_FS_MAKE_SYM
Create (or rename or link) a symbolic link.
+.TP
+.B LANDLOCK_ACCESS_FS_REFER
+Link or rename a file from or to a different directory
+(i.e., reparent a file hierarchy).
+.IP
+This access right is available since the second version of the Landlock ABI.
+.IP
+This is the only access right which is denied by default by any ruleset,
+even if the right is not specified as handled at ruleset creation time.
+The only way to make a ruleset grant this right
+is to explicitly allow it for a specific directory
+by adding a matching rule to the ruleset.
+.IP
+In particular, when using the first Landlock ABI version,
+Landlock will always deny attempts to reparent files
+between different directories.
+.IP
+In addition to the source and destination directories having the
+.B LANDLOCK_ACCESS_FS_REFER
+access right,
+the attempted link or rename operation must meet the following constraints:
+.RS
+.IP \[bu] 3
+The reparented file may not gain more access rights in the destination directory
+than it previously had in the source directory.
+If this is attempted, the operation results in an
+.B EXDEV
+error.
+.IP \[bu]
+When linking or renaming, the
+.BI LANDLOCK_ACCESS_FS_MAKE_ *
+right for the respective file type must be granted
+for the destination directory.
+Otherwise, the operation results in an
+.B EACCES
+error.
+.IP \[bu]
+When renaming, the
+.BI LANDLOCK_ACCESS_FS_REMOVE_ *
+right for the respective file type must be granted
+for the source directory.
+Otherwise, the operation results in an
+.B EACCES
+error.
+.RE
+.IP
+If multiple requirements are not met, the
+.B EACCES
+error code takes precedence over
+.BR EXDEV .
.\"
.SS Layers of file path access rights
Each time a thread enforces a ruleset on itself,
@@ -170,7 +251,7 @@ will stay enforced on all this thread's descendants.
This allows creating standalone and modular security policies
per application,
which will automatically be composed between themselves
-according to their runtime parent policies.
+according to their run-time parent policies.
.\"
.SS Ptrace restrictions
A sandboxed process has less privileges than a non-sandboxed process and
@@ -181,8 +262,104 @@ To be allowed to use
and related syscalls on a target process,
a sandboxed process should have a subset of the target process rules,
which means the tracee must be in a sub-domain of the tracer.
+.\"
+.SS Truncating files
+The operations covered by
+.B LANDLOCK_ACCESS_FS_WRITE_FILE
+and
+.B LANDLOCK_ACCESS_FS_TRUNCATE
+both change the contents of a file and sometimes overlap in
+non-intuitive ways.
+It is recommended to always specify both of these together.
+.PP
+A particularly surprising example is
+.BR creat (2).
+The name suggests that this system call requires
+the rights to create and write files.
+However, it also requires the truncate right
+if an existing file under the same name is already present.
+.PP
+It should also be noted that truncating files does not require the
+.B LANDLOCK_ACCESS_FS_WRITE_FILE
+right.
+Apart from the
+.BR truncate (2)
+system call, this can also be done through
+.BR open (2)
+with the flags
+.IR "O_RDONLY\ |\ O_TRUNC" .
+.PP
+When opening a file, the availability of the
+.B LANDLOCK_ACCESS_FS_TRUNCATE
+right is associated with the newly created file descriptor
+and will be used for subsequent truncation attempts using
+.BR ftruncate (2).
+The behavior is similar to opening a file for reading or writing,
+where permissions are checked during
+.BR open (2),
+but not during the subsequent
+.BR read (2)
+and
+.BR write (2)
+calls.
+.PP
+As a consequence,
+it is possible to have multiple open file descriptors for the same file,
+where one grants the right to truncate the file and the other does not.
+It is also possible to pass such file descriptors between processes,
+keeping their Landlock properties,
+even when these processes do not have an enforced Landlock ruleset.
.SH VERSIONS
-Landlock was added in Linux 5.13.
+Landlock was introduced in Linux 5.13.
+.PP
+To determine which Landlock features are available,
+users should query the Landlock ABI version:
+.TS
+box;
+ntb| ntb| lbx
+nt| nt| lbx.
+ABI Kernel Newly introduced access rights
+_ _ _
+1 5.13 LANDLOCK_ACCESS_FS_EXECUTE
+\^ \^ LANDLOCK_ACCESS_FS_WRITE_FILE
+\^ \^ LANDLOCK_ACCESS_FS_READ_FILE
+\^ \^ LANDLOCK_ACCESS_FS_READ_DIR
+\^ \^ LANDLOCK_ACCESS_FS_REMOVE_DIR
+\^ \^ LANDLOCK_ACCESS_FS_REMOVE_FILE
+\^ \^ LANDLOCK_ACCESS_FS_MAKE_CHAR
+\^ \^ LANDLOCK_ACCESS_FS_MAKE_DIR
+\^ \^ LANDLOCK_ACCESS_FS_MAKE_REG
+\^ \^ LANDLOCK_ACCESS_FS_MAKE_SOCK
+\^ \^ LANDLOCK_ACCESS_FS_MAKE_FIFO
+\^ \^ LANDLOCK_ACCESS_FS_MAKE_BLOCK
+\^ \^ LANDLOCK_ACCESS_FS_MAKE_SYM
+_ _ _
+2 5.19 LANDLOCK_ACCESS_FS_REFER
+_ _ _
+3 6.2 LANDLOCK_ACCESS_FS_TRUNCATE
+.TE
+.sp 1
+.PP
+Users should use the Landlock ABI version rather than the kernel version
+to determine which features are available.
+The mainline kernel versions listed here are only included for orientation.
+Kernels from other sources may contain backported features,
+and their version numbers may not match.
+.PP
+To query the running kernel's Landlock ABI version,
+programs may pass the
+.B LANDLOCK_CREATE_RULESET_VERSION
+flag to
+.BR landlock_create_ruleset (2).
+.PP
+When building fallback mechanisms for compatibility with older kernels,
+users are advised to consider the special semantics of the
+.B LANDLOCK_ACCESS_FS_REFER
+access right:
+In ABI v1,
+linking and moving of files between different directories is always forbidden,
+so programs relying on such operations are only compatible
+with Landlock ABI v2 and higher.
.SH NOTES
Landlock is enabled by
.BR CONFIG_SECURITY_LANDLOCK .
@@ -201,11 +378,10 @@ command line parameter and further to the value of
We can check that Landlock is enabled by looking for
.I landlock: Up and running.
in kernel logs.
-.PP
+.SH CAVEATS
It is currently not possible to restrict some file-related actions
accessible through these system call families:
.BR chdir (2),
-.BR truncate (2),
.BR stat (2),
.BR flock (2),
.BR chmod (2),
@@ -218,17 +394,20 @@ accessible through these system call families:
Future Landlock evolutions will enable to restrict them.
.SH EXAMPLES
We first need to create the ruleset that will contain our rules.
+.PP
For this example,
the ruleset will contain rules that only allow read actions,
but write actions will be denied.
The ruleset then needs to handle both of these kinds of actions.
-See below for the description of filesystem actions.
+See the
+.B DESCRIPTION
+section for the description of filesystem actions.
.PP
.in +4n
.EX
struct landlock_ruleset_attr attr = {0};
int ruleset_fd;
-
+\&
attr.handled_access_fs =
LANDLOCK_ACCESS_FS_EXECUTE |
LANDLOCK_ACCESS_FS_WRITE_FILE |
@@ -242,19 +421,83 @@ attr.handled_access_fs =
LANDLOCK_ACCESS_FS_MAKE_SOCK |
LANDLOCK_ACCESS_FS_MAKE_FIFO |
LANDLOCK_ACCESS_FS_MAKE_BLOCK |
- LANDLOCK_ACCESS_FS_MAKE_SYM;
-
+ LANDLOCK_ACCESS_FS_MAKE_SYM |
+ LANDLOCK_ACCESS_FS_REFER |
+ LANDLOCK_ACCESS_FS_TRUNCATE;
+.EE
+.in
+.PP
+To be compatible with older Linux versions,
+we detect the available Landlock ABI version,
+and only use the available subset of access rights:
+.PP
+.in +4n
+.EX
+/*
+ * Table of available file system access rights by ABI version,
+ * numbers hardcoded to keep the example short.
+ */
+__u64 landlock_fs_access_rights[] = {
+ (LANDLOCK_ACCESS_FS_MAKE_SYM << 1) \- 1, /* v1 */
+ (LANDLOCK_ACCESS_FS_REFER << 1) \- 1, /* v2: add "refer" */
+ (LANDLOCK_ACCESS_FS_TRUNCATE << 1) \- 1, /* v3: add "truncate" */
+};
+\&
+int abi = landlock_create_ruleset(NULL, 0,
+ LANDLOCK_CREATE_RULESET_VERSION);
+if (abi == \-1) {
+ /*
+ * Kernel too old, not compiled with Landlock,
+ * or Landlock was not enabled at boot time.
+ */
+ perror("Unable to use Landlock");
+ return; /* Graceful fallback: Do nothing. */
+}
+abi = MIN(abi, 3);
+\&
+/* Only use the available rights in the ruleset. */
+attr.handled_access_fs &= landlock_fs_access_rights[abi \- 1];
+.EE
+.in
+.PP
+The available access rights for each ABI version are listed in the
+.B VERSIONS
+section.
+.PP
+If our program needed to create hard links
+or rename files between different directories
+.RB ( LANDLOCK_ACCESS_FS_REFER ),
+we would require the following change to the backwards compatibility logic:
+Directory reparenting is not possible
+in a process restricted with Landlock ABI version 1.
+Therefore,
+if the program needed to do file reparenting,
+and if only Landlock ABI version 1 was available,
+we could not restrict the process.
+.PP
+Now that the ruleset attributes are determined,
+we create the Landlock ruleset
+and acquire a file descriptor as a handle to it,
+using
+.BR landlock_create_ruleset (2):
+.PP
+.in +4n
+.EX
ruleset_fd = landlock_create_ruleset(&attr, sizeof(attr), 0);
-if (ruleset_fd == -1) {
+if (ruleset_fd == \-1) {
perror("Failed to create a ruleset");
exit(EXIT_FAILURE);
}
.EE
.in
.PP
-We can now add a new rule to this ruleset thanks to the returned file
-descriptor referring to this ruleset.
-The rule will only allow reading the file hierarchy
+We can now add a new rule to the ruleset through the ruleset's file descriptor.
+The requested access rights must be a subset of the access rights
+which were specified in
+.I attr.handled_access_fs
+at ruleset creation time.
+.PP
+In this example, the rule will only allow reading the file hierarchy
.IR /usr .
Without another rule, write actions would then be denied by the ruleset.
To add
@@ -269,14 +512,14 @@ with this file descriptor.
.EX
struct landlock_path_beneath_attr path_beneath = {0};
int err;
-
+\&
path_beneath.allowed_access =
LANDLOCK_ACCESS_FS_EXECUTE |
LANDLOCK_ACCESS_FS_READ_FILE |
LANDLOCK_ACCESS_FS_READ_DIR;
-
+\&
path_beneath.parent_fd = open("/usr", O_PATH | O_CLOEXEC);
-if (path_beneath.parent_fd == -1) {
+if (path_beneath.parent_fd == \-1) {
perror("Failed to open file");
close(ruleset_fd);
exit(EXIT_FAILURE);
diff --git a/man7/libc.7 b/man7/libc.7
index a09912ac5..7a62251d7 100644
--- a/man7/libc.7
+++ b/man7/libc.7
@@ -3,7 +3,7 @@
.\"
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
-.TH libc 7 2023-02-05 "Linux man-pages 6.03"
+.TH libc 7 2023-02-05 "Linux man-pages 6.05.01"
.SH NAME
libc \- overview of standard C libraries on Linux
.SH DESCRIPTION
diff --git a/man7/locale.7 b/man7/locale.7
index c097a812c..49aa36708 100644
--- a/man7/locale.7
+++ b/man7/locale.7
@@ -8,7 +8,7 @@
.\" <jochen.hein@delphi.central.de>
.\" Modified Thu Apr 25 00:43:19 2002 by Bruno Haible <bruno@clisp.org>
.\"
-.TH locale 7 2023-02-05 "Linux man-pages 6.03"
+.TH locale 7 2023-05-03 "Linux man-pages 6.05.01"
.SH NAME
locale \- description of multilanguage support
.SH SYNOPSIS
@@ -244,9 +244,9 @@ function, which has the following declaration:
.in +4n
.EX
struct lconv {
-
+\&
/* Numeric (nonmonetary) information */
-
+\&
char *decimal_point; /* Radix character */
char *thousands_sep; /* Separator for digit groups to left
of radix character */
@@ -257,9 +257,9 @@ struct lconv {
is done. An element with value 0 means
that the previous element is used for
all groups further left. */
-
+\&
/* Remaining fields are for monetary information */
-
+\&
char *int_curr_symbol; /* First three chars are a currency
symbol from ISO 4217. Fourth char
is the separator. Fifth char
diff --git a/man7/mailaddr.7 b/man7/mailaddr.7
index 220fbda26..8218daaad 100644
--- a/man7/mailaddr.7
+++ b/man7/mailaddr.7
@@ -24,7 +24,7 @@
.\" WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
.\" %%%LICENSE_END
.\"
-.TH mailaddr 7 2023-02-05 "Linux man-pages 6.03"
+.TH mailaddr 7 2023-02-05 "Linux man-pages 6.05.01"
.UC 5
.SH NAME
mailaddr \- mail addressing description
diff --git a/man7/man-pages.7 b/man7/man-pages.7
index 82afefb8b..6d8b0ea84 100644
--- a/man7/man-pages.7
+++ b/man7/man-pages.7
@@ -8,7 +8,7 @@
.\" 2007-05-30 created by mtk, using text from old man.7 plus
.\" rewrites and additional text.
.\"
-.TH man-pages 7 2023-02-05 "Linux man-pages 6.03"
+.TH man-pages 7 2023-03-30 "Linux man-pages 6.05.01"
.SH NAME
man-pages \- conventions for writing Linux man pages
.SH SYNOPSIS
@@ -148,9 +148,10 @@ ERRORS [Typically only in Sections 2, 3]
.\" SECURITY,
ENVIRONMENT
FILES
-VERSIONS [Normally only in Sections 2, 3]
ATTRIBUTES [Normally only in Sections 2, 3]
+VERSIONS [Normally only in Sections 2, 3]
STANDARDS
+HISTORY
NOTES
CAVEATS
BUGS
@@ -194,7 +195,7 @@ It shows the common name of the library,
and in parentheses,
the name of the library file
and, if needed, the linker flag needed to link a program against it:
-.RI ( libfoo "[, " -lfoo ]).
+.RI ( libfoo "[, " \-lfoo ]).
.TP
.B SYNOPSIS
A brief summary of the command or function's interface.
@@ -341,12 +342,35 @@ See
for further details.
.TP
.B VERSIONS
+A summary of systems where the API performs differently,
+or where there's a similar API.
+.TP
+.B STANDARDS
+A description of any standards or conventions that relate to the function
+or command described by the manual page.
+.IP
+The preferred terms to use for the various standards are listed as
+headings in
+.BR standards (7).
+.IP
+This section should note the current standards to which the API conforms to.
+.IP
+If the API is not governed by any standards but commonly
+exists on other systems, note them.
+If the call is Linux-specific or GNU-specific, note this.
+If it's available in the BSDs, note that.
+.IP
+If this section consists of just a list of standards
+(which it commonly does),
+terminate the list with a period (\[aq].\[aq]).
+.TP
+.B HISTORY
A brief summary of the Linux kernel or glibc versions where a
system call or library function appeared,
or changed significantly in its operation.
.IP
As a general rule, every new interface should
-include a VERSIONS section in its manual page.
+include a HISTORY section in its manual page.
Unfortunately,
many existing manual pages don't include this information
(since there was no policy to do so when they were written).
@@ -362,31 +386,11 @@ The
.BR syscalls (2)
manual page also provides information about kernel versions
in which various system calls first appeared.
-.TP
-.B STANDARDS
-A description of any standards or conventions that relate to the function
-or command described by the manual page.
-.IP
-The preferred terms to use for the various standards are listed as
-headings in
-.BR standards (7).
-.IP
-For a page in Section 2 or 3,
-this section should note the POSIX.1
-version(s) that the call conforms to,
-and also whether the call is specified in C99.
-(Don't worry too much about other standards like SUS, SUSv2, and XPG,
-or the SVr4 and 4.xBSD implementation standards,
-unless the call was specified in those standards,
-but isn't in the current version of POSIX.1.)
-.IP
-If the call is not governed by any standards but commonly
-exists on other systems, note them.
-If the call is Linux-specific, note this.
-.IP
-If this section consists of just a list of standards
-(which it commonly does),
-terminate the list with a period (\[aq].\[aq]).
+.PP
+Old versions of standards should be mentioned here,
+rather than in STANDARDS,
+for example,
+SUS, SUSv2, and XPG, or the SVr4 and 4.xBSD implementation standards.
.TP
.B NOTES
Miscellaneous notes.
@@ -645,13 +649,12 @@ Positional lists
Elements are preceded by a number (index) in square brackets [4], [5].
These represent fields in a set.
The first index will be:
-.IP
.RS
-.PD 0
.TP
.B 0
When it represents fields of a C data structure,
to be consistent with arrays.
+.PD 0
.TP
.B 1
When it represents fields of a file,
diff --git a/man7/man.7 b/man7/man.7
index dc7284ee6..b0788f3aa 100644
--- a/man7/man.7
+++ b/man7/man.7
@@ -11,7 +11,7 @@
.\" Modified Tue Jul 27 20:12:02 2004 by Colin Watson <cjwatson@debian.org>
.\" 2007-05-30, mtk: various rewrites and moved much text to new man-pages.7.
.\"
-.TH man 7 2023-02-05 "Linux man-pages 6.03"
+.TH man 7 2023-07-29 "Linux man-pages 6.05.01"
.SH NAME
man \- macros to format man pages
.SH SYNOPSIS
@@ -60,7 +60,7 @@ The first command in a man page (after comment lines,
that is, lines that start with \fB.\e"\fP) should be
.PP
.RS
-.B \&.TH
+.B .TH
.I "title section date source manual"
.RE
.PP
@@ -76,12 +76,12 @@ command, not the
command.
.SS Sections
Sections are started with
-.B \&.SH
+.B .SH
followed by the heading name.
.\" The following doesn't seem to be required (see Debian bug 411303),
.\" If the name contains spaces and appears
.\" on the same line as
-.\" .BR \&.SH ,
+.\" .BR .SH ,
.\" then place the heading in double quotes.
.PP
The only mandatory heading is NAME, which should be the first section and
@@ -111,37 +111,37 @@ For a list of other sections that might appear in a manual page, see
.SS Fonts
The commands to select the type face are:
.TP 4
-.B \&.B
+.B .B
Bold
.TP
-.B \&.BI
+.B .BI
Bold alternating with italics
(especially useful for function specifications)
.TP
-.B \&.BR
+.B .BR
Bold alternating with Roman
(especially useful for referring to other
manual pages)
.TP
-.B \&.I
+.B .I
Italics
.TP
-.B \&.IB
+.B .IB
Italics alternating with bold
.TP
-.B \&.IR
+.B .IR
Italics alternating with Roman
.TP
-.B \&.RB
+.B .RB
Roman alternating with bold
.TP
-.B \&.RI
+.B .RI
Roman alternating with italics
.TP
-.B \&.SB
+.B .SB
Small alternating with bold
.TP
-.B \&.SM
+.B .SM
Small (useful for acronyms)
.PP
Traditionally, each command can have up to six arguments, but the GNU
@@ -152,7 +152,7 @@ Double quotes can be used to specify an argument which contains spaces.
For the macros that produce alternating type faces,
the arguments will be printed next to each other without
intervening spaces, so that the
-.B \&.BR
+.B .BR
command can be used to specify a word in bold followed by a mark of
punctuation in Roman.
If no arguments are given, the command is applied to the following line
@@ -178,21 +178,21 @@ indents, since these will automatically adjust to font size changes.
The other key macro definitions are:
.SS Normal paragraphs
.TP 9m
-.B \&.LP
+.B .LP
Same as
-.B \&.PP
+.B .PP
(begin a new paragraph).
.TP
-.B \&.P
+.B .P
Same as
-.B \&.PP
+.B .PP
(begin a new paragraph).
.TP
-.B \&.PP
+.B .PP
Begin a new paragraph and reset prevailing indent.
.SS Relative margin indent
.TP 9m
-.BI \&.RS " i"
+.BI .RS " i"
Start relative margin indent: moves the left margin
.I i
to the right (if
@@ -201,19 +201,19 @@ is omitted, the prevailing indent value is used).
A new prevailing indent is set to 0.5 inches.
As a result, all following paragraph(s) will be
indented until the corresponding
-.BR \&.RE .
+.BR .RE .
.TP
-.B \&.RE
+.B .RE
End relative margin indent and
restores the previous value of the prevailing indent.
.SS Indented paragraph macros
.TP 9m
-.BI \&.HP " i"
+.BI .HP " i"
Begin paragraph with a hanging indent
(the first line of the paragraph is at the left margin of
normal paragraphs, and the rest of the paragraph's lines are indented).
.TP
-.BI \&.IP " x i"
+.BI .IP " x i"
Indented paragraph with optional hanging tag.
If the tag
.I x
@@ -224,7 +224,7 @@ If the tag
is provided, it is hung at the left margin
before the following indented paragraph
(this is just like
-.B \&.TP
+.B .TP
except the tag is included with the command instead of being on the
following line).
If the tag is too long, the text after the tag will be moved down to the
@@ -234,25 +234,25 @@ as the tag, and for numbered lists, use the number or letter followed by
a period as the tag;
this simplifies translation to other formats.
.TP
-.BI \&.TP " i"
+.BI .TP " i"
Begin paragraph with hanging tag.
The tag is given on the next line, but
its results are like those of the
-.B \&.IP
+.B .IP
command.
.SS Hypertext link macros
.TP
-.BI \&.UR " url"
+.BI .UR " url"
Insert a hypertext link to the URI (URL)
.IR url ,
with all text up to the following
-.B \&.UE
+.B .UE
macro as the link text.
.TP
-.B \&.UE \c
+.BR .UE \~\c
.RI [ trailer ]
Terminate the link text of the preceding
-.B \&.UR
+.B .UR
macro, with the optional
.I trailer
(if present, usually a closing parenthesis and/or end-of-sentence
@@ -270,20 +270,20 @@ These macros have been supported since GNU Troff 1.20 (2009-01-05) and
Heirloom Doctools Troff since 160217 (2016-02-17).
.SS Miscellaneous macros
.TP 9m
-.B \&.DT
+.B .DT
Reset tabs to default tab values (every 0.5 inches);
does not cause a break.
.TP
-.BI \&.PD " d"
+.BI .PD " d"
Set inter-paragraph vertical distance to d
(if omitted, d=0.4v);
does not cause a break.
.TP
-.BI \&.SS " t"
+.BI .SS " t"
Subheading
.I t
(like
-.BR \&.SH ,
+.BR .SH ,
but used for a subsection inside a section).
.SS Predefined strings
The
diff --git a/man7/math_error.7 b/man7/math_error.7
index feafbbcb6..d3b3c1aa5 100644
--- a/man7/math_error.7
+++ b/man7/math_error.7
@@ -3,7 +3,7 @@
.\"
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
-.TH math_error 7 2022-12-04 "Linux man-pages 6.03"
+.TH math_error 7 2023-05-03 "Linux man-pages 6.05.01"
.SH NAME
math_error \- detecting errors from mathematical functions
.SH SYNOPSIS
@@ -203,11 +203,11 @@ less than zero (a domain error):
.in +4n
.EX
double x, r;
-
+\&
if (isnan(x) || islessequal(x, 0)) {
/* Deal with NaN / pole error / domain error */
}
-
+\&
r = log(x);
.EE
.in
diff --git a/man7/mount_namespaces.7 b/man7/mount_namespaces.7
index d9394f8d8..0ce2feef7 100644
--- a/man7/mount_namespaces.7
+++ b/man7/mount_namespaces.7
@@ -4,7 +4,7 @@
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
.\"
-.TH mount_namespaces 7 2023-02-10 "Linux man-pages 6.03"
+.TH mount_namespaces 7 2023-05-03 "Linux man-pages 6.05.01"
.SH NAME
mount_namespaces \- overview of Linux mount namespaces
.SH DESCRIPTION
@@ -608,7 +608,7 @@ Before going further, we show that unbindable mounts are indeed unbindable:
# \fBmount \-\-bind /home/cecilia /mntZ\fP
mount: wrong fs type, bad option, bad superblock on /home/cecilia,
missing codepage or helper program, or other error
-
+\&
In some cases useful info is found in syslog \- try
dmesg | tail or so.
.EE
@@ -977,10 +977,10 @@ mount point before the
.BR chroot (1)
was performed).
.\"
-.SH VERSIONS
-Mount namespaces first appeared in Linux 2.4.19.
.SH STANDARDS
-Namespaces are a Linux-specific feature.
+Linux.
+.SH HISTORY
+Linux 2.4.19.
.\"
.SH NOTES
The propagation type assigned to a new mount depends
@@ -1014,7 +1014,7 @@ in the new namespace,
.BR unshare (1)
(since
.I util\-linux
- 2.27) in turn reverses the step performed by
+2.27) in turn reverses the step performed by
.BR systemd (1),
by making all mounts private in the new namespace.
That is,
diff --git a/man7/mq_overview.7 b/man7/mq_overview.7
index 337e37a0b..b022ea054 100644
--- a/man7/mq_overview.7
+++ b/man7/mq_overview.7
@@ -3,7 +3,7 @@
.\"
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
-.TH mq_overview 7 2023-02-05 "Linux man-pages 6.03"
+.TH mq_overview 7 2023-02-05 "Linux man-pages 6.05.01"
.SH NAME
mq_overview \- overview of POSIX message queues
.SH DESCRIPTION
diff --git a/man7/namespaces.7 b/man7/namespaces.7
index 4973da4e0..6ff11af69 100644
--- a/man7/namespaces.7
+++ b/man7/namespaces.7
@@ -5,7 +5,7 @@
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
.\"
-.TH namespaces 7 2023-02-05 "Linux man-pages 6.03"
+.TH namespaces 7 2023-07-20 "Linux man-pages 6.05.01"
.SH NAME
namespaces \- overview of Linux namespaces
.SH DESCRIPTION
@@ -29,8 +29,6 @@ The third column identifies the manual page that provides details
on the namespace type.
The last column is a summary of the resources that are isolated by
the namespace type.
-.ad l
-.nh
.TS
lB lB lB lB
l1 lB1 l1 l.
@@ -60,8 +58,6 @@ Hostname and NIS
domain name
T}
.TE
-.hy
-.ad
.\"
.\" ==================== The namespaces API ====================
.\"
@@ -128,7 +124,7 @@ no privilege is required to create a user namespace.
.\"
.\" ==================== The /proc/[pid]/ns/ directory ====================
.\"
-.SS The /proc/[pid]/ns/ directory
+.SS The \fI/proc/\fPpid\fI/ns/\fP directory
Each process has a
.IR /proc/ pid /ns/
.\" See commit 6b4e306aa3dc94a0545eb9279475b1ab6209a31f
diff --git a/man7/netdevice.7 b/man7/netdevice.7
index 32cb8d769..a0f004968 100644
--- a/man7/netdevice.7
+++ b/man7/netdevice.7
@@ -1,12 +1,7 @@
'\" t
-.\" This man page is Copyright (C) 1999 Andi Kleen <ak@muc.de>.
+.\" SPDX-License-Identifier: Linux-man-pages-1-para
.\"
-.\" %%%LICENSE_START(VERBATIM_ONE_PARA)
-.\" Permission is granted to distribute possibly modified copies
-.\" of this page provided the header is included verbatim,
-.\" and in case of nontrivial modification author and date
-.\" of the modification is added to the header.
-.\" %%%LICENSE_END
+.\" This man page is Copyright (C) 1999 Andi Kleen <ak@muc.de>.
.\"
.\" $Id: netdevice.7,v 1.10 2000/08/17 10:09:54 ak Exp $
.\"
@@ -15,7 +10,7 @@
.\" Modified, 2011-11-02, <bidulock@openss7.org>, added many basic
.\" but missing ioctls, such as SIOCGIFADDR.
.\"
-.TH netdevice 7 2022-12-15 "Linux man-pages 6.03"
+.TH netdevice 7 2023-07-15 "Linux man-pages 6.05.01"
.SH NAME
netdevice \- low-level access to Linux network devices
.SH SYNOPSIS
diff --git a/man7/netlink.7 b/man7/netlink.7
index 90c0100f6..4d6cdbc2c 100644
--- a/man7/netlink.7
+++ b/man7/netlink.7
@@ -6,7 +6,7 @@
.\" Based on the original comments from Alexey Kuznetsov
.\" Modified 2005-12-27 by Hasso Tepper <hasso@estpak.ee>
.\" $Id: netlink.7,v 1.8 2000/06/22 13:23:00 ak Exp $
-.TH netlink 7 2023-02-05 "Linux man-pages 6.03"
+.TH netlink 7 2023-07-30 "Linux man-pages 6.05.01"
.SH NAME
netlink \- communication between kernel and user space (AF_NETLINK)
.SH SYNOPSIS
@@ -218,8 +218,6 @@ appropriate manual pages for that, for example,
.BR rtnetlink (7)
for
.BR NETLINK_ROUTE .
-.nh
-.ad l
.TS
tab(:);
l s
@@ -240,11 +238,7 @@ NLM_F_ECHO:T{
Echo this request.
T}
.TE
-.ad
-.hy
.\" No right adjustment for text blocks in tables
-.nh
-.ad l
.TS
tab(:);
l s
@@ -266,8 +260,6 @@ Convenience macro; equivalent to
(NLM_F_ROOT|NLM_F_MATCH).
T}
.TE
-.ad
-.hy
.\" FIXME NLM_F_ATOMIC is not used anymore?
.PP
Note that
@@ -275,8 +267,6 @@ Note that
requires the
.B CAP_NET_ADMIN
capability or an effective UID of 0.
-.nh
-.ad l
.TS
tab(:);
l s
@@ -296,8 +286,6 @@ NLM_F_APPEND:T{
Add to the end of the object list.
T}
.TE
-.ad
-.hy
.PP
.I nlmsg_seq
and
@@ -538,11 +526,11 @@ netlink socket which will listen to the
.in +4n
.EX
struct sockaddr_nl sa;
-
+\&
memset(&sa, 0, sizeof(sa));
sa.nl_family = AF_NETLINK;
sa.nl_groups = RTMGRP_LINK | RTMGRP_IPV4_IFADDR;
-
+\&
fd = socket(AF_NETLINK, SOCK_RAW, NETLINK_ROUTE);
bind(fd, (struct sockaddr *) &sa, sizeof(sa));
.EE
@@ -559,7 +547,7 @@ struct nlmsghdr *nh; /* The nlmsghdr with payload to send */
struct sockaddr_nl sa;
struct iovec iov = { nh, nh\->nlmsg_len };
struct msghdr msg;
-
+\&
msg = { &sa, sizeof(sa), &iov, 1, NULL, 0, 0 };
memset(&sa, 0, sizeof(sa));
sa.nl_family = AF_NETLINK;
@@ -567,7 +555,7 @@ nh\->nlmsg_pid = 0;
nh\->nlmsg_seq = ++sequence_number;
/* Request an ack from kernel by setting NLM_F_ACK */
nh\->nlmsg_flags |= NLM_F_ACK;
-
+\&
sendmsg(fd, &msg, 0);
.EE
.in
@@ -584,20 +572,20 @@ struct iovec iov = { buf, sizeof(buf) };
struct sockaddr_nl sa;
struct msghdr msg;
struct nlmsghdr *nh;
-
+\&
msg = { &sa, sizeof(sa), &iov, 1, NULL, 0, 0 };
len = recvmsg(fd, &msg, 0);
-
+\&
for (nh = (struct nlmsghdr *) buf; NLMSG_OK (nh, len);
nh = NLMSG_NEXT (nh, len)) {
/* The end of multipart message */
if (nh\->nlmsg_type == NLMSG_DONE)
return;
-
+\&
if (nh\->nlmsg_type == NLMSG_ERROR)
/* Do some error handling */
...
-
+\&
/* Continue with parsing payload */
...
}
diff --git a/man7/network_namespaces.7 b/man7/network_namespaces.7
index c50cc99f2..a9e6306d1 100644
--- a/man7/network_namespaces.7
+++ b/man7/network_namespaces.7
@@ -3,7 +3,7 @@
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
.\"
-.TH network_namespaces 7 2022-12-04 "Linux man-pages 6.03"
+.TH network_namespaces 7 2023-03-12 "Linux man-pages 6.05.01"
.SH NAME
network_namespaces \- overview of Linux network namespaces
.SH DESCRIPTION
@@ -12,7 +12,7 @@ with networking: network devices, IPv4 and IPv6 protocol stacks,
IP routing tables, firewall rules, the
.I /proc/net
directory (which is a symbolic link to
-.IR /proc/PID/net ),
+.IR /proc/ pid /net ),
the
.I /sys/class/net
directory, various files under
diff --git a/man7/nptl.7 b/man7/nptl.7
index 227f4ce1e..a00c845b4 100644
--- a/man7/nptl.7
+++ b/man7/nptl.7
@@ -3,7 +3,7 @@
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
.\"
-.TH nptl 7 2023-02-05 "Linux man-pages 6.03"
+.TH nptl 7 2023-02-05 "Linux man-pages 6.05.01"
.SH NAME
nptl \- Native POSIX Threads Library
.SH DESCRIPTION
diff --git a/man7/numa.7 b/man7/numa.7
index 36e2a2b3d..9ac509728 100644
--- a/man7/numa.7
+++ b/man7/numa.7
@@ -6,7 +6,7 @@
.\"
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
-.TH numa 7 2023-02-05 "Linux man-pages 6.03"
+.TH numa 7 2023-04-03 "Linux man-pages 6.05.01"
.SH NAME
numa \- overview of Non-Uniform Memory Architecture
.SH DESCRIPTION
@@ -31,7 +31,7 @@ and
However, applications should normally use the interface provided by
.IR libnuma ;
see "Library Support" below.
-.SS /proc/[number]/numa_maps (since Linux 2.6.14)
+.SS \fI/proc/\fPpid\fI/numa_maps\fP (since Linux 2.6.14)
.\" See also Changelog-2.6.14
This file displays information about a process's
NUMA memory policy and allocation.
@@ -43,14 +43,14 @@ that memory range and on which nodes the pages have been allocated.
.I numa_maps
is a read-only file.
When
-.I /proc/<pid>/numa_maps
+.IR /proc/ pid /numa_maps
is read, the kernel will scan the virtual address space of the
process and report how memory is used.
One line is displayed for each unique memory range of the process.
.PP
The first field of each line shows the starting address of the memory range.
This field allows a correlation with the contents of the
-.I /proc/<pid>/maps
+.IR /proc/ pid /maps
file,
which contains the end address of the range and other information,
such as the access permissions and sharing.
@@ -126,7 +126,7 @@ removed from memory by the swapper soon.
.I writeback=<pages>
Number of pages that are currently being written out to disk.
.SH STANDARDS
-No standards govern NUMA interfaces.
+None.
.SH NOTES
The Linux NUMA system calls and
.I /proc
diff --git a/man7/operator.7 b/man7/operator.7
index d65e4ae9d..ec4652f58 100644
--- a/man7/operator.7
+++ b/man7/operator.7
@@ -14,7 +14,7 @@
.\"
.\" 2007-12-08, mtk, Converted from mdoc to man macros
.\"
-.TH operator 7 2023-02-05 "Linux man-pages 6.03"
+.TH operator 7 2023-02-05 "Linux man-pages 6.05.01"
.SH NAME
operator \- C operator precedence and order of evaluation
.SH DESCRIPTION
diff --git a/man7/packet.7 b/man7/packet.7
index 54ef329dc..b2a264ca4 100644
--- a/man7/packet.7
+++ b/man7/packet.7
@@ -1,15 +1,10 @@
-.\" This man page is Copyright (C) 1999 Andi Kleen <ak@muc.de>.
+.\" SPDX-License-Identifier: Linux-man-pages-1-para
.\"
-.\" %%%LICENSE_START(VERBATIM_ONE_PARA)
-.\" Permission is granted to distribute possibly modified copies
-.\" of this page provided the header is included verbatim,
-.\" and in case of nontrivial modification author and date
-.\" of the modification is added to the header.
-.\" %%%LICENSE_END
+.\" This man page is Copyright (C) 1999 Andi Kleen <ak@muc.de>.
.\"
.\" $Id: packet.7,v 1.13 2000/08/14 08:03:45 ak Exp $
.\"
-.TH packet 7 2023-02-05 "Linux man-pages 6.03"
+.TH packet 7 2023-07-15 "Linux man-pages 6.05.01"
.SH NAME
packet \- packet interface on device level
.SH SYNOPSIS
diff --git a/man7/path_resolution.7 b/man7/path_resolution.7
index cbe982a1a..170460316 100644
--- a/man7/path_resolution.7
+++ b/man7/path_resolution.7
@@ -2,7 +2,7 @@
.\"
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
-.TH path_resolution 7 2023-02-05 "Linux man-pages 6.03"
+.TH path_resolution 7 2023-02-05 "Linux man-pages 6.05.01"
.SH NAME
path_resolution \- how a pathname is resolved to a file
.SH DESCRIPTION
diff --git a/man7/persistent-keyring.7 b/man7/persistent-keyring.7
index 181cdfe83..472782abe 100644
--- a/man7/persistent-keyring.7
+++ b/man7/persistent-keyring.7
@@ -3,7 +3,7 @@
.\"
.\" SPDX-License-Identifier: GPL-2.0-or-later
.\"
-.TH persistent-keyring 7 2023-02-08 "Linux man-pages 6.03"
+.TH persistent-keyring 7 2023-02-08 "Linux man-pages 6.05.01"
.SH NAME
persistent-keyring \- per-user persistent keyring
.SH DESCRIPTION
diff --git a/man7/pid_namespaces.7 b/man7/pid_namespaces.7
index c5a03b064..b154fb4cf 100644
--- a/man7/pid_namespaces.7
+++ b/man7/pid_namespaces.7
@@ -4,7 +4,7 @@
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
.\"
-.TH pid_namespaces 7 2023-02-05 "Linux man-pages 6.03"
+.TH pid_namespaces 7 2023-03-30 "Linux man-pages 6.05.01"
.SH NAME
pid_namespaces \- overview of Linux PID namespaces
.SH DESCRIPTION
@@ -370,7 +370,7 @@ in
it is translated into the corresponding PID value in
the receiving process's PID namespace.
.SH STANDARDS
-Namespaces are a Linux-specific feature.
+Linux.
.SH EXAMPLES
See
.BR user_namespaces (7).
diff --git a/man7/pipe.7 b/man7/pipe.7
index d5db27696..baf05bc4a 100644
--- a/man7/pipe.7
+++ b/man7/pipe.7
@@ -2,7 +2,7 @@
.\"
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
-.TH pipe 7 2022-12-04 "Linux man-pages 6.03"
+.TH pipe 7 2023-07-16 "Linux man-pages 6.05.01"
.SH NAME
pipe \- overview of pipes and FIFOs
.SH DESCRIPTION
@@ -56,12 +56,19 @@ If a process attempts to write to a full pipe (see below), then
.BR write (2)
blocks until sufficient data has been read from the pipe
to allow the write to complete.
+.PP
Nonblocking I/O is possible by using the
.BR fcntl (2)
.B F_SETFL
operation to enable the
.B O_NONBLOCK
-open file status flag.
+open file status flag or by opening a
+.BR fifo (7)
+with
+.BR O_NONBLOCK .
+If any process has the pipe open for writing, reads fail with
+.BR EAGAIN ;
+otherwise\[em]with no potential writers\[em]reads succeed and return empty.
.PP
The communication channel provided by a pipe is a
.IR "byte stream" :
@@ -356,10 +363,9 @@ are performed only when increasing a pipe's capacity;
an unprivileged user can always decrease a pipe's capacity.
.IP (c)
The accounting and checking against the limits were done as follows:
-.IP
.RS
-.PD 0
.IP (1) 5
+.PD 0
Test whether the user has exceeded the limit.
.IP (2)
Make the new pipe buffer allocation.
diff --git a/man7/pkeys.7 b/man7/pkeys.7
index 15ca2654b..4f96f1e5b 100644
--- a/man7/pkeys.7
+++ b/man7/pkeys.7
@@ -2,7 +2,7 @@
.\"
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
-.TH pkeys 7 2022-10-30 "Linux man-pages 6.03"
+.TH pkeys 7 2023-05-03 "Linux man-pages 6.05.01"
.SH NAME
pkeys \- overview of Memory Protection Keys
.SH DESCRIPTION
@@ -169,14 +169,14 @@ Segmentation fault (core dumped)
#include <stdio.h>
#include <stdlib.h>
#include <sys/mman.h>
-
+\&
int
main(void)
{
int status;
int pkey;
int *buffer;
-
+\&
/*
* Allocate one page of memory.
*/
@@ -184,20 +184,20 @@ main(void)
MAP_ANONYMOUS | MAP_PRIVATE, \-1, 0);
if (buffer == MAP_FAILED)
err(EXIT_FAILURE, "mmap");
-
+\&
/*
* Put some random data into the page (still OK to touch).
*/
*buffer = __LINE__;
printf("buffer contains: %d\en", *buffer);
-
+\&
/*
* Allocate a protection key:
*/
pkey = pkey_alloc(0, 0);
if (pkey == \-1)
err(EXIT_FAILURE, "pkey_alloc");
-
+\&
/*
* Disable access to any memory with "pkey" set,
* even though there is none right now.
@@ -205,7 +205,7 @@ main(void)
status = pkey_set(pkey, PKEY_DISABLE_ACCESS);
if (status)
err(EXIT_FAILURE, "pkey_set");
-
+\&
/*
* Set the protection key on "buffer".
* Note that it is still read/write as far as mprotect() is
@@ -215,18 +215,18 @@ main(void)
PROT_READ | PROT_WRITE, pkey);
if (status == \-1)
err(EXIT_FAILURE, "pkey_mprotect");
-
+\&
printf("about to read buffer again...\en");
-
+\&
/*
* This will crash, because we have disallowed access.
*/
printf("buffer contains: %d\en", *buffer);
-
+\&
status = pkey_free(pkey);
if (status == \-1)
err(EXIT_FAILURE, "pkey_free");
-
+\&
exit(EXIT_SUCCESS);
}
.EE
diff --git a/man7/posixoptions.7 b/man7/posixoptions.7
index d485e30d3..b0dea3de7 100644
--- a/man7/posixoptions.7
+++ b/man7/posixoptions.7
@@ -2,7 +2,7 @@
.\"
.\" SPDX-License-Identifier: GPL-2.0-or-later
.\"
-.TH posixoptions 7 2022-10-30 "Linux man-pages 6.03"
+.TH posixoptions 7 2022-10-30 "Linux man-pages 6.05.01"
.SH NAME
posixoptions \- optional parts of the POSIX standard
.SH DESCRIPTION
diff --git a/man7/process-keyring.7 b/man7/process-keyring.7
index dfb3b21c6..53557a0f5 100644
--- a/man7/process-keyring.7
+++ b/man7/process-keyring.7
@@ -3,7 +3,7 @@
.\"
.\" SPDX-License-Identifier: GPL-2.0-or-later
.\"
-.TH process-keyring 7 2022-10-30 "Linux man-pages 6.03"
+.TH process-keyring 7 2022-10-30 "Linux man-pages 6.05.01"
.SH NAME
process-keyring \- per-process shared keyring
.SH DESCRIPTION
diff --git a/man7/pthreads.7 b/man7/pthreads.7
index b2e76d09c..2c0079807 100644
--- a/man7/pthreads.7
+++ b/man7/pthreads.7
@@ -2,7 +2,7 @@
.\"
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
-.TH pthreads 7 2023-02-05 "Linux man-pages 6.03"
+.TH pthreads 7 2023-03-18 "Linux man-pages 6.05.01"
.SH NAME
pthreads \- POSIX threads
.SH DESCRIPTION
@@ -235,7 +235,7 @@ pthread_setcancelstate()
pthread_setcanceltype()
.EE
.in
-.SS Cancellation points
+.SS Cancelation points
POSIX.1 specifies that certain functions must,
and certain other functions may, be cancelation points.
If a thread is cancelable, its cancelability type is deferred,
diff --git a/man7/pty.7 b/man7/pty.7
index 73baec2b4..5d9b429ca 100644
--- a/man7/pty.7
+++ b/man7/pty.7
@@ -2,7 +2,7 @@
.\"
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
-.TH pty 7 2022-12-04 "Linux man-pages 6.03"
+.TH pty 7 2022-12-04 "Linux man-pages 6.05.01"
.SH NAME
pty \- pseudoterminal interfaces
.SH DESCRIPTION
diff --git a/man7/queue.7 b/man7/queue.7
index 3f84b59a1..6f2d5ab28 100644
--- a/man7/queue.7
+++ b/man7/queue.7
@@ -5,7 +5,7 @@
.\" SPDX-License-Identifier: BSD-3-Clause
.\"
.\"
-.TH queue 7 2023-02-05 "Linux man-pages 6.03"
+.TH queue 7 2023-03-30 "Linux man-pages 6.05.01"
.SH NAME
queue \- implementations of linked lists and queues
.SH DESCRIPTION
@@ -115,8 +115,8 @@ However:
.IP \[bu] 3
The termination condition for traversal is more complex.
.SH STANDARDS
-Not in POSIX.1, POSIX.1-2001, or POSIX.1-2008.
-Present on the BSDs.
+BSD.
+.SH HISTORY
.I <sys/queue.h>
macros first appeared in 4.4BSD.
.SH NOTES
diff --git a/man7/random.7 b/man7/random.7
index 2e0698b85..bca67cef6 100644
--- a/man7/random.7
+++ b/man7/random.7
@@ -9,7 +9,7 @@
.\" The following web page is quite informative:
.\" http://www.2uo.de/myths-about-urandom/
.\"
-.TH random 7 2023-02-10 "Linux man-pages 6.03"
+.TH random 7 2023-02-10 "Linux man-pages 6.05.01"
.SH NAME
random \- overview of interfaces for obtaining randomness
.SH DESCRIPTION
diff --git a/man7/raw.7 b/man7/raw.7
index f010808e1..ab43dd4a6 100644
--- a/man7/raw.7
+++ b/man7/raw.7
@@ -1,16 +1,11 @@
'\" t
-.\" This man page is Copyright (C) 1999 Andi Kleen <ak@muc.de>.
+.\" SPDX-License-Identifier: Linux-man-pages-1-para
.\"
-.\" %%%LICENSE_START(VERBATIM_ONE_PARA)
-.\" Permission is granted to distribute possibly modified copies
-.\" of this page provided the header is included verbatim,
-.\" and in case of nontrivial modification author and date
-.\" of the modification is added to the header.
-.\" %%%LICENSE_END
+.\" This man page is Copyright (C) 1999 Andi Kleen <ak@muc.de>.
.\"
.\" $Id: raw.7,v 1.6 1999/06/05 10:32:08 freitag Exp $
.\"
-.TH raw 7 2022-12-15 "Linux man-pages 6.03"
+.TH raw 7 2023-07-15 "Linux man-pages 6.05.01"
.SH NAME
raw \- Linux IPv4 raw sockets
.SH SYNOPSIS
diff --git a/man7/regex.7 b/man7/regex.7
index 124e2fbc4..7a5b2d85b 100644
--- a/man7/regex.7
+++ b/man7/regex.7
@@ -35,7 +35,7 @@
.\"
.ie t .ds dg \(dg
.el .ds dg (!)
-.TH regex 7 2023-02-05 "Linux man-pages 6.03"
+.TH regex 7 2023-03-08 "Linux man-pages 6.05.01"
.SH NAME
regex \- POSIX.2 regular expressions
.SH DESCRIPTION
@@ -91,18 +91,19 @@ a sequence of \fIi\fR through \fIj\fR (inclusive) matches of the atom.
An atom is a regular expression enclosed in "\fI()\fP"
(matching a match for the regular expression),
an empty set of "\fI()\fP" (matching the null string)\*(dg,
-a \fIbracket expression\fR (see below), \[aq].\[aq]
-(matching any single character), \[aq]\[ha]\[aq] (matching the null string at the
-beginning of a line), \[aq]$\[aq] (matching the null string at the
-end of a line), a \[aq]\e\[aq] followed by one of the characters
-"\fI\[ha].[$()|*+?{\e\fP"
+a \fIbracket expression\fR (see below),
+\[aq].\[aq] (matching any single character),
+\[aq]\[ha]\[aq] (matching the null string at the beginning of a line),
+\[aq]$\[aq] (matching the null string at the end of a line),
+a \[aq]\e\[aq] followed by one of the characters "\fI\[ha].[$()|*+?{\e\fP"
(matching that character taken as an ordinary character),
a \[aq]\e\[aq] followed by any other character\*(dg
(matching that character taken as an ordinary character,
as if the \[aq]\e\[aq] had not been present\*(dg),
or a single character with no other significance (matching that character).
-A \[aq]{\[aq] followed by a character other than a digit is an ordinary
-character, not the beginning of a bound\*(dg.
+A \[aq]{\[aq] followed by a character other than a digit
+is an ordinary character,
+not the beginning of a bound\*(dg.
It is illegal to end an RE with \[aq]\e\[aq].
.PP
A \fIbracket expression\fR is a list of characters enclosed in "\fI[]\fP".
diff --git a/man7/rtld-audit.7 b/man7/rtld-audit.7
index f0bf1c256..df04a8cd6 100644
--- a/man7/rtld-audit.7
+++ b/man7/rtld-audit.7
@@ -5,9 +5,9 @@
.\"
.\" 2009-01-12, mtk, Created
.\"
-.TH RTLD-AUDIT 7 2023-02-05 "Linux man-pages 6.03"
+.TH RTLD-AUDIT 7 2023-05-03 "Linux man-pages 6.05.01"
.SH NAME
-rtld-audit \- auditing API for the dynamic linker
+rtld\-audit \- auditing API for the dynamic linker
.SH SYNOPSIS
.nf
.BR "#define _GNU_SOURCE" " /* See feature_test_macros(7) */"
@@ -455,12 +455,14 @@ is ignored.
.\" symbol binding should return the value of the 'retval' argument
.\" (not provided by GNU, but equivalent to returning outregs->lrv_eax
.\" on (say) x86-32).
-.SH STANDARDS
-This API is nonstandard, but very similar to the Solaris API,
+.SH VERSIONS
+This API is very similar to the Solaris API
described in the Solaris
.IR "Linker and Libraries Guide" ,
in the chapter
.IR "Runtime Linker Auditing Interface" .
+.SH STANDARDS
+None.
.SH NOTES
Note the following differences from the Solaris dynamic linker
auditing API:
@@ -500,16 +502,16 @@ This is reportedly fixed in glibc 2.10.
.EX
#include <link.h>
#include <stdio.h>
-
+\&
unsigned int
la_version(unsigned int version)
{
printf("la_version(): version = %u; LAV_CURRENT = %u\en",
version, LAV_CURRENT);
-
+\&
return LAV_CURRENT;
}
-
+\&
char *
la_objsearch(const char *name, uintptr_t *cookie, unsigned int flag)
{
@@ -522,10 +524,10 @@ la_objsearch(const char *name, uintptr_t *cookie, unsigned int flag)
(flag == LA_SER_CONFIG) ? "LA_SER_CONFIG" :
(flag == LA_SER_SECURE) ? "LA_SER_SECURE" :
"???");
-
+\&
return name;
}
-
+\&
void
la_activity (uintptr_t *cookie, unsigned int flag)
{
@@ -535,7 +537,7 @@ la_activity (uintptr_t *cookie, unsigned int flag)
(flag == LA_ACT_DELETE) ? "LA_ACT_DELETE" :
"???");
}
-
+\&
unsigned int
la_objopen(struct link_map *map, Lmid_t lmid, uintptr_t *cookie)
{
@@ -545,24 +547,24 @@ la_objopen(struct link_map *map, Lmid_t lmid, uintptr_t *cookie)
(lmid == LM_ID_NEWLM) ? "LM_ID_NEWLM" :
"???",
cookie);
-
+\&
return LA_FLG_BINDTO | LA_FLG_BINDFROM;
}
-
+\&
unsigned int
la_objclose (uintptr_t *cookie)
{
printf("la_objclose(): %p\en", cookie);
-
+\&
return 0;
}
-
+\&
void
la_preinit(uintptr_t *cookie)
{
printf("la_preinit(): %p\en", cookie);
}
-
+\&
uintptr_t
la_symbind32(Elf32_Sym *sym, unsigned int ndx, uintptr_t *refcook,
uintptr_t *defcook, unsigned int *flags, const char *symname)
@@ -571,10 +573,10 @@ la_symbind32(Elf32_Sym *sym, unsigned int ndx, uintptr_t *refcook,
symname, sym\->st_value);
printf(" ndx = %u; flags = %#x", ndx, *flags);
printf("; refcook = %p; defcook = %p\en", refcook, defcook);
-
+\&
return sym\->st_value;
}
-
+\&
uintptr_t
la_symbind64(Elf64_Sym *sym, unsigned int ndx, uintptr_t *refcook,
uintptr_t *defcook, unsigned int *flags, const char *symname)
@@ -583,17 +585,17 @@ la_symbind64(Elf64_Sym *sym, unsigned int ndx, uintptr_t *refcook,
symname, sym\->st_value);
printf(" ndx = %u; flags = %#x", ndx, *flags);
printf("; refcook = %p; defcook = %p\en", refcook, defcook);
-
+\&
return sym\->st_value;
}
-
+\&
Elf32_Addr
la_i86_gnu_pltenter(Elf32_Sym *sym, unsigned int ndx,
uintptr_t *refcook, uintptr_t *defcook, La_i86_regs *regs,
unsigned int *flags, const char *symname, long *framesizep)
{
printf("la_i86_gnu_pltenter(): %s (%p)\en", symname, sym\->st_value);
-
+\&
return sym\->st_value;
}
.EE
diff --git a/man7/rtnetlink.7 b/man7/rtnetlink.7
index 5d58948b1..3b6465f5a 100644
--- a/man7/rtnetlink.7
+++ b/man7/rtnetlink.7
@@ -1,18 +1,13 @@
'\" t
-.\" This man page is Copyright (C) 1999 Andi Kleen <ak@muc.de>.
+.\" SPDX-License-Identifier: Linux-man-pages-1-para
.\"
-.\" %%%LICENSE_START(VERBATIM_ONE_PARA)
-.\" Permission is granted to distribute possibly modified copies
-.\" of this page provided the header is included verbatim,
-.\" and in case of nontrivial modification author and date
-.\" of the modification is added to the header.
-.\" %%%LICENSE_END
+.\" This man page is Copyright (C) 1999 Andi Kleen <ak@muc.de>.
.\"
.\" Based on the original comments from Alexey Kuznetsov, written with
.\" help from Matthew Wilcox.
.\" $Id: rtnetlink.7,v 1.8 2000/01/22 01:55:04 freitag Exp $
.\"
-.TH rtnetlink 7 2022-12-15 "Linux man-pages 6.03"
+.TH rtnetlink 7 2023-07-15 "Linux man-pages 6.05.01"
.SH NAME
rtnetlink \- Linux routing socket
.SH SYNOPSIS
@@ -105,6 +100,9 @@ IFLA_QDISC:asciiz string:Queueing discipline
IFLA_STATS:T{
see below
T}:Interface Statistics
+IFLA_PERM_ADDRESS:hardware address:T{
+hardware address provided by device (since Linux 5.5)
+T}
.TE
.IP
The value type for
@@ -203,7 +201,7 @@ struct rtmsg {
unsigned char rtm_protocol; /* Routing protocol; see below */
unsigned char rtm_scope; /* See below */
unsigned char rtm_type; /* See below */
-
+\&
unsigned int rtm_flags;
};
.EE
@@ -440,7 +438,7 @@ struct ndmsg {
__u8 ndm_flags; /* Flags */
__u8 ndm_type;
};
-
+\&
struct nda_cacheinfo {
__u32 ndm_confirmed;
__u32 ndm_used;
diff --git a/man7/sched.7 b/man7/sched.7
index f5249e9be..78545053f 100644
--- a/man7/sched.7
+++ b/man7/sched.7
@@ -10,7 +10,7 @@
.\"
.\" Worth looking at: http://rt.wiki.kernel.org/index.php
.\"
-.TH sched 7 2023-02-10 "Linux man-pages 6.03"
+.TH sched 7 2023-02-10 "Linux man-pages 6.05.01"
.SH NAME
sched \- overview of CPU scheduling
.SH DESCRIPTION
diff --git a/man7/sem_overview.7 b/man7/sem_overview.7
index 0700b3d21..c452a1c24 100644
--- a/man7/sem_overview.7
+++ b/man7/sem_overview.7
@@ -2,7 +2,7 @@
.\"
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
-.TH sem_overview 7 2022-12-04 "Linux man-pages 6.03"
+.TH sem_overview 7 2022-12-04 "Linux man-pages 6.05.01"
.SH NAME
sem_overview \- overview of POSIX semaphores
.SH DESCRIPTION
diff --git a/man7/session-keyring.7 b/man7/session-keyring.7
index 2f1d932c6..d8a950f1d 100644
--- a/man7/session-keyring.7
+++ b/man7/session-keyring.7
@@ -3,7 +3,7 @@
.\"
.\" SPDX-License-Identifier: GPL-2.0-or-later
.\"
-.TH session-keyring 7 2023-01-22 "Linux man-pages 6.03"
+.TH session-keyring 7 2023-03-12 "Linux man-pages 6.05.01"
.SH NAME
session-keyring \- session shared process keyring
.SH DESCRIPTION
@@ -12,7 +12,9 @@ It is typically created by
.BR pam_keyinit (8)
when a user logs in and a link will be added that refers to the
.BR user\-keyring (7).
-Optionally, PAM may revoke the session keyring on logout.
+Optionally,
+.BR PAM (7)
+may revoke the session keyring on logout.
(In typical configurations, PAM does do this revocation.)
The session keyring has the name (description)
.IR _ses .
diff --git a/man7/shm_overview.7 b/man7/shm_overview.7
index 8432100cb..9a33ea0c5 100644
--- a/man7/shm_overview.7
+++ b/man7/shm_overview.7
@@ -3,7 +3,7 @@
.\"
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
-.TH shm_overview 7 2022-12-04 "Linux man-pages 6.03"
+.TH shm_overview 7 2022-12-04 "Linux man-pages 6.05.01"
.SH NAME
shm_overview \- overview of POSIX shared memory
.SH DESCRIPTION
diff --git a/man7/sigevent.7 b/man7/sigevent.7
index a5232a52e..1ae860f0f 100644
--- a/man7/sigevent.7
+++ b/man7/sigevent.7
@@ -3,7 +3,7 @@
.\"
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
-.TH sigevent 7 2022-10-30 "Linux man-pages 6.03"
+.TH sigevent 7 2022-10-30 "Linux man-pages 6.05.01"
.SH NAME
sigevent \- structure for notification from asynchronous routines
.SH SYNOPSIS
diff --git a/man7/signal-safety.7 b/man7/signal-safety.7
index 8e030b52e..4bcb47895 100644
--- a/man7/signal-safety.7
+++ b/man7/signal-safety.7
@@ -3,7 +3,7 @@
.\"
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
-.TH signal-safety 7 2023-02-05 "Linux man-pages 6.03"
+.TH signal-safety 7 2023-02-05 "Linux man-pages 6.05.01"
.SH NAME
signal-safety \- async-signal-safe functions
.SH DESCRIPTION
diff --git a/man7/signal.7 b/man7/signal.7
index 9b56acfcf..6f6f9c906 100644
--- a/man7/signal.7
+++ b/man7/signal.7
@@ -23,7 +23,7 @@
.\" Added section on stop/cont signals interrupting syscalls.
.\" 2008-10-05, mtk: various additions
.\"
-.TH signal 7 2023-02-05 "Linux man-pages 6.03"
+.TH signal 7 2023-04-03 "Linux man-pages 6.05.01"
.SH NAME
signal \- overview of signals
.SH DESCRIPTION
@@ -927,7 +927,7 @@ For a discussion of async-signal-safe functions, see
.BR signal\-safety (7).
.PP
The
-.I /proc/[pid]/task/[tid]/status
+.IR /proc/ pid /task/ tid /status
file contains various fields that show the signals
that a thread is blocking
.RI ( SigBlk ),
@@ -943,7 +943,7 @@ as well as the set of pending signals that are directed
to the process as a whole
.RI ( ShdPnd ).
The corresponding fields in
-.I /proc/[pid]/status
+.IR /proc/ pid /status
show the information for the main thread.
See
.BR proc (5)
diff --git a/man7/sock_diag.7 b/man7/sock_diag.7
index a279e787a..adf47b7b5 100644
--- a/man7/sock_diag.7
+++ b/man7/sock_diag.7
@@ -2,7 +2,7 @@
.\" Copyright (c) 2016 Dmitry V. Levin <ldv@altlinux.org>
.\"
.\" SPDX-License-Identifier: GPL-2.0-or-later
-.TH sock_diag 7 2023-02-05 "Linux man-pages 6.03"
+.TH sock_diag 7 2023-05-03 "Linux man-pages 6.05.01"
.SH NAME
sock_diag \- obtaining information about sockets
.SH SYNOPSIS
@@ -482,9 +482,9 @@ struct inet_diag_msg {
__u8 idiag_state;
__u8 idiag_timer;
__u8 idiag_retrans;
-
+\&
struct inet_diag_sockid id;
-
+\&
__u32 idiag_expires;
__u32 idiag_rqueue;
__u32 idiag_wqueue;
@@ -617,7 +617,7 @@ and
.B INET_DIAG_SKMEMINFO
were introduced in Linux 3.6.
.SH STANDARDS
-The NETLINK_SOCK_DIAG API is Linux-specific.
+Linux.
.SH EXAMPLES
The following example program prints inode number, peer's inode number,
and name of all UNIX domain sockets in the current namespace.
@@ -633,7 +633,7 @@ and name of all UNIX domain sockets in the current namespace.
#include <linux/rtnetlink.h>
#include <linux/sock_diag.h>
#include <linux/unix_diag.h>
-
+\&
static int
send_query(int fd)
{
@@ -666,20 +666,20 @@ send_query(int fd)
.msg_iov = &iov,
.msg_iovlen = 1
};
-
+\&
for (;;) {
if (sendmsg(fd, &msg, 0) < 0) {
if (errno == EINTR)
continue;
-
+\&
perror("sendmsg");
return \-1;
}
-
+\&
return 0;
}
}
-
+\&
static int
print_diag(const struct unix_diag_msg *diag, unsigned int len)
{
@@ -691,12 +691,12 @@ print_diag(const struct unix_diag_msg *diag, unsigned int len)
fprintf(stderr, "unexpected family %u\en", diag\->udiag_family);
return \-1;
}
-
+\&
unsigned int rta_len = len \- NLMSG_LENGTH(sizeof(*diag));
unsigned int peer = 0;
size_t path_len = 0;
char path[sizeof(((struct sockaddr_un *) 0)\->sun_path) + 1];
-
+\&
for (struct rtattr *attr = (struct rtattr *) (diag + 1);
RTA_OK(attr, rta_len); attr = RTA_NEXT(attr, rta_len)) {
switch (attr\->rta_type) {
@@ -709,27 +709,27 @@ print_diag(const struct unix_diag_msg *diag, unsigned int len)
path[path_len] = \[aq]\e0\[aq];
}
break;
-
+\&
case UNIX_DIAG_PEER:
if (RTA_PAYLOAD(attr) >= sizeof(peer))
peer = *(unsigned int *) RTA_DATA(attr);
break;
}
}
-
+\&
printf("inode=%u", diag\->udiag_ino);
-
+\&
if (peer)
printf(", peer=%u", peer);
-
+\&
if (path_len)
printf(", name=%s%s", *path ? "" : "@",
*path ? path : path + 1);
-
+\&
putchar(\[aq]\en\[aq]);
return 0;
}
-
+\&
static int
receive_responses(int fd)
{
@@ -740,7 +740,7 @@ receive_responses(int fd)
.iov_len = sizeof(buf)
};
int flags = 0;
-
+\&
for (;;) {
struct msghdr msg = {
.msg_name = &nladdr,
@@ -748,72 +748,72 @@ receive_responses(int fd)
.msg_iov = &iov,
.msg_iovlen = 1
};
-
+\&
ssize_t ret = recvmsg(fd, &msg, flags);
-
+\&
if (ret < 0) {
if (errno == EINTR)
continue;
-
+\&
perror("recvmsg");
return \-1;
}
if (ret == 0)
return 0;
-
+\&
if (nladdr.nl_family != AF_NETLINK) {
fputs("!AF_NETLINK\en", stderr);
return \-1;
}
-
+\&
const struct nlmsghdr *h = (struct nlmsghdr *) buf;
-
+\&
if (!NLMSG_OK(h, ret)) {
fputs("!NLMSG_OK\en", stderr);
return \-1;
}
-
+\&
for (; NLMSG_OK(h, ret); h = NLMSG_NEXT(h, ret)) {
if (h\->nlmsg_type == NLMSG_DONE)
return 0;
-
+\&
if (h\->nlmsg_type == NLMSG_ERROR) {
const struct nlmsgerr *err = NLMSG_DATA(h);
-
+\&
if (h\->nlmsg_len < NLMSG_LENGTH(sizeof(*err))) {
fputs("NLMSG_ERROR\en", stderr);
} else {
errno = \-err\->error;
perror("NLMSG_ERROR");
}
-
+\&
return \-1;
}
-
+\&
if (h\->nlmsg_type != SOCK_DIAG_BY_FAMILY) {
fprintf(stderr, "unexpected nlmsg_type %u\en",
(unsigned) h\->nlmsg_type);
return \-1;
}
-
+\&
if (print_diag(NLMSG_DATA(h), h\->nlmsg_len))
return \-1;
}
}
}
-
+\&
int
main(void)
{
int fd = socket(AF_NETLINK, SOCK_RAW, NETLINK_SOCK_DIAG);
-
+\&
if (fd < 0) {
perror("socket");
return 1;
}
-
+\&
int ret = send_query(fd) || receive_responses(fd);
-
+\&
close(fd);
return ret;
}
diff --git a/man7/socket.7 b/man7/socket.7
index b5d70cf26..2cc24d90e 100644
--- a/man7/socket.7
+++ b/man7/socket.7
@@ -1,14 +1,9 @@
'\" t
+.\" SPDX-License-Identifier: Linux-man-pages-1-para
+.\"
.\" This man page is Copyright (C) 1999 Andi Kleen <ak@muc.de>.
.\" and copyright (c) 1999 Matthew Wilcox.
.\"
-.\" %%%LICENSE_START(VERBATIM_ONE_PARA)
-.\" Permission is granted to distribute possibly modified copies
-.\" of this page provided the header is included verbatim,
-.\" and in case of nontrivial modification author and date
-.\" of the modification is added to the header.
-.\" %%%LICENSE_END
-.\"
.\" 2002-10-30, Michael Kerrisk, <mtk.manpages@gmail.com>
.\" Added description of SO_ACCEPTCONN
.\" 2004-05-20, aeb, added SO_RCVTIMEO/SO_SNDTIMEO text.
@@ -52,7 +47,7 @@
.\" commit ea02f9411d9faa3553ed09ce0ec9f00ceae9885e
.\" Author: Michal Sekletar <msekleta@redhat.com>
.\"
-.TH socket 7 2023-02-05 "Linux man-pages 6.03"
+.TH socket 7 2023-07-15 "Linux man-pages 6.05.01"
.SH NAME
socket \- Linux socket interface
.SH SYNOPSIS
@@ -539,7 +534,7 @@ flows are received.
It allows each worker thread to be associated with
a NIC HW receive queue and service all the connection
requests received on that RX queue.
-This mapping between a app thread and
+This mapping between an app thread and
a HW NIC queue streamlines the
flow of data from the NIC to the application.
.TP
@@ -705,7 +700,7 @@ calls would have the effect noted in the comments:
.EX
int ov = 4; // Set peek offset to 4
setsockopt(fd, SOL_SOCKET, SO_PEEK_OFF, &ov, sizeof(ov));
-
+\&
recv(fd, buf, 2, MSG_PEEK); // Peeks "cc"; offset set to 6
recv(fd, buf, 2, MSG_PEEK); // Peeks "dd"; offset set to 8
recv(fd, buf, 2, 0); // Reads "aa"; offset set to 6
diff --git a/man7/spufs.7 b/man7/spufs.7
index 7710acccb..fc3b4241f 100644
--- a/man7/spufs.7
+++ b/man7/spufs.7
@@ -10,7 +10,7 @@
.\" 2007-07-10, quite a lot of polishing by mtk
.\" 2007-09-28, updates for newer kernels by Jeremy Kerr <jk@ozlabs.org>
.\"
-.TH spufs 7 2023-02-05 "Linux man-pages 6.03"
+.TH spufs 7 2023-02-05 "Linux man-pages 6.05.01"
.SH NAME
spufs \- SPU filesystem
.SH DESCRIPTION
diff --git a/man7/standards.7 b/man7/standards.7
index e6684bcd3..c1df6f8a3 100644
--- a/man7/standards.7
+++ b/man7/standards.7
@@ -2,7 +2,7 @@
.\"
.\" SPDX-License-Identifier: GPL-2.0-or-later
.\"
-.TH standards 7 2022-10-30 "Linux man-pages 6.03"
+.TH standards 7 2023-03-13 "Linux man-pages 6.05.01"
.SH NAME
standards \- C and UNIX Standards
.SH DESCRIPTION
@@ -101,7 +101,7 @@ Available online at
.B C11
This revision of the C language standard was ratified by ISO in 2011
.RI ( "ISO/IEC 9899:2011" ).
-.IP
+.TP
.B LFS
The Large File Summit specification, completed in 1996.
This specification defined mechanisms that allowed 32-bit systems
@@ -132,7 +132,7 @@ describing real-time facilities
for portable operating systems, ratified by ISO in 1996
.RI ( "ISO/IEC 9945-1:1996" ).
.TP
-.B POSIX.1c " (formerly known as \fIPOSIX.4a\fP)"
+.BR POSIX.1c " (formerly known as \fIPOSIX.4a\fP)"
IEEE Std 1003.1c-1995, which describes the POSIX threads interfaces.
.TP
.B POSIX.1d
diff --git a/man7/string_copying.7 b/man7/string_copying.7
index 62365897e..814eabddd 100644
--- a/man7/string_copying.7
+++ b/man7/string_copying.7
@@ -2,7 +2,7 @@
.\"
.\" SPDX-License-Identifier: BSD-3-Clause
.\"
-.TH string_copying 7 2023-02-05 "Linux man-pages 6.03"
+.TH string_copying 7 2023-07-29 "Linux man-pages 6.05.01"
.\" ----- NAME :: -----------------------------------------------------/
.SH NAME
stpcpy,
@@ -49,7 +49,7 @@ const char *restrict " src ,
.PP
// Zero a fixed-width buffer, and
// copy a string into a character sequence with truncation.
-.BI "char *strncpy(char " dest "[restrict ." sz "], \
+.BI "char *strncpy(char " dst "[restrict ." sz "], \
const char *restrict " src ,
.BI " size_t " sz );
.PP
@@ -203,7 +203,7 @@ Nowadays,
compilers can detect most programmer errors with features like
compiler warnings,
static analyzers, and
-.BR \%_FORTIFY_SOURCE
+.B \%_FORTIFY_SOURCE
(see
.BR ftm (7)).
Keeping the code simple
@@ -223,8 +223,7 @@ It only requires to check for truncation once after all chained calls.
.BR strlcpy (3bsd)
and
.BR strlcat (3bsd)
-are designed to crash if the input string is invalid
-(doesn't contain a terminating null byte).
+are similar, but less efficient when chained.
.IP \[bu]
.BR stpncpy (3)
and
@@ -280,7 +279,7 @@ instead of
In programs that make considerable use of strings or character sequences,
and need the best performance,
using overlapping character sequences can make a big difference.
-It allows holding subsequences of a larger character sequence.
+It allows holding subsequences of a larger character sequence,
while not duplicating memory
nor using time to do a copy.
.PP
@@ -317,12 +316,12 @@ List of functions:
.PD 0
.BR stpcpy (3)
.IP \[bu]
-.BR strcpy "(3), \c"
+.BR strcpy (3),
.BR strcat (3)
.IP \[bu]
.BR stpecpy (3)
.IP \[bu]
-.BR strlcpy "(3bsd), \c"
+.BR strlcpy (3bsd),
.BR strlcat (3bsd)
.PD
.PP
@@ -397,7 +396,7 @@ It returns a pointer suitable for chaining.
Truncation needs to be detected only once after the last chained call.
.IP
This function is not provided by any library;
-See EXAMPLES for a reference implementation.
+see EXAMPLES for a reference implementation.
.\" ----- DESCRIPTION :: Functions :: strlcpy(3bsd), strlcat(3bsd) ----/
.TP
.BR strlcpy (3bsd)
@@ -410,9 +409,6 @@ isn't large enough to hold the copy,
the resulting string is truncated
(but it is guaranteed to be null-terminated).
They return the length of the total string they tried to create.
-These functions force a SIGSEGV if the
-.I src
-pointer is not a string.
.IP
.BR stpecpy (3)
is a simpler alternative to these functions.
@@ -444,8 +440,8 @@ is a more useful alternative to this function.
.\" ----- DESCRIPTION :: Functions :: zustr2ustp(3) --------------------/
.TP
.BR zustr2ustp (3)
-This function copies the input character sequence
-contained in a null-padded wixed-width buffer,
+This function copies the input character sequence,
+contained in a null-padded fixed-width buffer,
into a destination character sequence.
The programmer is responsible for allocating a buffer large enough.
It returns a pointer suitable for chaining.
@@ -455,12 +451,12 @@ since the size of the original character sequence is always known,
so it wouldn't be very useful.
.IP
This function is not provided by any library;
-See EXAMPLES for a reference implementation.
+see EXAMPLES for a reference implementation.
.\" ----- DESCRIPTION :: Functions :: zustr2stp(3) --------------------/
.TP
.BR zustr2stp (3)
-This function copies the input character sequence
-contained in a null-padded wixed-width buffer,
+This function copies the input character sequence,
+contained in a null-padded fixed-width buffer,
into a destination string.
The programmer is responsible for allocating a buffer large enough.
It returns a pointer suitable for chaining.
@@ -470,7 +466,7 @@ since the size of the original character sequence is always known,
so it wouldn't be very useful.
.IP
This function is not provided by any library;
-See EXAMPLES for a reference implementation.
+see EXAMPLES for a reference implementation.
.\" ----- DESCRIPTION :: Functions :: strncat(3) ----------------------/
.TP
.BR strncat (3)
@@ -478,8 +474,8 @@ Do not confuse this function with
.BR strncpy (3);
they are not related at all.
.IP
-This function catenates the input character sequence
-contained in a null-padded wixed-width buffer,
+This function catenates the input character sequence,
+contained in a null-padded fixed-width buffer,
into a destination string.
The programmer is responsible for allocating a buffer large enough.
The return value is useless.
@@ -582,7 +578,6 @@ on truncation.
.IP
.BR stpecpy (3)
is a simpler and faster alternative to this function.
-.RE
.\" ----- CAVEATS :: --------------------------------------------------/
.SH CAVEATS
Don't mix chain calls to truncating and non-truncating functions.
@@ -748,63 +743,62 @@ Here are reference implementations for functions not provided by libc.
.in +4n
.EX
/* This code is in the public domain. */
-
+\&
.\" ----- EXAMPLES :: Implementations :: stpecpy(3) -------------------/
char *
.IR stpecpy "(char *dst, char end[0], const char *restrict src)"
{
char *p;
-
- if (src[strlen(src)] != \[aq]\e0\[aq])
- raise(SIGSEGV);
-
+\&
+ if (dst == NULL)
+ return NULL;
if (dst == end)
return end;
-
+\&
p = memccpy(dst, src, \[aq]\e0\[aq], end \- dst);
if (p != NULL)
return p \- 1;
-
+\&
/* truncation detected */
end[\-1] = \[aq]\e0\[aq];
return end;
}
-
+\&
.\" ----- EXAMPLES :: Implementations :: zustr2ustp(3) ----------------/
char *
.IR zustr2ustp "(char *restrict dst, const char *restrict src, size_t sz)"
{
return ustpcpy(dst, src, strnlen(src, sz));
}
-
+\&
.\" ----- EXAMPLES :: Implementations :: zustr2stp(3) -----------------/
char *
.IR zustr2stp "(char *restrict dst, const char *restrict src, size_t sz)"
{
char *p;
-
+\&
p = zustr2ustp(dst, src, sz);
*p = \[aq]\e0\[aq];
-
+\&
return p;
}
-
+\&
.\" ----- EXAMPLES :: Implementations :: ustpcpy(3) -------------------/
char *
.IR ustpcpy "(char *restrict dst, const char *restrict src, size_t len)"
{
return mempcpy(dst, src, len);
}
-
+\&
.\" ----- EXAMPLES :: Implementations :: ustr2stp(3) ------------------/
char *
.IR ustr2stp "(char *restrict dst, const char *restrict src, size_t len)"
{
char *p;
-
+\&
p = ustpcpy(dst, src, len);
*p = \[aq]\e0\[aq];
-
+\&
return p;
}
.EE
diff --git a/man7/suffixes.7 b/man7/suffixes.7
index 096e9e602..5e970f427 100644
--- a/man7/suffixes.7
+++ b/man7/suffixes.7
@@ -14,7 +14,7 @@
.\" Modified Thu Nov 16 23:28:25 2000 by David A. Wheeler
.\" <dwheeler@dwheeler.com>
.\"
-.TH SUFFIXES 7 2023-02-05 "Linux man-pages 6.03"
+.TH SUFFIXES 7 2023-03-17 "Linux man-pages 6.05.01"
.SH NAME
suffixes \- list of file suffixes
.SH DESCRIPTION
@@ -136,6 +136,8 @@ Suffix File type
\&.java a Java source file
\&.jpeg Joint Photographic Experts Group format
\&.jpg poor man's \fI.jpeg\fP
+\&.js JavaScript source code
+\&.jsx JSX (JavaScript XML-like extension) source code
\&.kmap \fBlyx\fP(1) keymap
\&.l equivalent to \fI.lex\fP or \fI.lisp\fP
\&.lex \fBlex\fP(1) or \fBflex\fP(1) files
@@ -207,6 +209,7 @@ Suffix File type
\&.sgml SGML source file
\&.sh \fBsh\fP(1) scripts
\&.shar archive created by the \fBshar\fP(1) utility
+\&.shtml HTML using Server Side Includes
\&.so Shared library or dynamically loadable object
\&.sql SQL source
\&.sqml SQML schema or query program
@@ -229,6 +232,8 @@ Suffix File type
\&.tk tcl/tk script
\&.tmp temporary file
\&.tmpl template files
+\&.ts TypeScript source code
+\&.tsx TypeScript with JSX source code (\fI.ts\fP + \fI.jsx\fP)
\&.txt equivalent to \fI.text\fP
\&.uu equivalent to \fI.uue\fP
\&.uue binary file encoded with \fBuuencode\fP(1)
diff --git a/man7/symlink.7 b/man7/symlink.7
index bc2c00b9c..9c238b2eb 100644
--- a/man7/symlink.7
+++ b/man7/symlink.7
@@ -10,7 +10,7 @@
.\" 2008-06-11, mtk, Taken from FreeBSD 6.2 and heavily edited for
.\" specific Linux details, improved readability, and man-pages style.
.\"
-.TH symlink 7 2023-02-05 "Linux man-pages 6.03"
+.TH symlink 7 2023-04-03 "Linux man-pages 6.05.01"
.SH NAME
symlink \- symbolic link handling
.SH DESCRIPTION
@@ -67,7 +67,9 @@ known as "magic links", which
can be found in certain pseudofilesystems such as
.BR proc (5)
(examples include
-.IR /proc/[pid]/exe " and " /proc/[pid]/fd/* ).
+.IR /proc/ pid /exe
+and
+.IR /proc/ pid /fd/ *).
Unlike normal symbolic links, magic links are not resolved through
pathname-expansion, but instead act as direct references to the kernel's own
representation of a file handle.
@@ -84,10 +86,14 @@ magic links have been used as attack vectors in various exploits.
The owner and group of an existing symbolic link can be changed
using
.BR lchown (2).
-The only time that the ownership of a symbolic link matters is
+The ownership of a symbolic link matters
when the link is being removed or renamed in a directory that
has the sticky bit set (see
-.BR stat (2)).
+.BR inode (7)),
+and when the
+.I fs.protected_symlinks
+sysctl is set (see
+.BR proc (5)).
.PP
The last access and last modification timestamps
of a symbolic link can be changed using
diff --git a/man7/system_data_types.7 b/man7/system_data_types.7
index ff75bd90a..c4b3925cd 100644
--- a/man7/system_data_types.7
+++ b/man7/system_data_types.7
@@ -4,7 +4,7 @@
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
.\"
-.TH system_data_types 7 2023-02-05 "Linux man-pages 6.03"
+.TH system_data_types 7 2023-05-20 "Linux man-pages 6.05.01"
.SH NAME
system_data_types \- overview of system data types
.SH DESCRIPTION
@@ -183,8 +183,8 @@ POSIX.1-2001 and later.
.PP
.EX
union sigval {
- int sigval_int; /* Integer value */
- void *sigval_ptr; /* Pointer value */
+ int sival_int; /* Integer value */
+ void *sival_ptr; /* Pointer value */
};
.EE
.PP
@@ -276,42 +276,42 @@ are used as explained in the notes section above.
#include <stdio.h>
#include <stdlib.h>
#include <sys/types.h>
-
+\&
int
main (void)
{
static const char *const str = "500000 us in half a second";
suseconds_t us;
intmax_t tmp;
-
+\&
/* Scan the number from the string into the temporary variable. */
-
+\&
sscanf(str, "%jd", &tmp);
-
+\&
/* Check that the value is within the valid range of suseconds_t. */
-
+\&
if (tmp < \-1 || tmp > 1000000) {
fprintf(stderr, "Scanned value outside valid range!\en");
exit(EXIT_FAILURE);
}
-
+\&
/* Copy the value to the suseconds_t variable \[aq]us\[aq]. */
-
+\&
us = tmp;
-
+\&
/* Even though suseconds_t can hold the value \-1, this isn\[aq]t
a sensible number of microseconds. */
-
+\&
if (us < 0) {
fprintf(stderr, "Scanned value shouldn\[aq]t be negative!\en");
exit(EXIT_FAILURE);
}
-
+\&
/* Print the value. */
-
+\&
printf("There are %jd microseconds in half a second.\en",
(intmax_t) us);
-
+\&
exit(EXIT_SUCCESS);
}
.EE
diff --git a/man7/sysvipc.7 b/man7/sysvipc.7
index 4ebfa6617..307292c96 100644
--- a/man7/sysvipc.7
+++ b/man7/sysvipc.7
@@ -2,7 +2,7 @@
.\"
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
-.TH sysvipc 7 2022-10-30 "Linux man-pages 6.03"
+.TH sysvipc 7 2022-10-30 "Linux man-pages 6.05.01"
.SH NAME
sysvipc \- System V interprocess communication mechanisms
.SH DESCRIPTION
diff --git a/man7/tcp.7 b/man7/tcp.7
index 53f8953d8..aec6b780b 100644
--- a/man7/tcp.7
+++ b/man7/tcp.7
@@ -1,15 +1,10 @@
+.\" SPDX-License-Identifier: Linux-man-pages-1-para
+.\"
.\" This man page is Copyright (C) 1999 Andi Kleen <ak@muc.de>.
.\" and Copyright (C) 2008 Michael Kerrisk <mtk.manpages@gmail.com>
.\" Note also that many pieces are drawn from the kernel source file
.\" Documentation/networking/ip-sysctl.txt.
.\"
-.\" %%%LICENSE_START(VERBATIM_ONE_PARA)
-.\" Permission is granted to distribute possibly modified copies
-.\" of this page provided the header is included verbatim,
-.\" and in case of nontrivial modification author and date
-.\" of the modification is added to the header.
-.\" %%%LICENSE_END
-.\"
.\" 2.4 Updates by Nivedita Singhvi 4/20/02 <nivedita@us.ibm.com>.
.\" Modified, 2004-11-11, Michael Kerrisk and Andries Brouwer
.\" Updated details of interaction of TCP_CORK and TCP_NODELAY.
@@ -93,7 +88,7 @@
.\" commit cd8ae85299d54155702a56811b2e035e63064d3d
.\" Author: Eric Dumazet <edumazet@google.com>
.\"
-.TH tcp 7 2023-02-10 "Linux man-pages 6.03"
+.TH tcp 7 2023-07-15 "Linux man-pages 6.05.01"
.SH NAME
tcp \- TCP protocol
.SH SYNOPSIS
@@ -1426,7 +1421,7 @@ is returned.
.B SIOCINQ
is defined in
.IR <linux/sockios.h> .
-.\" FIXME http://sources.redhat.com/bugzilla/show_bug.cgi?id=12002,
+.\" FIXME https://www.sourceware.org/bugzilla/show_bug.cgi?id=12002,
.\" filed 2010-09-10, may cause SIOCINQ to be defined in glibc headers
Alternatively,
you can use the synonymous
@@ -1477,7 +1472,7 @@ is returned.
.B SIOCOUTQ
is defined in
.IR <linux/sockios.h> .
-.\" FIXME . http://sources.redhat.com/bugzilla/show_bug.cgi?id=12002,
+.\" FIXME . https://www.sourceware.org/bugzilla/show_bug.cgi?id=12002,
.\" filed 2010-09-10, may cause SIOCOUTQ to be defined in glibc headers
Alternatively,
you can use the synonymous
diff --git a/man7/termio.7 b/man7/termio.7
index 13d9036fe..08bba54eb 100644
--- a/man7/termio.7
+++ b/man7/termio.7
@@ -4,7 +4,7 @@
.\"
.\" 28 Dec 2006 - Initial Creation
.\"
-.TH termio 7 2022-10-30 "Linux man-pages 6.03"
+.TH termio 7 2022-10-30 "Linux man-pages 6.05.01"
.SH NAME
termio \- System V terminal driver interface
.SH DESCRIPTION
diff --git a/man7/thread-keyring.7 b/man7/thread-keyring.7
index 2374893da..524bf2273 100644
--- a/man7/thread-keyring.7
+++ b/man7/thread-keyring.7
@@ -3,7 +3,7 @@
.\"
.\" SPDX-License-Identifier: GPL-2.0-or-later
.\"
-.TH thread-keyring 7 2022-10-30 "Linux man-pages 6.03"
+.TH thread-keyring 7 2022-10-30 "Linux man-pages 6.05.01"
.SH NAME
thread-keyring \- per-thread keyring
.SH DESCRIPTION
diff --git a/man7/time.7 b/man7/time.7
index e3afa9c9c..ee0db5d88 100644
--- a/man7/time.7
+++ b/man7/time.7
@@ -5,7 +5,7 @@
.\" 2008-06-24, mtk: added some details about where jiffies come into
.\" play; added section on high-resolution timers.
.\"
-.TH time 7 2023-01-22 "Linux man-pages 6.03"
+.TH time 7 2023-01-22 "Linux man-pages 6.05.01"
.SH NAME
time \- overview of time and timers
.SH DESCRIPTION
diff --git a/man7/time_namespaces.7 b/man7/time_namespaces.7
index 253a5a5fe..6e2999622 100644
--- a/man7/time_namespaces.7
+++ b/man7/time_namespaces.7
@@ -3,7 +3,7 @@
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
.\"
-.TH time_namespaces 7 2023-02-05 "Linux man-pages 6.03"
+.TH time_namespaces 7 2023-03-12 "Linux man-pages 6.05.01"
.SH NAME
time_namespaces \- overview of Linux time namespaces
.SH DESCRIPTION
@@ -56,13 +56,13 @@ this symbolic link in a call to
.BR setns (2)
in order to move into the namespace.)
.\"
-.SS /proc/PID/timens_offsets
+.SS \fI/proc/\fPpid\fI/timens_offsets\fP
Associated with each time namespace are offsets,
expressed with respect to the initial time namespace,
that define the values of the monotonic and
boot-time clocks in that namespace.
These offsets are exposed via the file
-.IR /proc/PID/timens_offsets .
+.IR /proc/ pid /timens_offsets .
Within this file,
the offsets are expressed as lines consisting of
three space-delimited fields:
diff --git a/man7/udp.7 b/man7/udp.7
index b3963ee56..45c5cad1f 100644
--- a/man7/udp.7
+++ b/man7/udp.7
@@ -1,15 +1,10 @@
-.\" This man page is Copyright (C) 1999 Andi Kleen <ak@muc.de>.
+.\" SPDX-License-Identifier: Linux-man-pages-1-para
.\"
-.\" %%%LICENSE_START(VERBATIM_ONE_PARA)
-.\" Permission is granted to distribute possibly modified copies
-.\" of this page provided the header is included verbatim,
-.\" and in case of nontrivial modification author and date
-.\" of the modification is added to the header.
-.\" %%%LICENSE_END
+.\" This man page is Copyright (C) 1999 Andi Kleen <ak@muc.de>.
.\"
.\" $Id: udp.7,v 1.7 2000/01/22 01:55:05 freitag Exp $
.\"
-.TH udp 7 2022-12-04 "Linux man-pages 6.03"
+.TH udp 7 2023-07-15 "Linux man-pages 6.05.01"
.SH NAME
udp \- User Datagram Protocol for IPv4
.SH SYNOPSIS
@@ -204,6 +199,49 @@ portable.
.\" UDP_ENCAP_ESPINUDP draft-ietf-ipsec-udp-encaps-06
.\" UDP_ENCAP_L2TPINUDP rfc2661
.\" FIXME Document UDP_NO_CHECK6_TX and UDP_NO_CHECK6_RX, added in Linux 3.16
+.TP
+.BR UDP_SEGMENT " (since Linux 4.18)"
+Enables UDP segmentation offload.
+Segmentation offload reduces
+.BR send (2)
+cost by transferring multiple datagrams worth of data
+as a single large packet through the kernel transmit path,
+even when that exceeds MTU.
+As late as possible,
+the large packet is split by segment size into a series of datagrams.
+This segmentation offload step is deferred to hardware if supported,
+else performed in software.
+This option takes a value in the range
+.RB [ 0 ,\~ USHRT_MAX ]
+that sets the segment size:
+the size of datagram payload,
+excluding the UDP header.
+The segment size must be chosen such that
+at most 64 datagrams are sent in a single call
+and that the datagrams after segmentation meet
+the same MTU rules that apply to datagrams sent without this option.
+Segmentation offload depends on checksum offload,
+as datagram checksums are computed after segmentation.
+The option may also be set for individual
+.BR sendmsg (2)
+calls by passing it as a
+.BR cmsg (3).
+A value of zero disables the feature.
+This option should not be used in code intended to be portable.
+.TP
+.BR UDP_GRO " (since Linux 5.0)"
+Enables UDP receive offload.
+If enabled,
+the socket may receive multiple datagrams worth of data
+as a single large buffer,
+together with a
+.BR cmsg (3)
+that holds the segment size.
+This option is the inverse of segmentation offload.
+It reduces receive cost by handling multiple datagrams worth of data
+as a single large packet in the kernel receive path,
+even when that exceeds MTU.
+This option should not be used in code intended to be portable.
.SS Ioctls
These ioctls can be accessed using
.BR ioctl (2).
diff --git a/man7/udplite.7 b/man7/udplite.7
index 6157b7f12..36a2db89b 100644
--- a/man7/udplite.7
+++ b/man7/udplite.7
@@ -4,7 +4,7 @@
.\"
.\" $Id: udplite.7,v 1.12 2008/07/23 15:22:22 gerrit Exp gerrit $
.\"
-.TH udplite 7 2023-02-10 "Linux man-pages 6.03"
+.TH udplite 7 2023-02-10 "Linux man-pages 6.05.01"
.SH NAME
udplite \- Lightweight User Datagram Protocol
.SH SYNOPSIS
diff --git a/man7/unicode.7 b/man7/unicode.7
index 905e1e87f..f65a9b2bc 100644
--- a/man7/unicode.7
+++ b/man7/unicode.7
@@ -7,11 +7,11 @@
.\" 2001-05-11 Markus Kuhn <mgk25@cl.cam.ac.uk>
.\" Update
.\"
-.TH unicode 7 2023-02-05 "Linux man-pages 6.03"
+.TH unicode 7 2023-03-12 "Linux man-pages 6.05.01"
.SH NAME
unicode \- universal character set
.SH DESCRIPTION
-The international standard ISO 10646 defines the
+The international standard ISO/IEC 10646 defines the
Universal Character Set (UCS).
UCS contains all characters of all other character set standards.
It also guarantees "round-trip compatibility";
@@ -41,7 +41,7 @@ including those provided by TeX, Postscript, APL, MS-DOS, MS-Windows,
Macintosh, OCR fonts, as well as many word processing and publishing
systems, and more are being added.
.PP
-The UCS standard (ISO 10646) describes a
+The UCS standard (ISO/IEC 10646) describes a
31-bit character set architecture
consisting of 128 24-bit
.IR groups ,
@@ -52,12 +52,12 @@ made up of 256 8-bit
with 256
.I column
positions, one for each character.
-Part 1 of the standard (ISO 10646-1)
+Part 1 of the standard (ISO/IEC 10646-1)
defines the first 65534 code positions (0x0000 to 0xfffd), which form
the
.I Basic Multilingual Plane
(BMP), that is plane 0 in group 0.
-Part 2 of the standard (ISO 10646-2)
+Part 2 of the standard (ISO/IEC 10646-2)
adds characters to group 0 outside the BMP in several
.I "supplementary planes"
in the range 0x10000 to 0x10ffff.
@@ -68,7 +68,7 @@ foreseeable future.
The BMP contains all characters found in the
commonly used other character sets.
The supplemental planes added by
-ISO 10646-2 cover only more exotic characters for special scientific,
+ISO/IEC 10646-2 cover only more exotic characters for special scientific,
dictionary printing, publishing industry, higher-level protocol and
enthusiast needs.
.PP
@@ -107,7 +107,7 @@ script or for mathematical typesetting and users of the International
Phonetic Alphabet.
.SS Implementation levels
As not all systems are expected to support advanced mechanisms like
-combining characters, ISO 10646-1 specifies the following three
+combining characters, ISO/IEC 10646-1 specifies the following three
.I implementation levels
of UCS:
.TP 0.9i
@@ -128,8 +128,8 @@ All UCS characters are supported.
The Unicode 3.0 Standard
published by the Unicode Consortium
contains exactly the UCS Basic Multilingual Plane
-at implementation level 3, as described in ISO 10646-1:2000.
-Unicode 3.1 added the supplemental planes of ISO 10646-2.
+at implementation level 3, as described in ISO/IEC 10646-1:2000.
+Unicode 3.1 added the supplemental planes of ISO/IEC 10646-2.
The Unicode standard and
technical reports published by the Unicode Consortium provide much
additional information on the semantics and recommended usages of
diff --git a/man7/units.7 b/man7/units.7
index e90a28b03..ca2bd2dd5 100644
--- a/man7/units.7
+++ b/man7/units.7
@@ -3,7 +3,7 @@
.\"
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
-.TH units 7 2023-02-10 "Linux man-pages 6.03"
+.TH units 7 2023-02-10 "Linux man-pages 6.05.01"
.SH NAME
units \- decimal and binary prefixes
.SH DESCRIPTION
diff --git a/man7/unix.7 b/man7/unix.7
index 2b41465da..cfa41880a 100644
--- a/man7/unix.7
+++ b/man7/unix.7
@@ -1,14 +1,9 @@
+.\" SPDX-License-Identifier: Linux-man-pages-1-para
+.\"
.\" This man page is Copyright (C) 1999 Andi Kleen <ak@muc.de>,
.\" Copyright (C) 2008-2014, Michael Kerrisk <mtk.manpages@gmail.com>,
.\" and Copyright (C) 2016, Heinrich Schuchardt <xypron.glpk@gmx.de>
.\"
-.\" %%%LICENSE_START(VERBATIM_ONE_PARA)
-.\" Permission is granted to distribute possibly modified copies
-.\" of this page provided the header is included verbatim,
-.\" and in case of nontrivial modification author and date
-.\" of the modification is added to the header.
-.\" %%%LICENSE_END
-.\"
.\" Modified, 2003-12-02, Michael Kerrisk, <mtk.manpages@gmail.com>
.\" Modified, 2003-09-23, Adam Langley
.\" Modified, 2004-05-27, Michael Kerrisk, <mtk.manpages@gmail.com>
@@ -17,7 +12,7 @@
.\" address that can appear in the sockaddr_un structure: pathname,
.\" unnamed, and abstract.
.\"
-.TH UNIX 7 2023-02-10 "Linux man-pages 6.03"
+.TH UNIX 7 2023-07-15 "Linux man-pages 6.05.01"
.SH NAME
unix \- sockets for local interprocess communication
.SH SYNOPSIS
@@ -665,7 +660,7 @@ is returned.
.B SIOCINQ
is defined in
.IR <linux/sockios.h> .
-.\" FIXME . http://sources.redhat.com/bugzilla/show_bug.cgi?id=12002,
+.\" FIXME . https://www.sourceware.org/bugzilla/show_bug.cgi?id=12002,
.\" filed 2010-09-10, may cause SIOCINQ to be defined in glibc headers
Alternatively,
you can use the synonymous
@@ -907,16 +902,16 @@ a null terminator for the string returned in
.in +4n
.EX
void *addrp;
-
+\&
addrlen = sizeof(struct sockaddr_un);
addrp = malloc(addrlen + 1);
if (addrp == NULL)
/* Handle error */ ;
memset(addrp, 0, addrlen + 1);
-
+\&
if (getsockname(sfd, (struct sockaddr *) addrp, &addrlen)) == \-1)
/* handle error */ ;
-
+\&
printf("sun_path = %s\en", ((struct sockaddr_un *) addrp)\->sun_path);
.EE
.in
@@ -963,14 +958,14 @@ $
/*
* File connection.h
*/
-
+\&
#define SOCKET_NAME "/tmp/9Lq7BNBnBycd6nxy.socket"
#define BUFFER_SIZE 12
-
+\&
/*
* File server.c
*/
-
+\&
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@@ -978,7 +973,7 @@ $
#include <sys/un.h>
#include <unistd.h>
#include "connection.h"
-
+\&
int
main(int argc, char *argv[])
{
@@ -989,123 +984,123 @@ main(int argc, char *argv[])
int data_socket;
int result;
char buffer[BUFFER_SIZE];
-
+\&
/* Create local socket. */
-
+\&
connection_socket = socket(AF_UNIX, SOCK_SEQPACKET, 0);
if (connection_socket == \-1) {
perror("socket");
exit(EXIT_FAILURE);
}
-
+\&
/*
* For portability clear the whole structure, since some
* implementations have additional (nonstandard) fields in
* the structure.
*/
-
+\&
memset(&name, 0, sizeof(name));
-
+\&
/* Bind socket to socket name. */
-
+\&
name.sun_family = AF_UNIX;
strncpy(name.sun_path, SOCKET_NAME, sizeof(name.sun_path) \- 1);
-
+\&
ret = bind(connection_socket, (const struct sockaddr *) &name,
sizeof(name));
if (ret == \-1) {
perror("bind");
exit(EXIT_FAILURE);
}
-
+\&
/*
* Prepare for accepting connections. The backlog size is set
* to 20. So while one request is being processed other requests
* can be waiting.
*/
-
+\&
ret = listen(connection_socket, 20);
if (ret == \-1) {
perror("listen");
exit(EXIT_FAILURE);
}
-
+\&
/* This is the main loop for handling connections. */
-
+\&
for (;;) {
-
+\&
/* Wait for incoming connection. */
-
+\&
data_socket = accept(connection_socket, NULL, NULL);
if (data_socket == \-1) {
perror("accept");
exit(EXIT_FAILURE);
}
-
+\&
result = 0;
for (;;) {
-
+\&
/* Wait for next data packet. */
-
+\&
ret = read(data_socket, buffer, sizeof(buffer));
if (ret == \-1) {
perror("read");
exit(EXIT_FAILURE);
}
-
+\&
/* Ensure buffer is 0\-terminated. */
-
+\&
buffer[sizeof(buffer) \- 1] = 0;
-
+\&
/* Handle commands. */
-
+\&
if (!strncmp(buffer, "DOWN", sizeof(buffer))) {
down_flag = 1;
break;
}
-
+\&
if (!strncmp(buffer, "END", sizeof(buffer))) {
break;
}
-
+\&
/* Add received summand. */
-
+\&
result += atoi(buffer);
}
-
+\&
/* Send result. */
-
+\&
sprintf(buffer, "%d", result);
ret = write(data_socket, buffer, sizeof(buffer));
if (ret == \-1) {
perror("write");
exit(EXIT_FAILURE);
}
-
+\&
/* Close socket. */
-
+\&
close(data_socket);
-
+\&
/* Quit on DOWN command. */
-
+\&
if (down_flag) {
break;
}
}
-
+\&
close(connection_socket);
-
+\&
/* Unlink the socket. */
-
+\&
unlink(SOCKET_NAME);
-
+\&
exit(EXIT_SUCCESS);
}
-
+\&
/*
* File client.c
*/
-
+\&
#include <errno.h>
#include <stdio.h>
#include <stdlib.h>
@@ -1114,7 +1109,7 @@ main(int argc, char *argv[])
#include <sys/un.h>
#include <unistd.h>
#include "connection.h"
-
+\&
int
main(int argc, char *argv[])
{
@@ -1122,37 +1117,37 @@ main(int argc, char *argv[])
int ret;
int data_socket;
char buffer[BUFFER_SIZE];
-
+\&
/* Create local socket. */
-
+\&
data_socket = socket(AF_UNIX, SOCK_SEQPACKET, 0);
if (data_socket == \-1) {
perror("socket");
exit(EXIT_FAILURE);
}
-
+\&
/*
* For portability clear the whole structure, since some
* implementations have additional (nonstandard) fields in
* the structure.
*/
-
+\&
memset(&addr, 0, sizeof(addr));
-
+\&
/* Connect socket to socket address. */
-
+\&
addr.sun_family = AF_UNIX;
strncpy(addr.sun_path, SOCKET_NAME, sizeof(addr.sun_path) \- 1);
-
+\&
ret = connect(data_socket, (const struct sockaddr *) &addr,
sizeof(addr));
if (ret == \-1) {
fprintf(stderr, "The server is down.\en");
exit(EXIT_FAILURE);
}
-
+\&
/* Send arguments. */
-
+\&
for (size_t i = 1; i < argc; ++i) {
ret = write(data_socket, argv[i], strlen(argv[i]) + 1);
if (ret == \-1) {
@@ -1160,34 +1155,34 @@ main(int argc, char *argv[])
break;
}
}
-
+\&
/* Request result. */
-
+\&
strcpy(buffer, "END");
ret = write(data_socket, buffer, strlen(buffer) + 1);
if (ret == \-1) {
perror("write");
exit(EXIT_FAILURE);
}
-
+\&
/* Receive result. */
-
+\&
ret = read(data_socket, buffer, sizeof(buffer));
if (ret == \-1) {
perror("read");
exit(EXIT_FAILURE);
}
-
+\&
/* Ensure buffer is 0\-terminated. */
-
+\&
buffer[sizeof(buffer) \- 1] = 0;
-
+\&
printf("Result = %s\en", buffer);
-
+\&
/* Close socket. */
-
+\&
close(data_socket);
-
+\&
exit(EXIT_SUCCESS);
}
.EE
diff --git a/man7/uri.7 b/man7/uri.7
index b85a2f9a8..a571aec97 100644
--- a/man7/uri.7
+++ b/man7/uri.7
@@ -25,29 +25,88 @@
.\" Modified Fri Aug 21 23:00:00 1999 by David A. Wheeler (dwheeler@dwheeler.com)
.\" Modified Tue Mar 14 2000 by David A. Wheeler (dwheeler@dwheeler.com)
.\"
-.TH uri 7 2023-02-05 "Linux man-pages 6.03"
+.TH uri 7 2023-04-30 "Linux man-pages 6.05.01"
.SH NAME
uri, url, urn \- uniform resource identifier (URI), including a URL or URN
.SH SYNOPSIS
-.nf
-.HP 0.2i
-URI = [ absoluteURI | relativeURI ] [ "#" fragment ]
-.HP
-absoluteURI = scheme ":" ( hierarchical_part | opaque_part )
-.HP
-relativeURI = ( net_path | absolute_path | relative_path ) [ "?" query ]
-.HP
-scheme = "http" | "ftp" | "gopher" | "mailto" | "news" | "telnet" |
- "file" | "man" | "info" | "whatis" | "ldap" | "wais" | \&...
-.HP
-hierarchical_part = ( net_path | absolute_path ) [ "?" query ]
-.HP
-net_path = "//" authority [ absolute_path ]
-.HP
-absolute_path = "/" path_segments
-.HP
-relative_path = relative_segment [ absolute_path ]
-.fi
+.SY "\fIURI\fP \fR=\fP"
+.RI [\~ absoluteURI
+|
+.IR relativeURI \~]
+.RB [\~\[dq] # \[dq]\~\c
+.IR fragment \~]
+.YS
+.PP
+.SY "\fIabsoluteURI\fP \fR=\fP"
+.I scheme\~\c
+.RB \[dq] : \[dq]
+.RI (\~ hierarchical_part
+|
+.IR opaque_part \~)
+.YS
+.PP
+.SY "\fIrelativeURI\fP \fR=\fP"
+.RI (\~ net_path
+|
+.I absolute_path
+|
+.IR relative_path \~)
+.RB [\~\[dq] ? \[dq]\~\c
+.IR query \~]
+.YS
+.PP
+.SY "\fIscheme\fP \fR=\fP"
+.RB \[dq] http \[dq]
+|
+.RB \[dq] ftp \[dq]
+|
+.RB \[dq] gopher \[dq]
+|
+.RB \[dq] mailto \[dq]
+|
+.RB \[dq] news \[dq]
+|
+.RB \[dq] telnet \[dq]
+|
+.RB \[dq] file \[dq]
+|
+.RB \[dq] ftp \[dq]
+|
+.RB \[dq] man \[dq]
+|
+.RB \[dq] info \[dq]
+|
+.RB \[dq] whatis \[dq]
+|
+.RB \[dq] ldap \[dq]
+|
+.RB \[dq] wais \[dq]
+| \&...
+.YS
+.PP
+.SY "\fIhierarchical_part\fP \fR=\fP"
+.RI (\~ net_path
+|
+.IR absolute_path \~)
+.RB [\~\[dq] ? \[dq]\~\c
+.IR query \~]
+.YS
+.PP
+.SY "\fInet_path\fP \fR=\fP"
+.RB \[dq] // \[dq]\~\c
+.I authority
+.RI [\~ absolute_path \~]
+.YS
+.PP
+.SY "\fIabsolute_path\fP \fR=\fP"
+.RB \[dq] / \[dq]\~\c
+.I path_segments
+.YS
+.PP
+.SY "\fIrelative_path\fP \fR=\fP"
+.I relative_segment
+.RI [\~ absolute_path \~]
+.YS
.SH DESCRIPTION
A Uniform Resource Identifier (URI) is a short string of characters
identifying an abstract or physical resource (for example, a web page).
@@ -82,9 +141,12 @@ precede such segments with ./ (e.g., "./this:that").
Note that descendants of MS-DOS (e.g., Microsoft Windows) replace
devicename colons with the vertical bar ("|") in URIs, so "C:" becomes "C|".
.PP
-A fragment identifier, if included, refers to a particular named portion
-(fragment) of a resource; text after a \[aq]#\[aq] identifies the fragment.
-A URI beginning with \[aq]#\[aq] refers to that fragment in the current resource.
+A fragment identifier,
+if included,
+refers to a particular named portion (fragment) of a resource;
+text after a \[aq]#\[aq] identifies the fragment.
+A URI beginning with \[aq]#\[aq]
+refers to that fragment in the current resource.
.SS Usage
There are many different URI schemes, each with specific
additional rules and meanings, but they are intentionally made to be
@@ -93,7 +155,7 @@ For example, many URL schemes
permit the authority to be the following format, called here an
.I ip_server
(square brackets show what's optional):
-.HP
+.PP
.IR "ip_server = " [ user " [ : " password " ] @ ] " host " [ : " port ]
.PP
This format allows you to optionally insert a username,
diff --git a/man7/user-keyring.7 b/man7/user-keyring.7
index 795db01f1..7468cc502 100644
--- a/man7/user-keyring.7
+++ b/man7/user-keyring.7
@@ -3,7 +3,7 @@
.\"
.\" SPDX-License-Identifier: GPL-2.0-or-later
.\"
-.TH user-keyring 7 2023-02-05 "Linux man-pages 6.03"
+.TH user-keyring 7 2023-02-05 "Linux man-pages 6.05.01"
.SH NAME
user-keyring \- per-user keyring
.SH DESCRIPTION
diff --git a/man7/user-session-keyring.7 b/man7/user-session-keyring.7
index 6450f4b6b..3fc879564 100644
--- a/man7/user-session-keyring.7
+++ b/man7/user-session-keyring.7
@@ -3,7 +3,7 @@
.\"
.\" SPDX-License-Identifier: GPL-2.0-or-later
.\"
-.TH user-session-keyring 7 2023-02-05 "Linux man-pages 6.03"
+.TH user-session-keyring 7 2023-02-05 "Linux man-pages 6.05.01"
.SH NAME
user-session-keyring \- per-user default session keyring
.SH DESCRIPTION
diff --git a/man7/user_namespaces.7 b/man7/user_namespaces.7
index cd16bc053..0c29f93eb 100644
--- a/man7/user_namespaces.7
+++ b/man7/user_namespaces.7
@@ -4,7 +4,7 @@
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
.\"
-.TH user_namespaces 7 2023-02-05 "Linux man-pages 6.03"
+.TH user_namespaces 7 2023-05-03 "Linux man-pages 6.05.01"
.SH NAME
user_namespaces \- overview of Linux user namespaces
.SH DESCRIPTION
@@ -91,6 +91,24 @@ The
operation can be used to discover the parental relationship
between user namespaces; see
.BR ioctl_ns (2).
+.PP
+A task that changes one of its effective IDs
+will have its dumpability reset to the value in
+.IR /proc/sys/fs/suid_dumpable .
+This may affect the ownership of proc files of child processes
+and may thus cause the parent to lack the permissions
+to write to mapping files of child processes running in a new user namespace.
+In such cases making the parent process dumpable, using
+.B PR_SET_DUMPABLE
+in a call to
+.BR prctl (2),
+before creating a child process in a new user namespace
+may rectify this problem.
+See
+.BR prctl (2)
+and
+.BR proc (5)
+for details on how ownership is affected.
.\"
.\" ============================================================
.\"
@@ -739,7 +757,7 @@ capability in the parent user namespace.
.\"
.\" ============================================================
.\"
-.SS The /proc/\fIpid\fP/setgroups file
+.SS The \fI/proc/\fPpid\fI/setgroups\fP file
.\"
.\" commit 9cc46516ddf497ea16e8d7cb986ae03a0f6b92f8
.\" commit 66d2f338ee4c449396b6f99f5e75cd18eb6df272
@@ -1013,7 +1031,7 @@ they are translated into the corresponding values as per the
receiving process's user and group ID mappings.
.\"
.SH STANDARDS
-Namespaces are a Linux-specific feature.
+Linux.
.\"
.SH NOTES
Over the years, there have been a lot of features that have been added
@@ -1135,9 +1153,9 @@ CapEff: 0000001fffffffff
\&
.EX
/* userns_child_exec.c
-
+\&
Licensed under GNU General Public License v2 or later
-
+\&
Create a child process that executes a shell command in new
namespace(s); allow UID and GID mappings to be specified when
creating a user namespace.
@@ -1155,14 +1173,14 @@ CapEff: 0000001fffffffff
#include <string.h>
#include <limits.h>
#include <errno.h>
-
+\&
struct child_args {
char **argv; /* Command to be executed by child, with args */
int pipe_fd[2]; /* Pipe used to synchronize parent and child */
};
-
+\&
static int verbose;
-
+\&
static void
usage(char *pname)
{
@@ -1195,106 +1213,106 @@ usage(char *pname)
" by commas;\en");
fpe("the commas are replaced by newlines before writing"
" to map files.\en");
-
+\&
exit(EXIT_FAILURE);
}
-
+\&
/* Update the mapping file \[aq]map_file\[aq], with the value provided in
\[aq]mapping\[aq], a string that defines a UID or GID mapping. A UID or
GID mapping consists of one or more newline\-delimited records
of the form:
-
+\&
ID_inside\-ns ID\-outside\-ns length
-
+\&
Requiring the user to supply a string that contains newlines is
of course inconvenient for command\-line use. Thus, we permit the
use of commas to delimit records in this string, and replace them
with newlines before writing the string to the file. */
-
+\&
static void
update_map(char *mapping, char *map_file)
{
int fd;
size_t map_len; /* Length of \[aq]mapping\[aq] */
-
+\&
/* Replace commas in mapping string with newlines. */
-
+\&
map_len = strlen(mapping);
for (size_t j = 0; j < map_len; j++)
if (mapping[j] == \[aq],\[aq])
mapping[j] = \[aq]\en\[aq];
-
+\&
fd = open(map_file, O_RDWR);
if (fd == \-1) {
fprintf(stderr, "ERROR: open %s: %s\en", map_file,
strerror(errno));
exit(EXIT_FAILURE);
}
-
+\&
if (write(fd, mapping, map_len) != map_len) {
fprintf(stderr, "ERROR: write %s: %s\en", map_file,
strerror(errno));
exit(EXIT_FAILURE);
}
-
+\&
close(fd);
}
-
-/* Linux 3.19 made a change in the handling of setgroups(2) and the
- \[aq]gid_map\[aq] file to address a security issue. The issue allowed
- *unprivileged* users to employ user namespaces in order to drop groups.
- The upshot of the 3.19 changes is that in order to update the
- \[aq]gid_maps\[aq] file, use of the setgroups() system call in this
- user namespace must first be disabled by writing "deny" to one of
- the /proc/PID/setgroups files for this namespace. That is the
- purpose of the following function. */
-
+\&
+/* Linux 3.19 made a change in the handling of setgroups(2) and
+ the \[aq]gid_map\[aq] file to address a security issue. The issue
+ allowed *unprivileged* users to employ user namespaces in
+ order to drop groups. The upshot of the 3.19 changes is that
+ in order to update the \[aq]gid_maps\[aq] file, use of the setgroups()
+ system call in this user namespace must first be disabled by
+ writing "deny" to one of the /proc/PID/setgroups files for
+ this namespace. That is the purpose of the following function. */
+\&
static void
proc_setgroups_write(pid_t child_pid, char *str)
{
char setgroups_path[PATH_MAX];
int fd;
-
+\&
snprintf(setgroups_path, PATH_MAX, "/proc/%jd/setgroups",
(intmax_t) child_pid);
-
+\&
fd = open(setgroups_path, O_RDWR);
if (fd == \-1) {
-
+\&
/* We may be on a system that doesn\[aq]t support
/proc/PID/setgroups. In that case, the file won\[aq]t exist,
and the system won\[aq]t impose the restrictions that Linux 3.19
added. That\[aq]s fine: we don\[aq]t need to do anything in order
to permit \[aq]gid_map\[aq] to be updated.
-
+\&
However, if the error from open() was something other than
the ENOENT error that is expected for that case, let the
user know. */
-
+\&
if (errno != ENOENT)
fprintf(stderr, "ERROR: open %s: %s\en", setgroups_path,
strerror(errno));
return;
}
-
+\&
if (write(fd, str, strlen(str)) == \-1)
fprintf(stderr, "ERROR: write %s: %s\en", setgroups_path,
strerror(errno));
-
+\&
close(fd);
}
-
+\&
static int /* Start function for cloned child */
childFunc(void *arg)
{
struct child_args *args = arg;
char ch;
-
+\&
/* Wait until the parent has updated the UID and GID mappings.
See the comment in main(). We wait for end of file on a
pipe that will be closed by the parent process once it has
updated the mappings. */
-
+\&
close(args\->pipe_fd[1]); /* Close our descriptor for the write
end of the pipe so that we see EOF
when parent closes its descriptor. */
@@ -1303,20 +1321,20 @@ childFunc(void *arg)
"Failure in child: read from pipe returned != 0\en");
exit(EXIT_FAILURE);
}
-
+\&
close(args\->pipe_fd[0]);
-
+\&
/* Execute a shell command. */
-
+\&
printf("About to exec %s\en", args\->argv[0]);
execvp(args\->argv[0], args\->argv);
err(EXIT_FAILURE, "execvp");
}
-
+\&
#define STACK_SIZE (1024 * 1024)
-
+\&
static char child_stack[STACK_SIZE]; /* Space for child\[aq]s stack */
-
+\&
int
main(int argc, char *argv[])
{
@@ -1327,14 +1345,14 @@ main(int argc, char *argv[])
const int MAP_BUF_SIZE = 100;
char map_buf[MAP_BUF_SIZE];
char map_path[PATH_MAX];
-
+\&
/* Parse command\-line options. The initial \[aq]+\[aq] character in
the final getopt() argument prevents GNU\-style permutation
of command\-line options. That\[aq]s useful, since sometimes
the \[aq]command\[aq] to be executed by this program itself
has command\-line options. We don\[aq]t want getopt() to treat
those as options to this program. */
-
+\&
flags = 0;
verbose = 0;
gid_map = NULL;
@@ -1355,16 +1373,16 @@ main(int argc, char *argv[])
default: usage(argv[0]);
}
}
-
+\&
/* \-M or \-G without \-U is nonsensical */
-
+\&
if (((uid_map != NULL || gid_map != NULL || map_zero) &&
!(flags & CLONE_NEWUSER)) ||
(map_zero && (uid_map != NULL || gid_map != NULL)))
usage(argv[0]);
-
+\&
args.argv = &argv[optind];
-
+\&
/* We use a pipe to synchronize the parent and child, in order to
ensure that the parent sets the UID and GID maps before the child
calls execve(). This ensures that the child maintains its
@@ -1374,25 +1392,25 @@ main(int argc, char *argv[])
its capabilities if it performed an execve() with nonzero
user IDs (see the capabilities(7) man page for details of the
transformation of a process\[aq]s capabilities during execve()). */
-
+\&
if (pipe(args.pipe_fd) == \-1)
err(EXIT_FAILURE, "pipe");
-
+\&
/* Create the child in new namespace(s). */
-
+\&
child_pid = clone(childFunc, child_stack + STACK_SIZE,
flags | SIGCHLD, &args);
if (child_pid == \-1)
err(EXIT_FAILURE, "clone");
-
+\&
/* Parent falls through to here. */
-
+\&
if (verbose)
printf("%s: PID of child created by clone() is %jd\en",
argv[0], (intmax_t) child_pid);
-
+\&
/* Update the UID and GID maps in the child. */
-
+\&
if (uid_map != NULL || map_zero) {
snprintf(map_path, PATH_MAX, "/proc/%jd/uid_map",
(intmax_t) child_pid);
@@ -1403,10 +1421,10 @@ main(int argc, char *argv[])
}
update_map(uid_map, map_path);
}
-
+\&
if (gid_map != NULL || map_zero) {
proc_setgroups_write(child_pid, "deny");
-
+\&
snprintf(map_path, PATH_MAX, "/proc/%jd/gid_map",
(intmax_t) child_pid);
if (map_zero) {
@@ -1416,18 +1434,18 @@ main(int argc, char *argv[])
}
update_map(gid_map, map_path);
}
-
+\&
/* Close the write end of the pipe, to signal to the child that we
have updated the UID and GID maps. */
-
+\&
close(args.pipe_fd[1]);
-
+\&
if (waitpid(child_pid, NULL, 0) == \-1) /* Wait for child */
err(EXIT_FAILURE, "waitpid");
-
+\&
if (verbose)
printf("%s: terminating\en", argv[0]);
-
+\&
exit(EXIT_SUCCESS);
}
.EE
diff --git a/man7/utf-8.7 b/man7/utf-8.7
index dad953791..8a5f7ab7a 100644
--- a/man7/utf-8.7
+++ b/man7/utf-8.7
@@ -7,7 +7,7 @@
.\" 2001-05-11 Markus Kuhn <mgk25@cl.cam.ac.uk>
.\" Update
.\"
-.TH UTF-8 7 2023-02-10 "Linux man-pages 6.03"
+.TH UTF-8 7 2023-03-12 "Linux man-pages 6.05.01"
.SH NAME
UTF-8 \- an ASCII compatible multibyte Unicode encoding
.SH DESCRIPTION
@@ -23,7 +23,7 @@ read 16-bit words as characters without major modifications.
For these reasons,
UCS-2 is not a suitable external encoding of Unicode
in filenames, text files, environment variables, and so on.
-The ISO 10646 Universal Character Set (UCS),
+The ISO/IEC 10646 Universal Character Set (UCS),
a superset of Unicode, occupies an even larger code
space\[em]31\ bits\[em]and the obvious
UCS-4 encoding for it (a sequence of 32-bit words) has the same problems.
diff --git a/man7/uts_namespaces.7 b/man7/uts_namespaces.7
index 0bd278836..670d19eac 100644
--- a/man7/uts_namespaces.7
+++ b/man7/uts_namespaces.7
@@ -3,7 +3,7 @@
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
.\"
-.TH uts_namespaces 7 2022-12-04 "Linux man-pages 6.03"
+.TH uts_namespaces 7 2022-12-04 "Linux man-pages 6.05.01"
.SH NAME
uts_namespaces \- overview of Linux UTS namespaces
.SH DESCRIPTION
diff --git a/man7/vdso.7 b/man7/vdso.7
index 0e5f67f60..338ef722b 100644
--- a/man7/vdso.7
+++ b/man7/vdso.7
@@ -11,7 +11,7 @@
.\" http://www.linuxjournal.com/content/creating-vdso-colonels-other-chicken
.\" http://www.trilithium.com/johan/2005/08/linux-gate/
.\"
-.TH vDSO 7 2023-02-10 "Linux man-pages 6.03"
+.TH vDSO 7 2023-05-03 "Linux man-pages 6.05.01"
.SH NAME
vdso \- overview of the virtual ELF dynamic shared object
.SH SYNOPSIS
@@ -606,7 +606,7 @@ The documents, examples, and source code in the Linux source code tree:
Documentation/ABI/stable/vdso
Documentation/ia64/fsys.rst
Documentation/vDSO/* (includes examples of using the vDSO)
-
+.PP
find arch/ \-iname \[aq]*vdso*\[aq] \-o \-iname \[aq]*gate*\[aq]
.EE
.in
diff --git a/man7/vsock.7 b/man7/vsock.7
index 3028d0cda..f6c371106 100644
--- a/man7/vsock.7
+++ b/man7/vsock.7
@@ -2,7 +2,7 @@
.\"
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
-.TH vsock 7 2022-10-30 "Linux man-pages 6.03"
+.TH vsock 7 2022-10-30 "Linux man-pages 6.05.01"
.SH NAME
vsock \- Linux VSOCK address family
.SH SYNOPSIS
diff --git a/man7/x25.7 b/man7/x25.7
index 09a8ef8fb..1dc498ea9 100644
--- a/man7/x25.7
+++ b/man7/x25.7
@@ -1,15 +1,10 @@
-.\" This man page is Copyright (C) 1998 Heiner Eisen.
+.\" SPDX-License-Identifier: Linux-man-pages-1-para
.\"
-.\" %%%LICENSE_START(VERBATIM_ONE_PARA)
-.\" Permission is granted to distribute possibly modified copies
-.\" of this page provided the header is included verbatim,
-.\" and in case of nontrivial modification author and date
-.\" of the modification is added to the header.
-.\" %%%LICENSE_END
+.\" This man page is Copyright (C) 1998 Heiner Eisen.
.\"
.\" $Id: x25.7,v 1.4 1999/05/18 10:35:12 freitag Exp $
.\"
-.TH x25 7 2023-02-05 "Linux man-pages 6.03"
+.TH x25 7 2023-07-15 "Linux man-pages 6.05.01"
.SH NAME
x25 \- ITU-T X.25 / ISO-8208 protocol interface
.SH SYNOPSIS
diff --git a/man7/xattr.7 b/man7/xattr.7
index 98e84d900..c2f12c951 100644
--- a/man7/xattr.7
+++ b/man7/xattr.7
@@ -6,7 +6,7 @@
.\"
.\" SPDX-License-Identifier: GPL-2.0-or-later
.\"
-.TH xattr 7 2023-02-05 "Linux man-pages 6.03"
+.TH xattr 7 2023-02-05 "Linux man-pages 6.05.01"
.SH NAME
xattr \- Extended attributes
.SH DESCRIPTION
diff --git a/man8/iconvconfig.8 b/man8/iconvconfig.8
index ef9b7815e..f02eede84 100644
--- a/man8/iconvconfig.8
+++ b/man8/iconvconfig.8
@@ -2,7 +2,7 @@
.\"
.\" SPDX-License-Identifier: GPL-2.0-or-later
.\"
-.TH iconvconfig 8 2022-10-30 "Linux man-pages 6.03"
+.TH iconvconfig 8 2022-10-30 "Linux man-pages 6.05.01"
.SH NAME
iconvconfig \- create iconv module configuration cache
.SH SYNOPSIS
diff --git a/man8/intro.8 b/man8/intro.8
index 5c1ebdda5..23fbcbd95 100644
--- a/man8/intro.8
+++ b/man8/intro.8
@@ -7,7 +7,7 @@
.\" Modified Sat Jul 24 17:35:48 1993 by Rik Faith (faith@cs.unc.edu)
.\" 2007-10-23 mtk: minor rewrites, and added paragraph on exit status
.\"
-.TH intro 8 2022-10-30 "Linux man-pages 6.03"
+.TH intro 8 2022-10-30 "Linux man-pages 6.05.01"
.SH NAME
intro \- introduction to administration and privileged commands
.SH DESCRIPTION
diff --git a/man8/ld.so.8 b/man8/ld.so.8
index 4ff3c28e4..afd29c52b 100644
--- a/man8/ld.so.8
+++ b/man8/ld.so.8
@@ -4,7 +4,7 @@
.\" Various parts:
.\" Copyright (C) 2007-9, 2013, 2016 Michael Kerrisk <mtk.manpages@gmail.com>
.\"
-.TH ld.so 8 2023-02-05 "Linux man-pages 6.03"
+.TH ld.so 8 2023-07-18 "Linux man-pages 6.05.01"
.SH NAME
ld.so, ld\-linux.so \- dynamic linker/loader
.SH SYNOPSIS
@@ -83,7 +83,7 @@ From the cache file
which contains a compiled list of candidate shared objects previously found
in the augmented library path.
If, however, the binary was linked with the
-.B \-z nodeflib
+.B \-z nodefaultlib
linker option, shared objects in the default paths are skipped.
Shared objects installed in hardware capability directories (see below)
are preferred to other shared objects.
@@ -97,7 +97,7 @@ and then
and then
.IR /usr/lib64 .)
If the binary was linked with the
-.B \-z nodeflib
+.B \-z nodefaultlib
linker option, this step is skipped.
.\"
.SS Dynamic string tokens
@@ -659,7 +659,7 @@ which is now always enabled.
The name of a (single) shared object to be profiled,
specified either as a pathname or a soname.
Profiling output is appended to the file whose name is:
-"\fI$LD_PROFILE_OUTPUT\fP/\fI$LD_PROFILE\fP.profile".
+.RI \%$LD_PROFILE_OUTPUT /\: $LD_PROFILE .profile .
.IP
Since glibc 2.2.5,
.B LD_PROFILE
diff --git a/man8/ldconfig.8 b/man8/ldconfig.8
index aec7492c1..5bbfd863a 100644
--- a/man8/ldconfig.8
+++ b/man8/ldconfig.8
@@ -5,7 +5,7 @@
.\"
.\" Modified, 6 May 2002, Michael Kerrisk, <mtk.manpages@gmail.com>
.\" Change listed order of /usr/lib and /lib
-.TH ldconfig 8 2023-01-07 "Linux man-pages 6.03"
+.TH ldconfig 8 2023-03-11 "Linux man-pages 6.05.01"
.SH NAME
ldconfig \- configure dynamic linker run-time bindings
.SH SYNOPSIS
@@ -130,7 +130,7 @@ Ignore auxiliary cache file.
.TP
.B \-l
(Since glibc 2.2)
-Interpret each operand as a libary name and configure its links.
+Interpret each operand as a library name and configure its links.
Intended for use only by experts.
.TP
.B \-n
diff --git a/man8/nscd.8 b/man8/nscd.8
index 5e68f8f52..1b39b95da 100644
--- a/man8/nscd.8
+++ b/man8/nscd.8
@@ -6,7 +6,7 @@
.\" 2008-12-05 Petr Baudis <pasky@suse.cz>
.\" Rewrite the NOTES section to reflect modern reality
.\"
-.TH nscd 8 2022-10-30 "Linux man-pages 6.03"
+.TH nscd 8 2022-10-30 "Linux man-pages 6.05.01"
.SH NAME
nscd \- name service cache daemon
.SH DESCRIPTION
diff --git a/man8/sln.8 b/man8/sln.8
index 46eb2b167..81d9078e8 100644
--- a/man8/sln.8
+++ b/man8/sln.8
@@ -2,7 +2,7 @@
.\"
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
-.TH sln 8 2023-01-07 "Linux man-pages 6.03"
+.TH sln 8 2023-01-07 "Linux man-pages 6.05.01"
.SH NAME
sln \- create symbolic links
.SH SYNOPSIS
diff --git a/man8/tzselect.8 b/man8/tzselect.8
index 1ba3f5d90..4578090f9 100644
--- a/man8/tzselect.8
+++ b/man8/tzselect.8
@@ -1,53 +1,125 @@
-.\" %%%LICENSE_START(PUBLIC_DOMAIN)
-.\" This page is in the public domain
-.\" %%%LICENSE_END
-.\"
-.TH tzselect 8 2022-10-30 "Linux man-pages 6.03"
+.\" This file is in the public domain, so clarified as of
+.\" 2009-05-17 by Arthur David Olson.
+.TH tzselect 8 "" "Time Zone Database"
.SH NAME
tzselect \- select a timezone
.SH SYNOPSIS
-.nf
+.ie \n(.g .ds - \f(CR-\fP
+.el .ds - \-
+.ds d " degrees
+.ds m " minutes
+.ds s " seconds
+.ds _ " \&
+.if t \{\
+. if \n(.g .if c \(de .if c \(fm .if c \(sd \{\
+. ds d \(de
+. ds m \(fm
+. ds s \(sd
+. ds _ \|
+. \}
+.\}
.B tzselect
-.fi
+[
+.B \*-c
+.I coord
+] [
+.B \*-n
+.I limit
+] [
+.B \*-\*-help
+] [
+.B \*-\*-version
+]
.SH DESCRIPTION
The
.B tzselect
program asks the user for information about the current location,
-and outputs the resulting timezone description to standard output.
-The output is suitable as a value for the
-.B TZ
-environment variable.
+and outputs the resulting timezone to standard output.
+The output is suitable as a value for the TZ environment variable.
.PP
All interaction with the user is done via standard input and standard error.
-.SH EXIT STATUS
-The exit status is zero if a timezone was successfully obtained
-from the user, and is nonzero otherwise.
-.SH ENVIRONMENT
-.TP
-.B AWK
-Name of a POSIX-compliant
-.I awk
+.SH OPTIONS
+.TP
+.BI "\*-c " coord
+Instead of asking for continent and then country and then city,
+ask for selection from time zones whose largest cities
+are closest to the location with geographical coordinates
+.I coord.
+Use ISO 6709 notation for
+.I coord,
+that is, a latitude immediately followed by a longitude. The latitude
+and longitude should be signed integers followed by an optional
+decimal point and fraction: positive numbers represent north and east,
+negative south and west. Latitudes with two and longitudes with three
+integer digits are treated as degrees; latitudes with four or six and
+longitudes with five or seven integer digits are treated as
+.I "DDMM, DDDMM, DDMMSS,"
+or
+.I DDDMMSS
+representing
+.I DD
+or
+.I DDD
+degrees,
+.I MM
+minutes,
+and zero or
+.I SS
+seconds, with any trailing fractions represent fractional minutes or
+(if
+.I SS
+is present) seconds. The decimal point is that of the current locale.
+For example, in the (default) C locale,
+.B "\*-c\ +40.689\*-074.045"
+specifies 40.689\*d\*_N, 74.045\*d\*_W,
+.B "\*-c\ +4041.4\*-07402.7"
+specifies 40\*d\*_41.4\*m\*_N, 74\*d\*_2.7\*m\*_W, and
+.B "\*-c\ +404121\*-0740240"
+specifies 40\*d\*_41\*m\*_21\*s\*_N, 74\*d\*_2\*m\*_40\*s\*_W.
+If
+.I coord
+is not one of the documented forms, the resulting behavior is unspecified.
+.TP
+.BI "\*-n " limit
+When
+.B \*-c
+is used, display the closest
+.I limit
+locations (default 10).
+.TP
+.B "\*-\*-help"
+Output help information and exit.
+.TP
+.B "\*-\*-version"
+Output version information and exit.
+.SH "ENVIRONMENT VARIABLES"
+.TP
+\f3AWK\fP
+Name of a Posix-compliant
+.B awk
program (default:
.BR awk ).
.TP
-.B TZDIR
+\f3TZDIR\fP
Name of the directory containing timezone data files (default:
-.IR /usr/share/zoneinfo ).
-.\" or perhaps /usr/local/etc/zoneinfo in some older systems.
+.BR /usr/share/zoneinfo ).
.SH FILES
.TP
-\fBTZDIR\fP\fI/iso3166.tab\fP
+\f2TZDIR\fP\f3/iso3166.tab\fP
Table of ISO 3166 2-letter country codes and country names.
.TP
-\fBTZDIR\fP\fI/zone.tab\fP
-Table of country codes, latitude and longitude, TZ values, and
+\f2TZDIR\fP\f3/zone1970.tab\fP
+Table of country codes, latitude and longitude, timezones, and
descriptive comments.
.TP
-\fBTZDIR\fP\fI/\fP\fITZ\fP
-Timezone data file for timezone
-.IR TZ .
-.SH SEE ALSO
-.BR tzfile (5),
-.BR zdump (8),
-.BR zic (8)
-.\" @(#)tzselect.8 1.3
+\f2TZDIR\fP\f3/\fP\f2TZ\fP
+Timezone data file for timezone \f2TZ\fP.
+.SH "EXIT STATUS"
+The exit status is zero if a timezone was successfully obtained from the user,
+nonzero otherwise.
+.SH "SEE ALSO"
+newctime(3), tzfile(5), zdump(8), zic(8)
+.SH NOTES
+Applications should not assume that
+.BR tzselect 's
+output matches the user's political preferences.
diff --git a/man8/zdump.8 b/man8/zdump.8
index 27d8310ca..f77c0c798 100644
--- a/man8/zdump.8
+++ b/man8/zdump.8
@@ -1,8 +1,6 @@
-.\" %%%LICENSE_START(PUBLIC_DOMAIN)
-.\" This page is in the public domain
-.\" %%%LICENSE_END
-.\"
-.TH zdump 8 2020-04-27 "" "Linux System Administration"
+.\" This file is in the public domain, so clarified as of
+.\" 2009-05-17 by Arthur David Olson.
+.TH zdump 8 "" "Time Zone Database"
.SH NAME
zdump \- timezone dumper
.SH SYNOPSIS
@@ -13,15 +11,15 @@ zdump \- timezone dumper
.I timezone
\&... ]
.SH DESCRIPTION
-.ie '\[lq]'' .ds lq \&"\"
-.el .ds lq \[lq]\"
-.ie '\[rq]'' .ds rq \&"\"
-.el .ds rq \[rq]\"
+.ie '\(lq'' .ds lq \&"\"
+.el .ds lq \(lq\"
+.ie '\(rq'' .ds rq \&"\"
+.el .ds rq \(rq\"
.de q
\\$3\*(lq\\$1\*(rq\\$2
..
-.ie \n(.g .ds - \f(CW-\fP
-.el ds - \-
+.ie \n(.g .ds - \f(CR-\fP
+.el .ds - \-
The
.B zdump
program prints the current time in each
@@ -48,12 +46,14 @@ Output a verbose description of time intervals.
For each
.I timezone
on the command line,
-print the time at the lowest possible time value,
-the time one day after the lowest possible time value,
+print the times at the two extreme time values,
+the times (if present) at and just beyond the boundaries of years that
+.BR localtime (3)
+and
+.BR gmtime (3)
+can represent, and
the times both one second before and exactly at
-each detected time discontinuity,
-the time at one day less than the highest possible time value,
-and the time at the highest possible time value.
+each detected time discontinuity.
Each line is followed by
.BI isdst= D
where
@@ -70,7 +70,7 @@ seconds east of Greenwich.
.B \*-V
Like
.BR \*-v ,
-except omit the times relative to the extreme time values.
+except omit output concerning extreme time and year values.
This generates output that is easier to compare to that of
implementations with different time representations.
.TP
@@ -79,10 +79,10 @@ Cut off interval output at the given year(s).
Cutoff times are computed using the proleptic Gregorian calendar with year 0
and with Universal Time (UT) ignoring leap seconds.
Cutoffs are at the start of each year, where the lower-bound
-timestamp is exclusive and the upper is inclusive; for example,
+timestamp is inclusive and the upper is exclusive; for example,
.B "\*-c 1970,2070"
-selects transitions after 1970-01-01 00:00:00 UTC
-and on or before 2070-01-01 00:00:00 UTC.
+selects transitions on or after 1970-01-01 00:00:00 UTC
+and before 2070-01-01 00:00:00 UTC.
The default cutoff is
.BR \*-500,2500 .
.TP
@@ -95,7 +95,7 @@ The
determines whether the count includes leap seconds.
As with
.BR \*-c ,
-the cutoff's lower bound is exclusive and its upper bound is inclusive.
+the cutoff's lower bound is inclusive and its upper bound is exclusive.
.SH "INTERVAL FORMAT"
The interval format is a compact text representation that is intended
to be both human- and machine-readable. It consists of an empty line,
@@ -151,7 +151,7 @@ Here is an example of the output, with the leading empty line omitted.
tabbed columns line up.)
.nf
.sp
-.if \n(.g .ft CW
+.if \n(.g .ft CR
.if t .in +.5i
.if n .in +2
.nr w \w'1896-01-13 'u+\n(.i
@@ -184,7 +184,7 @@ UT, a standard time abbreviated HST.
Here are excerpts from another example:
.nf
.sp
-.if \n(.g .ft CW
+.if \n(.g .ft CR
.if t .in +.5i
.if n .in +2
TZ="Europe/Astrakhan"
@@ -204,7 +204,8 @@ This time zone is east of UT, so its UT offsets are positive. Also,
many of its time zone abbreviations are omitted since they duplicate
the text of the UT offset.
.SH LIMITATIONS
-Time discontinuities are found by sampling the results returned by localtime
+Time discontinuities are found by sampling the results returned by
+.BR localtime (3)
at twelve-hour intervals.
This works in all real-world cases;
one can construct artificial time zones for which this fails.
@@ -228,5 +229,3 @@ introduction of UTC is problematic.
.SH SEE ALSO
.BR tzfile (5),
.BR zic (8)
-.\" This file is in the public domain, so clarified as of
-.\" 2009-05-17 by Arthur David Olson.
diff --git a/man8/zic.8 b/man8/zic.8
index 99e28f50e..c467efefe 100644
--- a/man8/zic.8
+++ b/man8/zic.8
@@ -1,8 +1,6 @@
-.\" %%%LICENSE_START(PUBLIC_DOMAIN)
-.\" This page is in the public domain
-.\" %%%LICENSE_END
-.\"
-.TH zic 8 2020-08-13 "" "Linux System Administration"
+.\" This file is in the public domain, so clarified as of
+.\" 2009-05-17 by Arthur David Olson.
+.TH zic 8 "" "Time Zone Database"
.SH NAME
zic \- timezone compiler
.SH SYNOPSIS
@@ -13,10 +11,10 @@ zic \- timezone compiler
.I filename
\&... ]
.SH DESCRIPTION
-.ie '\[lq]'' .ds lq \&"\"
-.el .ds lq \[lq]\"
-.ie '\[rq]'' .ds rq \&"\"
-.el .ds rq \[rq]\"
+.ie '\(lq'' .ds lq \&"\"
+.el .ds lq \(lq\"
+.ie '\(rq'' .ds rq \&"\"
+.el .ds rq \(rq\"
.de q
\\$3\*(lq\\$1\*(rq\\$2
..
@@ -26,16 +24,29 @@ zic \- timezone compiler
.el .ds > \(ra
.ie \n(.g \{\
. ds : \:
-. ds - \f(CW-\fP
+. ds - \f(CR-\fP
.\}
.el \{\
. ds :
. ds - \-
.\}
+.ds d " degrees
+.ds m " minutes
+.ds s " seconds
+.ds _ " \&
+.if t \{\
+. if \n(.g .if c \(de .if c \(fm .if c \(sd \{\
+. ds d \(de
+. ds m \(fm
+. ds s \(sd
+. ds _ \|
+. \}
+.\}
The
.B zic
program reads text from the file(s) named on the command line
-and creates the time conversion information files specified in this input.
+and creates the timezone information format (TZif) files
+specified in this input.
If a
.I filename
is
@@ -65,15 +76,13 @@ is
.BR slim ,
keep the output files small; this can help check for the bugs
and incompatibilities.
-Although the default is currently
-.BR fat ,
-this is intended to change in future
-.B zic
-versions, as software that mishandles the 64-bit data typically
+The default is
+.BR slim ,
+as software that mishandles 64-bit data typically
mishandles timestamps after the year 2038 anyway.
Also see the
.B \*-r
-option for another way to shrink output size.
+option for another way to alter output size.
.TP
.BI "\*-d " directory
Create time conversion information files in the named directory rather than
@@ -89,6 +98,12 @@ will act as if the input contained a link line of the form
.ti +.5i
.ta \w'Link\0\0'u +\w'\fItimezone\fP\0\0'u
Link \fItimezone\fP localtime
+.sp
+If
+.I timezone
+is
+.BR \*- ,
+any already-existing link is removed.
.TP
.BI "\*-L " leapsecondfilename
Read leap second information from the file with the given name.
@@ -106,16 +121,25 @@ will act as if the input contained a link line of the form
.ti +.5i
Link \fItimezone\fP posixrules
.sp
-This feature is obsolete and poorly supported.
+Unless
+.I timezone is
+.q "\*-" ,
+this option is obsolete and poorly supported.
Among other things it should not be used for timestamps after the year 2037,
and it should not be combined with
.B "\*-b slim"
if
.IR timezone 's
transitions are at standard time or Universal Time (UT) instead of local time.
+.sp
+If
+.I timezone
+is
+.BR \*- ,
+any already-existing link is removed.
.TP
.BR "\*-r " "[\fB@\fP\fIlo\fP][\fB/@\fP\fIhi\fP]"
-Reduce the size of output files by limiting their applicability
+Limit the applicability of output files
to timestamps in the range from
.I lo
(inclusive) to
@@ -124,9 +148,12 @@ to timestamps in the range from
.I lo
and
.I hi
-are possibly-signed decimal counts of seconds since the Epoch
+are possibly signed decimal counts of seconds since the Epoch
(1970-01-01 00:00:00 UTC).
Omitted counts default to extreme values.
+The output files use UT offset 0 and abbreviation
+.q "\*-00"
+in place of the omitted timestamp data.
For example,
.q "zic \*-r @0"
omits data intended for negative timestamps (i.e., before the Epoch), and
@@ -135,12 +162,31 @@ outputs data intended only for nonnegative timestamps that fit into
31-bit signed integers.
On platforms with GNU
.BR date ,
-.q "zic \-r @$(date +%s)"
+.q "zic \*-r @$(date +%s)"
omits data intended for past timestamps.
+Although this option typically reduces the output file's size,
+the size can increase due to the need to represent the timestamp range
+boundaries, particularly if
+.I hi
+causes a TZif file to contain explicit entries for
+.RI pre- hi
+transitions rather than concisely representing them
+with an extended POSIX TZ string.
Also see the
.B "\*-b slim"
option for another way to shrink output size.
.TP
+.BI "\*-R @" hi
+Generate redundant trailing explicit transitions for timestamps
+that occur less than
+.I hi
+seconds since the Epoch, even though the transitions could be
+more concisely represented via the extended POSIX TZ string.
+This option does not affect the represented timestamps.
+Although it accommodates nonstandard TZif readers
+that ignore the extended POSIX TZ string,
+it increases the size of the altered output files.
+.TP
.BI "\*-t " file
When creating local time information, put the configuration link in
the named file rather than in the standard location.
@@ -149,7 +195,10 @@ the named file rather than in the standard location.
Be more verbose, and complain about the following situations:
.RS
.PP
-The input specifies a link to a link.
+The input specifies a link to a link,
+something not supported by some older parsers, including
+.B zic
+itself through release 2022e.
.PP
A year that appears in a data file is outside the range
of representable years.
@@ -196,10 +245,10 @@ for
.PP
The output file does not contain all the information about the
long-term future of a timezone, because the future cannot be summarized as
-an extended POSIX TZ string. For example, as of 2019 this problem
-occurs for Iran's daylight-saving rules for the predicted future, as
-these rules are based on the Iranian calendar, which cannot be
-represented.
+an extended POSIX TZ string. For example, as of 2023 this problem
+occurs for Morocco's daylight-saving rules, as these rules are based
+on predictions for when Ramadan will be observed, something that
+an extended POSIX TZ string cannot represent.
.PP
The output contains data that may not be handled properly by client
code designed for older
@@ -207,6 +256,15 @@ code designed for older
output formats. These compatibility issues affect only timestamps
before 1970 or after the start of 2038.
.PP
+The output contains a truncated leap second table,
+which can cause some older TZif readers to misbehave.
+This can occur if the
+.B "\*-L"
+option is used, and either an Expires line is present or
+the
+.B "\*-r"
+option is also used.
+.PP
The output file contains more than 1200 transitions,
which may be mishandled by some clients.
The current reference client supports at most 2000 transitions;
@@ -233,10 +291,11 @@ format.
.PP
Input files should be text files, that is, they should be a series of
zero or more lines, each ending in a newline byte and containing at
-most 511 bytes, and without any NUL bytes. The input text's encoding
+most 2048 bytes counting the newline, and without any NUL bytes.
+The input text's encoding
is typically UTF-8 or ASCII; it should have a unibyte representation
for the POSIX Portable Character Set (PPCS)
-\*<http://pubs\*:.opengroup\*:.org/\*:onlinepubs/\*:9699919799/\*:basedefs/\*:V1_chap06\*:.html\*>
+\*<https://pubs\*:.opengroup\*:.org/\*:onlinepubs/\*:9699919799/\*:basedefs/\*:V1_chap06\*:.html\*>
and the encoding's non-unibyte characters should consist entirely of
non-PPCS bytes. Non-PPCS characters typically occur only in comments:
although output file names and time zone abbreviations can contain
@@ -272,9 +331,9 @@ abbreviation must be unambiguous in context.
A rule line has the form
.nf
.ti +.5i
-.ta \w'Rule\0\0'u +\w'NAME\0\0'u +\w'FROM\0\0'u +\w'1973\0\0'u +\w'TYPE\0\0'u +\w'Apr\0\0'u +\w'lastSun\0\0'u +\w'2:00w\0\0'u +\w'1:00d\0\0'u
+.ta \w'Rule\0\0'u +\w'NAME\0\0'u +\w'FROM\0\0'u +\w'1973\0\0'u +\w'\*-\0\0'u +\w'Apr\0\0'u +\w'lastSun\0\0'u +\w'2:00w\0\0'u +\w'1:00d\0\0'u
.sp
-Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S
+Rule NAME FROM TO \*- IN ON AT SAVE LETTER/S
.sp
For example:
.ti +.5i
@@ -293,7 +352,9 @@ nor
.q + .
To allow for future extensions,
an unquoted name should not contain characters from the set
-.q !$%&'()*,/:;<=>?@[\e]\[ha]\`{|}\[ti] .
+.ie \n(.g .q \f(CR!$%&\(aq()*,/:;<=>?@[\e]\(ha\(ga{|}\(ti\fP .
+.el .ie t .q \f(CW!$%&'()*,/:;<=>?@[\e]^\(ga{|}~\fP .
+.el .q !$%&'()*,/:;<=>?@[\e]^`{|}~ .
.TP
.B FROM
Gives the first year in which the rule applies.
@@ -323,12 +384,17 @@ may be used to repeat the value of the
.B FROM
field.
.TP
-.B TYPE
-should be
+.B \*-
+Is a reserved field and should always contain
.q \*-
-and is present for compatibility with older versions of
-.B zic
-in which it could contain year types.
+for compatibility with older versions of
+.BR zic .
+It was previously known as the
+.B TYPE
+field, which could contain values to allow a
+separate script to further restrict in which
+.q types
+of years the rule would apply.
.TP
.B IN
Names the month in which the rule takes effect.
@@ -496,14 +562,14 @@ This field has the same format as the
.B AT
and
.B SAVE
-fields of rule lines;
+fields of rule lines, except without suffix letters;
begin the field with a minus sign if time must be subtracted from UT.
.TP
.B RULES
The name of the rules that apply in the timezone or,
alternatively, a field in the same format as a rule-line SAVE column,
-giving of the amount of time to be added to local standard time
-effect, and whether the resulting time is standard or daylight saving.
+giving the amount of time to be added to local standard time
+and whether the resulting time is standard or daylight saving.
If this field is
.B \*-
then standard time always applies.
@@ -529,7 +595,7 @@ using the shortest form that does not lose information, where
.IR mm ,
and
.I ss
-are the hours, minutes, and seconds east (+) or west (\(mi) of UT.
+are the hours, minutes, and seconds east (+) or west (\-) of UT.
Alternatively,
a slash (/)
separates standard and daylight abbreviations.
@@ -538,6 +604,9 @@ alphanumeric ASCII characters,
.q "+"
and
.q "\*-".
+By convention, the time zone abbreviation
+.q "\*-00"
+is a placeholder that means local time is unspecified.
.TP
.B UNTIL
The time at which the UT offset or the rule(s) change for a location.
@@ -579,6 +648,42 @@ first transition into standard time.
In a single zone it is an error if two rules take effect at the same
instant, or if two zone changes take effect at the same instant.
.PP
+If a continuation line subtracts
+.I N
+seconds from the UT offset after a transition that would be
+interpreted to be later if using the continuation line's UT offset and
+rules, the
+.q "until"
+time of the previous zone or continuation line is interpreted
+according to the continuation line's UT offset and rules, and any rule
+that would otherwise take effect in the next
+.I N
+seconds is instead assumed to take effect simultaneously.
+For example:
+.br
+.ne 7
+.nf
+.in +2m
+.ta \w'# Rule\0\0'u +\w'NAME\0\0'u +\w'FROM\0\0'u +\w'2006\0\0'u +\w'\*-\0\0'u +\w'Oct\0\0'u +\w'lastSun\0\0'u +\w'2:00\0\0'u +\w'SAVE\0\0'u
+.sp
+# Rule NAME FROM TO \*- IN ON AT SAVE LETTER/S
+Rule US 1967 2006 - Oct lastSun 2:00 0 S
+Rule US 1967 1973 - Apr lastSun 2:00 1:00 D
+.ta \w'Zone\0\0America/Menominee\0\0'u +\w'STDOFF\0\0'u +\w'RULES\0\0'u +\w'FORMAT\0\0'u
+# Zone\0\0NAME STDOFF RULES FORMAT [UNTIL]
+Zone\0\0America/Menominee \*-5:00 \*- EST 1973 Apr 29 2:00
+ \*-6:00 US C%sT
+.sp
+.in
+.fi
+Here, an incorrect reading would be there were two clock changes on 1973-04-29,
+the first from 02:00 EST (\*-05) to 01:00 CST (\*-06),
+and the second an hour later from 02:00 CST (\*-06) to 03:00 CDT (\*-05).
+However,
+.B zic
+interprets this more sensibly as a single transition from 02:00 CST (\*-05) to
+02:00 CDT (\*-05).
+.PP
A link line has the form
.sp
.nf
@@ -596,19 +701,37 @@ The
.B TARGET
field should appear as the
.B NAME
-field in some zone line.
+field in some zone line or as the
+.B LINK-NAME
+field in some link line.
The
.B LINK-NAME
field is used as an alternative name for that zone;
it has the same syntax as a zone line's
.B NAME
field.
+Links can chain together, although the behavior is unspecified if a
+chain of one or more links does not terminate in a Zone name.
+A link line can appear before the line that defines the link target.
+For example:
+.sp
+.ne 3
+.nf
+.in +2m
+.ta \w'Zone\0\0'u +\w'Greenwich\0\0'u
+Link Greenwich G_M_T
+Link Etc/GMT Greenwich
+Zone Etc/GMT\0\00\0\0\*-\0\0GMT
+.sp
+.in
+.fi
+The two links are chained together, and G_M_T, Greenwich, and Etc/GMT
+all name the same zone.
.PP
Except for continuation lines,
lines may appear in any order in the input.
However, the behavior is unspecified if multiple zone or link lines
-define the same name, or if the source of one link line is the target
-of another.
+define the same name.
.PP
The file that describes leap seconds can have leap lines and an
expiration line.
@@ -653,6 +776,19 @@ or
if the leap second time given by the other fields should be interpreted as
local (wall clock) time.
.PP
+Rolling leap seconds were implemented back when it was not
+clear whether common practice was rolling or stationary,
+with concerns that one would see
+Times Square ball drops where there'd be a
+.q "3... 2... 1... leap... Happy New Year"
+countdown, placing the leap second at
+midnight New York time rather than midnight UTC.
+However, this countdown style does not seem to have caught on,
+which means rolling leap seconds are not used in practice;
+also, they are not supported if the
+.B \*-r
+option is used.
+.PP
The expiration line, if present, has the form:
.nf
.ti +.5i
@@ -672,36 +808,18 @@ The
.BR DAY ,
and
.B HH:MM:SS
-fields give the expiration timestamp in UTC for the leap second table;
-.B zic
-outputs this expiration timestamp by truncating the end of the output
-file to the timestamp.
-If there is no expiration line,
-.B zic
-also accepts a comment
-.q "#expires \fIE\fP ...\&"
-where
-.I E
-is the expiration timestamp as a decimal integer count of seconds
-since the Epoch, not counting leap seconds.
-However, the
-.q "#expires"
-comment is an obsolescent feature,
-and the leap second file should use an expiration line
-instead of relying on a comment.
+fields give the expiration timestamp in UTC for the leap second table.
+.br
+.ne 22
.SH "EXTENDED EXAMPLE"
Here is an extended example of
.B zic
input, intended to illustrate many of its features.
-In this example, the EU rules are for the European Union
-and for its predecessor organization, the European Communities.
-.br
-.ne 22
.nf
.in +2m
-.ta \w'# Rule\0\0'u +\w'NAME\0\0'u +\w'FROM\0\0'u +\w'1973\0\0'u +\w'TYPE\0\0'u +\w'Apr\0\0'u +\w'lastSun\0\0'u +\w'2:00\0\0'u +\w'SAVE\0\0'u
+.ta \w'# Rule\0\0'u +\w'NAME\0\0'u +\w'FROM\0\0'u +\w'1973\0\0'u +\w'\*-\0\0'u +\w'Apr\0\0'u +\w'lastSun\0\0'u +\w'2:00\0\0'u +\w'SAVE\0\0'u
.sp
-# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S
+# Rule NAME FROM TO \*- IN ON AT SAVE LETTER/S
Rule Swiss 1941 1942 \*- May Mon>=1 1:00 1:00 S
Rule Swiss 1941 1942 \*- Oct Mon>=1 2:00 0 \*-
.sp .5
@@ -723,13 +841,13 @@ Link Europe/Zurich Europe/Vaduz
.sp
.in
.fi
-In this example, the timezone is named Europe/Zurich but it has an alias
-as Europe/Vaduz. This example says that Zurich was 34 minutes and 8
+In this example, the EU rules are for the European Union
+and for its predecessor organization, the European Communities.
+The timezone is named Europe/Zurich and it has the alias Europe/Vaduz.
+This example says that Zurich was 34 minutes and 8
seconds east of UT until 1853-07-16 at 00:00, when the legal offset
was changed to
-.ds o 7 degrees 26 minutes 22.50 seconds
-.if \n(.g .if c \(de .if c \(fm .if c \(sd .ds o 7\(de\|26\(fm\|22.50\(sd
-\*o,
+7\*d\*_26\*m\*_22.50\*s,
which works out to 0:29:45.50;
.B zic
treats this by rounding it to 0:29:46.
@@ -783,5 +901,3 @@ specifying transition instants using universal time.
.SH SEE ALSO
.BR tzfile (5),
.BR zdump (8)
-.\" This file is in the public domain, so clarified as of
-.\" 2009-05-17 by Arthur David Olson.
diff --git a/scripts/FIXME_list.sh b/scripts/FIXME_list.sh
index 59ba3c0cb..59ba3c0cb 100644..100755
--- a/scripts/FIXME_list.sh
+++ b/scripts/FIXME_list.sh
diff --git a/scripts/LinuxManBook/BuildLinuxMan.pl b/scripts/LinuxManBook/BuildLinuxMan.pl
index 7d9605734..7d9605734 100644..100755
--- a/scripts/LinuxManBook/BuildLinuxMan.pl
+++ b/scripts/LinuxManBook/BuildLinuxMan.pl
diff --git a/scripts/LinuxManBook/LMBfront.t b/scripts/LinuxManBook/LMBfront.t
index 705c6632f..c034dd58a 100644
--- a/scripts/LinuxManBook/LMBfront.t
+++ b/scripts/LinuxManBook/LMBfront.t
@@ -24,7 +24,7 @@
\m[maroon]GNU/Linux\m[]
.sp 18p
.ps 16
-\f[BMB]THE MAN PAGES BOOK\fP
+\f[BMB]THE MAN-PAGES BOOK\fP
.sp 30p
.sp 1.4i
.ps 12
diff --git a/scripts/LinuxManBook/anmark.tmac b/scripts/LinuxManBook/anmark.tmac
index a1cba93ce..95e945956 100644
--- a/scripts/LinuxManBook/anmark.tmac
+++ b/scripts/LinuxManBook/anmark.tmac
@@ -1,6 +1,6 @@
.nr PDFOUTLINE.FOLDLEVEL 1
.defcolor pdf:href.colour rgb 0.00 0.25 0.75
-.pdfinfo /Title "The Linux Manpage Book"
+.pdfinfo /Title "The Linux man-pages Book"
.special S TINOR
.de EnD
..
diff --git a/scripts/LinuxManBook/devpdf/download b/scripts/LinuxManBook/devpdf/download
index e230c8213..e230c8213 100644..100755
--- a/scripts/LinuxManBook/devpdf/download
+++ b/scripts/LinuxManBook/devpdf/download
diff --git a/scripts/LinuxManBook/gropdf b/scripts/LinuxManBook/gropdf
index 8474e583f..8474e583f 100644..100755
--- a/scripts/LinuxManBook/gropdf
+++ b/scripts/LinuxManBook/gropdf
diff --git a/scripts/add_parens_for_own_funcs.sh b/scripts/add_parens_for_own_funcs.sh
index 1bf6d2ac6..1bf6d2ac6 100644..100755
--- a/scripts/add_parens_for_own_funcs.sh
+++ b/scripts/add_parens_for_own_funcs.sh
diff --git a/scripts/bash_aliases b/scripts/bash_aliases
index 9f7d10409..e461707c8 100644
--- a/scripts/bash_aliases
+++ b/scripts/bash_aliases
@@ -23,14 +23,15 @@ EX_USAGE=64;
# C
# sed_rm_ccomments() removes C comments.
-# It can't handle multiple comments in a single line correctly,
-# nor mixed or embedded //... and /*...*/ comments.
+# It can't handle mixed //... and /*...*/ comments.
# Use as a filter (see man_lsfunc() in this file).
sed_rm_ccomments()
{
- sed 's%/\*.*\*/%%' \
- |sed -E '\%/\*%,\%\*/%{\%(\*/|/\*)%!d; s%/\*.*%%; s%.*\*/%%;}' \
+ perl -p -e 's%/\*.*?\*/%%g' \
+ |sed -E '\%/\*%, \%\*/% {\%(\*/|/\*)%!d}' \
+ |sed -E '\%/\*% {s%/\*.*%%; n; s%.*\*/%%;}' \
+ |sed -E '\%/\*% {s%/\*.*%%; n; s%.*\*/%%;}' \
|sed 's%//.*%%';
}
@@ -65,7 +66,8 @@ man_section()
-e "/^\.SH $s/p" \
-e "/^\.SH $s/,/^\.SH/{/^\.SH/!p}";
done;) \
- |man -P cat -l - 2>/dev/null;
+ |mandoc -Tutf8 2>/dev/null \
+ |col -pbx;
done;
}
diff --git a/scripts/convert_to_utf_8.sh b/scripts/convert_to_utf_8.sh
index 28f5a72cf..28f5a72cf 100644..100755
--- a/scripts/convert_to_utf_8.sh
+++ b/scripts/convert_to_utf_8.sh
diff --git a/scripts/find_dots_no_parens.sh b/scripts/find_dots_no_parens.sh
index 79d1c321c..79d1c321c 100644..100755
--- a/scripts/find_dots_no_parens.sh
+++ b/scripts/find_dots_no_parens.sh
diff --git a/scripts/find_repeated_words.sh b/scripts/find_repeated_words.sh
index 747872e3b..747872e3b 100644..100755
--- a/scripts/find_repeated_words.sh
+++ b/scripts/find_repeated_words.sh
diff --git a/scripts/find_slashes_no_parens.sh b/scripts/find_slashes_no_parens.sh
index 086faac07..086faac07 100644..100755
--- a/scripts/find_slashes_no_parens.sh
+++ b/scripts/find_slashes_no_parens.sh
diff --git a/scripts/man_show_fixme.sh b/scripts/man_show_fixme.sh
index 6a42b3321..6a42b3321 100644..100755
--- a/scripts/man_show_fixme.sh
+++ b/scripts/man_show_fixme.sh
diff --git a/scripts/markup_check.sh b/scripts/markup_check.sh
index 4dddd3a2a..4dddd3a2a 100644..100755
--- a/scripts/markup_check.sh
+++ b/scripts/markup_check.sh
diff --git a/scripts/unformat_parens.sh b/scripts/unformat_parens.sh
index 06bbb48cd..06bbb48cd 100644..100755
--- a/scripts/unformat_parens.sh
+++ b/scripts/unformat_parens.sh
diff --git a/share/lint/groff/man.ignore.grep b/share/lint/groff/man.ignore.grep
new file mode 100644
index 000000000..912eb576c
--- /dev/null
+++ b/share/lint/groff/man.ignore.grep
@@ -0,0 +1,3 @@
+style: .TH missing fifth argument and second argument
+style: use of deprecated macro: .PD$
+style: use of deprecated macro: .UC$
diff --git a/share/lint/mandoc/man.ignore.grep b/share/lint/mandoc/man.ignore.grep
new file mode 100644
index 000000000..a2f91bcff
--- /dev/null
+++ b/share/lint/mandoc/man.ignore.grep
@@ -0,0 +1,6 @@
+STYLE: lower case character in document title:
+UNSUPP: ignoring macro in table:
+WARNING: cannot parse date, using it verbatim: TH (date)
+WARNING: empty block: UR
+WARNING: missing date, using "": TH
+WARNING: undefined escape, printing literally: \\\\
diff --git a/share/lint/mandoc/mdoc.ignore.grep b/share/lint/mandoc/mdoc.ignore.grep
new file mode 100644
index 000000000..3fe2831d0
--- /dev/null
+++ b/share/lint/mandoc/mdoc.ignore.grep
@@ -0,0 +1,5 @@
+STYLE: legacy man(7) date format: Dd
+STYLE: lower case character in document title: Dt
+STYLE: operating system explicitly specified: Os
+STYLE: referenced manual not found: Xr
+WARNING: cross reference to self: Xr
diff --git a/share/mk/build/_.mk b/share/mk/build/_.mk
new file mode 100644
index 000000000..bdce76039
--- /dev/null
+++ b/share/mk/build/_.mk
@@ -0,0 +1,52 @@
+########################################################################
+# Copyright 2021-2023, Alejandro Colomar <alx@kernel.org>
+# SPDX-License-Identifier: GPL-3.0-or-later
+########################################################################
+
+
+ifndef MAKEFILE_BUILD_INCLUDED
+MAKEFILE_BUILD_INCLUDED := 1
+
+
+include $(MAKEFILEDIR)/cmd.mk
+include $(MAKEFILEDIR)/src.mk
+
+
+builddir := .tmp
+
+SYSCONFDIR := $(srcdir)/etc
+
+_MANDIR := $(builddir)/man
+
+
+MKDIR := mkdir -p
+RM := rm
+
+
+NONSO_MAN := $(shell $(FIND) $(MANDIR)/* -type f \
+ | $(GREP) '$(MANEXT)' \
+ | $(XARGS) $(GREP) -l '^\.TH ' \
+ | $(SORT) \
+ | $(SED) 's,:,\\:,g')
+NONSO_MDOC := $(shell $(FIND) $(MANDIR)/* -type f \
+ | $(GREP) '$(MANEXT)' \
+ | $(XARGS) $(GREP) -l '^\.Dt ' \
+ | $(SORT) \
+ | $(SED) 's,:,\\:,g')
+
+
+$(builddir)/%/:
+ +$(info MKDIR $@)
+ +$(MKDIR) $@
+
+
+.PHONY: build
+build: build-catman build-html build-pdf build-ps build-src;
+
+.PHONY: clean
+clean:
+ $(info RM -rf $(builddir))
+ $(RM) -rf $(builddir)
+
+
+endif # include guard
diff --git a/share/mk/build/catman.mk b/share/mk/build/catman.mk
new file mode 100644
index 000000000..7b8766e7b
--- /dev/null
+++ b/share/mk/build/catman.mk
@@ -0,0 +1,89 @@
+########################################################################
+# Copyright 2021-2023, Alejandro Colomar <alx@kernel.org>
+# SPDX-License-Identifier: GPL-3.0-or-later
+########################################################################
+
+
+ifndef MAKEFILE_BUILD_CATMAN_INCLUDED
+MAKEFILE_BUILD_CATMAN_INCLUDED := 1
+
+
+include $(MAKEFILEDIR)/build/_.mk
+include $(MAKEFILEDIR)/build/groff.mk
+include $(MAKEFILEDIR)/cmd.mk
+include $(MAKEFILEDIR)/src.mk
+
+
+groff_man_ignore_grep := $(DATAROOTDIR)/lint/groff/man.ignore.grep
+
+MANWIDTH ?= 80
+TROFF_CHECKSTYLE_LVL := 3
+NROFF_LINE_LENGTH := $(shell $(EXPR) $(MANWIDTH) - 2)
+NROFF_OUT_DEVICE := $(shell $(LOCALE) charmap \
+ | $(GREP) -i 'utf-*8' >/dev/null \
+ && $(ECHO) utf8 \
+ || $(ECHO) ascii)
+
+DEFAULT_NROFFFLAGS := \
+ -T$(NROFF_OUT_DEVICE) \
+ -rLL=$(NROFF_LINE_LENGTH)n \
+ -rCHECKSTYLE=$(TROFF_CHECKSTYLE_LVL) \
+ -ww
+EXTRA_NROFFFLAGS :=
+NROFFFLAGS := $(DEFAULT_NROFFFLAGS) $(EXTRA_NROFFFLAGS)
+
+DEFAULT_GROTTYFLAGS := -c
+EXTRA_GROTTYFLAGS :=
+GROTTYFLAGS := $(DEFAULT_GROTTYFLAGS) $(EXTRA_GROTTYFLAGS)
+GROTTY := grotty
+
+
+_CATMAN_troff := $(patsubst $(MANDIR)/%,$(_MANDIR)/%.cat.troff,$(NONSO_MAN) $(NONSO_MDOC))
+_CATMAN_MAN_set := $(patsubst $(MANDIR)/%,$(_MANDIR)/%.cat.set,$(NONSO_MAN))
+_CATMAN_MDOC_set:= $(patsubst $(MANDIR)/%,$(_MANDIR)/%.cat.set,$(NONSO_MDOC))
+_CATMAN := $(patsubst $(MANDIR)/%,$(_MANDIR)/%.cat,$(NONSO_MAN) $(NONSO_MDOC))
+
+
+$(_CATMAN_troff): %.cat.troff: %.eqn | $$(@D)/
+ $(info EQN $@)
+ ! ($(EQN) -T$(NROFF_OUT_DEVICE) $(EQNFLAGS) <$< 2>&1 >$@) \
+ | $(GREP) ^ >&2
+
+$(_CATMAN_MAN_set): %.cat.set: %.cat.troff $(groff_man_ignore_grep) | $$(@D)/
+ $(info TROFF $@)
+ ! ($(TROFF) $(TROFFFLAGS_MAN) $(NROFFFLAGS) <$< 2>&1 >$@ \
+ | $(GREP) -v -f '$(groff_man_ignore_grep)' \
+ ||:; \
+ ) \
+ | $(GREP) ^ >&2
+
+$(_CATMAN_MDOC_set): %.cat.set: %.cat.troff | $$(@D)/
+ $(info TROFF $@)
+ ! ($(TROFF) $(TROFFFLAGS_MDOC) $(NROFFFLAGS) <$< 2>&1 >$@) \
+ | $(GREP) ^ >&2
+
+$(_CATMAN): %.cat: %.cat.set | $$(@D)/
+ $(info GROTTY $@)
+ $(GROTTY) $(GROTTYFLAGS) <$< >$@
+
+
+.PHONY: build-catman-eqn
+build-catman-eqn: $(_CATMAN_troff);
+
+.PHONY: build-catman-troff-man
+build-catman-troff-man: $(_CATMAN_MAN_set);
+
+.PHONY: build-catman-troff-mdoc
+build-catman-troff-mdoc: $(_CATMAN_MDOC_set);
+
+.PHONY: build-catman-troff
+build-catman-troff: build-catman-troff-man build-catman-troff-mdoc;
+
+.PHONY: build-catman-grotty
+build-catman-grotty: $(_CATMAN);
+
+.PHONY: build-catman
+build-catman: build-catman-grotty;
+
+
+endif # include guard
diff --git a/share/mk/build/groff.mk b/share/mk/build/groff.mk
new file mode 100644
index 000000000..2a5a3de13
--- /dev/null
+++ b/share/mk/build/groff.mk
@@ -0,0 +1,39 @@
+########################################################################
+# Copyright 2021-2023, Alejandro Colomar <alx@kernel.org>
+# SPDX-License-Identifier: GPL-3.0-or-later
+########################################################################
+
+
+ifndef MAKEFILE_BUILD_GROFF_INCLUDED
+MAKEFILE_BUILD_GROFF_INCLUDED := 1
+
+
+include $(MAKEFILEDIR)/build/_.mk
+include $(MAKEFILEDIR)/cmd.mk
+include $(MAKEFILEDIR)/src.mk
+
+
+DEFAULT_EQNFLAGS :=
+EXTRA_EQNFLAGS :=
+EQNFLAGS := $(DEFAULT_EQNFLAGS) $(EXTRA_EQNFLAGS)
+EQN := eqn
+
+DEFAULT_TROFFFLAGS := -wbreak
+EXTRA_TROFFFLAGS :=
+TROFFFLAGS := $(DEFAULT_TROFFFLAGS) $(EXTRA_TROFFFLAGS)
+TROFF := troff
+
+DEFAULT_TROFFFLAGS_MAN := \
+ $(TROFFFLAGS) \
+ -man
+EXTRA_TROFFFLAGS_MAN :=
+TROFFFLAGS_MAN := $(DEFAULT_TROFFFLAGS_MAN) $(EXTRA_TROFFFLAGS_MAN)
+
+DEFAULT_TROFFFLAGS_MDOC := \
+ $(TROFFFLAGS) \
+ -mdoc
+EXTRA_TROFFFLAGS_MDOC :=
+TROFFFLAGS_MDOC := $(DEFAULT_TROFFFLAGS_MDOC) $(EXTRA_TROFFFLAGS_MDOC)
+
+
+endif # include guard
diff --git a/lib/build-html.mk b/share/mk/build/html.mk
index 060e07ed9..084654df7 100644
--- a/lib/build-html.mk
+++ b/share/mk/build/html.mk
@@ -1,6 +1,6 @@
########################################################################
-# Copyright (C) 2021, 2022 Alejandro Colomar <alx@kernel.org>
-# SPDX-License-Identifier: GPL-2.0 OR LGPL-2.0
+# Copyright 2021-2022, Alejandro Colomar <alx@kernel.org>
+# SPDX-License-Identifier: GPL-3.0-or-later
########################################################################
@@ -8,9 +8,9 @@ ifndef MAKEFILE_BUILD_HTML_INCLUDED
MAKEFILE_BUILD_HTML_INCLUDED := 1
-include $(srcdir)/lib/build.mk
-include $(srcdir)/lib/cmd.mk
-include $(srcdir)/lib/src.mk
+include $(MAKEFILEDIR)/build/_.mk
+include $(MAKEFILEDIR)/cmd.mk
+include $(MAKEFILEDIR)/src.mk
htmlext := .html
@@ -23,24 +23,20 @@ MAN2HTMLFLAGS := $(DEFAULT_MAN2HTMLFLAGS) $(EXTRA_MAN2HTMLFLAGS)
MAN2HTML := man2html
-_HTMLPAGES := $(patsubst $(MANDIR)/%,$(_HTMLDIR)/%.html,$(MANPAGES))
-_HTMLDIRS := $(patsubst $(MANDIR)/%,$(_HTMLDIR)/%/.,$(MANDIRS))
+_HTMLPAGES := $(patsubst $(MANDIR)/%,$(_HTMLDIR)/%$(htmlext),$(MANPAGES))
# Use with
# make MAN2HTMLFLAGS=whatever html
# The sed removes the lines "Content-type: text/html\n\n"
-$(_HTMLPAGES): $(_HTMLDIR)/%.html: $(MANDIR)/% | $$(@D)/.
+$(_HTMLPAGES): $(_HTMLDIR)/%$(htmlext): $(MANDIR)/% | $$(@D)/
$(info MAN2HTML $@)
$(MAN2HTML) $(MAN2HTMLFLAGS) $< \
| $(SED) -e 1,2d >$@
-$(_HTMLDIRS): %/.: | $$(dir %). $(_HTMLDIR)/.
-
.PHONY: build-html html
-build-html html: $(_HTMLPAGES)
- @:
+build-html html: $(_HTMLPAGES);
-endif # MAKEFILE_BUILD_HTML_INCLUDED
+endif # include guard
diff --git a/share/mk/build/pdf.mk b/share/mk/build/pdf.mk
new file mode 100644
index 000000000..380c6c643
--- /dev/null
+++ b/share/mk/build/pdf.mk
@@ -0,0 +1,68 @@
+########################################################################
+# Copyright 2023, Alejandro Colomar <alx@kernel.org>
+# SPDX-License-Identifier: GPL-3.0-or-later
+########################################################################
+
+
+ifndef MAKEFILE_BUILD_PDF_INCLUDED
+MAKEFILE_BUILD_PDF_INCLUDED := 1
+
+
+include $(MAKEFILEDIR)/build/_.mk
+include $(MAKEFILEDIR)/build/groff.mk
+include $(MAKEFILEDIR)/cmd.mk
+include $(MAKEFILEDIR)/src.mk
+
+
+DEFAULT_GROPDFFLAGS :=
+EXTRA_GROPDFFLAGS :=
+GROPDFFLAGS := $(DEFAULT_GROPDFFLAGS) $(EXTRA_GROPDFFLAGS)
+GROPDF := gropdf
+
+
+_PDFMAN_troff := $(patsubst $(MANDIR)/%,$(_MANDIR)/%.pdf.troff,$(NONSO_MAN) $(NONSO_MDOC))
+_PDFMAN_MAN_set := $(patsubst $(MANDIR)/%,$(_MANDIR)/%.pdf.set,$(NONSO_MAN))
+_PDFMAN_MDOC_set:= $(patsubst $(MANDIR)/%,$(_MANDIR)/%.pdf.set,$(NONSO_MDOC))
+_PDFMAN := $(patsubst $(MANDIR)/%,$(_MANDIR)/%.pdf,$(NONSO_MAN) $(NONSO_MDOC))
+
+
+$(_PDFMAN_troff): %.pdf.troff: %.eqn | $$(@D)/
+ $(info EQN $@)
+ ! ($(EQN) -Tpdf $(EQNFLAGS) <$< 2>&1 >$@) \
+ | $(GREP) ^ >&2
+
+$(_PDFMAN_MAN_set): %.pdf.set: %.pdf.troff | $$(@D)/
+ $(info TROFF $@)
+ ! ($(TROFF) -Tpdf $(TROFFFLAGS_MAN) <$< 2>&1 >$@) \
+ | $(GREP) ^ >&2
+
+$(_PDFMAN_MDOC_set): %.pdf.set: %.pdf.troff | $$(@D)/
+ $(info TROFF $@)
+ ! ($(TROFF) -Tpdf $(TROFFFLAGS_MDOC) <$< 2>&1 >$@) \
+ | $(GREP) ^ >&2
+
+$(_PDFMAN): %.pdf: %.pdf.set | $$(@D)/
+ $(info GROPDF $@)
+ $(GROPDF) $(GROPDFFLAGS) <$< >$@
+
+
+.PHONY: build-pdf-eqn
+build-pdf-eqn: $(_PDFMAN_troff);
+
+.PHONY: build-pdf-troff-man
+build-pdf-troff-man: $(_PDFMAN_MAN_set);
+
+.PHONY: build-pdf-troff-mdoc
+build-pdf-troff-mdoc: $(_PDFMAN_MDOC_set);
+
+.PHONY: build-pdf-troff
+build-pdf-troff: build-pdf-troff-man build-pdf-troff-mdoc;
+
+.PHONY: build-pdf-gropdf
+build-pdf-gropdf: $(_PDFMAN);
+
+.PHONY: build-pdf
+build-pdf: build-pdf-gropdf;
+
+
+endif # include guard
diff --git a/share/mk/build/pre.mk b/share/mk/build/pre.mk
new file mode 100644
index 000000000..4c458fa4e
--- /dev/null
+++ b/share/mk/build/pre.mk
@@ -0,0 +1,47 @@
+########################################################################
+# Copyright 2021-2023, Alejandro Colomar <alx@kernel.org>
+# SPDX-License-Identifier: GPL-3.0-or-later
+########################################################################
+
+
+ifndef MAKEFILE_BUILD_PRE_INCLUDED
+MAKEFILE_BUILD_PRE_INCLUDED := 1
+
+
+include $(MAKEFILEDIR)/build/_.mk
+include $(MAKEFILEDIR)/cmd.mk
+include $(MAKEFILEDIR)/src.mk
+
+
+DEFAULT_PRECONVFLAGS :=
+EXTRA_PRECONVFLAGS :=
+PRECONVFLAGS := $(DEFAULT_PRECONVFLAGS) $(EXTRA_PRECONVFLAGS)
+PRECONV := preconv
+
+TBL := tbl
+
+
+_MAN_tbl := $(patsubst $(MANDIR)/%,$(_MANDIR)/%.tbl,$(NONSO_MAN) $(NONSO_MDOC))
+_MAN_eqn := $(patsubst $(MANDIR)/%,$(_MANDIR)/%.eqn,$(NONSO_MAN) $(NONSO_MDOC))
+
+
+$(_MAN_tbl): $(_MANDIR)/%.tbl: $(MANDIR)/% | $$(@D)/
+ $(info PRECONV $@)
+ $(PRECONV) $(PRECONVFLAGS) $< >$@
+
+$(_MAN_eqn): %.eqn: %.tbl | $$(@D)/
+ $(info TBL $@)
+ $(TBL) <$< >$@
+
+
+.PHONY: build-pre-preconv
+build-pre-preconv: $(_MAN_tbl);
+
+.PHONY: build-pre-tbl
+build-pre-tbl: $(_MAN_eqn);
+
+.PHONY: build-pre
+build-pre: build-pre-tbl;
+
+
+endif # include guard
diff --git a/share/mk/build/ps.mk b/share/mk/build/ps.mk
new file mode 100644
index 000000000..5b29dc1ad
--- /dev/null
+++ b/share/mk/build/ps.mk
@@ -0,0 +1,68 @@
+########################################################################
+# Copyright 2023, Alejandro Colomar <alx@kernel.org>
+# SPDX-License-Identifier: GPL-3.0-or-later
+########################################################################
+
+
+ifndef MAKEFILE_BUILD_PS_INCLUDED
+MAKEFILE_BUILD_PS_INCLUDED := 1
+
+
+include $(MAKEFILEDIR)/build/_.mk
+include $(MAKEFILEDIR)/build/groff.mk
+include $(MAKEFILEDIR)/cmd.mk
+include $(MAKEFILEDIR)/src.mk
+
+
+DEFAULT_GROPSFLAGS :=
+EXTRA_GROPSFLAGS :=
+GROPSFLAGS := $(DEFAULT_GROPSFLAGS) $(EXTRA_GROPSFLAGS)
+GROPS := grops
+
+
+_PSMAN_troff := $(patsubst $(MANDIR)/%,$(_MANDIR)/%.ps.troff,$(NONSO_MAN) $(NONSO_MDOC))
+_PSMAN_MAN_set := $(patsubst $(MANDIR)/%,$(_MANDIR)/%.ps.set,$(NONSO_MAN))
+_PSMAN_MDOC_set:= $(patsubst $(MANDIR)/%,$(_MANDIR)/%.ps.set,$(NONSO_MDOC))
+_PSMAN := $(patsubst $(MANDIR)/%,$(_MANDIR)/%.ps,$(NONSO_MAN) $(NONSO_MDOC))
+
+
+$(_PSMAN_troff): %.ps.troff: %.eqn | $$(@D)/
+ $(info EQN $@)
+ ! ($(EQN) -Tps $(EQNFLAGS) <$< 2>&1 >$@) \
+ | $(GREP) ^ >&2
+
+$(_PSMAN_MAN_set): %.ps.set: %.ps.troff | $$(@D)/
+ $(info TROFF $@)
+ ! ($(TROFF) -Tps $(TROFFFLAGS_MAN) <$< 2>&1 >$@) \
+ | $(GREP) ^ >&2
+
+$(_PSMAN_MDOC_set): %.ps.set: %.ps.troff | $$(@D)/
+ $(info TROFF $@)
+ ! ($(TROFF) -Tps $(TROFFFLAGS_MDOC) <$< 2>&1 >$@) \
+ | $(GREP) ^ >&2
+
+$(_PSMAN): %.ps: %.ps.set | $$(@D)/
+ $(info GROPS $@)
+ $(GROPS) $(GROPSFLAGS) <$< >$@
+
+
+.PHONY: build-ps-eqn
+build-ps-eqn: $(_PSMAN_troff);
+
+.PHONY: build-ps-troff-man
+build-ps-troff-man: $(_PSMAN_MAN_set);
+
+.PHONY: build-ps-troff-mdoc
+build-ps-troff-mdoc: $(_PSMAN_MDOC_set);
+
+.PHONY: build-ps-troff
+build-ps-troff: build-ps-troff-man build-ps-troff-mdoc;
+
+.PHONY: build-ps-grops
+build-ps-grops: $(_PSMAN);
+
+.PHONY: build-ps
+build-ps: build-ps-grops;
+
+
+endif # include guard
diff --git a/share/mk/build/src.mk b/share/mk/build/src.mk
new file mode 100644
index 000000000..365c2560e
--- /dev/null
+++ b/share/mk/build/src.mk
@@ -0,0 +1,117 @@
+########################################################################
+# Copyright 2021-2023, Alejandro Colomar <alx@kernel.org>
+# SPDX-License-Identifier: GPL-3.0-or-later
+########################################################################
+
+
+ifndef MAKEFILE_BUILD_SRC_INCLUDED
+MAKEFILE_BUILD_SRC_INCLUDED := 1
+
+
+include $(MAKEFILEDIR)/build/_.mk
+include $(MAKEFILEDIR)/cmd.mk
+include $(MAKEFILEDIR)/src.mk
+include $(MAKEFILEDIR)/verbose.mk
+
+
+PKGCONF_LIBS := libbsd-overlay
+
+
+DEFAULT_CPPFLAGS := $(shell $(PKGCONF) --cflags $(PKGCONF_LIBS) $(HIDE_ERR))
+EXTRA_CPPFLAGS :=
+CPPFLAGS := $(DEFAULT_CPPFLAGS) $(EXTRA_CPPFLAGS)
+
+DEFAULT_CFLAGS := \
+ -std=gnu17 \
+ -Wall \
+ -Wextra \
+ -Wstrict-prototypes \
+ -Wdeclaration-after-statement \
+ -Werror \
+ -Wno-error=unused-parameter \
+ -Wno-error=sign-compare \
+ -Wno-error=format \
+ -Wno-error=uninitialized
+ #-Wno-error=declaration-after-statement
+EXTRA_CFLAGS :=
+CFLAGS := $(DEFAULT_CFLAGS) $(EXTRA_CFLAGS)
+
+DEFAULT_LDFLAGS := \
+ -Wl,--as-needed \
+ -Wl,--no-allow-shlib-undefined \
+ -Wl,--no-copy-dt-needed-entries \
+ -Wl,--no-undefined \
+ $(shell $(PKGCONF) --libs-only-L $(PKGCONF_LIBS) $(HIDE_ERR)) \
+ $(shell $(PKGCONF) --libs-only-other $(PKGCONF_LIBS) $(HIDE_ERR))
+EXTRA_LDFLAGS :=
+LDFLAGS := $(DEFAULT_LDFLAGS) $(EXTRA_LDFLAGS)
+
+DEFAULT_LDLIBS := \
+ -lc \
+ $(shell $(PKGCONF) --libs-only-l $(PKGCONF_LIBS) $(HIDE_ERR))
+EXTRA_LDLIBS :=
+LDLIBS := $(DEFAULT_LDLIBS) $(EXTRA_LDLIBS)
+
+
+CC := cc
+LD := $(CC) $(CFLAGS)
+
+
+_SRCPAGEDIRS := $(patsubst $(MANDIR)/%,$(_MANDIR)/%.d/,$(NONSO_MAN))
+
+_UNITS_src_src := $(patsubst $(MANDIR)/%,$(_MANDIR)/%,$(shell \
+ $(FIND) $(MANDIR)/* -type f \
+ | $(GREP) '$(MANEXT)' \
+ | $(XARGS) $(GREP) -H '^\.\\" SRC BEGIN ' \
+ | $(SED) 's,:\.\\" SRC BEGIN (,.d/,' \
+ | $(SED) 's/)//' \
+ | $(SORT) \
+ | $(SED) 's,:,\\:,g'))
+_UNITS_src_h := $(filter %.h,$(_UNITS_src_src))
+_UNITS_src_c := $(filter %.c,$(_UNITS_src_src))
+_UNITS_src_o := $(patsubst %.c,%.o,$(_UNITS_src_c))
+_UNITS_src_bin := $(patsubst %.c,%,$(_UNITS_src_c))
+
+
+$(_SRCPAGEDIRS): $(_MANDIR)/%.d/: $(MANDIR)/%
+ +$(info MKDIR $@)
+ +$(MKDIR) $@
+ +touch $@
+
+$(_UNITS_src_src): $$(patsubst $(_MANDIR)/%.d,$(MANDIR)/%,$$(@D)) | $$(@D)/
+$(_UNITS_src_c): $$(filter $$(@D)/%.h,$(_UNITS_src_h))
+$(_UNITS_src_src):
+ $(info SED $@)
+ <$< \
+ $(SED) -n \
+ -e '/^\.TH/,/^\.SH/{/^\.SH/!p}' \
+ -e '/^\.SH EXAMPLES/p' \
+ -e "/^\... SRC BEGIN ($(@F))$$/,/^\... SRC END$$/p" \
+ | $(MANDOC) -Tutf8 \
+ | $(SED) '/^[^ ]/d' \
+ | $(SED) 's/^ //' \
+ >$@
+
+$(_UNITS_src_o): %.o: %.c
+ $(info CC $@)
+ $(CC) -c $(CPPFLAGS) $(CFLAGS) -o $@ $<
+
+$(_UNITS_src_bin): %: %.o
+ $(info LD $@)
+ $(LD) $(LDFLAGS) -o $@ $< $(LDLIBS)
+
+
+.PHONY: build-src-c
+build-src-c: $(_UNITS_src_c);
+
+.PHONY: build-src-cc
+build-src-cc: $(_UNITS_src_o);
+
+.PHONY: build-src-ld
+build-src-ld: $(_UNITS_src_bin);
+
+.PHONY: build-src
+build-src: build-src-ld
+
+
+endif # include guard
diff --git a/share/mk/check/_.mk b/share/mk/check/_.mk
new file mode 100644
index 000000000..6326d1f89
--- /dev/null
+++ b/share/mk/check/_.mk
@@ -0,0 +1,18 @@
+########################################################################
+# Copyright 2023, Alejandro Colomar <alx@kernel.org>
+# SPDX-License-Identifier: GPL-3.0-or-later
+########################################################################
+
+
+ifndef MAKEFILE_CHECK_INCLUDED
+MAKEFILE_CHECK_INCLUDED := 1
+
+
+check := check-catman
+
+
+.PHONY: check
+check: $(check);
+
+
+endif # include guard
diff --git a/share/mk/check/catman.mk b/share/mk/check/catman.mk
new file mode 100644
index 000000000..8a0d3b6db
--- /dev/null
+++ b/share/mk/check/catman.mk
@@ -0,0 +1,51 @@
+########################################################################
+# Copyright 2021-2023, Alejandro Colomar <alx@kernel.org>
+# SPDX-License-Identifier: GPL-3.0-or-later
+########################################################################
+
+
+ifndef MAKEFILE_CHECK_CATMAN_INCLUDED
+MAKEFILE_CHECK_CATMAN_INCLUDED := 1
+
+
+include $(MAKEFILEDIR)/cmd.mk
+include $(MAKEFILEDIR)/build/_.mk
+include $(MAKEFILEDIR)/build/catman.mk
+include $(MAKEFILEDIR)/check/_.mk
+include $(MAKEFILEDIR)/src.mk
+
+
+DEFAULT_COLFLAGS := \
+ -b \
+ -p \
+ -x
+EXTRA_COLFLAGS :=
+COLFLAGS := $(DEFAULT_COLFLAGS) $(EXTRA_COLFLAGS)
+COL := col
+
+
+_CHECK_catman_grep := $(patsubst $(MANDIR)/%,$(_MANDIR)/%.cat.grep,$(NONSO_MAN) $(NONSO_MDOC))
+_CHECK_catman := $(patsubst $(MANDIR)/%,$(_MANDIR)/%.check-catman.touch,$(NONSO_MAN) $(NONSO_MDOC))
+
+
+$(_CHECK_catman_grep): %.grep: % | $$(@D)/
+ $(info COL $@)
+ $(COL) $(COLFLAGS) <$< >$@
+
+$(_CHECK_catman): %.check-catman.touch: %.cat.grep | $$(@D)/
+ $(info GREP $@)
+ ! $(GREP) -n '.\{$(MANWIDTH)\}.' $< /dev/null >&2
+ touch $@
+
+
+.PHONY: check-catman-col
+check-catman-col: $(_CHECK_catman_grep);
+
+.PHONY: check-catman-grep
+check-catman-grep: $(_CHECK_catman);
+
+.PHONY: check-catman
+check-catman: check-catman-grep;
+
+
+endif # include guard
diff --git a/lib/cmd.mk b/share/mk/cmd.mk
index 17f3a8ee5..aa7c07c1c 100644
--- a/lib/cmd.mk
+++ b/share/mk/cmd.mk
@@ -1,6 +1,6 @@
########################################################################
-# Copyright (C) 2022 Alejandro Colomar <alx@kernel.org>
-# SPDX-License-Identifier: GPL-2.0 OR LGPL-2.0
+# Copyright 2022, Alejandro Colomar <alx@kernel.org>
+# SPDX-License-Identifier: GPL-3.0-or-later
########################################################################
@@ -8,6 +8,8 @@ ifndef MAKEFILE_CMD_INCLUDED
MAKEFILE_CMD_INCLUDED := 1
+BZIP2 := bzip2
+CP := cp
ECHO := echo
EXPR := expr
FIND := find
@@ -16,19 +18,23 @@ GREP := grep
GZIP := gzip
HEAD := head
INSTALL := install
+LN := ln
LOCALE := locale
-PKG-CONFIG := pkg-config
+LZIP := lzip
+MANDOC := mandoc
+PKGCONF := pkgconf
SED := sed
SORT := sort
+SPONGE := sponge
TAC := tac
TAIL := tail
TAR := tar
+TEST := test
XARGS := xargs
XZ := xz
INSTALL_DATA := $(INSTALL) -m 644
INSTALL_DIR := $(INSTALL) -m 755 -d
-RMDIR := rmdir --ignore-fail-on-non-empty
-endif # MAKEFILE_CMD_INCLUDED
+endif # include guard
diff --git a/share/mk/compress.mk b/share/mk/compress.mk
new file mode 100644
index 000000000..6502930dc
--- /dev/null
+++ b/share/mk/compress.mk
@@ -0,0 +1,40 @@
+########################################################################
+# Copyright 2023 Alejandro Colomar <alx@kernel.org>
+# SPDX-License-Identifier: GPL-3.0-or-later
+########################################################################
+
+
+ifndef MAKEFILE_COMPRESS_INCLUDED
+MAKEFILE_COMPRESS_INCLUDED := 1
+
+
+Z :=
+ifeq ($(Z),)
+else ifeq ($(Z),.bz2)
+else ifeq ($(Z),.gz)
+else ifeq ($(Z),.lz)
+else ifeq ($(Z),.xz)
+else
+$(warning "Z": "$(Z)")
+$(error Valid values for "Z": ["", ".bz2", ".gz", ".lz", ".xz"])
+endif
+
+
+DEFAULT_BZIP2FLAGS :=
+EXTRA_BZIP2FLAGS :=
+BZIP2FLAGS := $(DEFAULT_BZIP2FLAGS) $(EXTRA_BZIP2FLAGS)
+
+DEFAULT_GZIPFLAGS :=
+EXTRA_GZIPFLAGS :=
+GZIPFLAGS := $(DEFAULT_GZIPFLAGS) $(EXTRA_GZIPFLAGS)
+
+DEFAULT_LZIPFLAGS :=
+EXTRA_LZIPFLAGS :=
+LZIPFLAGS := $(DEFAULT_LZIPFLAGS) $(EXTRA_LZIPFLAGS)
+
+DEFAULT_XZFLAGS :=
+EXTRA_XZFLAGS :=
+XZFLAGS := $(DEFAULT_XZFLAGS) $(EXTRA_XZFLAGS)
+
+
+endif # include guard
diff --git a/share/mk/dist.mk b/share/mk/dist.mk
new file mode 100644
index 000000000..b18197dd7
--- /dev/null
+++ b/share/mk/dist.mk
@@ -0,0 +1,96 @@
+########################################################################
+# Copyright 2021-2022, Alejandro Colomar <alx@kernel.org>
+# SPDX-License-Identifier: GPL-3.0-or-later
+########################################################################
+
+
+ifndef MAKEFILE_DIST_INCLUDED
+MAKEFILE_DIST_INCLUDED := 1
+
+
+include $(MAKEFILEDIR)/build/_.mk
+include $(MAKEFILEDIR)/cmd.mk
+include $(MAKEFILEDIR)/compress.mk
+include $(MAKEFILEDIR)/install/_.mk
+include $(MAKEFILEDIR)/version.mk
+include $(MAKEFILEDIR)/verbose.mk
+
+
+_DISTDIR := $(builddir)/dist
+
+
+DEFAULT_TARFLAGS := \
+ --sort=name \
+ --owner=root:0 \
+ --group=root:0 \
+ --mtime='$(DISTDATE)'
+EXTRA_TARFLAGS :=
+TARFLAGS := $(DEFAULT_TARFLAGS) $(EXTRA_TARFLAGS)
+
+
+DISTFILES := $(shell $(GIT) ls-files $(HIDE_ERR) \
+ | $(SED) 's,^,$(srcdir)/,' \
+ | $(SED) 's,:,\\:,g')
+_DISTFILES := $(patsubst $(srcdir)/%,$(_DISTDIR)/%,$(DISTFILES))
+_DISTPAGES := $(filter $(_DISTDIR)/man%,$(_DISTFILES))
+_DISTOTHERS := $(filter-out $(_DISTDIR)/man%,$(_DISTFILES))
+
+DISTFILE := $(builddir)/$(DISTNAME).tar
+compression := bz2 gz lz xz
+dist := $(foreach x,$(compression),dist-$(x))
+
+
+$(builddir)/dist/%/:
+ +$(info INSTALL $@)
+ +$(INSTALL_DIR) $@
+
+
+$(_DISTPAGES): $(_DISTDIR)/man%: $(srcdir)/man% | $$(@D)/
+ $(info INSTALL $@)
+ $(INSTALL_DATA) -T $< $@
+ $(SED) -i '/^.TH/s/(unreleased)/$(DISTVERSION)/' $@
+ $(SED) -i "/^.TH/s/(date)/$$(git log --format=%cs -1 -- $< $(HIDE_ERR))/" $@
+
+$(_DISTOTHERS): $(_DISTDIR)/%: $(srcdir)/% | $$(@D)/
+ $(info CP $@)
+ $(CP) -T $< $@
+
+
+$(DISTFILE): $(_DISTFILES) | $$(@D)/
+ $(info TAR $@)
+ $(TAR) $(TARFLAGS) -cf $@ -T /dev/null
+ $(GIT) ls-files \
+ | $(SED) 's,^,$(_DISTDIR)/,' \
+ | $(XARGS) $(TAR) $(TARFLAGS) -rf $@ -C $(srcdir) \
+ --transform 's,^$(_DISTDIR),$(DISTNAME),'
+
+$(DISTFILE).bz2: %.bz2: % | $$(@D)/
+ $(info BZIP2 $@)
+ $(BZIP2) $(BZIP2FLAGS) -kf $<
+ touch $@
+
+$(DISTFILE).gz: %.gz: % | $$(@D)/
+ $(info GZIP $@)
+ $(GZIP) $(GZIPFLAGS) -knf $<
+
+$(DISTFILE).lz: %.lz: % | $$(@D)/
+ $(info LZIP $@)
+ $(LZIP) $(LZIPFLAGS) -kf $<
+ touch $@
+
+$(DISTFILE).xz: %.xz: % | $$(@D)/
+ $(info XZ $@)
+ $(XZ) $(XZFLAGS) -kf $<
+
+
+.PHONY: dist-tar
+dist-tar: $(DISTFILE);
+
+.PHONY: $(dist)
+$(dist): dist-%: $(DISTFILE).%;
+
+.PHONY: dist
+dist: $(dist);
+
+
+endif # include guard
diff --git a/lib/install.mk b/share/mk/install/_.mk
index 14b980a7f..751ab97e2 100644
--- a/lib/install.mk
+++ b/share/mk/install/_.mk
@@ -1,6 +1,6 @@
########################################################################
-# Copyright (C) 2021, 2022 Alejandro Colomar <alx@kernel.org>
-# SPDX-License-Identifier: GPL-2.0 OR LGPL-2.0
+# Copyright 2021-2022, Alejandro Colomar <alx@kernel.org>
+# SPDX-License-Identifier: GPL-3.0-or-later
########################################################################
@@ -8,7 +8,7 @@ ifndef MAKEFILE_INSTALL_INCLUDED
MAKEFILE_INSTALL_INCLUDED := 1
-include $(srcdir)/lib/cmd.mk
+include $(MAKEFILEDIR)/cmd.mk
DESTDIR :=
@@ -18,26 +18,20 @@ datarootdir := $(prefix)/share
docdir := $(datarootdir)/doc
-%/.:
- $(info INSTALL $(@D)/)
- $(INSTALL_DIR) $(@D)
+$(DESTDIR)%/:
+ +$(info INSTALL $@)
+ +$(INSTALL_DIR) $@
%-rm:
$(info RM $*)
$(RM) $*
-%-rmdir:
- $(info RMDIR $(@D))
- $(RMDIR) $(@D)
-
.PHONY: install
-install: install-man
- @:
+install: install-man;
.PHONY: uninstall
-uninstall: uninstall-man
- @:
+uninstall: uninstall-man;
-endif # MAKEFILE_INSTALL_INCLUDED
+endif # include guard
diff --git a/share/mk/install/html.mk b/share/mk/install/html.mk
new file mode 100644
index 000000000..97e00ce17
--- /dev/null
+++ b/share/mk/install/html.mk
@@ -0,0 +1,36 @@
+########################################################################
+# Copyright 2021-2022, Alejandro Colomar <alx@kernel.org>
+# SPDX-License-Identifier: GPL-3.0-or-later
+########################################################################
+
+
+ifndef MAKEFILE_INSTALL_HTML_INCLUDED
+MAKEFILE_INSTALL_HTML_INCLUDED := 1
+
+
+include $(MAKEFILEDIR)/build/html.mk
+include $(MAKEFILEDIR)/install/_.mk
+
+
+htmldir := $(docdir)
+htmldir_ := $(htmldir)/man
+_htmldir := $(DESTDIR)$(htmldir_)
+
+
+_htmlpages := $(patsubst $(_HTMLDIR)/%,$(_htmldir)/%,$(_HTMLPAGES))
+_htmlpages_rm := $(addsuffix -rm,$(wildcard $(_htmlpages)))
+
+
+$(_htmlpages): $(_htmldir)/%: $(_HTMLDIR)/% | $$(@D)/
+ $(info INSTALL $@)
+ $(INSTALL_DATA) -T $< $@
+
+
+.PHONY: install-html
+install-html: $(_htmlpages);
+
+.PHONY: uninstall-html
+uninstall-html: $(_htmlpages_rm);
+
+
+endif # include guard
diff --git a/share/mk/install/man.mk b/share/mk/install/man.mk
new file mode 100644
index 000000000..a135788cd
--- /dev/null
+++ b/share/mk/install/man.mk
@@ -0,0 +1,202 @@
+########################################################################
+# Copyright 2021-2023, Alejandro Colomar <alx@kernel.org>
+# SPDX-License-Identifier: GPL-3.0-or-later
+########################################################################
+
+
+ifndef MAKEFILE_INSTALL_MAN_INCLUDED
+MAKEFILE_INSTALL_MAN_INCLUDED := 1
+
+
+include $(MAKEFILEDIR)/cmd.mk
+include $(MAKEFILEDIR)/compress.mk
+include $(MAKEFILEDIR)/install/_.mk
+include $(MAKEFILEDIR)/src.mk
+
+
+LINK_PAGES := .so
+ifeq ($(LINK_PAGES),.so)
+else ifeq ($(LINK_PAGES),symlink)
+else
+$(warning "LINK_PAGES": "$(LINK_PAGES)")
+$(error Valid values for "LINK_PAGES": [".so", "symlink"])
+endif
+
+
+mandir := $(datarootdir)/man
+man1dir := $(mandir)/man1
+man2dir := $(mandir)/man2
+man2typedir := $(mandir)/man2type
+man3dir := $(mandir)/man3
+man3constdir:= $(mandir)/man3const
+man3headdir := $(mandir)/man3head
+man3typedir := $(mandir)/man3type
+man4dir := $(mandir)/man4
+man5dir := $(mandir)/man5
+man6dir := $(mandir)/man6
+man7dir := $(mandir)/man7
+man8dir := $(mandir)/man8
+man1ext := .1$(Z)
+man2ext := .2$(Z)
+man2typeext := .2type$(Z)
+man3ext := .3$(Z)
+man3constext:= .3const$(Z)
+man3headext := .3head$(Z)
+man3typeext := .3type$(Z)
+man4ext := .4$(Z)
+man5ext := .5$(Z)
+man6ext := .6$(Z)
+man7ext := .7$(Z)
+man8ext := .8$(Z)
+
+
+_mandir := $(DESTDIR)$(mandir)
+_man1dir := $(DESTDIR)$(man1dir)
+_man2dir := $(DESTDIR)$(man2dir)
+_man2typedir := $(DESTDIR)$(man2typedir)
+_man3dir := $(DESTDIR)$(man3dir)
+_man3constdir := $(DESTDIR)$(man3constdir)
+_man3headdir := $(DESTDIR)$(man3headdir)
+_man3typedir := $(DESTDIR)$(man3typedir)
+_man4dir := $(DESTDIR)$(man4dir)
+_man5dir := $(DESTDIR)$(man5dir)
+_man6dir := $(DESTDIR)$(man6dir)
+_man7dir := $(DESTDIR)$(man7dir)
+_man8dir := $(DESTDIR)$(man8dir)
+
+_man1pages := $(patsubst $(MANDIR)/man1/%,$(_man1dir)/%$(Z),$(MAN1PAGES))
+_man2pages := $(patsubst $(MANDIR)/man2/%,$(_man2dir)/%$(Z),$(MAN2PAGES))
+_man2typepages := $(patsubst $(MANDIR)/man2type/%,$(_man2typedir)/%$(Z),$(MAN2TYPEPAGES))
+_man3pages := $(patsubst $(MANDIR)/man3/%,$(_man3dir)/%$(Z),$(MAN3PAGES))
+_man3constpages := $(patsubst $(MANDIR)/man3const/%,$(_man3constdir)/%$(Z),$(MAN3CONSTPAGES))
+_man3headpages := $(patsubst $(MANDIR)/man3head/%,$(_man3headdir)/%$(Z),$(MAN3HEADPAGES))
+_man3typepages := $(patsubst $(MANDIR)/man3type/%,$(_man3typedir)/%$(Z),$(MAN3TYPEPAGES))
+_man4pages := $(patsubst $(MANDIR)/man4/%,$(_man4dir)/%$(Z),$(MAN4PAGES))
+_man5pages := $(patsubst $(MANDIR)/man5/%,$(_man5dir)/%$(Z),$(MAN5PAGES))
+_man6pages := $(patsubst $(MANDIR)/man6/%,$(_man6dir)/%$(Z),$(MAN6PAGES))
+_man7pages := $(patsubst $(MANDIR)/man7/%,$(_man7dir)/%$(Z),$(MAN7PAGES))
+_man8pages := $(patsubst $(MANDIR)/man8/%,$(_man8dir)/%$(Z),$(MAN8PAGES))
+_manpages := $(_man1pages) \
+ $(_man2pages) $(_man2typepages) \
+ $(_man3pages) $(_man3constpages) $(_man3headpages) $(_man3typepages) \
+ $(_man4pages) \
+ $(_man5pages) \
+ $(_man6pages) \
+ $(_man7pages) \
+ $(_man8pages)
+
+_man1pages_rm := $(addsuffix -rm,$(wildcard $(_man1pages)))
+_man2pages_rm := $(addsuffix -rm,$(wildcard $(_man2pages)))
+_man2typepages_rm := $(addsuffix -rm,$(wildcard $(_man2typepages)))
+_man3pages_rm := $(addsuffix -rm,$(wildcard $(_man3pages)))
+_man3constpages_rm:= $(addsuffix -rm,$(wildcard $(_man3constpages)))
+_man3headpages_rm := $(addsuffix -rm,$(wildcard $(_man3headpages)))
+_man3typepages_rm := $(addsuffix -rm,$(wildcard $(_man3typepages)))
+_man4pages_rm := $(addsuffix -rm,$(wildcard $(_man4pages)))
+_man5pages_rm := $(addsuffix -rm,$(wildcard $(_man5pages)))
+_man6pages_rm := $(addsuffix -rm,$(wildcard $(_man6pages)))
+_man7pages_rm := $(addsuffix -rm,$(wildcard $(_man7pages)))
+_man8pages_rm := $(addsuffix -rm,$(wildcard $(_man8pages)))
+
+MAN_SECTIONS := 1 2 2type 3 3const 3head 3type 4 5 6 7 8
+install_manX := $(foreach x,$(MAN_SECTIONS),install-man$(x))
+uninstall_manX := $(foreach x,$(MAN_SECTIONS),uninstall-man$(x))
+
+
+$(_man1pages): $(_man1dir)/%$(Z): $(MANDIR)/man1/% | $$(@D)/
+$(_man2pages): $(_man2dir)/%$(Z): $(MANDIR)/man2/% | $$(@D)/
+$(_man2typepages): $(_man2typedir)/%$(Z): $(MANDIR)/man2type/% | $$(@D)/
+$(_man3pages): $(_man3dir)/%$(Z): $(MANDIR)/man3/% | $$(@D)/
+$(_man3constpages): $(_man3constdir)/%$(Z): $(MANDIR)/man3const/% | $$(@D)/
+$(_man3headpages): $(_man3headdir)/%$(Z): $(MANDIR)/man3head/% | $$(@D)/
+$(_man3typepages): $(_man3typedir)/%$(Z): $(MANDIR)/man3type/% | $$(@D)/
+$(_man4pages): $(_man4dir)/%$(Z): $(MANDIR)/man4/% | $$(@D)/
+$(_man5pages): $(_man5dir)/%$(Z): $(MANDIR)/man5/% | $$(@D)/
+$(_man6pages): $(_man6dir)/%$(Z): $(MANDIR)/man6/% | $$(@D)/
+$(_man7pages): $(_man7dir)/%$(Z): $(MANDIR)/man7/% | $$(@D)/
+$(_man8pages): $(_man8dir)/%$(Z): $(MANDIR)/man8/% | $$(@D)/
+
+
+$(_manpages):
+ $(info INSTALL $@)
+ $(INSTALL_DATA) -T $< $@
+ $(SED) -i \
+ -e '/^\.so /s, man1/\(.*\)\.1$$, $(notdir $(man1dir))/\1$(man1ext),' \
+ -e '/^\.so /s, man2/\(.*\)\.2$$, $(notdir $(man2dir))/\1$(man2ext),' \
+ -e '/^\.so /s, man2type/\(.*\)\.2type$$, $(notdir $(man2typedir))/\1$(man2typeext),' \
+ -e '/^\.so /s, man3/\(.*\)\.3$$, $(notdir $(man3dir))/\1$(man3ext),' \
+ -e '/^\.so /s, man3const/\(.*\)\.3const$$, $(notdir $(man3constdir))/\1$(man3constext),' \
+ -e '/^\.so /s, man3head/\(.*\)\.3head$$, $(notdir $(man3headdir))/\1$(man3headext),' \
+ -e '/^\.so /s, man3type/\(.*\)\.3type$$, $(notdir $(man3typedir))/\1$(man3typeext),' \
+ -e '/^\.so /s, man4/\(.*\)\.4$$, $(notdir $(man4dir))/\1$(man4ext),' \
+ -e '/^\.so /s, man5/\(.*\)\.5$$, $(notdir $(man5dir))/\1$(man5ext),' \
+ -e '/^\.so /s, man6/\(.*\)\.6$$, $(notdir $(man6dir))/\1$(man6ext),' \
+ -e '/^\.so /s, man7/\(.*\)\.7$$, $(notdir $(man7dir))/\1$(man7ext),' \
+ -e '/^\.so /s, man8/\(.*\)\.8$$, $(notdir $(man8dir))/\1$(man8ext),' \
+ $@
+ifeq ($(LINK_PAGES),symlink)
+ if $(GREP) '^\.so ' <$@ >/dev/null; then \
+ $(GREP) '^\.so ' <$@ \
+ | $(SED) 's,^\.so \(.*\),../\1,' \
+ | $(XARGS) -I tgt $(LN) -fsT tgt $@; \
+ fi
+endif
+ifeq ($(Z),.bz2)
+ if ! $(TEST) -L $@; then \
+ $(BZIP2) $(BZIP2FLAGS) <$@ \
+ | $(SPONGE) $@; \
+ fi
+else ifeq ($(Z),.gz)
+ if ! $(TEST) -L $@; then \
+ $(GZIP) $(GZIPFLAGS) - <$@ \
+ | $(SPONGE) $@; \
+ fi
+else ifeq ($(Z),.lz)
+ if ! $(TEST) -L $@; then \
+ $(LZIP) $(LZIPFLAGS) - <$@ \
+ | $(SPONGE) $@; \
+ fi
+else ifeq ($(Z),.xz)
+ if ! $(TEST) -L $@; then \
+ $(XZ) $(XZFLAGS) - <$@ \
+ | $(SPONGE) $@; \
+ fi
+endif
+
+
+.PHONY: install-man1
+install-man1: $(_man1pages);
+.PHONY: install-man2
+install-man2: $(_man2pages);
+.PHONY: install-man2type
+install-man2type: $(_man2typepages);
+.PHONY: install-man3
+install-man3: $(_man3pages);
+.PHONY: install-man3const
+install-man3const: $(_man3constpages);
+.PHONY: install-man3head
+install-man3head: $(_man3headpages);
+.PHONY: install-man3type
+install-man3type: $(_man3typepages);
+.PHONY: install-man4
+install-man4: $(_man4pages);
+.PHONY: install-man5
+install-man5: $(_man5pages);
+.PHONY: install-man6
+install-man6: $(_man6pages);
+.PHONY: install-man7
+install-man7: $(_man7pages);
+.PHONY: install-man8
+install-man8: $(_man8pages);
+
+.PHONY: install-man
+install-man: $(install_manX);
+
+.PHONY: $(uninstall_manX)
+$(uninstall_manX): uninstall-man%: $$(_man%pages_rm);
+
+.PHONY: uninstall-man
+uninstall-man: $(uninstall_manX);
+
+
+endif # include guard
diff --git a/share/mk/lint/_.mk b/share/mk/lint/_.mk
new file mode 100644
index 000000000..9d93bd380
--- /dev/null
+++ b/share/mk/lint/_.mk
@@ -0,0 +1,18 @@
+########################################################################
+# Copyright 2021-2023, Alejandro Colomar <alx@kernel.org>
+# SPDX-License-Identifier: GPL-3.0-or-later
+########################################################################
+
+
+ifndef MAKEFILE_LINT_INCLUDED
+MAKEFILE_LINT_INCLUDED := 1
+
+
+lint := lint-c lint-man lint-mdoc
+
+
+.PHONY: lint
+lint: $(lint);
+
+
+endif # include guard
diff --git a/lib/lint-c.mk b/share/mk/lint/c.mk
index 8d0b98822..b7d80a9ba 100644
--- a/lib/lint-c.mk
+++ b/share/mk/lint/c.mk
@@ -1,6 +1,6 @@
########################################################################
-# Copyright (C) 2021, 2022 Alejandro Colomar <alx@kernel.org>
-# SPDX-License-Identifier: GPL-2.0 OR LGPL-2.0
+# Copyright 2021-2022, Alejandro Colomar <alx@kernel.org>
+# SPDX-License-Identifier: GPL-3.0-or-later
########################################################################
@@ -8,9 +8,9 @@ ifndef MAKEFILE_LINT_C_INCLUDED
MAKEFILE_LINT_C_INCLUDED := 1
-include $(srcdir)/lib/build-src.mk
-include $(srcdir)/lib/cmd.mk
-include $(srcdir)/lib/lint.mk
+include $(MAKEFILEDIR)/build/src.mk
+include $(MAKEFILEDIR)/cmd.mk
+include $(MAKEFILEDIR)/lint/_.mk
DEFAULT_CHECKPATCHFLAGS :=
@@ -19,19 +19,21 @@ CHECKPATCHFLAGS := $(DEFAULT_CHECKPATCHFLAGS) $(EXTRA_CHECKPATCHFLAGS)
CHECKPATCH := checkpatch
clang-tidy_config := $(SYSCONFDIR)/clang-tidy/config.yaml
-DEFAULT_CLANG-TIDYFLAGS := --config-file=$(clang-tidy_config)
-DEFAULT_CLANG-TIDYFLAGS += --quiet
-DEFAULT_CLANG-TIDYFLAGS += --use-color
+DEFAULT_CLANG-TIDYFLAGS := \
+ --config-file=$(clang-tidy_config) \
+ --quiet \
+ --use-color
EXTRA_CLANG-TIDYFLAGS :=
CLANG-TIDYFLAGS := $(DEFAULT_CLANG-TIDYFLAGS) $(EXTRA_CLANG-TIDYFLAGS)
CLANG-TIDY := clang-tidy
CPPCHECK_SUPPRESS := $(SYSCONFDIR)/cppcheck/cppcheck.suppress
-DEFAULT_CPPCHECKFLAGS := --enable=all
-DEFAULT_CPPCHECKFLAGS += --error-exitcode=2
-DEFAULT_CPPCHECKFLAgS += --inconclusive
-DEFAULT_CPPCHECKFLAGS += --quiet
-DEFAULT_CPPCHECKFLAGS += --suppressions-list=$(CPPCHECK_SUPPRESS)
+DEFAULT_CPPCHECKFLAGS := \
+ --enable=all \
+ --error-exitcode=2 \
+ --inconclusive \
+ --quiet \
+ --suppressions-list=$(CPPCHECK_SUPPRESS)
EXTRA_CPPCHECKFLAGS :=
CPPCHECKFLAGS := $(DEFAULT_CPPCHECKFLAGS) $(EXTRA_CPPCHECKFLAGS)
CPPCHECK := cppcheck
@@ -41,8 +43,9 @@ EXTRA_CPPLINTFLAGS :=
CPPLINTFLAGS := $(DEFAULT_CPPLINTFLAGS) $(EXTRA_CPPLINTFLAGS)
CPPLINT := cpplint
-DEFAULT_IWYUFLAGS := -Xiwyu --no_fwd_decls
-DEFAULT_IWYUFLAGS += -Xiwyu --error
+DEFAULT_IWYUFLAGS := \
+ -Xiwyu --no_fwd_decls \
+ -Xiwyu --error
EXTRA_IWYUFLAGS :=
IWYUFLAGS := $(DEFAULT_IWYUFLAGS) $(EXTRA_IWYUFLAGS)
IWYU := iwyu
@@ -90,12 +93,10 @@ $(_LINT_c_iwyu): %.lint-c.iwyu.touch: %.c
.PHONY: $(lint_c)
-$(lint_c): lint-c-%: $$(_LINT_c_%)
- @:
+$(lint_c): lint-c-%: $$(_LINT_c_%);
.PHONY: lint-c
-lint-c: $(lint_c)
- @:
+lint-c: $(lint_c);
-endif # MAKEFILE_LINT_C_INCLUDED
+endif # include guard
diff --git a/share/mk/lint/man/_.mk b/share/mk/lint/man/_.mk
new file mode 100644
index 000000000..8bbc01c8b
--- /dev/null
+++ b/share/mk/lint/man/_.mk
@@ -0,0 +1,16 @@
+########################################################################
+# Copyright 2021-2023, Alejandro Colomar <alx@kernel.org>
+# SPDX-License-Identifier: GPL-3.0-or-later
+########################################################################
+
+
+ifndef MAKEFILE_LINT_MAN_INCLUDED
+MAKEFILE_LINT_MAN_INCLUDED := 1
+
+
+DEFAULT_MANDOCFLAGS := -Tlint
+EXTRA_MANDOCFLAGS :=
+MANDOCFLAGS := $(DEFAULT_MANDOCFLAGS) $(EXTRA_MANDOCFLAGS)
+
+
+endif # include guard
diff --git a/share/mk/lint/man/man.mk b/share/mk/lint/man/man.mk
new file mode 100644
index 000000000..cb1bf53c9
--- /dev/null
+++ b/share/mk/lint/man/man.mk
@@ -0,0 +1,69 @@
+########################################################################
+# Copyright 2021-2023, Alejandro Colomar <alx@kernel.org>
+# SPDX-License-Identifier: GPL-3.0-or-later
+########################################################################
+
+
+ifndef MAKEFILE_LINT_MAN_MAN_INCLUDED
+MAKEFILE_LINT_MAN_MAN_INCLUDED := 1
+
+
+include $(MAKEFILEDIR)/cmd.mk
+include $(MAKEFILEDIR)/build/_.mk
+include $(MAKEFILEDIR)/lint/_.mk
+include $(MAKEFILEDIR)/lint/man/_.mk
+include $(MAKEFILEDIR)/src.mk
+
+
+mandoc_man_ignore_grep := $(DATAROOTDIR)/lint/mandoc/man.ignore.grep
+
+_LINT_man_mandoc :=$(patsubst $(MANDIR)/%,$(_MANDIR)/%.lint-man.mandoc.touch,$(NONSO_MAN))
+_LINT_man_tbl :=$(patsubst $(MANDIR)/%,$(_MANDIR)/%.lint-man.tbl.touch,$(NONSO_MAN))
+
+
+linters_man := mandoc tbl
+lint_man := $(foreach x,$(linters_man),lint-man-$(x))
+
+
+$(_LINT_man_mandoc): $(_MANDIR)/%.lint-man.mandoc.touch: $(MANDIR)/% $(mandoc_man_ignore_grep) | $$(@D)/
+ $(info LINT (mandoc) $@)
+ ! ($(MANDOC) -man $(MANDOCFLAGS) $< 2>&1 \
+ | $(GREP) -v -f '$(mandoc_man_ignore_grep)' \
+ ||:; \
+ ) \
+ | $(GREP) ^ >&2
+ touch $@
+
+$(_LINT_man_tbl): $(_MANDIR)/%.lint-man.tbl.touch: $(MANDIR)/% | $$(@D)/
+ $(info LINT (tbl comment) $@)
+ if $(GREP) -q '^\.TS$$' $< && ! $(HEAD) -n1 $< | $(GREP) -q '\\" t$$'; \
+ then \
+ >&2 $(ECHO) "$<:1: missing '\\\" t' comment:"; \
+ >&2 $(HEAD) -n1 <$<; \
+ exit 1; \
+ fi
+ if $(HEAD) -n1 $< | $(GREP) -q '\\" t$$' && ! $(GREP) -q '^\.TS$$' $<; \
+ then \
+ >&2 $(ECHO) "$<:1: spurious '\\\" t' comment:"; \
+ >&2 $(HEAD) -n1 <$<; \
+ exit 1; \
+ fi
+ if $(TAIL) -n+2 <$< | $(GREP) -q '\\" t$$'; \
+ then \
+ >&2 $(ECHO) "$<: spurious '\\\" t' not in first line:"; \
+ >&2 $(GREP) -n '\\" t$$' $< /dev/null; \
+ exit 1; \
+ fi
+ touch $@
+
+
+.PHONY: lint-man-mandoc
+lint-man-mandoc: $(_LINT_man_mandoc);
+.PHONY: lint-man-tbl
+lint-man-tbl: $(_LINT_man_tbl);
+
+.PHONY: lint-man
+lint-man: $(lint_man);
+
+
+endif # include guard
diff --git a/share/mk/lint/man/mdoc.mk b/share/mk/lint/man/mdoc.mk
new file mode 100644
index 000000000..9b5f5b4b1
--- /dev/null
+++ b/share/mk/lint/man/mdoc.mk
@@ -0,0 +1,44 @@
+########################################################################
+# Copyright 2023, Alejandro Colomar <alx@kernel.org>
+# SPDX-License-Identifier: GPL-3.0-or-later
+########################################################################
+
+
+ifndef MAKEFILE_LINT_MAN_MDOC_INCLUDED
+MAKEFILE_LINT_MAN_MDOC_INCLUDED := 1
+
+
+include $(MAKEFILEDIR)/cmd.mk
+include $(MAKEFILEDIR)/build/_.mk
+include $(MAKEFILEDIR)/lint/_.mk
+include $(MAKEFILEDIR)/lint/man/_.mk
+include $(MAKEFILEDIR)/src.mk
+
+
+mandoc_mdoc_ignore_grep := $(DATAROOTDIR)/lint/mandoc/mdoc.ignore.grep
+
+_LINT_mdoc_mandoc:=$(patsubst $(MANDIR)/%,$(_MANDIR)/%.lint-mdoc.mandoc.touch,$(NONSO_MDOC))
+
+
+linters_mdoc := mandoc
+lint_mdoc := $(foreach x,$(linters_mdoc),lint-mdoc-$(x))
+
+
+$(_LINT_mdoc_mandoc): $(_MANDIR)/%.lint-mdoc.mandoc.touch: $(MANDIR)/% $(mandoc_mdoc_ignore_grep) | $$(@D)/
+ $(info LINT (mandoc) $@)
+ ! ($(MANDOC) -mdoc $(MANDOCFLAGS) $< 2>&1 \
+ | $(GREP) -v -f '$(mandoc_mdoc_ignore_grep)' \
+ ||:; \
+ ) \
+ | $(GREP) ^ >&2
+ touch $@
+
+
+.PHONY: $(lint_mdoc)
+$(lint_mdoc): lint-mdoc-%: $$(_LINT_mdoc_%);
+
+.PHONY: lint-mdoc
+lint-mdoc: $(lint_mdoc);
+
+
+endif # include guard
diff --git a/share/mk/src.mk b/share/mk/src.mk
new file mode 100644
index 000000000..65825b541
--- /dev/null
+++ b/share/mk/src.mk
@@ -0,0 +1,37 @@
+########################################################################
+# Copyright 2021-2022, Alejandro Colomar <alx@kernel.org>
+# SPDX-License-Identifier: GPL-3.0-or-later
+########################################################################
+
+
+ifndef MAKEFILE_SRC_INCLUDED
+MAKEFILE_SRC_INCLUDED := 1
+
+
+include $(MAKEFILEDIR)/cmd.mk
+
+
+MANDIR := $(srcdir)
+MANEXT := \.[0-9]\w*\(\.man\)\?\(\.in\)\?$
+
+
+MANPAGES := $(shell $(FIND) $(MANDIR)/* -type f \
+ | $(GREP) '$(MANEXT)' \
+ | $(SORT) \
+ | $(SED) 's,:,\\:,g')
+
+MAN1PAGES := $(filter $(MANDIR)/man1/%,$(filter %.1,$(MANPAGES)))
+MAN2PAGES := $(filter $(MANDIR)/man2/%,$(filter %.2,$(MANPAGES)))
+MAN2TYPEPAGES := $(filter $(MANDIR)/man2type/%,$(filter %.2type,$(MANPAGES)))
+MAN3PAGES := $(filter $(MANDIR)/man3/%,$(filter %.3,$(MANPAGES)))
+MAN3CONSTPAGES := $(filter $(MANDIR)/man3const/%,$(filter %.3const,$(MANPAGES)))
+MAN3HEADPAGES := $(filter $(MANDIR)/man3head/%,$(filter %.3head,$(MANPAGES)))
+MAN3TYPEPAGES := $(filter $(MANDIR)/man3type/%,$(filter %.3type,$(MANPAGES)))
+MAN4PAGES := $(filter $(MANDIR)/man4/%,$(filter %.4,$(MANPAGES)))
+MAN5PAGES := $(filter $(MANDIR)/man5/%,$(filter %.5,$(MANPAGES)))
+MAN6PAGES := $(filter $(MANDIR)/man6/%,$(filter %.6,$(MANPAGES)))
+MAN7PAGES := $(filter $(MANDIR)/man7/%,$(filter %.7,$(MANPAGES)))
+MAN8PAGES := $(filter $(MANDIR)/man8/%,$(filter %.8,$(MANPAGES)))
+
+
+endif # include guard
diff --git a/lib/verbose.mk b/share/mk/verbose.mk
index 38180804f..2cc4450ad 100644
--- a/lib/verbose.mk
+++ b/share/mk/verbose.mk
@@ -1,6 +1,6 @@
########################################################################
-# Copyright (C) 2022 Alejandro Colomar <alx@kernel.org>
-# SPDX-License-Identifier: GPL-3.0
+# Copyright 2022, Alejandro Colomar <alx@kernel.org>
+# SPDX-License-Identifier: GPL-3.0-or-later
########################################################################
@@ -12,10 +12,8 @@ ifdef V
HIDE_ERR :=
else
HIDE_ERR := 2>/dev/null
+.SILENT:
endif
-$(V).SILENT:
-
-
-endif # MAKEFILE_VERBOSE_INCLUDED
+endif # include guard
diff --git a/lib/version.mk b/share/mk/version.mk
index 1a8fa53c2..af3c0cb2a 100644
--- a/lib/version.mk
+++ b/share/mk/version.mk
@@ -1,6 +1,6 @@
########################################################################
-# Copyright (C) 2022 Alejandro Colomar <alx@kernel.org>
-# SPDX-License-Identifier: GPL-2.0 OR LGPL-2.0
+# Copyright 2022, Alejandro Colomar <alx@kernel.org>
+# SPDX-License-Identifier: GPL-3.0-or-later
########################################################################
@@ -8,12 +8,13 @@ ifndef MAKEFILE_VERSION_INCLUDED
MAKEFILE_VERSION_INCLUDED := 1
-include $(srcdir)/lib/cmd.mk
-include $(srcdir)/lib/verbose.mk
+include $(MAKEFILEDIR)/cmd.mk
+include $(MAKEFILEDIR)/verbose.mk
DISTNAME := $(shell $(GIT) describe $(HIDE_ERR))
DISTVERSION := $(patsubst man-pages-%,%,$(DISTNAME))
+DISTDATE := $(shell $(GIT) log -1 --format='%aD')
-endif # MAKEFILE_VERSION_INCLUDED
+endif # include guard