1 # SOME DESCRIPTIVE TITLE
2 # Copyright (C) YEAR Free Software Foundation, Inc.
3 # This file is distributed under the same license as the PACKAGE package.
4 # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
9 "Project-Id-Version: PACKAGE VERSION\n"
10 "POT-Creation-Date: 2015-02-04 23:33+0900\n"
11 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
12 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
13 "Language-Team: LANGUAGE <LL@li.org>\n"
16 "Content-Type: text/plain; charset=UTF-8\n"
17 "Content-Transfer-Encoding: 8bit\n"
20 #: build/C/man2/_syscall.2:38
26 #: build/C/man2/_syscall.2:38
32 #: build/C/man2/_syscall.2:38 build/C/man2/access.2:43 build/C/man2/alarm.2:30 build/C/man2/brk.2:29 build/C/man2/chdir.2:33 build/C/man2/chmod.2:32 build/C/man2/chown.2:38 build/C/man2/chroot.2:33 build/C/man2/close.2:35 build/C/man2/dup.2:37 build/C/man7/environ.7:34 build/C/man2/execve.2:37 build/C/man2/exit_group.2:25 build/C/man2/fcntl.2:65 build/C/man3/fexecve.3:25 build/C/man2/flock.2:35 build/C/man2/fork.2:39 build/C/man2/fsync.2:38 build/C/man2/get_thread_area.2:8 build/C/man2/getdomainname.2:29 build/C/man3/getdtablesize.3:27 build/C/man3/gethostid.3:29 build/C/man2/gethostname.2:32 build/C/man2/getpagesize.2:25 build/C/man2/gettid.2:26 build/C/man2/idle.2:32 build/C/man2/ioctl.2:41 build/C/man2/ioctl_list.2:30 build/C/man2/ioperm.2:34 build/C/man2/mincore.2:34 build/C/man2/mkdir.2:11 build/C/man2/nice.2:31 build/C/man2/pread.2:25 build/C/man2/set_thread_area.2:8 build/C/man2/setup.2:34 build/C/man2/swapon.2:42 build/C/man2/syscall.2:42 build/C/man2/syscalls.2:31 build/C/man2/sysctl.2:30 build/C/man2/sysinfo.2:14 build/C/man2/truncate.2:43 build/C/man2/umask.2:34 build/C/man2/uname.2:27 build/C/man2/uselib.2:31 build/C/man2/vfork.2:28 build/C/man2/vhangup.2:28 build/C/man2/execveat.2:26
38 #: build/C/man2/_syscall.2:38 build/C/man2/access.2:43 build/C/man2/alarm.2:30 build/C/man2/brk.2:29 build/C/man2/chdir.2:33 build/C/man2/chmod.2:32 build/C/man2/chown.2:38 build/C/man2/chroot.2:33 build/C/man2/close.2:35 build/C/man3/confstr.3:32 build/C/man3/crypt.3:36 build/C/man3/daemon.3:36 build/C/man3/des_crypt.3:14 build/C/man2/dup.2:37 build/C/man3/encrypt.3:30 build/C/man7/environ.7:34 build/C/man3/euidaccess.3:25 build/C/man3/exec.3:41 build/C/man2/execve.2:37 build/C/man2/exit_group.2:25 build/C/man2/fcntl.2:65 build/C/man3/fexecve.3:25 build/C/man2/flock.2:35 build/C/man2/fork.2:39 build/C/man3/fpathconf.3:41 build/C/man2/fsync.2:38 build/C/man3/get_nprocs_conf.3:26 build/C/man2/get_thread_area.2:8 build/C/man3/getcwd.3:32 build/C/man2/getdomainname.2:29 build/C/man3/getdtablesize.3:27 build/C/man3/gethostid.3:29 build/C/man2/gethostname.2:32 build/C/man3/getlogin.3:28 build/C/man3/getopt.3:41 build/C/man2/getpagesize.2:25 build/C/man2/gettid.2:26 build/C/man3/getumask.3:28 build/C/man3/getusershell.3:30 build/C/man2/idle.2:32 build/C/man2/ioctl.2:41 build/C/man2/ioctl_list.2:30 build/C/man2/ioperm.2:34 build/C/man3/lockf.3:28 build/C/man2/mincore.2:34 build/C/man2/mkdir.2:11 build/C/man2/nice.2:31 build/C/man2/pread.2:25 build/C/man2/set_thread_area.2:8 build/C/man2/setup.2:34 build/C/man5/shells.5:28 build/C/man3/sleep.3:26 build/C/man3/swab.3:31 build/C/man2/swapon.2:42 build/C/man2/syscall.2:42 build/C/man2/syscalls.2:31 build/C/man3/sysconf.3:27 build/C/man2/sysctl.2:30 build/C/man2/sysinfo.2:14 build/C/man3/tcgetpgrp.3:25 build/C/man2/truncate.2:43 build/C/man3/ualarm.3:24 build/C/man2/umask.2:34 build/C/man2/uname.2:27 build/C/man2/uselib.2:31 build/C/man3/usleep.3:33 build/C/man2/vfork.2:28 build/C/man2/vhangup.2:28 build/C/man2/execveat.2:26
40 msgid "Linux Programmer's Manual"
44 #: build/C/man2/_syscall.2:39 build/C/man2/access.2:44 build/C/man2/alarm.2:31 build/C/man2/brk.2:30 build/C/man2/chdir.2:34 build/C/man2/chmod.2:33 build/C/man2/chown.2:39 build/C/man2/chroot.2:34 build/C/man2/close.2:36 build/C/man3/confstr.3:33 build/C/man3/crypt.3:37 build/C/man3/daemon.3:37 build/C/man3/des_crypt.3:15 build/C/man2/dup.2:38 build/C/man3/encrypt.3:31 build/C/man7/environ.7:35 build/C/man3/euidaccess.3:26 build/C/man3/exec.3:42 build/C/man2/execve.2:38 build/C/man2/exit_group.2:26 build/C/man2/fcntl.2:66 build/C/man3/fexecve.3:26 build/C/man2/flock.2:36 build/C/man2/fork.2:40 build/C/man3/fpathconf.3:42 build/C/man2/fsync.2:39 build/C/man3/get_nprocs_conf.3:27 build/C/man2/get_thread_area.2:9 build/C/man3/getcwd.3:33 build/C/man2/getdomainname.2:30 build/C/man3/getdtablesize.3:28 build/C/man3/gethostid.3:30 build/C/man2/gethostname.2:33 build/C/man3/getlogin.3:29 build/C/man3/getopt.3:42 build/C/man2/getpagesize.2:26 build/C/man2/gettid.2:27 build/C/man3/getumask.3:29 build/C/man3/getusershell.3:31 build/C/man2/idle.2:33 build/C/man2/ioctl.2:42 build/C/man2/ioctl_list.2:31 build/C/man2/ioperm.2:35 build/C/man3/lockf.3:29 build/C/man2/mincore.2:35 build/C/man2/mkdir.2:12 build/C/man2/nice.2:32 build/C/man2/pread.2:26 build/C/man2/set_thread_area.2:9 build/C/man2/setup.2:35 build/C/man5/shells.5:29 build/C/man3/sleep.3:27 build/C/man3/swab.3:32 build/C/man2/swapon.2:43 build/C/man2/syscall.2:43 build/C/man2/syscalls.2:32 build/C/man3/sysconf.3:28 build/C/man2/sysctl.2:31 build/C/man2/sysinfo.2:15 build/C/man3/tcgetpgrp.3:26 build/C/man2/truncate.2:44 build/C/man3/ualarm.3:25 build/C/man2/umask.2:35 build/C/man2/uname.2:28 build/C/man2/uselib.2:32 build/C/man3/usleep.3:34 build/C/man2/vfork.2:29 build/C/man2/vhangup.2:29 build/C/man2/execveat.2:27
50 #: build/C/man2/_syscall.2:41
51 msgid "_syscall - invoking a system call without library support (OBSOLETE)"
55 #: build/C/man2/_syscall.2:41 build/C/man2/access.2:46 build/C/man2/alarm.2:33 build/C/man2/brk.2:32 build/C/man2/chdir.2:36 build/C/man2/chmod.2:35 build/C/man2/chown.2:41 build/C/man2/chroot.2:36 build/C/man2/close.2:38 build/C/man3/confstr.3:35 build/C/man3/crypt.3:39 build/C/man3/daemon.3:39 build/C/man3/des_crypt.3:18 build/C/man2/dup.2:40 build/C/man3/encrypt.3:33 build/C/man7/environ.7:37 build/C/man3/euidaccess.3:28 build/C/man3/exec.3:44 build/C/man2/execve.2:40 build/C/man2/exit_group.2:28 build/C/man2/fcntl.2:68 build/C/man3/fexecve.3:28 build/C/man2/flock.2:38 build/C/man2/fork.2:42 build/C/man3/fpathconf.3:44 build/C/man2/fsync.2:41 build/C/man3/get_nprocs_conf.3:29 build/C/man2/get_thread_area.2:11 build/C/man3/getcwd.3:35 build/C/man2/getdomainname.2:32 build/C/man3/getdtablesize.3:30 build/C/man3/gethostid.3:32 build/C/man2/gethostname.2:35 build/C/man3/getlogin.3:31 build/C/man3/getopt.3:45 build/C/man2/getpagesize.2:28 build/C/man2/gettid.2:29 build/C/man3/getumask.3:31 build/C/man3/getusershell.3:33 build/C/man2/idle.2:35 build/C/man2/ioctl.2:44 build/C/man2/ioperm.2:37 build/C/man3/lockf.3:31 build/C/man2/mincore.2:37 build/C/man2/mkdir.2:14 build/C/man2/nice.2:34 build/C/man2/pread.2:28 build/C/man2/set_thread_area.2:11 build/C/man2/setup.2:37 build/C/man3/sleep.3:29 build/C/man3/swab.3:34 build/C/man2/swapon.2:45 build/C/man2/syscall.2:45 build/C/man2/syscalls.2:34 build/C/man3/sysconf.3:30 build/C/man2/sysctl.2:33 build/C/man2/sysinfo.2:17 build/C/man3/tcgetpgrp.3:28 build/C/man2/truncate.2:46 build/C/man3/ualarm.3:27 build/C/man2/umask.2:37 build/C/man2/uname.2:30 build/C/man2/uselib.2:34 build/C/man3/usleep.3:36 build/C/man2/vfork.2:31 build/C/man2/vhangup.2:31 build/C/man2/execveat.2:29
61 #: build/C/man2/_syscall.2:43 build/C/man2/get_thread_area.2:13 build/C/man2/set_thread_area.2:13
62 msgid "B<#include E<lt>linux/unistd.hE<gt>>"
66 #: build/C/man2/_syscall.2:45
67 msgid "A _syscall macro"
71 #: build/C/man2/_syscall.2:47
72 msgid "desired system call"
76 #: build/C/man2/_syscall.2:47 build/C/man2/access.2:78 build/C/man2/alarm.2:39 build/C/man2/brk.2:64 build/C/man2/chdir.2:59 build/C/man2/chmod.2:81 build/C/man2/chown.2:88 build/C/man2/chroot.2:63 build/C/man2/close.2:44 build/C/man3/confstr.3:49 build/C/man3/crypt.3:56 build/C/man3/daemon.3:51 build/C/man3/des_crypt.3:34 build/C/man2/dup.2:53 build/C/man3/encrypt.3:56 build/C/man7/environ.7:42 build/C/man3/euidaccess.3:36 build/C/man3/exec.3:72 build/C/man2/execve.2:46 build/C/man2/exit_group.2:34 build/C/man2/fcntl.2:75 build/C/man3/fexecve.3:53 build/C/man2/flock.2:42 build/C/man2/fork.2:46 build/C/man3/fpathconf.3:52 build/C/man2/fsync.2:61 build/C/man3/get_nprocs_conf.3:35 build/C/man2/get_thread_area.2:20 build/C/man3/getcwd.3:75 build/C/man2/getdomainname.2:51 build/C/man3/getdtablesize.3:57 build/C/man3/gethostid.3:56 build/C/man2/gethostname.2:63 build/C/man3/getlogin.3:52 build/C/man3/getopt.3:79 build/C/man2/getpagesize.2:55 build/C/man2/gettid.2:38 build/C/man3/getumask.3:39 build/C/man3/getusershell.3:57 build/C/man2/idle.2:39 build/C/man2/ioctl.2:50 build/C/man2/ioctl_list.2:33 build/C/man2/ioperm.2:42 build/C/man3/lockf.3:48 build/C/man2/mincore.2:51 build/C/man2/mkdir.2:47 build/C/man2/nice.2:46 build/C/man2/pread.2:53 build/C/man2/set_thread_area.2:20 build/C/man2/setup.2:41 build/C/man5/shells.5:31 build/C/man3/sleep.3:35 build/C/man3/swab.3:41 build/C/man2/swapon.2:53 build/C/man2/syscall.2:53 build/C/man2/syscalls.2:36 build/C/man3/sysconf.3:36 build/C/man2/sysctl.2:44 build/C/man2/sysinfo.2:21 build/C/man3/tcgetpgrp.3:34 build/C/man2/truncate.2:79 build/C/man3/ualarm.3:58 build/C/man2/umask.2:43 build/C/man2/uname.2:34 build/C/man2/uselib.2:38 build/C/man3/usleep.3:67 build/C/man2/vfork.2:62 build/C/man2/vhangup.2:45 build/C/man2/execveat.2:37
82 #: build/C/man2/_syscall.2:53
84 "The important thing to know about a system call is its prototype. You need "
85 "to know how many arguments, their types, and the function return type. "
86 "There are seven macros that make the actual call into the system easier. "
91 #: build/C/man2/_syscall.2:56
92 msgid "_syscallI<X>(I<type>,I<name>,I<type1>,I<arg1>,I<type2>,I<arg2>,...)"
96 #: build/C/man2/_syscall.2:59
101 #: build/C/man2/_syscall.2:63
102 msgid "I<X> is 0\\(en6, which are the number of arguments taken by the system call"
106 #: build/C/man2/_syscall.2:66
107 msgid "I<type> is the return type of the system call"
111 #: build/C/man2/_syscall.2:69
112 msgid "I<name> is the name of the system call"
116 #: build/C/man2/_syscall.2:72
117 msgid "I<typeN> is the Nth argument's type"
121 #: build/C/man2/_syscall.2:75
122 msgid "I<argN> is the name of the Nth argument"
126 #: build/C/man2/_syscall.2:83
128 "These macros create a function called I<name> with the arguments you "
129 "specify. Once you include the _syscall() in your source file, you call the "
130 "system call by I<name>."
134 #: build/C/man2/_syscall.2:83 build/C/man3/getlogin.3:132 build/C/man3/getusershell.3:89 build/C/man5/shells.5:43
140 #: build/C/man2/_syscall.2:85
141 msgid "I</usr/include/linux/unistd.h>"
145 #: build/C/man2/_syscall.2:85 build/C/man2/access.2:262 build/C/man2/alarm.2:59 build/C/man2/brk.2:113 build/C/man2/chdir.2:125 build/C/man2/chmod.2:330 build/C/man2/chown.2:313 build/C/man2/chroot.2:134 build/C/man2/close.2:84 build/C/man3/confstr.3:128 build/C/man3/crypt.3:183 build/C/man3/daemon.3:96 build/C/man3/des_crypt.3:142 build/C/man2/dup.2:208 build/C/man3/encrypt.3:137 build/C/man3/euidaccess.3:80 build/C/man3/exec.3:199 build/C/man2/execve.2:464 build/C/man2/exit_group.2:43 build/C/man2/fcntl.2:1640 build/C/man3/fexecve.3:94 build/C/man2/flock.2:139 build/C/man2/fork.2:226 build/C/man3/fpathconf.3:169 build/C/man2/fsync.2:125 build/C/man3/get_nprocs_conf.3:48 build/C/man2/get_thread_area.2:46 build/C/man3/getcwd.3:208 build/C/man2/getdomainname.2:110 build/C/man3/getdtablesize.3:74 build/C/man3/gethostid.3:92 build/C/man2/gethostname.2:124 build/C/man3/getlogin.3:154 build/C/man3/getopt.3:318 build/C/man2/getpagesize.2:64 build/C/man2/gettid.2:58 build/C/man3/getumask.3:58 build/C/man3/getusershell.3:101 build/C/man2/idle.2:61 build/C/man2/ioctl.2:119 build/C/man2/ioperm.2:101 build/C/man3/lockf.3:159 build/C/man2/mincore.2:134 build/C/man2/mkdir.2:204 build/C/man2/nice.2:75 build/C/man2/pread.2:115 build/C/man2/set_thread_area.2:63 build/C/man2/setup.2:62 build/C/man3/sleep.3:44 build/C/man3/swab.3:77 build/C/man2/swapon.2:162 build/C/man3/sysconf.3:327 build/C/man2/sysctl.2:100 build/C/man2/sysinfo.2:87 build/C/man3/tcgetpgrp.3:116 build/C/man2/truncate.2:200 build/C/man3/ualarm.3:97 build/C/man2/umask.2:95 build/C/man2/uname.2:73 build/C/man2/uselib.2:76 build/C/man3/usleep.3:96 build/C/man2/vfork.2:159 build/C/man2/vhangup.2:63 build/C/man2/execveat.2:165
147 msgid "CONFORMING TO"
151 #: build/C/man2/_syscall.2:87
152 msgid "The use of these macros is Linux-specific, and deprecated."
156 #: build/C/man2/_syscall.2:87 build/C/man2/access.2:268 build/C/man2/alarm.2:61 build/C/man2/brk.2:121 build/C/man2/chdir.2:127 build/C/man2/chmod.2:337 build/C/man2/chown.2:330 build/C/man2/chroot.2:139 build/C/man2/close.2:87 build/C/man3/crypt.3:188 build/C/man3/daemon.3:102 build/C/man2/dup.2:218 build/C/man3/encrypt.3:148 build/C/man3/euidaccess.3:86 build/C/man3/exec.3:205 build/C/man2/execve.2:472 build/C/man2/exit_group.2:45 build/C/man2/fcntl.2:1705 build/C/man3/fexecve.3:99 build/C/man2/flock.2:148 build/C/man2/fork.2:228 build/C/man3/fpathconf.3:171 build/C/man2/fsync.2:140 build/C/man3/get_nprocs_conf.3:50 build/C/man2/get_thread_area.2:50 build/C/man3/getcwd.3:230 build/C/man2/getdomainname.2:113 build/C/man3/getdtablesize.3:82 build/C/man3/gethostid.3:102 build/C/man2/gethostname.2:130 build/C/man3/getopt.3:350 build/C/man2/getpagesize.2:71 build/C/man2/gettid.2:62 build/C/man3/getumask.3:60 build/C/man2/ioctl.2:134 build/C/man2/ioperm.2:105 build/C/man2/mkdir.2:211 build/C/man2/nice.2:82 build/C/man2/pread.2:117 build/C/man2/set_thread_area.2:67 build/C/man2/setup.2:65 build/C/man2/swapon.2:168 build/C/man2/syscall.2:80 build/C/man2/syscalls.2:667 build/C/man2/sysctl.2:114 build/C/man3/tcgetpgrp.3:118 build/C/man2/truncate.2:213 build/C/man3/ualarm.3:105 build/C/man2/umask.2:97 build/C/man2/uname.2:82 build/C/man2/uselib.2:80 build/C/man3/usleep.3:114 build/C/man2/vfork.2:174 build/C/man2/execveat.2:169
162 #: build/C/man2/_syscall.2:97
164 "Starting around kernel 2.6.18, the _syscall macros were removed from header "
165 "files supplied to user space. Use B<syscall>(2) instead. (Some "
166 "architectures, notably ia64, never provided the _syscall macros; on those "
167 "architectures, B<syscall>(2) was always required.)"
171 #: build/C/man2/_syscall.2:103
173 "The _syscall() macros I<do not> produce a prototype. You may have to create "
174 "one, especially for C++ users."
178 #: build/C/man2/_syscall.2:124
180 "System calls are not required to return only positive or negative error "
181 "codes. You need to read the source to be sure how it will return errors. "
182 "Usually, it is the negative of a standard error code, for example, "
183 "-I<EPERM>. The _syscall() macros will return the result I<r> of the system "
184 "call when I<r> is nonnegative, but will return -1 and set the variable "
185 "I<errno> to -I<r> when I<r> is negative. For the error codes, see "
189 #. The preferred way to invoke system calls that glibc does not know
192 #. However, this mechanism can be used only if using a libc
193 #. (such as glibc) that supports
196 #. .I <sys/syscall.h>
197 #. header file contains the required SYS_foo definition.
198 #. Otherwise, the use of a _syscall macro is required.
200 #: build/C/man2/_syscall.2:140
202 "When defining a system call, the argument types I<must> be passed by-value "
203 "or by-pointer (for aggregates like structs)."
207 #: build/C/man2/_syscall.2:140 build/C/man2/chown.2:442 build/C/man3/confstr.3:130 build/C/man3/encrypt.3:150 build/C/man2/execve.2:656 build/C/man2/fork.2:259 build/C/man3/get_nprocs_conf.3:67 build/C/man3/getopt.3:376 build/C/man5/shells.5:45 build/C/man2/syscall.2:224 build/C/man2/sysctl.2:143
213 #: build/C/man2/_syscall.2:147
216 "#include E<lt>stdio.hE<gt>\n"
217 "#include E<lt>stdlib.hE<gt>\n"
218 "#include E<lt>errno.hE<gt>\n"
219 "#include E<lt>linux/unistd.hE<gt> /* for _syscallX macros/related "
221 "#include E<lt>linux/kernel.hE<gt> /* for struct sysinfo */\n"
225 #: build/C/man2/_syscall.2:149
227 msgid "_syscall1(int, sysinfo, struct sysinfo *, info);\n"
231 #: build/C/man2/_syscall.2:152
234 "/* Note: if you copy directly from the nroff source, remember to\n"
235 "REMOVE the extra backslashes in the printf statement. */\n"
239 #: build/C/man2/_syscall.2:158
245 " struct sysinfo s_info;\n"
250 #: build/C/man2/_syscall.2:173
253 " error = sysinfo(&s_info);\n"
254 " printf(\"code error = %d\\en\", error);\n"
255 " printf(\"Uptime = %lds\\enLoad: 1 min %lu / 5 min %lu / 15 min "
257 " \"RAM: total %lu / free %lu / shared %lu\\en\"\n"
258 " \"Memory in buffers = %lu\\enSwap: total %lu / free %lu\\en\"\n"
259 " \"Number of processes = %d\\en\",\n"
260 " s_info.uptime, s_info.loads[0],\n"
261 " s_info.loads[1], s_info.loads[2],\n"
262 " s_info.totalram, s_info.freeram,\n"
263 " s_info.sharedram, s_info.bufferram,\n"
264 " s_info.totalswap, s_info.freeswap,\n"
266 " exit(EXIT_SUCCESS);\n"
271 #: build/C/man2/_syscall.2:174
273 msgid "Sample output"
277 #: build/C/man2/_syscall.2:183
282 "Load: 1 min 13376 / 5 min 5504 / 15 min 1152\n"
283 "RAM: total 15343616 / free 827392 / shared 8237056\n"
284 "Memory in buffers = 5066752\n"
285 "Swap: total 27881472 / free 24698880\n"
286 "Number of processes = 40\n"
290 #: build/C/man2/_syscall.2:184 build/C/man2/access.2:390 build/C/man2/alarm.2:86 build/C/man2/brk.2:163 build/C/man2/chdir.2:136 build/C/man2/chmod.2:361 build/C/man2/chown.2:490 build/C/man2/chroot.2:151 build/C/man2/close.2:131 build/C/man3/confstr.3:147 build/C/man3/crypt.3:249 build/C/man3/daemon.3:110 build/C/man3/des_crypt.3:145 build/C/man2/dup.2:274 build/C/man3/encrypt.3:174 build/C/man7/environ.7:247 build/C/man3/euidaccess.3:101 build/C/man3/exec.3:241 build/C/man2/execve.2:751 build/C/man2/exit_group.2:49 build/C/man2/fcntl.2:1916 build/C/man3/fexecve.3:165 build/C/man2/flock.2:234 build/C/man2/fork.2:264 build/C/man3/fpathconf.3:180 build/C/man2/fsync.2:162 build/C/man2/get_thread_area.2:55 build/C/man3/getcwd.3:249 build/C/man2/getdomainname.2:127 build/C/man3/getdtablesize.3:95 build/C/man3/gethostid.3:124 build/C/man2/gethostname.2:176 build/C/man3/getlogin.3:209 build/C/man3/getopt.3:516 build/C/man2/getpagesize.2:108 build/C/man2/gettid.2:71 build/C/man3/getumask.3:63 build/C/man3/getusershell.3:103 build/C/man2/ioctl.2:142 build/C/man2/ioctl_list.2:963 build/C/man2/ioperm.2:117 build/C/man3/lockf.3:161 build/C/man2/mincore.2:166 build/C/man2/mkdir.2:236 build/C/man2/nice.2:105 build/C/man2/pread.2:158 build/C/man2/set_thread_area.2:72 build/C/man5/shells.5:56 build/C/man3/sleep.3:61 build/C/man3/swab.3:79 build/C/man2/swapon.2:202 build/C/man2/syscall.2:241 build/C/man2/syscalls.2:844 build/C/man3/sysconf.3:338 build/C/man2/sysctl.2:181 build/C/man2/sysinfo.2:90 build/C/man3/tcgetpgrp.3:127 build/C/man2/truncate.2:261 build/C/man3/ualarm.3:147 build/C/man2/umask.2:118 build/C/man2/uname.2:167 build/C/man2/uselib.2:102 build/C/man3/usleep.3:147 build/C/man2/vfork.2:273 build/C/man2/vhangup.2:66 build/C/man2/execveat.2:229
296 #: build/C/man2/_syscall.2:188
297 msgid "B<intro>(2), B<syscall>(2), B<errno>(3)"
301 #: build/C/man2/_syscall.2:188 build/C/man2/access.2:401 build/C/man2/alarm.2:95 build/C/man2/brk.2:168 build/C/man2/chdir.2:140 build/C/man2/chmod.2:368 build/C/man2/chown.2:495 build/C/man2/chroot.2:154 build/C/man2/close.2:138 build/C/man3/confstr.3:155 build/C/man3/crypt.3:255 build/C/man3/daemon.3:113 build/C/man3/des_crypt.3:149 build/C/man2/dup.2:278 build/C/man3/encrypt.3:179 build/C/man7/environ.7:264 build/C/man3/euidaccess.3:112 build/C/man3/exec.3:249 build/C/man2/execve.2:763 build/C/man2/exit_group.2:51 build/C/man2/fcntl.2:1937 build/C/man3/fexecve.3:168 build/C/man2/flock.2:248 build/C/man2/fork.2:275 build/C/man3/fpathconf.3:186 build/C/man2/fsync.2:170 build/C/man3/get_nprocs_conf.3:88 build/C/man2/get_thread_area.2:58 build/C/man3/getcwd.3:256 build/C/man2/getdomainname.2:131 build/C/man3/getdtablesize.3:100 build/C/man3/gethostid.3:127 build/C/man2/gethostname.2:180 build/C/man3/getlogin.3:213 build/C/man3/getopt.3:519 build/C/man2/getpagesize.2:111 build/C/man2/gettid.2:90 build/C/man3/getumask.3:65 build/C/man3/getusershell.3:105 build/C/man2/idle.2:64 build/C/man2/ioctl.2:150 build/C/man2/ioctl_list.2:965 build/C/man2/ioperm.2:121 build/C/man3/lockf.3:176 build/C/man2/mincore.2:169 build/C/man2/mkdir.2:247 build/C/man2/nice.2:113 build/C/man2/pread.2:163 build/C/man2/set_thread_area.2:74 build/C/man2/setup.2:72 build/C/man5/shells.5:59 build/C/man3/sleep.3:66 build/C/man3/swab.3:81 build/C/man2/swapon.2:206 build/C/man2/syscall.2:247 build/C/man2/syscalls.2:851 build/C/man3/sysconf.3:347 build/C/man2/sysctl.2:183 build/C/man2/sysinfo.2:92 build/C/man3/tcgetpgrp.3:131 build/C/man2/truncate.2:265 build/C/man3/ualarm.3:155 build/C/man2/umask.2:124 build/C/man2/uname.2:172 build/C/man2/uselib.2:112 build/C/man3/usleep.3:156 build/C/man2/vfork.2:279 build/C/man2/vhangup.2:69 build/C/man2/execveat.2:233
307 #: build/C/man2/_syscall.2:196 build/C/man2/access.2:409 build/C/man2/alarm.2:103 build/C/man2/brk.2:176 build/C/man2/chdir.2:148 build/C/man2/chmod.2:376 build/C/man2/chown.2:503 build/C/man2/chroot.2:162 build/C/man2/close.2:146 build/C/man3/confstr.3:163 build/C/man3/crypt.3:263 build/C/man3/daemon.3:121 build/C/man3/des_crypt.3:157 build/C/man2/dup.2:286 build/C/man3/encrypt.3:187 build/C/man7/environ.7:272 build/C/man3/euidaccess.3:120 build/C/man3/exec.3:257 build/C/man2/execve.2:771 build/C/man2/exit_group.2:59 build/C/man2/fcntl.2:1945 build/C/man3/fexecve.3:176 build/C/man2/flock.2:256 build/C/man2/fork.2:283 build/C/man3/fpathconf.3:194 build/C/man2/fsync.2:178 build/C/man3/get_nprocs_conf.3:96 build/C/man2/get_thread_area.2:66 build/C/man3/getcwd.3:264 build/C/man2/getdomainname.2:139 build/C/man3/getdtablesize.3:108 build/C/man3/gethostid.3:135 build/C/man2/gethostname.2:188 build/C/man3/getlogin.3:221 build/C/man3/getopt.3:527 build/C/man2/getpagesize.2:119 build/C/man2/gettid.2:98 build/C/man3/getumask.3:73 build/C/man3/getusershell.3:113 build/C/man2/idle.2:72 build/C/man2/ioctl.2:158 build/C/man2/ioctl_list.2:973 build/C/man2/ioperm.2:129 build/C/man3/lockf.3:184 build/C/man2/mincore.2:177 build/C/man2/mkdir.2:255 build/C/man2/nice.2:121 build/C/man2/pread.2:171 build/C/man2/set_thread_area.2:82 build/C/man2/setup.2:80 build/C/man5/shells.5:67 build/C/man3/sleep.3:74 build/C/man3/swab.3:89 build/C/man2/swapon.2:214 build/C/man2/syscall.2:255 build/C/man2/syscalls.2:859 build/C/man3/sysconf.3:355 build/C/man2/sysctl.2:191 build/C/man2/sysinfo.2:100 build/C/man3/tcgetpgrp.3:139 build/C/man2/truncate.2:273 build/C/man3/ualarm.3:163 build/C/man2/umask.2:132 build/C/man2/uname.2:180 build/C/man2/uselib.2:120 build/C/man3/usleep.3:164 build/C/man2/vfork.2:287 build/C/man2/vhangup.2:77 build/C/man2/execveat.2:241
309 "This page is part of release 3.79 of the Linux I<man-pages> project. A "
310 "description of the project, information about reporting bugs, and the latest "
311 "version of this page, can be found at "
312 "\\%http://www.kernel.org/doc/man-pages/."
316 #: build/C/man2/access.2:43
322 #: build/C/man2/access.2:43 build/C/man2/brk.2:29 build/C/man2/chmod.2:32 build/C/man2/chown.2:38 build/C/man3/des_crypt.3:14 build/C/man7/environ.7:34 build/C/man2/fsync.2:38 build/C/man3/getcwd.3:32 build/C/man3/getdtablesize.3:27 build/C/man2/gethostname.2:32 build/C/man2/getpagesize.2:25 build/C/man2/ioperm.2:34 build/C/man2/mkdir.2:11 build/C/man2/sysinfo.2:14
328 #: build/C/man2/access.2:46
329 msgid "access, faccessat - check user's permissions for a file"
333 #: build/C/man2/access.2:49 build/C/man2/alarm.2:36 build/C/man2/chown.2:44 build/C/man2/close.2:41 build/C/man3/confstr.3:38 build/C/man3/crypt.3:44 build/C/man2/dup.2:43 build/C/man3/fexecve.3:31 build/C/man3/fpathconf.3:47 build/C/man3/getcwd.3:38 build/C/man3/getopt.3:48 build/C/man3/getusershell.3:36 build/C/man3/sleep.3:32 build/C/man3/sysconf.3:33 build/C/man2/sysctl.2:36 build/C/man3/ualarm.3:30 build/C/man3/usleep.3:39
335 msgid "B<#include E<lt>unistd.hE<gt>>\n"
339 #: build/C/man2/access.2:51
341 msgid "B<int access(const char *>I<pathname>B<, int >I<mode>B<);>\n"
345 #: build/C/man2/access.2:54 build/C/man2/chown.2:53
348 "B<#include E<lt>fcntl.hE<gt> >/* Definition of AT_* constants */\n"
349 "B<#include E<lt>unistd.hE<gt>>\n"
353 #: build/C/man2/access.2:57
356 "B<int faccessat(int >I<dirfd>B<, const char *>I<pathname>B<, int >I<mode>B<, "
357 "int >I<flags>B<);>\n"
361 #: build/C/man2/access.2:62 build/C/man2/brk.2:42 build/C/man2/chdir.2:46 build/C/man2/chmod.2:53 build/C/man2/chown.2:62 build/C/man2/chroot.2:44 build/C/man3/confstr.3:45 build/C/man3/daemon.3:47 build/C/man3/exec.3:68 build/C/man3/fexecve.3:38 build/C/man2/fsync.2:51 build/C/man3/getcwd.3:49 build/C/man2/getdomainname.2:42 build/C/man3/getdtablesize.3:38 build/C/man3/gethostid.3:42 build/C/man2/gethostname.2:45 build/C/man3/getlogin.3:45 build/C/man3/getopt.3:69 build/C/man2/getpagesize.2:36 build/C/man3/getusershell.3:47 build/C/man3/lockf.3:39 build/C/man2/mincore.2:47 build/C/man2/mkdir.2:31 build/C/man2/nice.2:42 build/C/man2/pread.2:40 build/C/man2/truncate.2:58 build/C/man3/ualarm.3:37 build/C/man3/usleep.3:46 build/C/man2/vfork.2:41 build/C/man2/vhangup.2:39
362 msgid "Feature Test Macro Requirements for glibc (see B<feature_test_macros>(7)):"
366 #: build/C/man2/access.2:65
367 msgid "B<faccessat>():"
371 #: build/C/man2/access.2:68 build/C/man2/chmod.2:71 build/C/man2/chown.2:79 build/C/man3/fexecve.3:44 build/C/man2/mkdir.2:37
373 msgid "Since glibc 2.10:"
377 #: build/C/man2/access.2:71 build/C/man2/chmod.2:74 build/C/man2/chown.2:82 build/C/man3/fexecve.3:47 build/C/man2/mkdir.2:40
378 msgid "_XOPEN_SOURCE\\ E<gt>=\\ 700 || _POSIX_C_SOURCE\\ E<gt>=\\ 200809L"
382 #: build/C/man2/access.2:71 build/C/man2/chmod.2:74 build/C/man2/chown.2:82 build/C/man3/fexecve.3:47 build/C/man2/mkdir.2:40
384 msgid "Before glibc 2.10:"
388 #: build/C/man2/access.2:74 build/C/man2/chmod.2:77 build/C/man2/chown.2:85 build/C/man2/mkdir.2:43
389 msgid "_ATFILE_SOURCE"
393 #: build/C/man2/access.2:85
395 "B<access>() checks whether the calling process can access the file "
396 "I<pathname>. If I<pathname> is a symbolic link, it is dereferenced."
399 #. F_OK is defined as 0 on every system that I know of.
401 #: build/C/man2/access.2:99
403 "The I<mode> specifies the accessibility check(s) to be performed, and is "
404 "either the value B<F_OK>, or a mask consisting of the bitwise OR of one or "
405 "more of B<R_OK>, B<W_OK>, and B<X_OK>. B<F_OK> tests for the existence of "
406 "the file. B<R_OK>, B<W_OK>, and B<X_OK> test whether the file exists and "
407 "grants read, write, and execute permissions, respectively."
411 #: build/C/man2/access.2:108
413 "The check is done using the calling process's I<real> UID and GID, rather "
414 "than the effective IDs as is done when actually attempting an operation "
415 "(e.g., B<open>(2)) on the file. This allows set-user-ID programs to easily "
416 "determine the invoking user's authority."
420 #: build/C/man2/access.2:114
422 "If the calling process is privileged (i.e., its real UID is zero), then an "
423 "B<X_OK> check is successful for a regular file if execute permission is "
424 "enabled for any of the file owner, group, or other."
428 #: build/C/man2/access.2:114
434 #: build/C/man2/access.2:120
436 "The B<faccessat>() system call operates in exactly the same way as "
437 "B<access>(), except for the differences described here."
441 #: build/C/man2/access.2:130
443 "If the pathname given in I<pathname> is relative, then it is interpreted "
444 "relative to the directory referred to by the file descriptor I<dirfd> "
445 "(rather than relative to the current working directory of the calling "
446 "process, as is done by B<access>() for a relative pathname)."
450 #: build/C/man2/access.2:142
452 "If I<pathname> is relative and I<dirfd> is the special value B<AT_FDCWD>, "
453 "then I<pathname> is interpreted relative to the current working directory of "
454 "the calling process (like B<access>())."
458 #: build/C/man2/access.2:148 build/C/man2/chmod.2:216 build/C/man2/chown.2:179 build/C/man2/mkdir.2:110 build/C/man2/execveat.2:76
459 msgid "If I<pathname> is absolute, then I<dirfd> is ignored."
463 #: build/C/man2/access.2:151
465 "I<flags> is constructed by ORing together zero or more of the following "
470 #: build/C/man2/access.2:151
472 msgid "B<AT_EACCESS>"
476 #: build/C/man2/access.2:158
478 "Perform access checks using the effective user and group IDs. By default, "
479 "B<faccessat>() uses the real IDs (like B<access>())."
483 #: build/C/man2/access.2:158 build/C/man2/chmod.2:219 build/C/man2/chown.2:208 build/C/man2/execveat.2:100
485 msgid "B<AT_SYMLINK_NOFOLLOW>"
489 #: build/C/man2/access.2:164
491 "If I<pathname> is a symbolic link, do not dereference it: instead return "
492 "information about the link itself."
496 #: build/C/man2/access.2:169
497 msgid "See B<openat>(2) for an explanation of the need for B<faccessat>()."
501 #: build/C/man2/access.2:169 build/C/man2/alarm.2:54 build/C/man2/brk.2:93 build/C/man2/chdir.2:70 build/C/man2/chmod.2:231 build/C/man2/chown.2:224 build/C/man2/chroot.2:90 build/C/man2/close.2:64 build/C/man3/confstr.3:95 build/C/man3/crypt.3:120 build/C/man3/daemon.3:73 build/C/man3/des_crypt.3:106 build/C/man2/dup.2:148 build/C/man3/encrypt.3:113 build/C/man3/euidaccess.3:58 build/C/man3/exec.3:183 build/C/man2/execve.2:355 build/C/man2/exit_group.2:39 build/C/man2/fcntl.2:1444 build/C/man3/fexecve.3:67 build/C/man2/flock.2:112 build/C/man2/fork.2:178 build/C/man3/fpathconf.3:160 build/C/man2/fsync.2:108 build/C/man3/get_nprocs_conf.3:46 build/C/man2/get_thread_area.2:29 build/C/man3/getcwd.3:156 build/C/man2/getdomainname.2:75 build/C/man3/getdtablesize.3:61 build/C/man3/gethostid.3:71 build/C/man2/gethostname.2:89 build/C/man3/getlogin.3:95 build/C/man3/getopt.3:274 build/C/man2/gettid.2:50 build/C/man3/getusershell.3:85 build/C/man2/idle.2:52 build/C/man2/ioctl.2:85 build/C/man2/ioctl_list.2:107 build/C/man2/ioperm.2:79 build/C/man3/lockf.3:116 build/C/man2/mincore.2:94 build/C/man2/mkdir.2:115 build/C/man2/nice.2:56 build/C/man2/pread.2:79 build/C/man2/set_thread_area.2:44 build/C/man2/setup.2:53 build/C/man3/sleep.3:40 build/C/man3/swab.3:68 build/C/man2/swapon.2:111 build/C/man2/syscall.2:74 build/C/man3/sysconf.3:314 build/C/man2/sysctl.2:74 build/C/man2/sysinfo.2:74 build/C/man3/tcgetpgrp.3:64 build/C/man2/truncate.2:110 build/C/man3/ualarm.3:81 build/C/man2/umask.2:92 build/C/man2/uname.2:63 build/C/man2/uselib.2:48 build/C/man3/usleep.3:75 build/C/man2/vhangup.2:50 build/C/man2/execveat.2:108
507 #: build/C/man2/access.2:185
509 "On success (all requested permissions granted, or I<mode> is B<F_OK> and the "
510 "file exists), zero is returned. On error (at least one bit in I<mode> asked "
511 "for a permission that is denied, or I<mode> is B<F_OK> and the file does not "
512 "exist, or some other error occurred), -1 is returned, and I<errno> is set "
517 #: build/C/man2/access.2:185 build/C/man2/chdir.2:75 build/C/man2/chmod.2:236 build/C/man2/chown.2:229 build/C/man2/chroot.2:95 build/C/man2/close.2:70 build/C/man3/confstr.3:122 build/C/man3/crypt.3:123 build/C/man2/dup.2:154 build/C/man3/encrypt.3:115 build/C/man3/euidaccess.3:66 build/C/man3/exec.3:190 build/C/man2/execve.2:361 build/C/man2/fcntl.2:1482 build/C/man3/fexecve.3:74 build/C/man2/flock.2:117 build/C/man2/fork.2:185 build/C/man2/fsync.2:113 build/C/man2/get_thread_area.2:35 build/C/man3/getcwd.3:172 build/C/man2/getdomainname.2:80 build/C/man3/getdtablesize.3:63 build/C/man3/gethostid.3:81 build/C/man2/gethostname.2:94 build/C/man3/getlogin.3:103 build/C/man2/gettid.2:52 build/C/man2/idle.2:55 build/C/man2/ioctl.2:94 build/C/man2/ioperm.2:84 build/C/man3/lockf.3:121 build/C/man2/mincore.2:101 build/C/man2/mkdir.2:122 build/C/man2/nice.2:61 build/C/man2/pread.2:89 build/C/man2/set_thread_area.2:49 build/C/man2/setup.2:56 build/C/man2/swapon.2:116 build/C/man2/sysctl.2:81 build/C/man2/sysinfo.2:79 build/C/man3/tcgetpgrp.3:86 build/C/man2/truncate.2:115 build/C/man3/ualarm.3:84 build/C/man2/uname.2:68 build/C/man2/uselib.2:53 build/C/man3/usleep.3:82 build/C/man2/vhangup.2:55 build/C/man2/execveat.2:115
523 #: build/C/man2/access.2:190
524 msgid "B<access>() and B<faccessat>() shall fail if:"
528 #: build/C/man2/access.2:190 build/C/man2/chdir.2:81 build/C/man2/chdir.2:117 build/C/man2/chmod.2:243 build/C/man2/chown.2:236 build/C/man2/chroot.2:98 build/C/man2/execve.2:369 build/C/man2/execve.2:376 build/C/man2/execve.2:379 build/C/man2/execve.2:382 build/C/man3/getcwd.3:173 build/C/man3/gethostid.3:84 build/C/man2/mkdir.2:123 build/C/man2/truncate.2:118 build/C/man2/uselib.2:59
534 #: build/C/man2/access.2:197
536 "The requested access would be denied to the file, or search permission is "
537 "denied for one of the directories in the path prefix of I<pathname>. (See "
538 "also B<path_resolution>(7).)"
542 #: build/C/man2/access.2:197 build/C/man2/chdir.2:94 build/C/man2/chmod.2:255 build/C/man2/chown.2:245 build/C/man2/chroot.2:112 build/C/man2/execve.2:417 build/C/man2/mkdir.2:145 build/C/man2/truncate.2:152 build/C/man2/execveat.2:130
548 #: build/C/man2/access.2:201 build/C/man2/chmod.2:259 build/C/man2/chown.2:249 build/C/man2/mkdir.2:149
549 msgid "Too many symbolic links were encountered in resolving I<pathname>."
553 #: build/C/man2/access.2:201 build/C/man2/chdir.2:98 build/C/man2/chmod.2:259 build/C/man2/chown.2:249 build/C/man2/chroot.2:116 build/C/man2/execve.2:425 build/C/man2/gethostname.2:109 build/C/man2/mkdir.2:153 build/C/man2/truncate.2:155
555 msgid "B<ENAMETOOLONG>"
559 #: build/C/man2/access.2:205 build/C/man2/chmod.2:263 build/C/man2/chown.2:253
560 msgid "I<pathname> is too long."
564 #: build/C/man2/access.2:205 build/C/man2/chdir.2:102 build/C/man2/chmod.2:263 build/C/man2/chown.2:253 build/C/man2/chown.2:279 build/C/man2/chroot.2:120 build/C/man2/execve.2:432 build/C/man3/getcwd.3:198 build/C/man3/getlogin.3:122 build/C/man2/mkdir.2:156 build/C/man2/swapon.2:147 build/C/man2/truncate.2:159 build/C/man2/execveat.2:140
570 #: build/C/man2/access.2:210
571 msgid "A component of I<pathname> does not exist or is a dangling symbolic link."
575 #: build/C/man2/access.2:210 build/C/man2/access.2:252 build/C/man2/chdir.2:108 build/C/man2/chmod.2:269 build/C/man2/chmod.2:314 build/C/man2/chown.2:259 build/C/man2/chown.2:303 build/C/man2/chroot.2:126 build/C/man2/execve.2:446 build/C/man2/fcntl.2:1617 build/C/man2/mkdir.2:173 build/C/man2/mkdir.2:194 build/C/man2/sysctl.2:88 build/C/man2/truncate.2:162 build/C/man2/execveat.2:154
581 #: build/C/man2/access.2:215 build/C/man2/mkdir.2:178
582 msgid "A component used as a directory in I<pathname> is not, in fact, a directory."
586 #: build/C/man2/access.2:215 build/C/man2/chmod.2:278 build/C/man2/chmod.2:296 build/C/man2/chown.2:266 build/C/man2/chown.2:285 build/C/man2/mkdir.2:183 build/C/man2/truncate.2:175
592 #: build/C/man2/access.2:218
593 msgid "Write permission was requested for a file on a read-only filesystem."
597 #: build/C/man2/access.2:223
598 msgid "B<access>() and B<faccessat>() may fail if:"
602 #: build/C/man2/access.2:223 build/C/man2/chdir.2:87 build/C/man2/chmod.2:248 build/C/man2/chown.2:241 build/C/man2/chroot.2:105 build/C/man2/execve.2:396 build/C/man2/fcntl.2:1527 build/C/man2/get_thread_area.2:36 build/C/man3/getcwd.3:176 build/C/man2/getdomainname.2:83 build/C/man2/gethostname.2:95 build/C/man2/ioctl.2:99 build/C/man2/mincore.2:104 build/C/man2/mkdir.2:142 build/C/man2/set_thread_area.2:53 build/C/man2/sysctl.2:82 build/C/man2/sysinfo.2:80 build/C/man2/truncate.2:124 build/C/man2/uname.2:69
608 #: build/C/man2/access.2:227 build/C/man2/chmod.2:252 build/C/man2/chown.2:245 build/C/man2/mkdir.2:145
609 msgid "I<pathname> points outside your accessible address space."
613 #: build/C/man2/access.2:227 build/C/man2/access.2:248 build/C/man2/chmod.2:310 build/C/man2/chown.2:299 build/C/man3/confstr.3:123 build/C/man3/crypt.3:124 build/C/man2/dup.2:184 build/C/man2/dup.2:189 build/C/man2/execve.2:404 build/C/man2/fcntl.2:1553 build/C/man2/fcntl.2:1558 build/C/man2/fcntl.2:1566 build/C/man2/fcntl.2:1576 build/C/man2/fcntl.2:1588 build/C/man2/fcntl.2:1596 build/C/man3/fexecve.3:78 build/C/man2/flock.2:127 build/C/man2/get_thread_area.2:39 build/C/man3/getcwd.3:180 build/C/man2/getdomainname.2:87 build/C/man2/getdomainname.2:99 build/C/man2/gethostname.2:99 build/C/man2/ioctl.2:103 build/C/man2/ioperm.2:85 build/C/man3/lockf.3:147 build/C/man2/mincore.2:108 build/C/man2/set_thread_area.2:50 build/C/man2/swapon.2:124 build/C/man2/swapon.2:129 build/C/man2/swapon.2:139 build/C/man3/tcgetpgrp.3:91 build/C/man2/truncate.2:141 build/C/man2/truncate.2:196 build/C/man3/ualarm.3:88 build/C/man3/usleep.3:87 build/C/man2/execveat.2:126
619 #: build/C/man2/access.2:231
620 msgid "I<mode> was incorrectly specified."
624 #: build/C/man2/access.2:231 build/C/man2/chdir.2:91 build/C/man2/chmod.2:252 build/C/man2/chmod.2:290 build/C/man2/chown.2:276 build/C/man2/chroot.2:109 build/C/man2/close.2:81 build/C/man2/execve.2:408 build/C/man2/fsync.2:118 build/C/man2/ioperm.2:91 build/C/man2/truncate.2:146
630 #: build/C/man2/access.2:234 build/C/man2/chdir.2:94 build/C/man2/chmod.2:255 build/C/man2/chroot.2:112 build/C/man2/close.2:84 build/C/man2/execve.2:411
631 msgid "An I/O error occurred."
635 #: build/C/man2/access.2:234 build/C/man2/chdir.2:105 build/C/man2/chmod.2:266 build/C/man2/chown.2:256 build/C/man2/chroot.2:123 build/C/man2/execve.2:443 build/C/man2/fork.2:216 build/C/man3/getlogin.3:125 build/C/man2/ioperm.2:94 build/C/man2/mincore.2:112 build/C/man2/mincore.2:124 build/C/man2/mkdir.2:161 build/C/man2/swapon.2:152
641 #: build/C/man2/access.2:237 build/C/man2/chdir.2:108 build/C/man2/chmod.2:269 build/C/man2/chown.2:259 build/C/man2/chroot.2:126 build/C/man2/execve.2:446 build/C/man2/mkdir.2:164
642 msgid "Insufficient kernel memory was available."
646 #: build/C/man2/access.2:237 build/C/man2/execve.2:461 build/C/man2/truncate.2:178
652 #: build/C/man2/access.2:241
653 msgid "Write access was requested to an executable which is being executed."
657 #: build/C/man2/access.2:244
658 msgid "The following additional errors can occur for B<faccessat>():"
662 #: build/C/man2/access.2:244 build/C/man2/chdir.2:121 build/C/man2/chmod.2:285 build/C/man2/chmod.2:306 build/C/man2/chown.2:273 build/C/man2/chown.2:295 build/C/man2/close.2:71 build/C/man2/dup.2:155 build/C/man2/dup.2:159 build/C/man2/fcntl.2:1490 build/C/man2/fcntl.2:1494 build/C/man2/flock.2:118 build/C/man2/fsync.2:114 build/C/man2/ioctl.2:95 build/C/man3/lockf.3:130 build/C/man2/mkdir.2:190 build/C/man3/tcgetpgrp.3:87 build/C/man2/truncate.2:188 build/C/man2/execveat.2:122
668 #: build/C/man2/access.2:248 build/C/man2/chmod.2:310 build/C/man2/chown.2:299 build/C/man2/mkdir.2:194 build/C/man2/execveat.2:126
669 msgid "I<dirfd> is not a valid file descriptor."
673 #: build/C/man2/access.2:252 build/C/man2/chmod.2:314 build/C/man2/chown.2:303 build/C/man2/execveat.2:130
674 msgid "Invalid flag specified in I<flags>."
678 #: build/C/man2/access.2:258 build/C/man2/chmod.2:320 build/C/man2/chown.2:309 build/C/man2/mkdir.2:200 build/C/man2/execveat.2:160
680 "I<pathname> is relative and I<dirfd> is a file descriptor referring to a "
681 "file other than a directory."
685 #: build/C/man2/access.2:258 build/C/man2/chmod.2:326 build/C/man2/chown.2:309 build/C/man3/des_crypt.3:131 build/C/man2/dup.2:203 build/C/man3/euidaccess.3:69 build/C/man3/exec.3:195 build/C/man2/exit_group.2:41 build/C/man3/fexecve.3:91 build/C/man2/get_thread_area.2:42 build/C/man2/gettid.2:54 build/C/man2/idle.2:59 build/C/man2/mincore.2:132 build/C/man2/mkdir.2:200 build/C/man2/pread.2:104 build/C/man2/set_thread_area.2:59 build/C/man2/setup.2:60 build/C/man2/sysinfo.2:83 build/C/man2/execveat.2:160
691 #: build/C/man2/access.2:262
693 "B<faccessat>() was added to Linux in kernel 2.6.16; library support was "
694 "added to glibc in version 2.4."
698 #: build/C/man2/access.2:265
699 msgid "B<access>(): SVr4, 4.3BSD, POSIX.1-2001, POSIX.1-2008."
703 #: build/C/man2/access.2:268
704 msgid "B<faccessat>(): POSIX.1-2008."
708 #: build/C/man2/access.2:281
710 "B<Warning>: Using these calls to check if a user is authorized to, for "
711 "example, open a file before actually doing so using B<open>(2) creates a "
712 "security hole, because the user might exploit the short time interval "
713 "between checking and opening the file to manipulate it. B<For this reason, "
714 "the use of this system call should be avoided>. (In the example just "
715 "described, a safer alternative would be to temporarily switch the process's "
716 "effective user ID to the real ID and then call B<open>(2).)"
720 #: build/C/man2/access.2:288
722 "B<access>() always dereferences symbolic links. If you need to check the "
723 "permissions on a symbolic link, use B<faccessat>(2) with the flag "
724 "B<AT_SYMLINK_NOFOLLOW>."
728 #: build/C/man2/access.2:294
730 "These calls return an error if any of the access types in I<mode> is denied, "
731 "even if some of the other access types in I<mode> are permitted."
734 #. HPU-UX 11 and Tru64 5.1 do this.
736 #: build/C/man2/access.2:301
738 "If the calling process has appropriate privileges (i.e., is superuser), "
739 "POSIX.1-2001 permits an implementation to indicate success for an B<X_OK> "
740 "check even if none of the execute file permission bits are set. Linux does "
745 #: build/C/man2/access.2:309
747 "A file is accessible only if the permissions on each of the directories in "
748 "the path prefix of I<pathname> grant search (i.e., execute) access. If any "
749 "directory is inaccessible, then the B<access>() call will fail, regardless "
750 "of the permissions on the file itself."
754 #: build/C/man2/access.2:317
756 "Only access bits are checked, not the file type or contents. Therefore, if "
757 "a directory is found to be writable, it probably means that files can be "
758 "created in the directory, and not that the directory can be written as a "
759 "file. Similarly, a DOS file may be found to be \"executable,\" but the "
760 "B<execve>(2) call will still fail."
764 #: build/C/man2/access.2:326
766 "These calls may not work correctly on NFSv2 filesystems with UID mapping "
767 "enabled, because UID mapping is done on the server and hidden from the "
768 "client, which checks permissions. (NFS versions 3 and higher perform the "
769 "check on the server.) Similar problems can occur to FUSE mounts."
773 #: build/C/man2/access.2:326 build/C/man2/brk.2:140 build/C/man2/chmod.2:338 build/C/man2/gethostname.2:140 build/C/man2/uname.2:138
775 msgid "C library/kernel ABI differences"
779 #: build/C/man2/access.2:339
781 "The raw B<faccessat>() system call takes only the first three arguments. "
782 "The B<AT_EACCESS> and B<AT_SYMLINK_NOFOLLOW> flags are actually implemented "
783 "within the glibc wrapper function for B<faccessat>(). If either of these "
784 "flags is specified, then the wrapper function employs B<fstatat>(2) to "
785 "determine access permissions."
789 #: build/C/man2/access.2:339 build/C/man2/chmod.2:348 build/C/man2/chown.2:380 build/C/man3/crypt.3:189 build/C/man2/mkdir.2:223
795 #: build/C/man2/access.2:357
797 "On older kernels where B<faccessat>() is unavailable (and when the "
798 "B<AT_EACCESS> and B<AT_SYMLINK_NOFOLLOW> flags are not specified), the glibc "
799 "wrapper function falls back to the use of B<access>(). When I<pathname> is "
800 "a relative pathname, glibc constructs a pathname based on the symbolic link "
801 "in I</proc/self/fd> that corresponds to the I<dirfd> argument."
805 #: build/C/man2/access.2:357 build/C/man7/environ.7:209 build/C/man2/fcntl.2:1818 build/C/man3/fexecve.3:146 build/C/man3/gethostid.3:122 build/C/man3/getlogin.3:177 build/C/man3/getopt.3:369 build/C/man2/mincore.2:144 build/C/man2/pread.2:146 build/C/man3/sleep.3:46 build/C/man3/sysconf.3:329 build/C/man2/sysctl.2:135 build/C/man2/truncate.2:253 build/C/man2/vfork.2:252 build/C/man2/execveat.2:210
810 #. This behavior appears to have been an implementation accident.
812 #: build/C/man2/access.2:380
814 "In kernel 2.4 (and earlier) there is some strangeness in the handling of "
815 "B<X_OK> tests for superuser. If all categories of execute permission are "
816 "disabled for a nondirectory file, then the only B<access>() test that "
817 "returns -1 is when I<mode> is specified as just B<X_OK>; if B<R_OK> or "
818 "B<W_OK> is also specified in I<mode>, then B<access>() returns 0 for such "
819 "files. Early 2.6 kernels (up to and including 2.6.3) also behaved in the "
820 "same way as kernel 2.4."
824 #: build/C/man2/access.2:390
826 "In kernels before 2.6.20, these calls ignored the effect of the B<MS_NOEXEC> "
827 "flag if it was used to B<mount>(2) the underlying filesystem. Since kernel "
828 "2.6.20, the B<MS_NOEXEC> is honored"
832 #: build/C/man2/access.2:401
834 "B<chmod>(2), B<chown>(2), B<open>(2), B<setgid>(2), B<setuid>(2), "
835 "B<stat>(2), B<euidaccess>(3), B<credentials>(7), B<path_resolution>(7), "
840 #: build/C/man2/alarm.2:30
846 #: build/C/man2/alarm.2:30
852 #: build/C/man2/alarm.2:33
853 msgid "alarm - set an alarm clock for delivery of a signal"
857 #: build/C/man2/alarm.2:38
859 msgid "B<unsigned int alarm(unsigned int >I<seconds>B<);>\n"
863 #: build/C/man2/alarm.2:46
865 "B<alarm>() arranges for a B<SIGALRM> signal to be delivered to the calling "
866 "process in I<seconds> seconds."
870 #: build/C/man2/alarm.2:50
871 msgid "If I<seconds> is zero, any pending alarm is canceled."
875 #: build/C/man2/alarm.2:54
876 msgid "In any event any previously set B<alarm>() is canceled."
880 #: build/C/man2/alarm.2:59
882 "B<alarm>() returns the number of seconds remaining until any previously "
883 "scheduled alarm was due to be delivered, or zero if there was no previously "
888 #: build/C/man2/alarm.2:61
889 msgid "SVr4, POSIX.1-2001, 4.3BSD."
893 #: build/C/man2/alarm.2:67
895 "B<alarm>() and B<setitimer>(2) share the same timer; calls to one will "
896 "interfere with use of the other."
900 #: build/C/man2/alarm.2:74
902 "Alarms created by B<alarm>() are preserved across B<execve>(2) and are not "
903 "inherited by children created via B<fork>(2)."
907 #: build/C/man2/alarm.2:83
909 "B<sleep>(3) may be implemented using B<SIGALRM>; mixing calls to B<alarm>() "
910 "and B<sleep>(3) is a bad idea."
914 #: build/C/man2/alarm.2:86
916 "Scheduling delays can, as ever, cause the execution of the process to be "
917 "delayed by an arbitrary amount of time."
921 #: build/C/man2/alarm.2:95
923 "B<gettimeofday>(2), B<pause>(2), B<select>(2), B<setitimer>(2), "
924 "B<sigaction>(2), B<signal>(2), B<sleep>(3), B<time>(7)"
928 #: build/C/man2/brk.2:29
934 #: build/C/man2/brk.2:32
935 msgid "brk, sbrk - change data segment size"
939 #: build/C/man2/brk.2:34 build/C/man2/chdir.2:38 build/C/man2/chroot.2:38 build/C/man3/daemon.3:41 build/C/man3/encrypt.3:37 build/C/man3/exec.3:46 build/C/man2/execve.2:42 build/C/man2/fork.2:44 build/C/man2/fsync.2:43 build/C/man2/getdomainname.2:34 build/C/man3/getdtablesize.3:32 build/C/man3/gethostid.3:34 build/C/man2/gethostname.2:37 build/C/man3/getlogin.3:33 build/C/man2/getpagesize.2:30 build/C/man2/idle.2:37 build/C/man3/lockf.3:33 build/C/man2/mincore.2:39 build/C/man2/nice.2:36 build/C/man2/pread.2:30 build/C/man2/setup.2:39 build/C/man2/swapon.2:47 build/C/man3/tcgetpgrp.3:30 build/C/man2/truncate.2:48 build/C/man2/uselib.2:36 build/C/man2/vfork.2:35 build/C/man2/vhangup.2:33 build/C/man2/execveat.2:31
940 msgid "B<#include E<lt>unistd.hE<gt>>"
944 #: build/C/man2/brk.2:36
945 msgid "B<int brk(void *>I<addr>B<);>"
949 #: build/C/man2/brk.2:38
950 msgid "B<void *sbrk(intptr_t >I<increment>B<);>"
954 #: build/C/man2/brk.2:46
955 msgid "B<brk>(), B<sbrk>():"
959 #: build/C/man2/brk.2:49 build/C/man3/getcwd.3:60 build/C/man3/getdtablesize.3:44 build/C/man2/getpagesize.2:42 build/C/man3/ualarm.3:43 build/C/man3/usleep.3:52 build/C/man2/vfork.2:47
961 msgid "Since glibc 2.12:"
965 #: build/C/man2/brk.2:56
968 "_BSD_SOURCE || _SVID_SOURCE ||\n"
969 " (_XOPEN_SOURCE\\ E<gt>=\\ 500 ||\n"
970 " _XOPEN_SOURCE\\ &&\\ _XOPEN_SOURCE_EXTENDED) &&\n"
971 " !(_POSIX_C_SOURCE\\ E<gt>=\\ 200112L || _XOPEN_SOURCE\\ E<gt>=\\ 600)\n"
975 #: build/C/man2/brk.2:61
977 "Before glibc 2.12: _BSD_SOURCE || _SVID_SOURCE || _XOPEN_SOURCE\\ E<gt>=\\ "
978 "500 || _XOPEN_SOURCE\\ &&\\ _XOPEN_SOURCE_EXTENDED"
982 #: build/C/man2/brk.2:76
984 "B<brk>() and B<sbrk>() change the location of the I<program break>, which "
985 "defines the end of the process's data segment (i.e., the program break is "
986 "the first location after the end of the uninitialized data segment). "
987 "Increasing the program break has the effect of allocating memory to the "
988 "process; decreasing the break deallocates memory."
992 #: build/C/man2/brk.2:83
994 "B<brk>() sets the end of the data segment to the value specified by "
995 "I<addr>, when that value is reasonable, the system has enough memory, and "
996 "the process does not exceed its maximum data size (see B<setrlimit>(2))."
1000 #: build/C/man2/brk.2:93
1002 "B<sbrk>() increments the program's data space by I<increment> bytes. "
1003 "Calling B<sbrk>() with an I<increment> of 0 can be used to find the current "
1004 "location of the program break."
1008 #: build/C/man2/brk.2:101
1010 "On success, B<brk>() returns zero. On error, -1 is returned, and I<errno> "
1011 "is set to B<ENOMEM>."
1015 #: build/C/man2/brk.2:113
1017 "On success, B<sbrk>() returns the previous program break. (If the break "
1018 "was increased, then this value is a pointer to the start of the newly "
1019 "allocated memory). On error, I<(void\\ *)\\ -1> is returned, and I<errno> "
1020 "is set to B<ENOMEM>."
1027 #. are not defined in the C Standard and are deliberately excluded from the
1028 #. POSIX.1-1990 standard (see paragraphs B.1.1.1.3 and B.8.3.3).
1030 #: build/C/man2/brk.2:121
1031 msgid "4.3BSD; SUSv1, marked LEGACY in SUSv2, removed in POSIX.1-2001."
1035 #: build/C/man2/brk.2:130
1037 "Avoid using B<brk>() and B<sbrk>(): the B<malloc>(3) memory allocation "
1038 "package is the portable and comfortable way of allocating memory."
1042 #. \fIint\fP (e.g., XPGv4, DU 4.0, HP-UX 11, FreeBSD 4.0, OpenBSD 3.2),
1043 #. \fIssize_t\fP (OSF1 2.0, Irix 5.3, 6.5),
1044 #. \fIptrdiff_t\fP (libc4, libc5, ulibc, glibc 2.0, 2.1),
1045 #. \fIintptr_t\fP (e.g., XPGv5, AIX, SunOS 5.8, 5.9, FreeBSD 4.7, NetBSD 1.6,
1046 #. Tru64 5.1, glibc2.2).
1048 #: build/C/man2/brk.2:140
1050 "Various systems use various types for the argument of B<sbrk>(). Common are "
1051 "I<int>, I<ssize_t>, I<ptrdiff_t>, I<intptr_t>."
1055 #: build/C/man2/brk.2:156
1057 "The return value described above for B<brk>() is the behavior provided by "
1058 "the glibc wrapper function for the Linux B<brk>() system call. (On most "
1059 "other implementations, the return value from B<brk>() is the same; this "
1060 "return value was also specified in SUSv2.) However, the actual Linux system "
1061 "call returns the new program break on success. On failure, the system call "
1062 "returns the current break. The glibc wrapper function does some work (i.e., "
1063 "checks whether the new break is less than I<addr>) to provide the 0 and -1 "
1064 "return values described above."
1068 #: build/C/man2/brk.2:163
1070 "On Linux, B<sbrk>() is implemented as a library function that uses the "
1071 "B<brk>() system call, and does some internal bookkeeping so that it can "
1072 "return the old break value."
1076 #: build/C/man2/brk.2:168
1077 msgid "B<execve>(2), B<getrlimit>(2), B<end>(3), B<malloc>(3)"
1081 #: build/C/man2/chdir.2:33
1087 #: build/C/man2/chdir.2:33
1093 #: build/C/man2/chdir.2:36
1094 msgid "chdir, fchdir - change working directory"
1098 #: build/C/man2/chdir.2:40
1099 msgid "B<int chdir(const char *>I<path>B<);>"
1103 #: build/C/man2/chdir.2:42
1104 msgid "B<int fchdir(int >I<fd>B<);>"
1108 #: build/C/man2/chdir.2:49
1109 msgid "B<fchdir>():"
1113 #: build/C/man2/chdir.2:54 build/C/man2/chmod.2:62 build/C/man2/chown.2:71 build/C/man3/gethostid.3:50 build/C/man2/truncate.2:66 build/C/man2/truncate.2:74
1115 "_BSD_SOURCE || _XOPEN_SOURCE\\ E<gt>=\\ 500 || _XOPEN_SOURCE\\ &&\\ "
1116 "_XOPEN_SOURCE_EXTENDED"
1120 #: build/C/man2/chdir.2:56 build/C/man2/chmod.2:64 build/C/man2/chown.2:73 build/C/man2/pread.2:50 build/C/man2/truncate.2:68
1121 msgid "|| /* Since glibc 2.12: */ _POSIX_C_SOURCE\\ E<gt>=\\ 200809L"
1125 #: build/C/man2/chdir.2:64
1127 "B<chdir>() changes the current working directory of the calling process to "
1128 "the directory specified in I<path>."
1132 #: build/C/man2/chdir.2:70
1134 "B<fchdir>() is identical to B<chdir>(); the only difference is that the "
1135 "directory is given as an open file descriptor."
1139 #: build/C/man2/chdir.2:75 build/C/man2/chmod.2:236 build/C/man2/chown.2:229 build/C/man2/chroot.2:95 build/C/man2/flock.2:117 build/C/man2/getdomainname.2:80 build/C/man2/gethostname.2:94 build/C/man2/ioperm.2:84 build/C/man3/lockf.3:121 build/C/man2/swapon.2:116 build/C/man2/sysinfo.2:79 build/C/man2/truncate.2:115 build/C/man2/uname.2:68 build/C/man2/uselib.2:53 build/C/man2/vhangup.2:55
1141 "On success, zero is returned. On error, -1 is returned, and I<errno> is set "
1146 #: build/C/man2/chdir.2:81
1148 "Depending on the filesystem, other errors can be returned. The more general "
1149 "errors for B<chdir>() are listed below:"
1153 #: build/C/man2/chdir.2:87
1155 "Search permission is denied for one of the components of I<path>. (See also "
1156 "B<path_resolution>(7).)"
1160 #: build/C/man2/chdir.2:91 build/C/man2/chroot.2:109
1161 msgid "I<path> points outside your accessible address space."
1165 #: build/C/man2/chdir.2:98 build/C/man2/chroot.2:116
1166 msgid "Too many symbolic links were encountered in resolving I<path>."
1170 #: build/C/man2/chdir.2:102 build/C/man2/chroot.2:120
1171 msgid "I<path> is too long."
1175 #: build/C/man2/chdir.2:105 build/C/man2/chmod.2:266 build/C/man2/chown.2:256 build/C/man2/chroot.2:123
1176 msgid "The file does not exist."
1180 #: build/C/man2/chdir.2:113 build/C/man2/chroot.2:131
1181 msgid "A component of I<path> is not a directory."
1185 #: build/C/man2/chdir.2:117
1186 msgid "The general errors for B<fchdir>() are listed below:"
1190 #: build/C/man2/chdir.2:121
1191 msgid "Search permission was denied on the directory open on I<fd>."
1195 #: build/C/man2/chdir.2:125 build/C/man3/tcgetpgrp.3:91
1196 msgid "I<fd> is not a valid file descriptor."
1200 #: build/C/man2/chdir.2:127
1201 msgid "SVr4, 4.4BSD, POSIX.1-2001."
1205 #: build/C/man2/chdir.2:130
1207 "The current working directory is the starting point for interpreting "
1208 "relative pathnames (those not starting with \\(aq/\\(aq)."
1212 #: build/C/man2/chdir.2:136
1214 "A child process created via B<fork>(2) inherits its parent's current "
1215 "working directory. The current working directory is left unchanged by "
1220 #: build/C/man2/chdir.2:140
1221 msgid "B<chroot>(2), B<getcwd>(3), B<path_resolution>(7)"
1225 #: build/C/man2/chmod.2:32
1231 #: build/C/man2/chmod.2:35
1232 msgid "chmod, fchmod, fchmodat - change permissions of a file"
1236 #: build/C/man2/chmod.2:38
1238 msgid "B<#include E<lt>sys/stat.hE<gt>>\n"
1242 #: build/C/man2/chmod.2:40
1244 msgid "B<int chmod(const char *>I<pathname>B<, mode_t >I<mode>B<);>\n"
1248 #: build/C/man2/chmod.2:42
1250 msgid "B<int fchmod(int >I<fd>B<, mode_t >I<mode>B<);>\n"
1254 #: build/C/man2/chmod.2:45
1257 "B<#include E<lt>fcntl.hE<gt>> /* Definition of AT_* constants */\n"
1258 "B<#include E<lt>sys/stat.hE<gt>>\n"
1262 #: build/C/man2/chmod.2:48
1265 "B<int fchmodat(int >I<dirfd>B<, const char *>I<pathname>B<, mode_t "
1266 ">I<mode>B<, int >I<flags>B<);>\n"
1270 #: build/C/man2/chmod.2:58
1271 msgid "B<fchmod>():"
1275 #: build/C/man2/chmod.2:68
1276 msgid "B<fchmodat>():"
1280 #: build/C/man2/chmod.2:88
1282 "The B<chmod>() and B<fchmod>() system calls change the permissions of a "
1283 "file. They differ only in how the file is specified:"
1287 #: build/C/man2/chmod.2:88 build/C/man2/chmod.2:93 build/C/man2/chown.2:96 build/C/man2/chown.2:101 build/C/man2/chown.2:105 build/C/man2/chown.2:353 build/C/man2/chown.2:358 build/C/man2/chown.2:364 build/C/man2/dup.2:106 build/C/man2/dup.2:112 build/C/man2/dup.2:129 build/C/man2/dup.2:138 build/C/man2/execve.2:122 build/C/man2/execve.2:126 build/C/man2/execve.2:129 build/C/man2/execve.2:132 build/C/man2/execve.2:135 build/C/man2/execve.2:138 build/C/man2/execve.2:141 build/C/man2/execve.2:144 build/C/man2/execve.2:147 build/C/man2/execve.2:150 build/C/man2/execve.2:154 build/C/man2/execve.2:158 build/C/man2/execve.2:167 build/C/man2/execve.2:174 build/C/man2/execve.2:179 build/C/man2/execve.2:186 build/C/man2/execve.2:193 build/C/man2/execve.2:200 build/C/man2/execve.2:207 build/C/man2/execve.2:211 build/C/man2/execve.2:214 build/C/man2/execve.2:222 build/C/man2/execve.2:226 build/C/man2/execve.2:231 build/C/man2/fcntl.2:452 build/C/man2/fcntl.2:468 build/C/man2/fork.2:52 build/C/man2/fork.2:56 build/C/man2/fork.2:58 build/C/man2/fork.2:62 build/C/man2/fork.2:68 build/C/man2/fork.2:71 build/C/man2/fork.2:74 build/C/man2/fork.2:82 build/C/man2/fork.2:87 build/C/man2/fork.2:99 build/C/man2/fork.2:106 build/C/man2/fork.2:112 build/C/man2/fork.2:119 build/C/man2/fork.2:125 build/C/man2/fork.2:130 build/C/man2/fork.2:138 build/C/man2/fork.2:147 build/C/man2/fork.2:161 build/C/man2/fork.2:170 build/C/man2/syscalls.2:87 build/C/man2/syscalls.2:90 build/C/man2/syscalls.2:96 build/C/man2/syscalls.2:112 build/C/man2/syscalls.2:118 build/C/man2/syscalls.2:124 build/C/man2/syscalls.2:130 build/C/man2/syscalls.2:137 build/C/man2/syscalls.2:703 build/C/man2/syscalls.2:724 build/C/man2/syscalls.2:735 build/C/man2/syscalls.2:742 build/C/man2/syscalls.2:753 build/C/man2/syscalls.2:765 build/C/man2/syscalls.2:786 build/C/man2/syscalls.2:794 build/C/man2/vfork.2:193 build/C/man2/vfork.2:197
1293 #: build/C/man2/chmod.2:93
1295 "B<chmod>() changes the permissions of the file specified whose pathname is "
1296 "given in I<pathname>, which is dereferenced if it is a symbolic link."
1300 #: build/C/man2/chmod.2:97
1302 "B<fchmod>() changes the permissions of the file referred to by the open "
1303 "file descriptor I<fd>."
1307 #: build/C/man2/chmod.2:102
1309 "The new file permissions are specified in I<mode>, which is a bit mask "
1310 "created by ORing together zero or more of the following:"
1314 #: build/C/man2/chmod.2:102
1316 msgid "B<S_ISUID> (04000)"
1320 #: build/C/man2/chmod.2:106
1321 msgid "set-user-ID (set process effective user ID on B<execve>(2))"
1325 #: build/C/man2/chmod.2:106
1327 msgid "B<S_ISGID> (02000)"
1331 #: build/C/man2/chmod.2:116
1333 "set-group-ID (set process effective group ID on B<execve>(2); mandatory "
1334 "locking, as described in B<fcntl>(2); take a new file's group from parent "
1335 "directory, as described in B<chown>(2) and B<mkdir>(2))"
1339 #: build/C/man2/chmod.2:116
1341 msgid "B<S_ISVTX> (01000)"
1345 #: build/C/man2/chmod.2:120
1346 msgid "sticky bit (restricted deletion flag, as described in B<unlink>(2))"
1350 #: build/C/man2/chmod.2:120
1352 msgid "B<S_IRUSR> (00400)"
1356 #: build/C/man2/chmod.2:123
1357 msgid "read by owner"
1361 #: build/C/man2/chmod.2:123
1363 msgid "B<S_IWUSR> (00200)"
1367 #: build/C/man2/chmod.2:126
1368 msgid "write by owner"
1372 #: build/C/man2/chmod.2:126
1374 msgid "B<S_IXUSR> (00100)"
1378 #: build/C/man2/chmod.2:130
1380 "execute/search by owner (\"search\" applies for directories, and means that "
1381 "entries within the directory can be accessed)"
1385 #: build/C/man2/chmod.2:130
1387 msgid "B<S_IRGRP> (00040)"
1391 #: build/C/man2/chmod.2:133
1392 msgid "read by group"
1396 #: build/C/man2/chmod.2:133
1398 msgid "B<S_IWGRP> (00020)"
1402 #: build/C/man2/chmod.2:136
1403 msgid "write by group"
1407 #: build/C/man2/chmod.2:136
1409 msgid "B<S_IXGRP> (00010)"
1413 #: build/C/man2/chmod.2:139
1414 msgid "execute/search by group"
1418 #: build/C/man2/chmod.2:139
1420 msgid "B<S_IROTH> (00004)"
1424 #: build/C/man2/chmod.2:142
1425 msgid "read by others"
1429 #: build/C/man2/chmod.2:142
1431 msgid "B<S_IWOTH> (00002)"
1435 #: build/C/man2/chmod.2:145
1436 msgid "write by others"
1440 #: build/C/man2/chmod.2:145
1442 msgid "B<S_IXOTH> (00001)"
1446 #: build/C/man2/chmod.2:148
1447 msgid "execute/search by others"
1451 #: build/C/man2/chmod.2:153
1453 "The effective UID of the calling process must match the owner of the file, "
1454 "or the process must be privileged (Linux: it must have the B<CAP_FOWNER> "
1459 #: build/C/man2/chmod.2:162
1461 "If the calling process is not privileged (Linux: does not have the "
1462 "B<CAP_FSETID> capability), and the group of the file does not match the "
1463 "effective group ID of the process or one of its supplementary group IDs, the "
1464 "B<S_ISGID> bit will be turned off, but this will not cause an error to be "
1469 #: build/C/man2/chmod.2:174
1471 "As a security measure, depending on the filesystem, the set-user-ID and "
1472 "set-group-ID execution bits may be turned off if a file is written. (On "
1473 "Linux this occurs if the writing process does not have the B<CAP_FSETID> "
1474 "capability.) On some filesystems, only the superuser can set the sticky "
1475 "bit, which may have a special meaning. For the sticky bit, and for "
1476 "set-user-ID and set-group-ID bits on directories, see B<stat>(2)."
1480 #: build/C/man2/chmod.2:182
1482 "On NFS filesystems, restricting the permissions will immediately influence "
1483 "already open files, because the access control is done on the server, but "
1484 "open files are maintained by the client. Widening the permissions may be "
1485 "delayed for other clients if attribute caching is enabled on them."
1489 #: build/C/man2/chmod.2:182
1495 #: build/C/man2/chmod.2:188
1497 "The B<fchmodat>() system call operates in exactly the same way as "
1498 "B<chmod>(), except for the differences described here."
1502 #: build/C/man2/chmod.2:198
1504 "If the pathname given in I<pathname> is relative, then it is interpreted "
1505 "relative to the directory referred to by the file descriptor I<dirfd> "
1506 "(rather than relative to the current working directory of the calling "
1507 "process, as is done by B<chmod>() for a relative pathname)."
1511 #: build/C/man2/chmod.2:210
1513 "If I<pathname> is relative and I<dirfd> is the special value B<AT_FDCWD>, "
1514 "then I<pathname> is interpreted relative to the current working directory of "
1515 "the calling process (like B<chmod>())."
1519 #: build/C/man2/chmod.2:219
1520 msgid "I<flags> can either be 0, or include the following flag:"
1524 #: build/C/man2/chmod.2:226
1526 "If I<pathname> is a symbolic link, do not dereference it: instead operate on "
1527 "the link itself. This flag is not currently implemented."
1531 #: build/C/man2/chmod.2:231
1532 msgid "See B<openat>(2) for an explanation of the need for B<fchmodat>()."
1536 #: build/C/man2/chmod.2:239 build/C/man2/chown.2:232
1538 "Depending on the filesystem, errors other than those listed below can be "
1543 #: build/C/man2/chmod.2:243
1544 msgid "The more general errors for B<chmod>() are listed below:"
1547 #. Also search permission is required on the final component,
1548 #. maybe just to guarantee that it is a directory?
1550 #: build/C/man2/chmod.2:248 build/C/man2/chown.2:241 build/C/man2/chroot.2:105
1552 "Search permission is denied on a component of the path prefix. (See also "
1553 "B<path_resolution>(7).)"
1557 #: build/C/man2/chmod.2:272 build/C/man2/chown.2:262 build/C/man2/truncate.2:165
1558 msgid "A component of the path prefix is not a directory."
1562 #: build/C/man2/chmod.2:272 build/C/man2/chmod.2:293 build/C/man2/chown.2:262 build/C/man2/chown.2:282 build/C/man2/chroot.2:131 build/C/man3/crypt.3:169 build/C/man2/execve.2:451 build/C/man2/execve.2:457 build/C/man2/fcntl.2:1625 build/C/man2/fcntl.2:1630 build/C/man2/getdomainname.2:91 build/C/man3/gethostid.3:88 build/C/man2/gethostname.2:117 build/C/man2/idle.2:56 build/C/man2/ioperm.2:98 build/C/man2/mkdir.2:178 build/C/man2/nice.2:62 build/C/man2/setup.2:57 build/C/man2/swapon.2:155 build/C/man3/tcgetpgrp.3:104 build/C/man2/truncate.2:165 build/C/man2/truncate.2:171 build/C/man2/vhangup.2:56
1568 #: build/C/man2/chmod.2:278
1570 "The effective UID does not match the owner of the file, and the process is "
1571 "not privileged (Linux: it does not have the B<CAP_FOWNER> capability)."
1575 #: build/C/man2/chmod.2:281 build/C/man2/chown.2:269 build/C/man2/truncate.2:178
1576 msgid "The named file resides on a read-only filesystem."
1580 #: build/C/man2/chmod.2:285
1581 msgid "The general errors for B<fchmod>() are listed below:"
1585 #: build/C/man2/chmod.2:290
1586 msgid "The file descriptor I<fd> is not valid."
1590 #: build/C/man2/chmod.2:293 build/C/man2/chmod.2:296 build/C/man2/chmod.2:299 build/C/man2/chown.2:282 build/C/man2/chown.2:285 build/C/man2/chown.2:288
1595 #: build/C/man2/chmod.2:306
1597 "The same errors that occur for B<chmod>() can also occur for "
1598 "B<fchmodat>(). The following additional errors can occur for B<fchmodat>():"
1602 #: build/C/man2/chmod.2:320
1608 #: build/C/man2/chmod.2:326
1609 msgid "I<flags> specified B<AT_SYMLINK_NOFOLLOW>, which is not supported."
1613 #: build/C/man2/chmod.2:330
1615 "B<fchmodat>() was added to Linux in kernel 2.6.16; library support was "
1616 "added to glibc in version 2.4."
1620 #: build/C/man2/chmod.2:334
1621 msgid "B<chmod>(), B<fchmod>(): 4.4BSD, SVr4, POSIX.1-2001i, POSIX.1-2008."
1625 #: build/C/man2/chmod.2:337
1626 msgid "B<fchmodat>(): POSIX.1-2008."
1630 #: build/C/man2/chmod.2:348
1632 "The GNU C library B<fchmodat>() wrapper function implements the "
1633 "POSIX-specified interface described in this page. This interface differs "
1634 "from the underlying Linux system call, which does I<not> have a I<flags> "
1639 #: build/C/man2/chmod.2:361
1641 "On older kernels where B<fchmodat>() is unavailable, the glibc wrapper "
1642 "function falls back to the use of B<chmod>(). When I<pathname> is a "
1643 "relative pathname, glibc constructs a pathname based on the symbolic link in "
1644 "I</proc/self/fd> that corresponds to the I<dirfd> argument."
1648 #: build/C/man2/chmod.2:368
1650 "B<chown>(2), B<execve>(2), B<open>(2), B<stat>(2), B<path_resolution>(7), "
1655 #: build/C/man2/chown.2:38
1661 #: build/C/man2/chown.2:41
1662 msgid "chown, fchown, lchown, fchownat - change ownership of a file"
1666 #: build/C/man2/chown.2:46
1669 "B<int chown(const char *>I<pathname>B<, uid_t >I<owner>B<, gid_t "
1674 #: build/C/man2/chown.2:48
1676 msgid "B<int fchown(int >I<fd>B<, uid_t >I<owner>B<, gid_t >I<group>B<);>\n"
1680 #: build/C/man2/chown.2:50
1683 "B<int lchown(const char *>I<pathname>B<, uid_t >I<owner>B<, gid_t "
1688 #: build/C/man2/chown.2:56
1691 "B<int fchownat(int >I<dirfd>B<, const char *>I<pathname>B<,>\n"
1692 "B< uid_t >I<owner>B<, gid_t >I<group>B<, int >I<flags>B<);>\n"
1696 #: build/C/man2/chown.2:66
1697 msgid "B<fchown>(), B<lchown>():"
1701 #: build/C/man2/chown.2:76
1702 msgid "B<fchownat>():"
1706 #: build/C/man2/chown.2:96
1708 "These system calls change the owner and group of a file. The B<chown>(), "
1709 "B<fchown>(), and B<lchown>() system calls differ only in how the file is "
1714 #: build/C/man2/chown.2:101
1716 "B<chown>() changes the ownership of the file specified by I<pathname>, "
1717 "which is dereferenced if it is a symbolic link."
1721 #: build/C/man2/chown.2:105
1723 "B<fchown>() changes the ownership of the file referred to by the open file "
1728 #: build/C/man2/chown.2:110
1729 msgid "B<lchown>() is like B<chown>(), but does not dereference symbolic links."
1733 #: build/C/man2/chown.2:119
1735 "Only a privileged process (Linux: one with the B<CAP_CHOWN> capability) may "
1736 "change the owner of a file. The owner of a file may change the group of the "
1737 "file to any group of which that owner is a member. A privileged process "
1738 "(Linux: with B<CAP_CHOWN>) may change the group arbitrarily."
1742 #: build/C/man2/chown.2:125
1743 msgid "If the I<owner> or I<group> is specified as -1, then that ID is not changed."
1746 #. In Linux 2.0 kernels, superuser was like everyone else
1747 #. In 2.2, up to 2.2.12, these bits were not cleared for superuser.
1748 #. Since 2.2.13, superuser is once more like everyone else.
1750 #: build/C/man2/chown.2:145
1752 "When the owner or group of an executable file are changed by an unprivileged "
1753 "user the B<S_ISUID> and B<S_ISGID> mode bits are cleared. POSIX does not "
1754 "specify whether this also should happen when root does the B<chown>(); the "
1755 "Linux behavior depends on the kernel version. In case of a "
1756 "non-group-executable file (i.e., one for which the B<S_IXGRP> bit is not "
1757 "set) the B<S_ISGID> bit indicates mandatory locking, and is not cleared by a "
1762 #: build/C/man2/chown.2:145
1768 #: build/C/man2/chown.2:151
1770 "The B<fchownat>() system call operates in exactly the same way as "
1771 "B<chown>(), except for the differences described here."
1775 #: build/C/man2/chown.2:161
1777 "If the pathname given in I<pathname> is relative, then it is interpreted "
1778 "relative to the directory referred to by the file descriptor I<dirfd> "
1779 "(rather than relative to the current working directory of the calling "
1780 "process, as is done by B<chown>() for a relative pathname)."
1784 #: build/C/man2/chown.2:173
1786 "If I<pathname> is relative and I<dirfd> is the special value B<AT_FDCWD>, "
1787 "then I<pathname> is interpreted relative to the current working directory of "
1788 "the calling process (like B<chown>())."
1792 #: build/C/man2/chown.2:184
1794 "The I<flags> argument is a bit mask created by ORing together 0 or more of "
1795 "the following values;"
1799 #: build/C/man2/chown.2:184
1801 msgid "B<AT_EMPTY_PATH> (since Linux 2.6.39)"
1804 #. commit 65cfc6722361570bfe255698d9cd4dccaf47570d
1805 #. Before glibc 2.16, defining _ATFILE_SOURCE sufficed
1807 #: build/C/man2/chown.2:207
1809 "If I<pathname> is an empty string, operate on the file referred to by "
1810 "I<dirfd> (which may have been obtained using the B<open>(2) B<O_PATH> "
1811 "flag). In this case, I<dirfd> can refer to any type of file, not just a "
1812 "directory. If I<dirfd> is B<AT_FDCWD>, the call operates on the current "
1813 "working directory. This flag is Linux-specific; define B<_GNU_SOURCE> to "
1814 "obtain its definition."
1818 #: build/C/man2/chown.2:219
1820 "If I<pathname> is a symbolic link, do not dereference it: instead operate on "
1821 "the link itself, like B<lchown>(). (By default, B<fchownat>() dereferences "
1822 "symbolic links, like B<chown>().)"
1826 #: build/C/man2/chown.2:224
1827 msgid "See B<openat>(2) for an explanation of the need for B<fchownat>()."
1831 #: build/C/man2/chown.2:236
1832 msgid "The more general errors for B<chown>() are listed below."
1836 #: build/C/man2/chown.2:266
1838 "The calling process did not have the required permissions (see above) to "
1839 "change owner and/or group."
1843 #: build/C/man2/chown.2:273
1844 msgid "The general errors for B<fchown>() are listed below:"
1848 #: build/C/man2/chown.2:276
1849 msgid "The descriptor is not valid."
1853 #: build/C/man2/chown.2:279
1854 msgid "A low-level I/O error occurred while modifying the inode."
1858 #: build/C/man2/chown.2:295
1860 "The same errors that occur for B<chown>() can also occur for "
1861 "B<fchownat>(). The following additional errors can occur for B<fchownat>():"
1865 #: build/C/man2/chown.2:313
1867 "B<fchownat>() was added to Linux in kernel 2.6.16; library support was "
1868 "added to glibc in version 2.4."
1872 #: build/C/man2/chown.2:318
1874 "B<chown>(), B<fchown>(), B<lchown>(): 4.4BSD, SVr4, POSIX.1-2001, "
1879 #. SVr4 documents EINVAL, EINTR, ENOLINK and EMULTIHOP returns, but no
1880 #. ENOMEM. POSIX.1 does not document ENOMEM or ELOOP error conditions.
1882 #. SVr4 documents additional EINVAL, EIO, EINTR, and ENOLINK
1883 #. error conditions.
1885 #: build/C/man2/chown.2:327
1887 "The 4.4BSD version can be used only by the superuser (that is, ordinary "
1888 "users cannot give away files)."
1892 #: build/C/man2/chown.2:330
1893 msgid "B<fchownat>(): POSIX.1-2008."
1897 #: build/C/man2/chown.2:331
1899 msgid "Ownership of new files"
1903 #: build/C/man2/chown.2:353
1905 "When a new file is created (by, for example, B<open>(2) or B<mkdir>(2)), "
1906 "its owner is made the same as the filesystem user ID of the creating "
1907 "process. The group of the file depends on a range of factors, including the "
1908 "type of filesystem, the options used to mount the filesystem, and whether or "
1909 "not the set-group-ID permission bit is enabled on the parent directory. If "
1910 "the filesystem supports the I<-o\\ grpid> (or, synonymously I<-o\\ "
1911 "bsdgroups>) and I<-o\\ nogrpid> (or, synonymously I<-o\\ sysvgroups>) "
1912 "B<mount>(8) options, then the rules are as follows:"
1916 #: build/C/man2/chown.2:358
1918 "If the filesystem is mounted with I<-o\\ grpid>, then the group of a new "
1919 "file is made the same as that of the parent directory."
1923 #: build/C/man2/chown.2:364
1925 "If the filesystem is mounted with I<-o\\ nogrpid> and the set-group-ID bit "
1926 "is disabled on the parent directory, then the group of a new file is made "
1927 "the same as the process's filesystem GID."
1931 #: build/C/man2/chown.2:370
1933 "If the filesystem is mounted with I<-o\\ nogrpid> and the set-group-ID bit "
1934 "is enabled on the parent directory, then the group of a new file is made the "
1935 "same as that of the parent directory."
1939 #: build/C/man2/chown.2:380
1941 "As at Linux 2.6.25, the I<-o\\ grpid> and I<-o\\ nogrpid> mount options are "
1942 "supported by ext2, ext3, ext4, and XFS. Filesystems that don't support "
1943 "these mount options follow the I<-o\\ nogrpid> rules."
1947 #: build/C/man2/chown.2:395
1949 "On older kernels where B<fchownat>() is unavailable, the glibc wrapper "
1950 "function falls back to the use of B<chown>() and B<lchown>(). When "
1951 "I<pathname> is a relative pathname, glibc constructs a pathname based on the "
1952 "symbolic link in I</proc/self/fd> that corresponds to the I<dirfd> argument."
1956 #: build/C/man2/chown.2:395
1962 #: build/C/man2/chown.2:408
1964 "The B<chown>() semantics are deliberately violated on NFS filesystems which "
1965 "have UID mapping enabled. Additionally, the semantics of all system calls "
1966 "which access the file contents are violated, because B<chown>() may cause "
1967 "immediate access revocation on already open files. Client side caching may "
1968 "lead to a delay between the time where ownership have been changed to allow "
1969 "access for a user and the time where the file can actually be accessed by "
1970 "the user on other clients."
1974 #: build/C/man2/chown.2:408
1976 msgid "Historical details"
1980 #: build/C/man2/chown.2:427
1982 "The original Linux B<chown>(), B<fchown>(), and B<lchown>() system calls "
1983 "supported only 16-bit user and group IDs. Subsequently, Linux 2.4 added "
1984 "B<chown32>(), B<fchown32>(), and B<lchown32>(), supporting 32-bit IDs. The "
1985 "glibc B<chown>(), B<fchown>(), and B<lchown>() wrapper functions "
1986 "transparently deal with the variations across kernel versions."
1990 #: build/C/man2/chown.2:442
1992 "In versions of Linux prior to 2.1.81 (and distinct from 2.1.46), B<chown>() "
1993 "did not follow symbolic links. Since Linux 2.1.81, B<chown>() does follow "
1994 "symbolic links, and there is a new system call B<lchown>() that does not "
1995 "follow symbolic links. Since Linux 2.1.86, this new call (that has the same "
1996 "semantics as the old B<chown>()) has got the same syscall number, and "
1997 "B<chown>() got the newly introduced number."
2001 #: build/C/man2/chown.2:451
2003 "The following program changes the ownership of the file named in its second "
2004 "command-line argument to the value specified in its first command-line "
2005 "argument. The new owner can be specified either as a numeric user ID, or as "
2006 "a username (which is converted to a user ID by using B<getpwnam>(3) to "
2007 "perform a lookup in the system password file)."
2011 #: build/C/man2/chown.2:451
2013 msgid "Program source"
2017 #: build/C/man2/chown.2:457
2020 "#include E<lt>pwd.hE<gt>\n"
2021 "#include E<lt>stdio.hE<gt>\n"
2022 "#include E<lt>stdlib.hE<gt>\n"
2023 "#include E<lt>unistd.hE<gt>\n"
2027 #: build/C/man2/chown.2:464
2031 "main(int argc, char *argv[])\n"
2034 " struct passwd *pwd;\n"
2039 #: build/C/man2/chown.2:469
2042 " if (argc != 3 || argv[1][0] == \\(aq\\e0\\(aq) {\n"
2043 " fprintf(stderr, \"%s E<lt>ownerE<gt> E<lt>fileE<gt>\\en\", "
2045 " exit(EXIT_FAILURE);\n"
2050 #: build/C/man2/chown.2:471
2052 msgid " uid = strtol(argv[1], &endptr, 10); /* Allow a numeric string */\n"
2056 #: build/C/man2/chown.2:478
2059 " if (*endptr != \\(aq\\e0\\(aq) { /* Was not pure numeric string "
2061 " pwd = getpwnam(argv[1]); /* Try getting UID for username */\n"
2062 " if (pwd == NULL) {\n"
2063 " perror(\"getpwnam\");\n"
2064 " exit(EXIT_FAILURE);\n"
2069 #: build/C/man2/chown.2:481
2072 " uid = pwd-E<gt>pw_uid;\n"
2077 #: build/C/man2/chown.2:486
2080 " if (chown(argv[2], uid, -1) == -1) {\n"
2081 " perror(\"chown\");\n"
2082 " exit(EXIT_FAILURE);\n"
2087 #: build/C/man2/chown.2:489 build/C/man2/execve.2:677 build/C/man3/getopt.3:430 build/C/man3/getopt.3:515
2090 " exit(EXIT_SUCCESS);\n"
2095 #: build/C/man2/chown.2:495
2096 msgid "B<chmod>(2), B<flock>(2), B<path_resolution>(7), B<symlink>(7)"
2100 #: build/C/man2/chroot.2:33
2106 #: build/C/man2/chroot.2:33 build/C/man3/gethostid.3:29
2112 #: build/C/man2/chroot.2:36
2113 msgid "chroot - change root directory"
2117 #: build/C/man2/chroot.2:40
2118 msgid "B<int chroot(const char *>I<path>B<);>"
2122 #: build/C/man2/chroot.2:47
2123 msgid "B<chroot>():"
2127 #: build/C/man2/chroot.2:50
2129 msgid "Since glibc 2.2.2:"
2133 #: build/C/man2/chroot.2:57
2137 " (_XOPEN_SOURCE\\ E<gt>=\\ 500 ||\n"
2138 " _XOPEN_SOURCE\\ &&\\ _XOPEN_SOURCE_EXTENDED) &&\n"
2139 " !(_POSIX_C_SOURCE\\ E<gt>=\\ 200112L || _XOPEN_SOURCE\\ E<gt>=\\ 600)\n"
2143 #: build/C/man2/chroot.2:60
2144 msgid "Before glibc 2.2.2: none"
2148 #: build/C/man2/chroot.2:69
2150 "B<chroot>() changes the root directory of the calling process to that "
2151 "specified in I<path>. This directory will be used for pathnames beginning "
2152 "with I</>. The root directory is inherited by all children of the calling "
2157 #: build/C/man2/chroot.2:74
2159 "Only a privileged process (Linux: one with the B<CAP_SYS_CHROOT> capability) "
2160 "may call B<chroot>()."
2164 #: build/C/man2/chroot.2:77
2166 "This call changes an ingredient in the pathname resolution process and does "
2171 #: build/C/man2/chroot.2:83
2173 "This call does not change the current working directory, so that after the "
2174 "call \\(aqI<.>\\(aq can be outside the tree rooted at \\(aqI</>\\(aq. In "
2175 "particular, the superuser can escape from a \"chroot jail\" by doing:"
2179 #: build/C/man2/chroot.2:86
2181 msgid " mkdir foo; chroot foo; cd ..\n"
2185 #: build/C/man2/chroot.2:90
2187 "This call does not close open file descriptors, and such file descriptors "
2188 "may allow access to files outside the chroot tree."
2192 #: build/C/man2/chroot.2:98
2194 "Depending on the filesystem, other errors can be returned. The more general "
2195 "errors are listed below:"
2199 #: build/C/man2/chroot.2:134
2200 msgid "The caller has insufficient privilege."
2203 #. SVr4 documents additional EINTR, ENOLINK and EMULTIHOP error conditions.
2204 #. X/OPEN does not document EIO, ENOMEM or EFAULT error conditions.
2206 #: build/C/man2/chroot.2:139
2208 "SVr4, 4.4BSD, SUSv2 (marked LEGACY). This function is not part of "
2213 #: build/C/man2/chroot.2:145
2215 "A child process created via B<fork>(2) inherits its parent's root "
2216 "directory. The root directory is left unchanged by B<execve>(2)."
2219 #. FIXME . eventually say something about containers,
2220 #. virtual servers, etc.?
2222 #: build/C/man2/chroot.2:151
2223 msgid "FreeBSD has a stronger B<jail>() system call."
2227 #: build/C/man2/chroot.2:154
2228 msgid "B<chdir>(2), B<path_resolution>(7)"
2232 #: build/C/man2/close.2:35
2238 #: build/C/man2/close.2:35
2244 #: build/C/man2/close.2:38
2245 msgid "close - close a file descriptor"
2249 #: build/C/man2/close.2:43
2251 msgid "B<int close(int >I<fd>B<);>\n"
2255 #: build/C/man2/close.2:53
2257 "B<close>() closes a file descriptor, so that it no longer refers to any "
2258 "file and may be reused. Any record locks (see B<fcntl>(2)) held on the "
2259 "file it was associated with, and owned by the process, are removed "
2260 "(regardless of the file descriptor that was used to obtain the lock)."
2264 #: build/C/man2/close.2:64
2266 "If I<fd> is the last file descriptor referring to the underlying open file "
2267 "description (see B<open>(2)), the resources associated with the open file "
2268 "description are freed; if the descriptor was the last reference to a file "
2269 "which has been removed using B<unlink>(2), the file is deleted."
2273 #: build/C/man2/close.2:70
2275 "B<close>() returns zero on success. On error, -1 is returned, and I<errno> "
2276 "is set appropriately."
2280 #: build/C/man2/close.2:75
2281 msgid "I<fd> isn't a valid open file descriptor."
2285 #: build/C/man2/close.2:75 build/C/man2/dup.2:176 build/C/man2/fcntl.2:1531 build/C/man2/fcntl.2:1540 build/C/man2/flock.2:122 build/C/man2/truncate.2:134 build/C/man3/ualarm.3:85 build/C/man3/usleep.3:83
2291 #: build/C/man2/close.2:81
2292 msgid "The B<close>() call was interrupted by a signal; see B<signal>(7)."
2296 #: build/C/man2/close.2:87 build/C/man2/fork.2:228 build/C/man3/swab.3:79 build/C/man2/umask.2:97
2297 msgid "SVr4, 4.3BSD, POSIX.1-2001."
2301 #: build/C/man2/close.2:107
2303 "Not checking the return value of B<close>() is a common but nevertheless "
2304 "serious programming error. It is quite possible that errors on a previous "
2305 "B<write>(2) operation are first reported at the final B<close>(). Not "
2306 "checking the return value when closing the file may lead to silent loss of "
2307 "data. This can especially be observed with NFS and with disk quota. Note "
2308 "that the return value should be used only for diagnostics. In particular "
2309 "B<close>() should not be retried after an B<EINTR> since this may cause a "
2310 "reused descriptor from another thread to be closed."
2314 #: build/C/man2/close.2:116
2316 "A successful close does not guarantee that the data has been successfully "
2317 "saved to disk, as the kernel defers writes. It is not common for a "
2318 "filesystem to flush the buffers when the stream is closed. If you need to "
2319 "be sure that the data is physically stored, use B<fsync>(2). (It will "
2320 "depend on the disk hardware at this point.)"
2323 #. Date: Tue, 4 Sep 2007 13:57:35 +0200
2324 #. From: Fredrik Noring <noring@nocrew.org>
2325 #. One such race involves signals and ERESTARTSYS. If a file descriptor
2326 #. in use by a system call is closed and then reused by e.g. an
2327 #. independent open() in some unrelated thread, before the original system
2328 #. call has restarted after ERESTARTSYS, the original system call will
2329 #. later restart with the reused file descriptor. This is most likely a
2330 #. serious programming error.
2332 #: build/C/man2/close.2:131
2334 "It is probably unwise to close file descriptors while they may be in use by "
2335 "system calls in other threads in the same process. Since a file descriptor "
2336 "may be reused, there are some obscure race conditions that may cause "
2337 "unintended side effects."
2341 #: build/C/man2/close.2:138
2343 "B<fcntl>(2), B<fsync>(2), B<open>(2), B<shutdown>(2), B<unlink>(2), "
2348 #: build/C/man3/confstr.3:32
2354 #: build/C/man3/confstr.3:32
2360 #: build/C/man3/confstr.3:32 build/C/man3/daemon.3:36 build/C/man3/exec.3:41 build/C/man3/fpathconf.3:41 build/C/man3/get_nprocs_conf.3:26 build/C/man3/getcwd.3:32 build/C/man3/getlogin.3:28 build/C/man3/getopt.3:41 build/C/man3/getumask.3:28 build/C/man3/getusershell.3:30 build/C/man3/lockf.3:28 build/C/man3/sleep.3:26 build/C/man3/sysconf.3:27 build/C/man3/tcgetpgrp.3:25
2366 #: build/C/man3/confstr.3:35
2367 msgid "confstr - get configuration dependent string variables"
2371 #: build/C/man3/confstr.3:40
2373 msgid "B<size_t confstr(int >I<name>B<, char *>I<buf>B<, size_t >I<len>B<);>\n"
2377 #: build/C/man3/confstr.3:49
2378 msgid "B<confstr>(): _POSIX_C_SOURCE\\ E<gt>=\\ 2 || _XOPEN_SOURCE"
2382 #: build/C/man3/confstr.3:52
2383 msgid "B<confstr>() gets the value of configuration-dependent string variables."
2387 #: build/C/man3/confstr.3:57
2389 "The I<name> argument is the system variable to be queried. The following "
2390 "variables are supported:"
2394 #: build/C/man3/confstr.3:57
2396 msgid "B<_CS_GNU_LIBC_VERSION> (GNU C library only; since glibc 2.3.2)"
2400 #: build/C/man3/confstr.3:61
2402 "A string which identifies the GNU C library version on this system (e.g, "
2407 #: build/C/man3/confstr.3:61
2409 msgid "B<_CS_GNU_LIBPTHREAD_VERSION> (GNU C library only; since glibc 2.3.2)"
2413 #: build/C/man3/confstr.3:65
2415 "A string which identifies the POSIX implementation supplied by this C "
2416 "library (e.g, \"NPTL 2.3.4\" or \"linuxthreads-0.10\")."
2420 #: build/C/man3/confstr.3:65
2426 #: build/C/man3/confstr.3:71
2428 "A value for the B<PATH> variable which indicates where all the POSIX.2 "
2429 "standard utilities can be found."
2433 #: build/C/man3/confstr.3:87
2435 "If I<buf> is not NULL and I<len> is not zero, B<confstr>() copies the value "
2436 "of the string to I<buf> truncated to I<len - 1> bytes if necessary, with a "
2437 "null byte (\\(aq\\e0\\(aq) as terminator. This can be detected by comparing "
2438 "the return value of B<confstr>() against I<len>."
2442 #: build/C/man3/confstr.3:95
2444 "If I<len> is zero and I<buf> is NULL, B<confstr>() just returns the value "
2449 #: build/C/man3/confstr.3:107
2451 "If I<name> is a valid configuration variable, B<confstr>() returns the "
2452 "number of bytes (including the terminating null byte) that would be "
2453 "required to hold the entire value of that variable. This value may be "
2454 "greater than I<len>, which means that the value in I<buf> is truncated."
2458 #: build/C/man3/confstr.3:122
2460 "If I<name> is a valid configuration variable, but that variable does not "
2461 "have a value, then B<confstr>() returns 0. If I<name> does not correspond "
2462 "to a valid configuration variable, B<confstr>() returns 0, and I<errno> is "
2467 #: build/C/man3/confstr.3:128
2468 msgid "The value of I<name> is invalid."
2472 #: build/C/man3/confstr.3:130 build/C/man3/fpathconf.3:171 build/C/man2/pread.2:117 build/C/man3/sleep.3:46 build/C/man3/sysconf.3:329 build/C/man3/tcgetpgrp.3:118
2473 msgid "POSIX.1-2001."
2477 #: build/C/man3/confstr.3:133
2479 "The following code fragment determines the path where to find the POSIX.2 "
2484 #: build/C/man3/confstr.3:139
2492 #: build/C/man3/confstr.3:145
2495 "n = confstr(_CS_PATH, NULL, (size_t) 0);\n"
2496 "pathbuf = malloc(n);\n"
2497 "if (pathbuf == NULL)\n"
2499 "confstr(_CS_PATH, pathbuf, n);\n"
2503 #: build/C/man3/confstr.3:155
2505 "B<getconf>(1), B<sh>(1), B<exec>(3), B<fpathconf>(3) B<sysconf>(3) "
2506 "B<pathconf>(3) B<system>(3)"
2510 #: build/C/man3/crypt.3:36
2516 #: build/C/man3/crypt.3:36
2522 #: build/C/man3/crypt.3:39
2523 msgid "crypt, crypt_r - password and data encryption"
2527 #: build/C/man3/crypt.3:42
2529 msgid "B<#define _XOPEN_SOURCE> /* See feature_test_macros(7) */\n"
2533 #: build/C/man3/crypt.3:46
2535 msgid "B<char *crypt(const char *>I<key>B<, const char *>I<salt>B<);>\n"
2539 #: build/C/man3/crypt.3:48
2541 msgid "B<#define _GNU_SOURCE> /* See feature_test_macros(7) */\n"
2545 #: build/C/man3/crypt.3:50
2547 msgid "B<#include E<lt>crypt.hE<gt>>\n"
2551 #: build/C/man3/crypt.3:53
2554 "B<char *crypt_r(const char *>I<key>B<, const char *>I<salt>B<,>\n"
2555 "B< struct crypt_data *>I<data>B<);>\n"
2559 #: build/C/man3/crypt.3:56
2560 msgid "Link with I<-lcrypt>."
2564 #: build/C/man3/crypt.3:62
2566 "B<crypt>() is the password encryption function. It is based on the Data "
2567 "Encryption Standard algorithm with variations intended (among other things) "
2568 "to discourage use of hardware implementations of a key search."
2572 #: build/C/man3/crypt.3:65
2573 msgid "I<key> is a user's typed password."
2577 #: build/C/man3/crypt.3:71
2579 "I<salt> is a two-character string chosen from the set [B<a-zA-Z0-9./>]. "
2580 "This string is used to perturb the algorithm in one of 4096 different ways."
2584 #: build/C/man3/crypt.3:82
2586 "By taking the lowest 7 bits of each of the first eight characters of the "
2587 "I<key>, a 56-bit key is obtained. This 56-bit key is used to encrypt "
2588 "repeatedly a constant string (usually a string consisting of all zeros). "
2589 "The returned value points to the encrypted password, a series of 13 "
2590 "printable ASCII characters (the first two characters represent the salt "
2591 "itself). The return value points to static data whose content is "
2592 "overwritten by each call."
2596 #: build/C/man3/crypt.3:84
2597 msgid "Warning: The key space consists of"
2601 #: build/C/man3/crypt.3:99
2603 "equal 7.2e16 possible values. Exhaustive searches of this key space are "
2604 "possible using massively parallel computers. Software, such as B<crack>(1), "
2605 "is available which will search the portion of this key space that is "
2606 "generally used by humans for passwords. Hence, password selection should, "
2607 "at minimum, avoid common words and names. The use of a B<passwd>(1) "
2608 "program that checks for crackable passwords during the selection process is "
2613 #: build/C/man3/crypt.3:108
2615 "The DES algorithm itself has a few quirks which make the use of the "
2616 "B<crypt>() interface a very poor choice for anything other than password "
2617 "authentication. If you are planning on using the B<crypt>() interface for "
2618 "a cryptography project, don't do it: get a good book on encryption and one "
2619 "of the widely available DES libraries."
2623 #: build/C/man3/crypt.3:120
2625 "B<crypt_r>() is a reentrant version of B<crypt>(). The structure pointed "
2626 "to by I<data> is used to store result data and bookkeeping information. "
2627 "Other than allocating it, the only thing that the caller should do with this "
2628 "structure is to set I<data-E<gt>initialized> to zero before the first call "
2633 #: build/C/man3/crypt.3:123
2635 "On success, a pointer to the encrypted password is returned. On error, NULL "
2640 #: build/C/man3/crypt.3:128
2641 msgid "I<salt> has the wrong format."
2645 #: build/C/man3/crypt.3:130 build/C/man3/encrypt.3:120 build/C/man3/fexecve.3:86 build/C/man2/fork.2:220
2650 #. This level of detail is not necessary in this man page. . .
2652 #. When encrypting a plain text P using DES with the key K results in the
2653 #. encrypted text C, then the complementary plain text P' being encrypted
2654 #. using the complementary key K' will result in the complementary encrypted
2657 #. Weak keys are keys which stay invariant under the DES key transformation.
2658 #. The four known weak keys 0101010101010101, fefefefefefefefe,
2659 #. 1f1f1f1f0e0e0e0e and e0e0e0e0f1f1f1f1 must be avoided.
2661 #. There are six known half weak key pairs, which keys lead to the same
2662 #. encrypted data. Keys which are part of such key clusters should be
2664 #. Sorry, I could not find out what they are.
2667 #. Heavily redundant data causes trouble with DES encryption, when used in the
2673 #. interface should be used only for its intended purpose of password
2674 #. verification, and should not be used as part of a data encryption tool.
2676 #. The first and last three output bits of the fourth S-box can be
2677 #. represented as function of their input bits. Empiric studies have
2678 #. shown that S-boxes partially compute the same output for similar input.
2679 #. It is suspected that this may contain a back door which could allow the
2680 #. NSA to decrypt DES encrypted data.
2682 #. Making encrypted data computed using crypt() publicly available has
2683 #. to be considered insecure for the given reasons.
2685 #: build/C/man3/crypt.3:169
2687 "The B<crypt>() function was not implemented, probably because of "
2688 "U.S.A. export restrictions."
2692 #: build/C/man3/crypt.3:174
2694 "I</proc/sys/crypto/fips_enabled> has a nonzero value, and an attempt was "
2695 "made to use a weak encryption type, such as DES."
2699 #: build/C/man3/crypt.3:174 build/C/man3/daemon.3:91 build/C/man3/des_crypt.3:134 build/C/man3/encrypt.3:124 build/C/man3/euidaccess.3:73 build/C/man3/getdtablesize.3:69 build/C/man3/getlogin.3:140 build/C/man3/getusershell.3:93 build/C/man3/lockf.3:154 build/C/man3/swab.3:72 build/C/man3/tcgetpgrp.3:109 build/C/man3/ualarm.3:92 build/C/man3/usleep.3:91
2705 #: build/C/man3/crypt.3:175 build/C/man3/daemon.3:92 build/C/man3/des_crypt.3:135 build/C/man3/encrypt.3:125 build/C/man3/euidaccess.3:74 build/C/man3/getdtablesize.3:70 build/C/man3/getlogin.3:141 build/C/man3/getusershell.3:94 build/C/man3/lockf.3:155 build/C/man3/swab.3:73 build/C/man3/tcgetpgrp.3:110 build/C/man3/ualarm.3:93 build/C/man3/usleep.3:92
2707 msgid "Multithreading (see pthreads(7))"
2711 #: build/C/man3/crypt.3:179
2712 msgid "The B<crypt>() function is not thread-safe."
2716 #: build/C/man3/crypt.3:183
2717 msgid "The B<crypt_r>() function is thread-safe."
2721 #: build/C/man3/crypt.3:188
2722 msgid "B<crypt>(): SVr4, 4.3BSD, POSIX.1-2001. B<crypt_r>() is a GNU extension."
2726 #: build/C/man3/crypt.3:192
2728 "The glibc2 version of this function supports additional encryption "
2733 #: build/C/man3/crypt.3:197
2735 "If I<salt> is a character string starting with the characters \"$I<id>$\" "
2736 "followed by a string terminated by \"$\":"
2740 #: build/C/man3/crypt.3:200
2741 msgid "$I<id>$I<salt>$I<encrypted>"
2745 #: build/C/man3/crypt.3:209
2747 "then instead of using the DES machine, I<id> identifies the encryption "
2748 "method used and this then determines how the rest of the password string is "
2749 "interpreted. The following values of I<id> are supported:"
2753 #: build/C/man3/crypt.3:212
2755 msgid "ID | Method\n"
2759 #: build/C/man3/crypt.3:213 build/C/man2/syscall.2:160 build/C/man2/syscall.2:198
2765 #: build/C/man3/crypt.3:214
2771 #: build/C/man3/crypt.3:215
2773 msgid "2a | Blowfish (not in mainline glibc; added in some\n"
2777 #: build/C/man3/crypt.3:216
2779 msgid " | Linux distributions)\n"
2782 #. openSUSE has Blowfish, but AFAICS, this option is not supported
2783 #. natively by glibc -- mtk, Jul 08
2786 #. glibc doesn't appear to natively support Sun MD5; I don't know
2787 #. if any distros add the support.
2789 #: build/C/man3/crypt.3:223
2791 msgid "5 | SHA-256 (since glibc 2.7)\n"
2795 #: build/C/man3/crypt.3:224
2797 msgid "6 | SHA-512 (since glibc 2.7)\n"
2801 #: build/C/man3/crypt.3:231
2803 "So $5$I<salt>$I<encrypted> is an SHA-256 encoded password and "
2804 "$6$I<salt>$I<encrypted> is an SHA-512 encoded one."
2808 #: build/C/man3/crypt.3:236
2810 "\"I<salt>\" stands for the up to 16 characters following \"$I<id>$\" in the "
2811 "salt. The encrypted part of the password string is the actual computed "
2812 "password. The size of this string is fixed:"
2816 #: build/C/man3/crypt.3:238
2818 msgid "MD5 | 22 characters\n"
2822 #: build/C/man3/crypt.3:239
2824 msgid "SHA-256 | 43 characters\n"
2828 #: build/C/man3/crypt.3:240
2830 msgid "SHA-512 | 86 characters\n"
2834 #: build/C/man3/crypt.3:249
2836 "The characters in \"I<salt>\" and \"I<encrypted>\" are drawn from the set "
2837 "[B<a-zA-Z0-9./>]. In the MD5 and SHA implementations the entire I<key> is "
2838 "significant (instead of only the first 8 bytes in DES)."
2842 #: build/C/man3/crypt.3:255
2843 msgid "B<login>(1), B<passwd>(1), B<encrypt>(3), B<getpass>(3), B<passwd>(5)"
2847 #: build/C/man3/daemon.3:36
2853 #: build/C/man3/daemon.3:36
2859 #: build/C/man3/daemon.3:39
2860 msgid "daemon - run in the background"
2864 #: build/C/man3/daemon.3:43
2865 msgid "B<int daemon(int >I<nochdir>B<, int >I<noclose>B<);>"
2869 #: build/C/man3/daemon.3:51
2870 msgid "B<daemon>(): _BSD_SOURCE || (_XOPEN_SOURCE && _XOPEN_SOURCE\\ E<lt>\\ 500)"
2874 #: build/C/man3/daemon.3:56
2876 "The B<daemon>() function is for programs wishing to detach themselves from "
2877 "the controlling terminal and run in the background as system daemons."
2881 #: build/C/man3/daemon.3:64
2883 "If I<nochdir> is zero, B<daemon>() changes the calling process's current "
2884 "working directory to the root directory (\"/\"); otherwise, the current "
2885 "working directory is left unchanged."
2889 #: build/C/man3/daemon.3:73
2891 "If I<noclose> is zero, B<daemon>() redirects standard input, standard "
2892 "output and standard error to I</dev/null>; otherwise, no changes are made to "
2893 "these file descriptors."
2896 #. not .IR in order not to underline _
2898 #: build/C/man3/daemon.3:91
2900 "(This function forks, and if the B<fork>(2) succeeds, the parent calls "
2901 "B<_exit>(2), so that further errors are seen by the child only.) On success "
2902 "B<daemon>() returns zero. If an error occurs, B<daemon>() returns -1 and "
2903 "sets I<errno> to any of the errors specified for the B<fork>(2) and "
2908 #: build/C/man3/daemon.3:96
2909 msgid "The B<daemon>() function is thread-safe."
2913 #: build/C/man3/daemon.3:102
2915 "Not in POSIX.1-2001. A similar function appears on the BSDs. The "
2916 "B<daemon>() function first appeared in 4.4BSD."
2920 #: build/C/man3/daemon.3:110
2922 "The glibc implementation can also return -1 when I</dev/null> exists but is "
2923 "not a character device with the expected major and minor numbers. In this "
2924 "case, I<errno> need not be set."
2928 #: build/C/man3/daemon.3:113
2929 msgid "B<fork>(2), B<setsid>(2)"
2933 #: build/C/man3/des_crypt.3:14
2939 #: build/C/man3/des_crypt.3:18
2941 "des_crypt, ecb_crypt, cbc_crypt, des_setparity, DES_FAILED - fast DES "
2946 #. .B #include <des_crypt.h>
2948 #: build/C/man3/des_crypt.3:23
2950 msgid "B<#include E<lt>rpc/des_crypt.hE<gt>>\n"
2954 #: build/C/man3/des_crypt.3:26
2957 "B<int ecb_crypt(char *>I<key>B<, char *>I<data>B<, unsigned "
2959 "B< unsigned >I<mode>B<);>\n"
2963 #: build/C/man3/des_crypt.3:29
2966 "B<int cbc_crypt(char *>I<key>B<, char *>I<data>B<, unsigned "
2968 "B< unsigned >I<mode>B<, char *>I<ivec>B<);>\n"
2972 #: build/C/man3/des_crypt.3:31
2974 msgid "B<void des_setparity(char *>I<key>B<);>\n"
2978 #: build/C/man3/des_crypt.3:33
2980 msgid "B<int DES_FAILED(int >I<status>B<);>\n"
2984 #: build/C/man3/des_crypt.3:63
2986 "B<ecb_crypt>() and B<cbc_crypt>() implement the NBS DES (Data Encryption "
2987 "Standard). These routines are faster and more general purpose than "
2988 "B<crypt>(3). They also are able to utilize DES hardware if it is "
2989 "available. B<ecb_crypt>() encrypts in ECB (Electronic Code Book) mode, "
2990 "which encrypts blocks of data independently. B<cbc_crypt>() encrypts in "
2991 "CBC (Cipher Block Chaining) mode, which chains together successive blocks. "
2992 "CBC mode protects against insertions, deletions and substitutions of "
2993 "blocks. Also, regularities in the clear text will not appear in the cipher "
2998 #: build/C/man3/des_crypt.3:106
3000 "Here is how to use these routines. The first argument, I<key>, is the "
3001 "8-byte encryption key with parity. To set the key's parity, which for DES "
3002 "is in the low bit of each byte, use B<des_setparity>(). The second "
3003 "argument, I<data>, contains the data to be encrypted or decrypted. The "
3004 "third argument, I<datalen>, is the length in bytes of I<data>, which must be "
3005 "a multiple of 8. The fourth argument, I<mode>, is formed by ORing together "
3006 "some things. For the encryption direction OR in either B<DES_ENCRYPT> or "
3007 "B<DES_DECRYPT>. For software versus hardware encryption, OR in either "
3008 "B<DES_HW> or B<DES_SW>. If B<DES_HW> is specified, and there is no "
3009 "hardware, then the encryption is performed in software and the routine "
3010 "returns B<DESERR_NOHWDEVICE>. For B<cbc_crypt>(), the argument I<ivec> is "
3011 "the 8-byte initialization vector for the chaining. It is updated to the "
3012 "next initialization vector upon return."
3016 #: build/C/man3/des_crypt.3:108
3018 msgid "B<DESERR_NONE>"
3022 #: build/C/man3/des_crypt.3:111
3027 #: build/C/man3/des_crypt.3:111
3029 msgid "B<DESERR_NOHWDEVICE>"
3033 #: build/C/man3/des_crypt.3:114
3035 "Encryption succeeded, but done in software instead of the requested "
3040 #: build/C/man3/des_crypt.3:114
3042 msgid "B<DESERR_HWERROR>"
3046 #: build/C/man3/des_crypt.3:117
3047 msgid "An error occurred in the hardware or driver."
3051 #: build/C/man3/des_crypt.3:117
3053 msgid "B<DESERR_BADPARAM>"
3057 #: build/C/man3/des_crypt.3:120
3058 msgid "Bad argument to routine."
3063 #. So far the Sun page
3064 #. Some additions - aeb
3066 #: build/C/man3/des_crypt.3:131
3068 "Given a result status I<stat>, the macro B<DES_FAILED(>I<stat>B<)> is false "
3069 "only for the first two statuses."
3073 #: build/C/man3/des_crypt.3:134
3074 msgid "These functions are present in glibc 2.1 and later."
3078 #: build/C/man3/des_crypt.3:142
3080 "The B<ecb_crypt>(), B<cbc_crypt>(), and B<des_setparity>() functions are "
3085 #: build/C/man3/des_crypt.3:145
3086 msgid "4.3BSD. Not in POSIX.1-2001."
3090 #: build/C/man3/des_crypt.3:149
3091 msgid "B<des>(1), B<crypt>(3), B<xcrypt>(3)"
3095 #: build/C/man2/dup.2:37
3101 #: build/C/man2/dup.2:37 build/C/man3/exec.3:41 build/C/man2/execve.2:37 build/C/man2/fcntl.2:65 build/C/man3/fexecve.3:25 build/C/man2/syscall.2:42 build/C/man2/syscalls.2:31 build/C/man2/truncate.2:43 build/C/man2/execveat.2:26
3107 #: build/C/man2/dup.2:40
3108 msgid "dup, dup2, dup3 - duplicate a file descriptor"
3112 #: build/C/man2/dup.2:46
3115 "B<int dup(int >I<oldfd>B<);>\n"
3116 "B<int dup2(int >I<oldfd>B<, int >I<newfd>B<);>\n"
3120 #: build/C/man2/dup.2:50
3123 "B<#define _GNU_SOURCE> /* See feature_test_macros(7) */\n"
3124 "B<#include E<lt>fcntl.hE<gt>> /* Obtain O_* constant "
3126 "B<#include E<lt>unistd.hE<gt>>\n"
3130 #: build/C/man2/dup.2:52
3132 msgid "B<int dup3(int >I<oldfd>B<, int >I<newfd>B<, int >I<flags>B<);>\n"
3136 #: build/C/man2/dup.2:59
3138 "The B<dup>() system call creates a copy of the file descriptor I<oldfd>, "
3139 "using the lowest-numbered unused descriptor for the new descriptor."
3143 #: build/C/man2/dup.2:68
3145 "After a successful return, the old and new file descriptors may be used "
3146 "interchangeably. They refer to the same open file description (see "
3147 "B<open>(2)) and thus share file offset and file status flags; for example, "
3148 "if the file offset is modified by using B<lseek>(2) on one of the "
3149 "descriptors, the offset is also changed for the other."
3153 #: build/C/man2/dup.2:77
3155 "The two descriptors do not share file descriptor flags (the close-on-exec "
3156 "flag). The close-on-exec flag (B<FD_CLOEXEC>; see B<fcntl>(2)) for the "
3157 "duplicate descriptor is off."
3161 #: build/C/man2/dup.2:77
3167 #: build/C/man2/dup.2:88
3169 "The B<dup2>() system call performs the same task as B<dup>(), but instead "
3170 "of using the lowest-numbered unused file descriptor, it uses the descriptor "
3171 "number specified in I<newfd>. If the descriptor I<newfd> was previously "
3172 "open, it is silently closed before being reused."
3176 #: build/C/man2/dup.2:104
3178 "The steps of closing and reusing the file descriptor I<newfd> are performed "
3179 "I<atomically>. This is important, because trying to implement equivalent "
3180 "functionality using B<close>(2) and B<dup>() would be subject to race "
3181 "conditions, whereby I<newfd> might be reused between the two steps. Such "
3182 "reuse could happen because the main program is interrupted by a signal "
3183 "handler that allocates a file descriptor, or because a parallel thread "
3184 "allocates a file descriptor."
3188 #: build/C/man2/dup.2:106
3189 msgid "Note the following points:"
3193 #: build/C/man2/dup.2:112
3195 "If I<oldfd> is not a valid file descriptor, then the call fails, and "
3196 "I<newfd> is not closed."
3200 #: build/C/man2/dup.2:124
3202 "If I<oldfd> is a valid file descriptor, and I<newfd> has the same value as "
3203 "I<oldfd>, then B<dup2>() does nothing, and returns I<newfd>."
3207 #: build/C/man2/dup.2:124
3213 #: build/C/man2/dup.2:129
3214 msgid "B<dup3>() is the same as B<dup2>(), except that:"
3218 #: build/C/man2/dup.2:138
3220 "The caller can force the close-on-exec flag to be set for the new file "
3221 "descriptor by specifying B<O_CLOEXEC> in I<flags>. See the description of "
3222 "the same flag in B<open>(2) for reasons why this may be useful."
3225 #. FIXME . To confirm with Al Viro that this was intended, and its rationale
3227 #: build/C/man2/dup.2:148
3228 msgid "If I<oldfd> equals I<newfd>, then B<dup3>() fails with the error B<EINVAL>."
3232 #: build/C/man2/dup.2:154
3234 "On success, these system calls return the new descriptor. On error, -1 is "
3235 "returned, and I<errno> is set appropriately."
3239 #: build/C/man2/dup.2:159
3240 msgid "I<oldfd> isn't an open file descriptor."
3244 #: build/C/man2/dup.2:166
3246 "I<newfd> is out of the allowed range for file descriptors (see the "
3247 "discussion of B<RLIMIT_NOFILE> in B<getrlimit>(2))."
3251 #: build/C/man2/dup.2:166 build/C/man2/fcntl.2:1503 build/C/man2/fcntl.2:1512 build/C/man2/swapon.2:117
3257 #: build/C/man2/dup.2:176
3259 "(Linux only) This may be returned by B<dup2>() or B<dup3>() during a race "
3260 "condition with B<open>(2) and B<dup>()."
3264 #: build/C/man2/dup.2:184
3266 "The B<dup2>() or B<dup3>() call was interrupted by a signal; see "
3271 #: build/C/man2/dup.2:189
3272 msgid "(B<dup3>()) I<flags> contain an invalid value."
3275 #. FIXME . To confirm with Al Viro that this was intended, and its rationale
3277 #: build/C/man2/dup.2:196
3278 msgid "(B<dup3>()) I<oldfd> was equal to I<newfd>."
3282 #: build/C/man2/dup.2:196 build/C/man2/execve.2:422 build/C/man2/fcntl.2:1607 build/C/man3/getlogin.3:105
3288 #: build/C/man2/dup.2:203
3290 "The process already has the maximum number of file descriptors open and "
3291 "tried to open a new one (see the discussion of B<RLIMIT_NOFILE> in "
3296 #: build/C/man2/dup.2:208
3298 "B<dup3>() was added to Linux in version 2.6.27; glibc support is available "
3299 "starting with version 2.9."
3303 #: build/C/man2/dup.2:212
3304 msgid "B<dup>(), B<dup2>(): SVr4, 4.3BSD, POSIX.1-2001."
3307 #. SVr4 documents additional
3308 #. EINTR and ENOLINK error conditions. POSIX.1 adds EINTR.
3309 #. The EBUSY return is Linux-specific.
3311 #: build/C/man2/dup.2:218
3312 msgid "B<dup3>() is Linux-specific."
3316 #: build/C/man2/dup.2:232
3318 "The error returned by B<dup2>() is different from that returned by "
3319 "B<fcntl(>..., B<F_DUPFD>, ...B<)> when I<newfd> is out of range. On some "
3320 "systems, B<dup2>() also sometimes returns B<EINVAL> like B<F_DUPFD>."
3324 #: build/C/man2/dup.2:248
3326 "If I<newfd> was open, any errors that would have been reported at "
3327 "B<close>(2) time are lost. If this is of concern, then\\(emunless the "
3328 "program is single-threaded and does not allocate file descriptors in signal "
3329 "handlers\\(emthe correct approach is I<not> to close I<newfd> before calling "
3330 "B<dup2>(), because of the race condition described above. Instead, code "
3331 "something like the following could be used:"
3335 #: build/C/man2/dup.2:253
3338 " /* Obtain a duplicate of 'newfd' that can subsequently\n"
3339 " be used to check for close() errors; an EBADF error\n"
3340 " means that 'newfd' was not open. */\n"
3344 #: build/C/man2/dup.2:258
3347 " tmpfd = dup(newfd);\n"
3348 " if (tmpfd == -1 && errno != EBADF) {\n"
3349 " /* Handle unexpected dup() error */\n"
3354 #: build/C/man2/dup.2:260
3356 msgid " /* Atomically duplicate 'oldfd' on 'newfd' */\n"
3360 #: build/C/man2/dup.2:264
3363 " if (dup2(oldfd, newfd) == -1) {\n"
3364 " /* Handle dup2() error */\n"
3369 #: build/C/man2/dup.2:267
3372 " /* Now check for close() errors on the file originally\n"
3373 " referred to by 'newfd' */\n"
3377 #: build/C/man2/dup.2:273
3380 " if (tmpfd != -1) {\n"
3381 " if (close(tmpfd) == -1) {\n"
3382 " /* Handle errors from close */\n"
3388 #: build/C/man2/dup.2:278
3389 msgid "B<close>(2), B<fcntl>(2), B<open>(2)"
3393 #: build/C/man3/encrypt.3:30
3399 #: build/C/man3/encrypt.3:30
3405 #: build/C/man3/encrypt.3:33
3406 msgid "encrypt, setkey, encrypt_r, setkey_r - encrypt 64-bit messages"
3410 #: build/C/man3/encrypt.3:35 build/C/man3/encrypt.3:41
3411 msgid "B<#define _XOPEN_SOURCE> /* See feature_test_macros(7) */"
3415 #: build/C/man3/encrypt.3:39
3416 msgid "B<void encrypt(char >I<block>B<[64], int >I<edflag>B<);>"
3420 #: build/C/man3/encrypt.3:43
3421 msgid "B<#include E<lt>stdlib.hE<gt>>"
3425 #: build/C/man3/encrypt.3:45
3426 msgid "B<void setkey(const char *>I<key>B<);>"
3430 #: build/C/man3/encrypt.3:47 build/C/man3/getumask.3:33
3431 msgid "B<#define _GNU_SOURCE> /* See feature_test_macros(7) */"
3435 #: build/C/man3/encrypt.3:49
3436 msgid "B<#include E<lt>crypt.hE<gt>>"
3440 #: build/C/man3/encrypt.3:51
3441 msgid "B<void setkey_r(const char *>I<key>B<, struct crypt_data *>I<data>B<);>"
3445 #: build/C/man3/encrypt.3:54
3447 "B<void encrypt_r(char *>I<block>B<, int >I<edflag>B<, struct crypt_data "
3452 #: build/C/man3/encrypt.3:56
3453 msgid "Each of these requires linking with I<-lcrypt>."
3457 #: build/C/man3/encrypt.3:68
3459 "These functions encrypt and decrypt 64-bit messages. The B<setkey>() "
3460 "function sets the key used by B<encrypt>(). The I<key> argument used here "
3461 "is an array of 64 bytes, each of which has numerical value 1 or 0. The "
3462 "bytes key[n] where n=8*i-1 are ignored, so that the effective key length is "
3467 #: build/C/man3/encrypt.3:80
3469 "The B<encrypt>() function modifies the passed buffer, encoding if I<edflag> "
3470 "is 0, and decoding if 1 is being passed. Like the I<key> argument, also "
3471 "I<block> is a bit vector representation of the actual value that is "
3472 "encoded. The result is returned in that same vector."
3476 #: build/C/man3/encrypt.3:90
3478 "These two functions are not reentrant, that is, the key data is kept in "
3479 "static storage. The functions B<setkey_r>() and B<encrypt_r>() are the "
3480 "reentrant versions. They use the following structure to hold the key data:"
3484 #: build/C/man3/encrypt.3:105
3487 "struct crypt_data {\n"
3488 " char keysched[16 * 8];\n"
3489 " char sb0[32768];\n"
3490 " char sb1[32768];\n"
3491 " char sb2[32768];\n"
3492 " char sb3[32768];\n"
3493 " char crypt_3_buf[14];\n"
3494 " char current_salt[2];\n"
3495 " long int current_saltbits;\n"
3497 " int initialized;\n"
3502 #: build/C/man3/encrypt.3:113
3503 msgid "Before calling B<setkey_r>() set I<data-E<gt>initialized> to zero."
3507 #: build/C/man3/encrypt.3:115
3508 msgid "These functions do not return any value."
3512 #: build/C/man3/encrypt.3:120
3514 "Set I<errno> to zero before calling the above functions. On success, it is "
3519 #: build/C/man3/encrypt.3:124
3521 "The function is not provided. (For example because of former USA export "
3526 #: build/C/man3/encrypt.3:131
3527 msgid "The B<encrypt>() and B<setkey>() functions are not thread-safe."
3531 #: build/C/man3/encrypt.3:137
3532 msgid "The B<encrypt_r>() and B<setkey_r>() functions are thread-safe."
3536 #: build/C/man3/encrypt.3:148
3538 "The functions B<encrypt>() and B<setkey>() conform to SVr4, SUSv2, and "
3539 "POSIX.1-2001. The functions B<encrypt_r>() and B<setkey_r>() are GNU "
3544 #: build/C/man3/encrypt.3:150
3545 msgid "In glibc 2.2, these functions use the DES algorithm."
3549 #: build/C/man3/encrypt.3:157
3551 "You need to link with libcrypt to compile this example with glibc. To do "
3552 "useful work, the I<key[]> and I<txt[]> arrays must be filled with a useful "
3557 #: build/C/man3/encrypt.3:162
3560 "#define _XOPEN_SOURCE\n"
3561 "#include E<lt>unistd.hE<gt>\n"
3562 "#include E<lt>stdlib.hE<gt>\n"
3566 #: build/C/man3/encrypt.3:168
3572 " char key[64]; /* bit pattern for key */\n"
3573 " char txt[64]; /* bit pattern for messages */\n"
3577 #: build/C/man3/encrypt.3:173
3581 " encrypt(txt, 0); /* encode */\n"
3582 " encrypt(txt, 1); /* decode */\n"
3588 #: build/C/man3/encrypt.3:179
3589 msgid "B<cbc_crypt>(3), B<crypt>(3), B<ecb_crypt>(3),"
3593 #: build/C/man7/environ.7:34
3599 #: build/C/man7/environ.7:37
3600 msgid "environ - user environment"
3604 #: build/C/man7/environ.7:40
3606 msgid "B<extern char **>I<environ>B<;>\n"
3610 #: build/C/man7/environ.7:56
3612 "The variable I<environ> points to an array of pointers to strings called the "
3613 "\"environment\". The last pointer in this array has the value NULL. (This "
3614 "variable must be declared in the user program, but is declared in the header "
3615 "file I<E<lt>unistd.hE<gt>> if the B<_GNU_SOURCE> feature test macro is "
3616 "defined.) This array of strings is made available to the process by the "
3617 "B<exec>(3) call that started the process."
3621 #: build/C/man7/environ.7:61
3623 "By convention the strings in I<environ> have the form "
3624 "\"I<name>B<=>I<value>\". Common examples are:"
3628 #: build/C/man7/environ.7:61
3634 #: build/C/man7/environ.7:64
3635 msgid "The name of the logged-in user (used by some BSD-derived programs)."
3639 #: build/C/man7/environ.7:64
3645 #: build/C/man7/environ.7:67
3646 msgid "The name of the logged-in user (used by some System-V derived programs)."
3650 #: build/C/man7/environ.7:67
3656 #: build/C/man7/environ.7:73
3658 "A user's login directory, set by B<login>(1) from the password file "
3663 #: build/C/man7/environ.7:73
3669 #: build/C/man7/environ.7:91
3671 "The name of a locale to use for locale categories when not overridden by "
3672 "B<LC_ALL> or more specific environment variables such as B<LC_COLLATE>, "
3673 "B<LC_CTYPE>, B<LC_MESSAGES>, B<LC_MONETARY>, B<LC_NUMERIC>, and B<LC_TIME> "
3674 "(see B<locale>(7) for further details of the B<LC_*> environment "
3679 #: build/C/man7/environ.7:91
3685 #: build/C/man7/environ.7:106
3687 "The sequence of directory prefixes that B<sh>(1) and many other programs "
3688 "apply in searching for a file known by an incomplete pathname. The prefixes "
3689 "are separated by \\(aqB<:>\\(aq. (Similarly one has B<CDPATH> used by some "
3690 "shells to find the target of a change directory command, B<MANPATH> used by "
3691 "B<man>(1) to find manual pages, and so on)"
3695 #: build/C/man7/environ.7:106
3701 #: build/C/man7/environ.7:110
3702 msgid "The current working directory. Set by some shells."
3706 #: build/C/man7/environ.7:110
3712 #: build/C/man7/environ.7:113
3713 msgid "The pathname of the user's login shell."
3717 #: build/C/man7/environ.7:113
3723 #: build/C/man7/environ.7:116
3724 msgid "The terminal type for which output is to be prepared."
3728 #: build/C/man7/environ.7:116
3734 #: build/C/man7/environ.7:119
3735 msgid "The user's preferred utility to display text files."
3739 #: build/C/man7/environ.7:119
3741 msgid "B<EDITOR>/B<VISUAL>"
3746 #. The user's preferred utility to browse URLs. Sequence of colon-separated
3747 #. browser commands. See http://www.catb.org/~esr/BROWSER/ .
3749 #: build/C/man7/environ.7:126
3750 msgid "The user's preferred utility to edit text files."
3754 #: build/C/man7/environ.7:144
3756 "Further names may be placed in the environment by the I<export> command and "
3757 "\"name=value\" in B<sh>(1), or by the I<setenv> command if you use "
3758 "B<csh>(1). Arguments may also be placed in the environment at the point of "
3759 "an B<exec>(3). A C program can manipulate its environment using the "
3760 "functions B<getenv>(3), B<putenv>(3), B<setenv>(3), and B<unsetenv>(3)."
3764 #: build/C/man7/environ.7:148
3766 "Note that the behavior of many programs and library routines is influenced "
3767 "by the presence or value of certain environment variables. A random "
3772 #: build/C/man7/environ.7:157
3774 "The variables B<LANG>, B<LANGUAGE>, B<NLSPATH>, B<LOCPATH>, B<LC_ALL>, "
3775 "B<LC_MESSAGES>, and so on influence locale handling; see B<catopen>(3), "
3776 "B<gettext>(3), and B<locale>(7)."
3780 #: build/C/man7/environ.7:164
3782 "B<TMPDIR> influences the path prefix of names created by B<tmpnam>(3) and "
3783 "other routines, and the temporary directory used by B<sort>(1) and other "
3788 #: build/C/man7/environ.7:168
3790 "B<LD_LIBRARY_PATH>, B<LD_PRELOAD> and other LD_* variables influence the "
3791 "behavior of the dynamic loader/linker."
3795 #: build/C/man7/environ.7:172
3797 "B<POSIXLY_CORRECT> makes certain programs and library routines follow the "
3798 "prescriptions of POSIX."
3802 #: build/C/man7/environ.7:178
3803 msgid "The behavior of B<malloc>(3) is influenced by B<MALLOC_*> variables."
3807 #: build/C/man7/environ.7:184
3809 "The variable B<HOSTALIASES> gives the name of a file containing aliases to "
3810 "be used with B<gethostbyname>(3)."
3814 #: build/C/man7/environ.7:195
3816 "B<TZ> and B<TZDIR> give timezone information used by B<tzset>(3) and "
3817 "through that by functions like B<ctime>(3), B<localtime>(3), B<mktime>(3), "
3818 "B<strftime>(3). See also B<tzselect>(8)."
3822 #: build/C/man7/environ.7:199
3824 "B<TERMCAP> gives information on how to address a given terminal (or gives "
3825 "the name of a file containing such information)."
3829 #: build/C/man7/environ.7:202
3831 "B<COLUMNS> and B<LINES> tell applications about the window size, possibly "
3832 "overriding the actual size."
3836 #: build/C/man7/environ.7:207
3838 "B<PRINTER> or B<LPDEST> may specify the desired printer to use. See "
3843 #: build/C/man7/environ.7:209
3848 #: build/C/man7/environ.7:214
3850 "Clearly there is a security risk here. Many a system command has been "
3851 "tricked into mischief by a user who specified unusual values for B<IFS> or "
3852 "B<LD_LIBRARY_PATH>."
3856 #: build/C/man7/environ.7:247
3858 "There is also the risk of name space pollution. Programs like I<make> and "
3859 "I<autoconf> allow overriding of default utility names from the environment "
3860 "with similarly named variables in all caps. Thus one uses B<CC> to select "
3861 "the desired C compiler (and similarly B<MAKE>, B<AR>, B<AS>, B<FC>, B<LD>, "
3862 "B<LEX>, B<RM>, B<YACC>, etc.). However, in some traditional uses such an "
3863 "environment variable gives options for the program instead of a pathname. "
3864 "Thus, one has B<MORE>, B<LESS>, and B<GZIP>. Such usage is considered "
3865 "mistaken, and to be avoided in new programs. The authors of I<gzip> should "
3866 "consider renaming their option to B<GZIP_OPT>."
3870 #: build/C/man7/environ.7:264
3872 "B<env>(1), B<bash>(1), B<csh>(1), B<login>(1), B<printenv>(1), B<sh>(1), "
3873 "B<tcsh>(1), B<execve>(2), B<clearenv>(3), B<exec>(3), B<getenv>(3), "
3874 "B<putenv>(3), B<setenv>(3), B<unsetenv>(3), B<locale>(7), B<ld.so>(8)"
3878 #: build/C/man3/euidaccess.3:25
3884 #: build/C/man3/euidaccess.3:25
3890 #: build/C/man3/euidaccess.3:28
3891 msgid "euidaccess, eaccess - check effective user's permissions for a file"
3895 #: build/C/man3/euidaccess.3:32
3898 "B<#define _GNU_SOURCE> /* See feature_test_macros(7) */\n"
3899 "B<#include E<lt>unistd.hE<gt>>\n"
3903 #: build/C/man3/euidaccess.3:35
3906 "B<int euidaccess(const char *>I<pathname>B<, int >I<mode>B<);>\n"
3907 "B<int eaccess(const char *>I<pathname>B<, int >I<mode>B<);>\n"
3911 #: build/C/man3/euidaccess.3:47
3913 "Like B<access>(2), B<euidaccess>() checks permissions and existence of the "
3914 "file identified by its argument I<pathname>. However, whereas B<access>(2) "
3915 "performs checks using the real user and group identifiers of the process, "
3916 "B<euidaccess>() uses the effective identifiers."
3920 #: build/C/man3/euidaccess.3:53
3922 "I<mode> is a mask consisting of one or more of B<R_OK>, B<W_OK>, B<X_OK>, "
3923 "and B<F_OK>, with the same meanings as for B<access>(2)."
3927 #: build/C/man3/euidaccess.3:58
3929 "B<eaccess>() is a synonym for B<euidaccess>(), provided for compatibility "
3930 "with some other systems."
3934 #: build/C/man3/euidaccess.3:66
3936 "On success (all requested permissions granted), zero is returned. On error "
3937 "(at least one bit in I<mode> asked for a permission that is denied, or some "
3938 "other error occurred), -1 is returned, and I<errno> is set appropriately."
3942 #: build/C/man3/euidaccess.3:69
3943 msgid "As for B<access>(2)."
3947 #: build/C/man3/euidaccess.3:73
3948 msgid "The B<eaccess>() function was added to glibc in version 2.4."
3952 #: build/C/man3/euidaccess.3:80
3953 msgid "The B<euidaccess>() and B<eaccess>() functions are thread-safe."
3956 #. e.g., FreeBSD 6.1.
3958 #: build/C/man3/euidaccess.3:86
3960 "These functions are nonstandard. Some other systems have an B<eaccess>() "
3965 #: build/C/man3/euidaccess.3:93
3967 "I<Warning>: Using this function to check a process's permissions on a file "
3968 "before performing some operation based on that information leads to race "
3969 "conditions: the file permissions may change between the two steps. "
3970 "Generally, it is safer just to attempt the desired operation and handle any "
3971 "permission error that occurs."
3975 #: build/C/man3/euidaccess.3:101
3977 "This function always dereferences symbolic links. If you need to check the "
3978 "permissions on a symbolic link, use B<faccessat>(2) with the flags "
3979 "B<AT_EACCESS> and B<AT_SYMLINK_NOFOLLOW>."
3983 #: build/C/man3/euidaccess.3:112
3985 "B<access>(2), B<chmod>(2), B<chown>(2), B<faccessat>(2), B<open>(2), "
3986 "B<setgid>(2), B<setuid>(2), B<stat>(2), B<credentials>(7), "
3987 "B<path_resolution>(7)"
3991 #: build/C/man3/exec.3:41
3997 #: build/C/man3/exec.3:44
3998 msgid "execl, execlp, execle, execv, execvp, execvpe - execute a file"
4002 #: build/C/man3/exec.3:48
4003 msgid "B<extern char **environ;>"
4007 #: build/C/man3/exec.3:50
4008 msgid "B<int execl(const char *>I<path>B<, const char *>I<arg>B<, ...);>"
4012 #: build/C/man3/exec.3:52
4013 msgid "B<int execlp(const char *>I<file>B<, const char *>I<arg>B<, ...);>"
4017 #: build/C/man3/exec.3:54
4018 msgid "B<int execle(const char *>I<path>B<, const char *>I<arg>B<,>"
4022 #: build/C/man3/exec.3:56
4023 msgid "B< ..., char * const >I<envp>B<[]);>"
4027 #: build/C/man3/exec.3:58
4028 msgid "B<int execv(const char *>I<path>B<, char *const >I<argv>B<[]);>"
4032 #: build/C/man3/exec.3:60
4033 msgid "B<int execvp(const char *>I<file>B<, char *const >I<argv>B<[]);>"
4037 #: build/C/man3/exec.3:62
4038 msgid "B<int execvpe(const char *>I<file>B<, char *const >I<argv>B<[],>"
4042 #: build/C/man3/exec.3:64 build/C/man2/execve.2:46
4043 msgid "B< char *const >I<envp>B<[]);>"
4047 #: build/C/man3/exec.3:72
4048 msgid "B<execvpe>(): _GNU_SOURCE"
4052 #: build/C/man3/exec.3:82
4054 "The B<exec>() family of functions replaces the current process image with a "
4055 "new process image. The functions described in this manual page are "
4056 "front-ends for B<execve>(2). (See the manual page for B<execve>(2) for "
4057 "further details about the replacement of the current process image.)"
4061 #: build/C/man3/exec.3:85
4063 "The initial argument for these functions is the name of a file that is to be "
4068 #: build/C/man3/exec.3:107
4070 "The I<const char\\ *arg> and subsequent ellipses in the B<execl>(), "
4071 "B<execlp>(), and B<execle>() functions can be thought of as I<arg0>, "
4072 "I<arg1>, \\&..., I<argn>. Together they describe a list of one or more "
4073 "pointers to null-terminated strings that represent the argument list "
4074 "available to the executed program. The first argument, by convention, "
4075 "should point to the filename associated with the file being executed. The "
4076 "list of arguments I<must> be terminated by a null pointer, and, since these "
4077 "are variadic functions, this pointer must be cast I<(char\\ *) NULL>."
4081 #: build/C/man3/exec.3:120
4083 "The B<execv>(), B<execvp>(), and B<execvpe>() functions provide an array of "
4084 "pointers to null-terminated strings that represent the argument list "
4085 "available to the new program. The first argument, by convention, should "
4086 "point to the filename associated with the file being executed. The array of "
4087 "pointers I<must> be terminated by a null pointer."
4091 #: build/C/man3/exec.3:137
4093 "The B<execle>() and B<execvpe>() functions allow the caller to specify the "
4094 "environment of the executed program via the argument I<envp>. The I<envp> "
4095 "argument is an array of pointers to null-terminated strings and I<must> be "
4096 "terminated by a null pointer. The other functions take the environment for "
4097 "the new process image from the external variable I<environ> in the calling "
4102 #: build/C/man3/exec.3:137
4104 msgid "Special semantics for execlp() and execvp()"
4108 #: build/C/man3/exec.3:157
4110 "The B<execlp>(), B<execvp>(), and B<execvpe>() functions duplicate the "
4111 "actions of the shell in searching for an executable file if the specified "
4112 "filename does not contain a slash (/) character. The file is sought in the "
4113 "colon-separated list of directory pathnames specified in the B<PATH> "
4114 "environment variable. If this variable isn't defined, the path list "
4115 "defaults to the current directory followed by the list of directories "
4116 "returned by I<confstr(_CS_PATH)>. (This B<confstr>(3) call typically "
4117 "returns the value \"/bin:/usr/bin\".)"
4121 #: build/C/man3/exec.3:161
4123 "If the specified filename includes a slash character, then B<PATH> is "
4124 "ignored, and the file at the specified pathname is executed."
4128 #: build/C/man3/exec.3:163
4129 msgid "In addition, certain errors are treated specially."
4133 #: build/C/man3/exec.3:174
4135 "If permission is denied for a file (the attempted B<execve>(2) failed with "
4136 "the error B<EACCES>), these functions will continue searching the rest of "
4137 "the search path. If no other file is found, however, they will return with "
4138 "I<errno> set to B<EACCES>."
4142 #: build/C/man3/exec.3:183
4144 "If the header of a file isn't recognized (the attempted B<execve>(2) failed "
4145 "with the error B<ENOEXEC>), these functions will execute the shell "
4146 "(I</bin/sh>) with the path of the file as its first argument. (If this "
4147 "attempt fails, no further searching is done.)"
4151 #: build/C/man3/exec.3:190
4153 "The B<exec>() functions return only if an error has occurred. The return "
4154 "value is -1, and I<errno> is set to indicate the error."
4158 #: build/C/man3/exec.3:195
4160 "All of these functions may fail and set I<errno> for any of the errors "
4161 "specified for B<execve>(2)."
4165 #: build/C/man3/exec.3:199
4166 msgid "The B<execvpe>() function first appeared in glibc 2.11."
4170 #: build/C/man3/exec.3:201
4171 msgid "POSIX.1-2001, POSIX.1-2008."
4175 #: build/C/man3/exec.3:205
4176 msgid "The B<execvpe>() function is a GNU extension."
4180 #: build/C/man3/exec.3:215
4182 "On some other systems, the default path (used when the environment does not "
4183 "contain the variable B<PATH>) has the current working directory listed after "
4184 "I</bin> and I</usr/bin>, as an anti-Trojan-horse measure. Linux uses here "
4185 "the traditional \"current directory first\" default path."
4189 #: build/C/man3/exec.3:229
4191 "The behavior of B<execlp>() and B<execvp>() when errors occur while "
4192 "attempting to execute the file is historic practice, but has not "
4193 "traditionally been documented and is not specified by the POSIX standard. "
4194 "BSD (and possibly other systems) do an automatic sleep and retry if "
4195 "B<ETXTBSY> is encountered. Linux treats it as a hard error and returns "
4200 #: build/C/man3/exec.3:241
4202 "Traditionally, the functions B<execlp>() and B<execvp>() ignored all "
4203 "errors except for the ones described above and B<ENOMEM> and B<E2BIG>, upon "
4204 "which they returned. They now return if any error other than the ones "
4205 "described above occurs."
4209 #: build/C/man3/exec.3:249
4211 "B<sh>(1), B<execve>(2), B<execveat>(2), B<fork>(2), B<ptrace>(2), "
4212 "B<fexecve>(3), B<environ>(7)"
4216 #: build/C/man2/execve.2:37
4222 #: build/C/man2/execve.2:40
4223 msgid "execve - execute program"
4227 #: build/C/man2/execve.2:44
4228 msgid "B<int execve(const char *>I<filename>B<, char *const >I<argv>B<[], >"
4232 #: build/C/man2/execve.2:51
4234 "B<execve>() executes the program pointed to by I<filename>. I<filename> "
4235 "must be either a binary executable, or a script starting with a line of the "
4240 #: build/C/man2/execve.2:55 build/C/man2/execve.2:265
4242 msgid "B<#!> I<interpreter >[optional-arg]\n"
4246 #: build/C/man2/execve.2:59
4247 msgid "For details of the latter case, see \"Interpreter scripts\" below."
4251 #: build/C/man2/execve.2:68
4253 "I<argv> is an array of argument strings passed to the new program. By "
4254 "convention, the first of these strings should contain the filename "
4255 "associated with the file being executed. I<envp> is an array of strings, "
4256 "conventionally of the form B<key=value>, which are passed as environment to "
4257 "the new program. Both I<argv> and I<envp> must be terminated by a null "
4258 "pointer. The argument vector and environment can be accessed by the called "
4259 "program's main function, when it is defined as:"
4263 #: build/C/man2/execve.2:72
4265 msgid "int main(int argc, char *argv[], char *envp[])\n"
4269 #: build/C/man2/execve.2:79
4271 "B<execve>() does not return on success, and the text, data, bss, and stack "
4272 "of the calling process are overwritten by that of the program loaded."
4276 #: build/C/man2/execve.2:83
4278 "If the current program is being ptraced, a B<SIGTRAP> is sent to it after a "
4279 "successful B<execve>()."
4283 #: build/C/man2/execve.2:98
4285 "If the set-user-ID bit is set on the program file pointed to by I<filename>, "
4286 "and the underlying filesystem is not mounted I<nosuid> (the B<MS_NOSUID> "
4287 "flag for B<mount>(2)), and the calling process is not being ptraced, then "
4288 "the effective user ID of the calling process is changed to that of the owner "
4289 "of the program file. Similarly, when the set-group-ID bit of the program "
4290 "file is set the effective group ID of the calling process is set to the "
4291 "group of the program file."
4295 #: build/C/man2/execve.2:103
4297 "The effective user ID of the process is copied to the saved set-user-ID; "
4298 "similarly, the effective group ID is copied to the saved set-group-ID. This "
4299 "copying takes place after any effective ID changes that occur because of the "
4300 "set-user-ID and set-group-ID permission bits."
4304 #: build/C/man2/execve.2:111
4306 "If the executable is an a.out dynamically linked binary executable "
4307 "containing shared-library stubs, the Linux dynamic linker B<ld.so>(8) is "
4308 "called at the start of execution to bring needed shared libraries into "
4309 "memory and link the executable with them."
4313 #: build/C/man2/execve.2:118
4315 "If the executable is a dynamically linked ELF executable, the interpreter "
4316 "named in the PT_INTERP segment is used to load the needed shared libraries. "
4317 "This interpreter is typically I</lib/ld-linux.so.2> for binaries linked with "
4322 #: build/C/man2/execve.2:122
4324 "All process attributes are preserved during an B<execve>(), except the "
4329 #: build/C/man2/execve.2:126
4331 "The dispositions of any signals that are being caught are reset to the "
4332 "default (B<signal>(7))."
4336 #: build/C/man2/execve.2:129
4337 msgid "Any alternate signal stack is not preserved (B<sigaltstack>(2))."
4341 #: build/C/man2/execve.2:132
4342 msgid "Memory mappings are not preserved (B<mmap>(2))."
4346 #: build/C/man2/execve.2:135
4347 msgid "Attached System\\ V shared memory segments are detached (B<shmat>(2))."
4351 #: build/C/man2/execve.2:138
4352 msgid "POSIX shared memory regions are unmapped (B<shm_open>(3))."
4356 #: build/C/man2/execve.2:141
4357 msgid "Open POSIX message queue descriptors are closed (B<mq_overview>(7))."
4361 #: build/C/man2/execve.2:144
4362 msgid "Any open POSIX named semaphores are closed (B<sem_overview>(7))."
4366 #: build/C/man2/execve.2:147
4367 msgid "POSIX timers are not preserved (B<timer_create>(2))."
4371 #: build/C/man2/execve.2:150
4372 msgid "Any open directory streams are closed (B<opendir>(3))."
4376 #: build/C/man2/execve.2:154
4377 msgid "Memory locks are not preserved (B<mlock>(2), B<mlockall>(2))."
4381 #: build/C/man2/execve.2:158
4382 msgid "Exit handlers are not preserved (B<atexit>(3), B<on_exit>(3))."
4386 #: build/C/man2/execve.2:161
4387 msgid "The floating-point environment is reset to the default (see B<fenv>(3))."
4391 #: build/C/man2/execve.2:167
4393 "The process attributes in the preceding list are all specified in "
4394 "POSIX.1-2001. The following Linux-specific process attributes are also not "
4395 "preserved during an B<execve>():"
4399 #: build/C/man2/execve.2:174
4401 "The B<prctl>(2) B<PR_SET_DUMPABLE> flag is set, unless a set-user-ID or "
4402 "set-group ID program is being executed, in which case it is cleared."
4406 #: build/C/man2/execve.2:179
4407 msgid "The B<prctl>(2) B<PR_SET_KEEPCAPS> flag is cleared."
4411 #: build/C/man2/execve.2:186
4413 "(Since Linux 2.4.36 / 2.6.23) If a set-user-ID or set-group-ID program is "
4414 "being executed, then the parent death signal set by B<prctl>(2) "
4415 "B<PR_SET_PDEATHSIG> flag is cleared."
4419 #: build/C/man2/execve.2:193
4421 "The process name, as set by B<prctl>(2) B<PR_SET_NAME> (and displayed by "
4422 "I<ps\\ -o comm>), is reset to the name of the new executable file."
4426 #: build/C/man2/execve.2:200
4428 "The B<SECBIT_KEEP_CAPS> I<securebits> flag is cleared. See "
4429 "B<capabilities>(7)."
4433 #: build/C/man2/execve.2:205
4434 msgid "The termination signal is reset to B<SIGCHLD> (see B<clone>(2))."
4438 #: build/C/man2/execve.2:207 build/C/man2/fork.2:138
4439 msgid "Note the following further points:"
4443 #: build/C/man2/execve.2:211
4445 "All threads other than the calling thread are destroyed during an "
4446 "B<execve>(). Mutexes, condition variables, and other pthreads objects are "
4451 #: build/C/man2/execve.2:214
4453 "The equivalent of I<setlocale(LC_ALL, \"C\")> is executed at program "
4458 #: build/C/man2/execve.2:222
4460 "POSIX.1-2001 specifies that the dispositions of any signals that are ignored "
4461 "or set to the default are left unchanged. POSIX.1-2001 specifies one "
4462 "exception: if B<SIGCHLD> is being ignored, then an implementation may leave "
4463 "the disposition unchanged or reset it to the default; Linux does the former."
4467 #: build/C/man2/execve.2:226
4469 "Any outstanding asynchronous I/O operations are canceled (B<aio_read>(3), "
4474 #: build/C/man2/execve.2:231
4475 msgid "For the handling of capabilities during B<execve>(), see B<capabilities>(7)."
4478 #. On Linux it appears that these file descriptors are
4479 #. always open after an execve(), and it looks like
4480 #. Solaris 8 and FreeBSD 6.1 are the same. -- mtk, 30 Apr 2007
4482 #: build/C/man2/execve.2:258
4484 "By default, file descriptors remain open across an B<execve>(). File "
4485 "descriptors that are marked close-on-exec are closed; see the description of "
4486 "B<FD_CLOEXEC> in B<fcntl>(2). (If a file descriptor is closed, this will "
4487 "cause the release of all record locks obtained on the underlying file by "
4488 "this process. See B<fcntl>(2) for details.) POSIX.1-2001 says that if "
4489 "file descriptors 0, 1, and 2 would otherwise be closed after a successful "
4490 "B<execve>(), and the process would gain privilege because the set-user_ID or "
4491 "set-group_ID permission bit was set on the executed file, then the system "
4492 "may open an unspecified file for each of these file descriptors. As a "
4493 "general principle, no portable program, whether privileged or not, can "
4494 "assume that these three file descriptors will remain closed across an "
4499 #: build/C/man2/execve.2:258 build/C/man2/execve.2:528
4501 msgid "Interpreter scripts"
4505 #: build/C/man2/execve.2:261
4507 "An interpreter script is a text file that has execute permission enabled and "
4508 "whose first line is of the form:"
4512 #: build/C/man2/execve.2:279
4514 "The I<interpreter> must be a valid pathname for an executable which is not "
4515 "itself a script. If the I<filename> argument of B<execve>() specifies an "
4516 "interpreter script, then I<interpreter> will be invoked with the following "
4521 #: build/C/man2/execve.2:283
4523 msgid "I<interpreter> [optional-arg] I<filename> arg...\n"
4527 #: build/C/man2/execve.2:294
4529 "where I<arg...> is the series of words pointed to by the I<argv> argument of "
4530 "B<execve>(), starting at I<argv>[1]."
4534 #: build/C/man2/execve.2:299
4536 "For portable use, I<optional-arg> should either be absent, or be specified "
4537 "as a single word (i.e., it should not contain white space); see NOTES below."
4541 #: build/C/man2/execve.2:299
4543 msgid "Limits on size of arguments and environment"
4547 #: build/C/man2/execve.2:312
4549 "Most UNIX implementations impose some limit on the total size of the "
4550 "command-line argument (I<argv>) and environment (I<envp>) strings that may "
4551 "be passed to a new program. POSIX.1 allows an implementation to advertise "
4552 "this limit using the B<ARG_MAX> constant (either defined in "
4553 "I<E<lt>limits.hE<gt>> or available at run time using the call "
4554 "I<sysconf(_SC_ARG_MAX)>)."
4558 #: build/C/man2/execve.2:319
4560 "On Linux prior to kernel 2.6.23, the memory used to store the environment "
4561 "and argument strings was limited to 32 pages (defined by the kernel constant "
4562 "B<MAX_ARG_PAGES>). On architectures with a 4-kB page size, this yields a "
4563 "maximum size of 128 kB."
4566 #. For some background on the changes to ARG_MAX in kernels 2.6.23 and
4568 #. http://sourceware.org/bugzilla/show_bug.cgi?id=5786
4569 #. http://bugzilla.kernel.org/show_bug.cgi?id=10095
4570 #. http://thread.gmane.org/gmane.linux.kernel/646709/focus=648101,
4571 #. checked into 2.6.25 as commit a64e715fc74b1a7dcc5944f848acc38b2c4d4ee2.
4572 #. Ollie: That doesn't include the lists of pointers, though,
4573 #. so the actual usage is a bit higher (1 pointer per argument).
4575 #: build/C/man2/execve.2:355
4577 "On kernel 2.6.23 and later, most architectures support a size limit derived "
4578 "from the soft B<RLIMIT_STACK> resource limit (see B<getrlimit>(2)) that is "
4579 "in force at the time of the B<execve>() call. (Architectures with no "
4580 "memory management unit are excepted: they maintain the limit that was in "
4581 "effect before kernel 2.6.23.) This change allows programs to have a much "
4582 "larger argument and/or environment list. For these architectures, the total "
4583 "size is limited to 1/4 of the allowed stack size. (Imposing the 1/4-limit "
4584 "ensures that the new program always has some stack space.) Since Linux "
4585 "2.6.25, the kernel places a floor of 32 pages on this size limit, so that, "
4586 "even when B<RLIMIT_STACK> is set very low, applications are guaranteed to "
4587 "have at least as much argument and environment space as was provided by "
4588 "Linux 2.6.23 and earlier. (This guarantee was not provided in Linux 2.6.23 "
4589 "and 2.6.24.) Additionally, the limit per string is 32 pages (the kernel "
4590 "constant B<MAX_ARG_STRLEN>), and the maximum number of strings is "
4595 #: build/C/man2/execve.2:361
4597 "On success, B<execve>() does not return, on error -1 is returned, and "
4598 "I<errno> is set appropriately."
4602 #: build/C/man2/execve.2:362
4608 #: build/C/man2/execve.2:369
4610 "The total number of bytes in the environment (I<envp>) and argument list "
4611 "(I<argv>) is too large."
4615 #: build/C/man2/execve.2:376
4617 "Search permission is denied on a component of the path prefix of I<filename> "
4618 "or the name of a script interpreter. (See also B<path_resolution>(7).)"
4622 #: build/C/man2/execve.2:379
4623 msgid "The file or a script interpreter is not a regular file."
4627 #: build/C/man2/execve.2:382
4628 msgid "Execute permission is denied for the file or a script or ELF interpreter."
4632 #: build/C/man2/execve.2:386
4633 msgid "The filesystem is mounted I<noexec>."
4637 #: build/C/man2/execve.2:386
4639 msgid "B<EAGAIN> (since Linux 3.1)"
4642 #. commit 72fa59970f8698023045ab0713d66f3f4f96945c
4644 #: build/C/man2/execve.2:396
4646 "Having changed its real UID using one of the B<set*uid>() calls, the caller "
4647 "was\\(emand is now still\\(emabove its B<RLIMIT_NPROC> resource limit (see "
4648 "B<setrlimit>(2)). For a more detailed explanation of this error, see NOTES."
4652 #: build/C/man2/execve.2:404
4654 "I<filename> or one of the pointers in the vectors I<argv> or I<envp> points "
4655 "outside your accessible address space."
4659 #: build/C/man2/execve.2:408
4661 "An ELF executable had more than one PT_INTERP segment (i.e., tried to name "
4662 "more than one interpreter)."
4666 #: build/C/man2/execve.2:411 build/C/man2/truncate.2:149
4672 #: build/C/man2/execve.2:414
4673 msgid "An ELF interpreter was a directory."
4677 #: build/C/man2/execve.2:414
4683 #: build/C/man2/execve.2:417
4684 msgid "An ELF interpreter was not in a recognized format."
4688 #: build/C/man2/execve.2:422
4690 "Too many symbolic links were encountered in resolving I<filename> or the "
4691 "name of a script or ELF interpreter."
4695 #: build/C/man2/execve.2:425
4696 msgid "The process has the maximum number of files open."
4700 #: build/C/man2/execve.2:429
4701 msgid "I<filename> is too long."
4705 #: build/C/man2/execve.2:429 build/C/man3/getlogin.3:108 build/C/man2/swapon.2:144 build/C/man2/uselib.2:67
4711 #: build/C/man2/execve.2:432 build/C/man2/swapon.2:147 build/C/man2/uselib.2:70
4712 msgid "The system limit on the total number of open files has been reached."
4716 #: build/C/man2/execve.2:438
4718 "The file I<filename> or a script or ELF interpreter does not exist, or a "
4719 "shared library needed for file or interpreter cannot be found."
4723 #: build/C/man2/execve.2:438 build/C/man2/uselib.2:70
4729 #: build/C/man2/execve.2:443
4731 "An executable is not in a recognized format, is for the wrong architecture, "
4732 "or has some other format error that means it cannot be executed."
4736 #: build/C/man2/execve.2:451
4738 "A component of the path prefix of I<filename> or a script or ELF interpreter "
4739 "is not a directory."
4743 #: build/C/man2/execve.2:457
4745 "The filesystem is mounted I<nosuid>, the user is not the superuser, and the "
4746 "file has the set-user-ID or set-group-ID bit set."
4750 #: build/C/man2/execve.2:461
4752 "The process is being traced, the user is not the superuser and the file has "
4753 "the set-user-ID or set-group-ID bit set."
4757 #: build/C/man2/execve.2:464
4758 msgid "Executable was open for writing by one or more processes."
4761 #. SVr4 documents additional error
4762 #. conditions EAGAIN, EINTR, ELIBACC, ENOLINK, EMULTIHOP; POSIX does not
4763 #. document ETXTBSY, EPERM, EFAULT, ELOOP, EIO, ENFILE, EMFILE, EINVAL,
4764 #. EISDIR or ELIBBAD error conditions.
4766 #: build/C/man2/execve.2:472
4768 "SVr4, 4.3BSD, POSIX.1-2001. POSIX.1-2001 does not document the #! behavior "
4769 "but is otherwise compatible."
4773 #: build/C/man2/execve.2:475
4774 msgid "Set-user-ID and set-group-ID processes can not be B<ptrace>(2)d."
4777 #. e.g., EFAULT on Solaris 8 and FreeBSD 6.1; but
4778 #. HP-UX 11 is like Linux -- mtk, Apr 2007
4779 #. Bug filed 30 Apr 2007: http://bugzilla.kernel.org/show_bug.cgi?id=8408
4780 #. Bug rejected (because fix would constitute an ABI change).
4782 #: build/C/man2/execve.2:502
4784 "The result of mounting a filesystem I<nosuid> varies across Linux kernel "
4785 "versions: some will refuse execution of set-user-ID and set-group-ID "
4786 "executables when this would give the user powers she did not have already "
4787 "(and return B<EPERM>), some will just ignore the set-user-ID and "
4788 "set-group-ID bits and B<exec>() successfully. On Linux, I<argv> and "
4789 "I<envp> can be specified as NULL. In both cases, this has the same effect "
4790 "as specifying the argument as a pointer to a list containing a single null "
4791 "pointer. B<Do not take advantage of this misfeature!> It is nonstandard and "
4792 "nonportable: on most other UNIX systems doing this will result in an error "
4797 #: build/C/man2/execve.2:513
4799 "POSIX.1-2001 says that values returned by B<sysconf>(3) should be invariant "
4800 "over the lifetime of a process. However, since Linux 2.6.23, if the "
4801 "B<RLIMIT_STACK> resource limit changes, then the value reported by "
4802 "B<_SC_ARG_MAX> will also change, to reflect the fact that the limit on space "
4803 "for holding command-line arguments and environment variables has changed."
4807 #: build/C/man2/execve.2:528
4809 "In most cases where B<execve>() fails, control returns to the original "
4810 "executable image, and the caller of B<execve>() can then handle the error. "
4811 "However, in (rare) cases (typically caused by resource exhaustion), failure "
4812 "may occur past the point of no return: the original executable image has "
4813 "been torn down, but the new image could not be completely built. In such "
4814 "cases, the kernel kills the process with a B<SIGKILL> signal."
4818 #: build/C/man2/execve.2:531
4820 "A maximum line length of 127 characters is allowed for the first line in an "
4821 "interpreter scripts."
4825 #. e.g., FreeBSD before 6.0, but not FreeBSD 6.0 onward
4827 #: build/C/man2/execve.2:550
4829 "The semantics of the I<optional-arg> argument of an interpreter script vary "
4830 "across implementations. On Linux, the entire string following the "
4831 "I<interpreter> name is passed as a single argument to the interpreter, and "
4832 "this string can include white space. However, behavior differs on some "
4833 "other systems. Some systems use the first white space to terminate "
4834 "I<optional-arg>. On some systems, an interpreter script can have multiple "
4835 "arguments, and white spaces in I<optional-arg> are used to delimit the "
4841 #. Some Linux versions have failed to check permissions on ELF
4842 #. interpreters. This is a security hole, because it allows users to
4843 #. open any file, such as a rewinding tape device, for reading. Some
4844 #. Linux versions have also had other security holes in
4846 #. that could be exploited for denial of service by a suitably crafted
4847 #. ELF binary. There are no known problems with 2.0.34 or 2.2.15.
4849 #: build/C/man2/execve.2:561
4850 msgid "Linux ignores the set-user-ID and set-group-ID bits on scripts."
4854 #: build/C/man2/execve.2:561
4856 msgid "execve() and EAGAIN"
4860 #: build/C/man2/execve.2:567
4862 "A more detailed explanation of the B<EAGAIN> error that can occur (since "
4863 "Linux 3.1) when calling B<execve>() is as follows."
4866 #. commit 909cc4ae86f3380152a18e2a3c44523893ee11c4
4868 #: build/C/man2/execve.2:589
4870 "The B<EAGAIN> error can occur when a I<preceding> call to B<setuid>(2), "
4871 "B<setreuid>(2), or B<setresuid>(2) caused the real user ID of the process "
4872 "to change, and that change caused the process to exceed its B<RLIMIT_NPROC> "
4873 "resource limit (i.e., the number of processes belonging to the new real UID "
4874 "exceeds the resource limit). From Linux 2.6.0 to 3.0, this caused the "
4875 "B<set*uid>() call to fail. (Prior to 2.6, the resource limit was not "
4876 "imposed on processes that changed their user IDs.)"
4880 #: build/C/man2/execve.2:620
4882 "Since Linux 3.1, the scenario just described no longer causes the "
4883 "B<set*uid>() call to fail, because it too often led to security holes where "
4884 "buggy applications didn't check the return status and assumed that\\(emif "
4885 "the caller had root privileges\\(emthe call would always succeed. Instead, "
4886 "the B<set*uid>() calls now successfully change the real UID, but the kernel "
4887 "sets an internal flag, named B<PF_NPROC_EXCEEDED>, to note that the "
4888 "B<RLIMIT_NPROC> resource limit has been exceeded. If the "
4889 "B<PF_NPROC_EXCEEDED> flag is set and the resource limit is still exceeded at "
4890 "the time of a subsequent B<execve>() call, that call fails with the error "
4891 "B<EAGAIN>. This kernel logic ensures that the B<RLIMIT_NPROC> resource "
4892 "limit is still enforced for the common privileged daemon "
4893 "workflow\\(emnamely, B<fork>(2) + B<set*uid>() + B<execve>()."
4897 #: build/C/man2/execve.2:636
4899 "If the resource limit was not still exceeded at the time of the B<execve>() "
4900 "call (because other processes belonging to this real UID terminated between "
4901 "the B<set*uid>() call and the B<execve>() call), then the B<execve>() "
4902 "call succeeds and the kernel clears the B<PF_NPROC_EXCEEDED> process flag. "
4903 "The flag is also cleared if a subsequent call to B<fork>(2) by this process "
4908 #: build/C/man2/execve.2:636
4915 #. Some Linux versions have failed to check permissions on ELF
4916 #. interpreters. This is a security hole, because it allows users to
4917 #. open any file, such as a rewinding tape device, for reading. Some
4918 #. Linux versions have also had other security holes in
4920 #. that could be exploited for denial of service by a suitably crafted
4921 #. ELF binary. There are no known problems with 2.0.34 or 2.2.15.
4923 #: build/C/man2/execve.2:656
4925 "With UNIX\\ V6, the argument list of an B<exec>() call was ended by 0, "
4926 "while the argument list of I<main> was ended by -1. Thus, this argument "
4927 "list was not directly usable in a further B<exec>() call. Since UNIX\\ V7, "
4932 #: build/C/man2/execve.2:659
4934 "The following program is designed to be execed by the second program below. "
4935 "It just echoes its command-line arguments, one per line."
4939 #: build/C/man2/execve.2:663
4941 msgid "/* myecho.c */\n"
4945 #: build/C/man2/execve.2:666
4948 "#include E<lt>stdio.hE<gt>\n"
4949 "#include E<lt>stdlib.hE<gt>\n"
4953 #: build/C/man2/execve.2:671
4957 "main(int argc, char *argv[])\n"
4963 #: build/C/man2/execve.2:674
4966 " for (j = 0; j E<lt> argc; j++)\n"
4967 " printf(\"argv[%d]: %s\\en\", j, argv[j]);\n"
4971 #: build/C/man2/execve.2:682
4973 "This program can be used to exec the program named in its command-line "
4978 #: build/C/man2/execve.2:686
4980 msgid "/* execve.c */\n"
4984 #: build/C/man2/execve.2:690
4987 "#include E<lt>stdio.hE<gt>\n"
4988 "#include E<lt>stdlib.hE<gt>\n"
4989 "#include E<lt>unistd.hE<gt>\n"
4993 #: build/C/man2/execve.2:696
4997 "main(int argc, char *argv[])\n"
4999 " char *newargv[] = { NULL, \"hello\", \"world\", NULL };\n"
5000 " char *newenviron[] = { NULL };\n"
5004 #: build/C/man2/execve.2:701
5007 " if (argc != 2) {\n"
5008 " fprintf(stderr, \"Usage: %s E<lt>file-to-execE<gt>\\en\", "
5010 " exit(EXIT_FAILURE);\n"
5015 #: build/C/man2/execve.2:703
5017 msgid " newargv[0] = argv[1];\n"
5021 #: build/C/man2/execve.2:708
5024 " execve(argv[1], newargv, newenviron);\n"
5025 " perror(\"execve\"); /* execve() returns only on error */\n"
5026 " exit(EXIT_FAILURE);\n"
5031 #: build/C/man2/execve.2:712
5032 msgid "We can use the second program to exec the first as follows:"
5036 #: build/C/man2/execve.2:721
5039 "$B< cc myecho.c -o myecho>\n"
5040 "$B< cc execve.c -o execve>\n"
5041 "$B< ./execve ./myecho>\n"
5042 "argv[0]: ./myecho\n"
5048 #: build/C/man2/execve.2:729
5050 "We can also use these programs to demonstrate the use of a script "
5051 "interpreter. To do this we create a script whose \"interpreter\" is our "
5052 "I<myecho> program:"
5056 #: build/C/man2/execve.2:736
5059 "$B< cat E<gt> script>\n"
5060 "B<#!./myecho script-arg>\n"
5062 "$B< chmod +x script>\n"
5066 #: build/C/man2/execve.2:740
5067 msgid "We can then use our program to exec the script:"
5071 #: build/C/man2/execve.2:749
5074 "$B< ./execve ./script>\n"
5075 "argv[0]: ./myecho\n"
5076 "argv[1]: script-arg\n"
5077 "argv[2]: ./script\n"
5083 #: build/C/man2/execve.2:763
5085 "B<chmod>(2), B<execveat>(2), B<fork>(2), B<ptrace>(2), B<execl>(3), "
5086 "B<fexecve>(3), B<getopt>(3), B<credentials>(7), B<environ>(7), "
5087 "B<path_resolution>(7), B<ld.so>(8)"
5091 #: build/C/man2/exit_group.2:25
5097 #: build/C/man2/exit_group.2:25
5103 #: build/C/man2/exit_group.2:28
5104 msgid "exit_group - exit all threads in a process"
5108 #: build/C/man2/exit_group.2:31
5110 msgid "B<#include E<lt>linux/unistd.hE<gt>>\n"
5114 #: build/C/man2/exit_group.2:33
5116 msgid "B<void exit_group(int >I<status>B<);>\n"
5120 #: build/C/man2/exit_group.2:39
5122 "This system call is equivalent to B<exit>(2) except that it terminates not "
5123 "only the calling thread, but all threads in the calling process's thread "
5128 #: build/C/man2/exit_group.2:41
5129 msgid "This system call does not return."
5133 #: build/C/man2/exit_group.2:43
5134 msgid "This call is present since Linux 2.5.35."
5138 #: build/C/man2/exit_group.2:45
5139 msgid "This call is Linux-specific."
5143 #: build/C/man2/exit_group.2:49
5145 "Since glibc 2.3, this is the system call invoked when the B<exit>(2) "
5146 "wrapper function is called."
5150 #: build/C/man2/exit_group.2:51
5155 #: build/C/man2/fcntl.2:65
5161 #: build/C/man2/fcntl.2:68
5162 msgid "fcntl - manipulate file descriptor"
5166 #: build/C/man2/fcntl.2:72
5169 "B<#include E<lt>unistd.hE<gt>>\n"
5170 "B<#include E<lt>fcntl.hE<gt>>\n"
5174 #: build/C/man2/fcntl.2:74
5176 msgid "B<int fcntl(int >I<fd>B<, int >I<cmd>B<, ... /* >I<arg>B< */ );>\n"
5180 #: build/C/man2/fcntl.2:81
5182 "B<fcntl>() performs one of the operations described below on the open file "
5183 "descriptor I<fd>. The operation is determined by I<cmd>."
5187 #: build/C/man2/fcntl.2:95
5189 "B<fcntl>() can take an optional third argument. Whether or not this "
5190 "argument is required is determined by I<cmd>. The required argument type is "
5191 "indicated in parentheses after each I<cmd> name (in most cases, the required "
5192 "type is I<int>, and we identify the argument using the name I<arg>), or "
5193 "I<void> is specified if the argument is not required."
5197 #: build/C/man2/fcntl.2:106
5199 "Certain of the operations below are supported only since a particular Linux "
5200 "kernel version. The preferred method of checking whether the host kernel "
5201 "supports a particular operation is to invoke B<fcntl>() with the desired "
5202 "I<cmd> value and then test whether the call failed with B<EINVAL>, "
5203 "indicating that the kernel does not recognize this value."
5207 #: build/C/man2/fcntl.2:106
5209 msgid "Duplicating a file descriptor"
5213 #: build/C/man2/fcntl.2:107
5215 msgid "B<F_DUPFD> (I<int>)"
5219 #: build/C/man2/fcntl.2:117
5221 "Find the lowest numbered available file descriptor greater than or equal to "
5222 "I<arg> and make it be a copy of I<fd>. This is different from B<dup2>(2), "
5223 "which uses exactly the descriptor specified."
5227 #: build/C/man2/fcntl.2:119
5228 msgid "On success, the new descriptor is returned."
5232 #: build/C/man2/fcntl.2:123
5233 msgid "See B<dup>(2) for further details."
5237 #: build/C/man2/fcntl.2:123
5239 msgid "B<F_DUPFD_CLOEXEC> (I<int>; since Linux 2.6.24)"
5243 #: build/C/man2/fcntl.2:140
5245 "As for B<F_DUPFD>, but additionally set the close-on-exec flag for the "
5246 "duplicate descriptor. Specifying this flag permits a program to avoid an "
5247 "additional B<fcntl>() B<F_SETFD> operation to set the B<FD_CLOEXEC> flag. "
5248 "For an explanation of why this flag is useful, see the description of "
5249 "B<O_CLOEXEC> in B<open>(2)."
5253 #: build/C/man2/fcntl.2:140
5255 msgid "File descriptor flags"
5259 #: build/C/man2/fcntl.2:151
5261 "The following commands manipulate the flags associated with a file "
5262 "descriptor. Currently, only one such flag is defined: B<FD_CLOEXEC>, the "
5263 "close-on-exec flag. If the B<FD_CLOEXEC> bit is 0, the file descriptor will "
5264 "remain open across an B<execve>(2), otherwise it will be closed."
5268 #: build/C/man2/fcntl.2:151
5270 msgid "B<F_GETFD> (I<void>)"
5274 #: build/C/man2/fcntl.2:156
5275 msgid "Read the file descriptor flags; I<arg> is ignored."
5279 #: build/C/man2/fcntl.2:156
5281 msgid "B<F_SETFD> (I<int>)"
5285 #: build/C/man2/fcntl.2:160
5286 msgid "Set the file descriptor flags to the value specified by I<arg>."
5290 #: build/C/man2/fcntl.2:175
5292 "In multithreaded programs, using B<fcntl>() B<F_SETFD> to set the "
5293 "close-on-exec flag at the same time as another thread performs a B<fork>(2) "
5294 "plus B<execve>(2) is vulnerable to a race condition that may "
5295 "unintentionally leak the file descriptor to the program executed in the "
5296 "child process. See the discussion of the B<O_CLOEXEC> flag in B<open>(2) "
5297 "for details and a remedy to the problem."
5301 #: build/C/man2/fcntl.2:175
5303 msgid "File status flags"
5309 #: build/C/man2/fcntl.2:190
5311 "Each open file description has certain associated status flags, initialized "
5312 "by B<open>(2) and possibly modified by B<fcntl>(). Duplicated file "
5313 "descriptors (made with B<dup>(2), B<fcntl>(F_DUPFD), B<fork>(2), etc.) refer "
5314 "to the same open file description, and thus share the same file status "
5319 #: build/C/man2/fcntl.2:193
5320 msgid "The file status flags and their semantics are described in B<open>(2)."
5324 #: build/C/man2/fcntl.2:193
5326 msgid "B<F_GETFL> (I<void>)"
5330 #: build/C/man2/fcntl.2:198
5331 msgid "Get the file access mode and the file status flags; I<arg> is ignored."
5335 #: build/C/man2/fcntl.2:198
5337 msgid "B<F_SETFL> (I<int>)"
5341 #: build/C/man2/fcntl.2:223
5343 "Set the file status flags to the value specified by I<arg>. File access "
5344 "mode (B<O_RDONLY>, B<O_WRONLY>, B<O_RDWR>) and file creation flags (i.e., "
5345 "B<O_CREAT>, B<O_EXCL>, B<O_NOCTTY>, B<O_TRUNC>) in I<arg> are ignored. On "
5346 "Linux this command can change only the B<O_APPEND>, B<O_ASYNC>, B<O_DIRECT>, "
5347 "B<O_NOATIME>, and B<O_NONBLOCK> flags. It is not possible to change the "
5348 "B<O_DSYNC> and B<O_SYNC> flags; see BUGS, below."
5352 #: build/C/man2/fcntl.2:223
5354 msgid "Advisory record locking"
5358 #: build/C/man2/fcntl.2:228
5360 "Linux implements traditional (\"process-associated\") UNIX record locks, as "
5361 "standardized by POSIX. For a Linux-specific alternative with better "
5362 "semantics, see the discussion of open file description locks below."
5366 #: build/C/man2/fcntl.2:239
5368 "B<F_SETLK>, B<F_SETLKW>, and B<F_GETLK> are used to acquire, release, and "
5369 "test for the existence of record locks (also known as byte-range, "
5370 "file-segment, or file-region locks). The third argument, I<lock>, is a "
5371 "pointer to a structure that has at least the following fields (in "
5372 "unspecified order)."
5376 #: build/C/man2/fcntl.2:254
5381 " short l_type; /* Type of lock: F_RDLCK,\n"
5382 " F_WRLCK, F_UNLCK */\n"
5383 " short l_whence; /* How to interpret l_start:\n"
5384 " SEEK_SET, SEEK_CUR, SEEK_END */\n"
5385 " off_t l_start; /* Starting offset for lock */\n"
5386 " off_t l_len; /* Number of bytes to lock */\n"
5387 " pid_t l_pid; /* PID of process blocking our lock\n"
5388 " (set by F_GETLK and F_OFD_GETLK) */\n"
5394 #: build/C/man2/fcntl.2:262
5396 "The I<l_whence>, I<l_start>, and I<l_len> fields of this structure specify "
5397 "the range of bytes we wish to lock. Bytes past the end of the file may be "
5398 "locked, but not bytes before the start of the file."
5402 #: build/C/man2/fcntl.2:282
5404 "I<l_start> is the starting offset for the lock, and is interpreted relative "
5405 "to either: the start of the file (if I<l_whence> is B<SEEK_SET>); the "
5406 "current file offset (if I<l_whence> is B<SEEK_CUR>); or the end of the file "
5407 "(if I<l_whence> is B<SEEK_END>). In the final two cases, I<l_start> can be "
5408 "a negative number provided the offset does not lie before the start of the "
5413 #: build/C/man2/fcntl.2:297
5415 "I<l_len> specifies the number of bytes to be locked. If I<l_len> is "
5416 "positive, then the range to be locked covers bytes I<l_start> up to and "
5417 "including I<l_start>+I<l_len>-1. Specifying 0 for I<l_len> has the special "
5418 "meaning: lock all bytes starting at the location specified by I<l_whence> "
5419 "and I<l_start> through to the end of file, no matter how large the file "
5424 #: build/C/man2/fcntl.2:310
5426 "POSIX.1-2001 allows (but does not require) an implementation to support a "
5427 "negative I<l_len> value; if I<l_len> is negative, the interval described by "
5428 "I<lock> covers bytes I<l_start>+I<l_len> up to and including I<l_start>-1. "
5429 "This is supported by Linux since kernel versions 2.4.21 and 2.5.49."
5433 #: build/C/man2/fcntl.2:329
5435 "The I<l_type> field can be used to place a read (B<F_RDLCK>) or a write "
5436 "(B<F_WRLCK>) lock on a file. Any number of processes may hold a read lock "
5437 "(shared lock) on a file region, but only one process may hold a write lock "
5438 "(exclusive lock). An exclusive lock excludes all other locks, both shared "
5439 "and exclusive. A single process can hold only one type of lock on a file "
5440 "region; if a new lock is applied to an already-locked region, then the "
5441 "existing lock is converted to the new lock type. (Such conversions may "
5442 "involve splitting, shrinking, or coalescing with an existing lock if the "
5443 "byte range specified by the new lock does not precisely coincide with the "
5444 "range of the existing lock.)"
5448 #: build/C/man2/fcntl.2:329
5450 msgid "B<F_SETLK> (I<struct flock *>)"
5454 #: build/C/man2/fcntl.2:354
5456 "Acquire a lock (when I<l_type> is B<F_RDLCK> or B<F_WRLCK>) or release a "
5457 "lock (when I<l_type> is B<F_UNLCK>) on the bytes specified by the "
5458 "I<l_whence>, I<l_start>, and I<l_len> fields of I<lock>. If a conflicting "
5459 "lock is held by another process, this call returns -1 and sets I<errno> to "
5460 "B<EACCES> or B<EAGAIN>. (The error returned in this case differs across "
5461 "implementations, so POSIX requires a portable application to check for both "
5466 #: build/C/man2/fcntl.2:354
5468 msgid "B<F_SETLKW> (I<struct flock *>)"
5472 #: build/C/man2/fcntl.2:368
5474 "As for B<F_SETLK>, but if a conflicting lock is held on the file, then wait "
5475 "for that lock to be released. If a signal is caught while waiting, then the "
5476 "call is interrupted and (after the signal handler has returned) returns "
5477 "immediately (with return value -1 and I<errno> set to B<EINTR>; see "
5482 #: build/C/man2/fcntl.2:368
5484 msgid "B<F_GETLK> (I<struct flock *>)"
5488 #: build/C/man2/fcntl.2:382
5490 "On input to this call, I<lock> describes a lock we would like to place on "
5491 "the file. If the lock could be placed, B<fcntl>() does not actually place "
5492 "it, but returns B<F_UNLCK> in the I<l_type> field of I<lock> and leaves the "
5493 "other fields of the structure unchanged."
5497 #: build/C/man2/fcntl.2:399
5499 "If one or more incompatible locks would prevent this lock being placed, then "
5500 "B<fcntl>() returns details about one of those locks in the I<l_type>, "
5501 "I<l_whence>, I<l_start>, and I<l_len> fields of I<lock>. If the conflicting "
5502 "lock is a traditional (process-associated) record lock, then the I<l_pid> "
5503 "field is set to the PID of the process holding that lock. If the "
5504 "conflicting lock is an open file description lock, then I<l_pid> is set to "
5505 "-1. Note that the returned information may already be out of date by the "
5506 "time the caller inspects it."
5510 #: build/C/man2/fcntl.2:407
5512 "In order to place a read lock, I<fd> must be open for reading. In order to "
5513 "place a write lock, I<fd> must be open for writing. To place both types of "
5514 "lock, open a file read-write."
5518 #: build/C/man2/fcntl.2:430
5520 "When placing locks with B<F_SETLKW>, the kernel detects I<deadlocks>, "
5521 "whereby two or more processes have their lock requests mutually blocked by "
5522 "locks held by the other processes. For example, suppose process A holds a "
5523 "write lock on byte 100 of a file, and process B holds a write lock on byte "
5524 "200. If each process then attempts to lock the byte already locked by the "
5525 "other process using B<F_SETLKW>, then, without deadlock detection, both "
5526 "processes would remain blocked indefinitely. When the kernel detects such "
5527 "deadlocks, it causes one of the blocking lock requests to immediately fail "
5528 "with the error B<EDEADLK>; an application that encounters such an error "
5529 "should release some of its locks to allow other applications to proceed "
5530 "before attempting regain the locks that it requires. Circular deadlocks "
5531 "involving more than two processes are also detected. Note, however, that "
5532 "there are limitations to the kernel's deadlock-detection algorithm; see "
5537 #: build/C/man2/fcntl.2:434
5539 "As well as being removed by an explicit B<F_UNLCK>, record locks are "
5540 "automatically released when the process terminates."
5544 #: build/C/man2/fcntl.2:439
5546 "Record locks are not inherited by a child created via B<fork>(2), but are "
5547 "preserved across an B<execve>(2)."
5551 #: build/C/man2/fcntl.2:448
5553 "Because of the buffering performed by the B<stdio>(3) library, the use of "
5554 "record locking with routines in that package should be avoided; use "
5555 "B<read>(2) and B<write>(2) instead."
5559 #: build/C/man2/fcntl.2:452
5561 "The record locks described above are associated with the process (unlike the "
5562 "open file description locks described below). This has some unfortunate "
5566 #. (Additional file descriptors referring to the same file
5567 #. may have been obtained by calls to
5568 #. .BR open "(2), " dup "(2), " dup2 "(2), or " fcntl ().)
5570 #: build/C/man2/fcntl.2:468
5572 "If a process closes I<any> file descriptor referring to a file, then all of "
5573 "the process's locks on that file are released, regardless of the file "
5574 "descriptor(s) on which the locks were obtained. This is bad: it means that "
5575 "a process can lose its locks on a file such as I</etc/passwd> or "
5576 "I</etc/mtab> when for some reason a library function decides to open, read, "
5577 "and close the same file."
5581 #: build/C/man2/fcntl.2:473
5583 "The threads in a process share locks. In other words, a multithreaded "
5584 "program can't use record locking to ensure that threads don't simultaneously "
5585 "access the same region of a file."
5589 #: build/C/man2/fcntl.2:475
5590 msgid "Open file description locks solve both of these problems."
5594 #: build/C/man2/fcntl.2:475
5596 msgid "Open file description locks (non-POSIX)"
5600 #: build/C/man2/fcntl.2:482
5602 "Open file description locks are advisory byte-range locks whose operation is "
5603 "in most respects identical to the traditional record locks described above. "
5604 "This lock type is Linux-specific, and available since Linux 3.15. For an "
5605 "explanation of open file descriptions, see B<open>(2)."
5609 #: build/C/man2/fcntl.2:500
5611 "The principal difference between the two lock types is that whereas "
5612 "traditional record locks are associated with a process, open file "
5613 "description locks are associated with the open file description on which "
5614 "they are acquired, much like locks acquired with B<flock>(2). Consequently "
5615 "(and unlike traditional advisory record locks), open file description locks "
5616 "are inherited across B<fork>(2) (and B<clone>(2) with B<CLONE_FILES>), and "
5617 "are only automatically released on the last close of the open file "
5618 "description, instead of being released on any close of the file."
5622 #: build/C/man2/fcntl.2:503
5624 "Open file description locks always conflict with traditional record locks, "
5625 "even when they are acquired by the same process on the same file descriptor."
5629 #: build/C/man2/fcntl.2:516
5631 "Open file description locks placed via the same open file description (i.e., "
5632 "via the same file descriptor, or via a duplicate of the file descriptor "
5633 "created by B<fork>(2), B<dup>(2), B<fcntl>(2) B<F_DUPFD>, and so on) are "
5634 "always compatible: if a new lock is placed on an already locked region, then "
5635 "the existing lock is converted to the new lock type. (Such conversions may "
5636 "result in splitting, shrinking, or coalescing with an existing lock as "
5641 #: build/C/man2/fcntl.2:524
5643 "On the other hand, open file description locks may conflict with each other "
5644 "when they are acquired via different open file descriptions. Thus, the "
5645 "threads in a multithreaded program can use open file description locks to "
5646 "synchronize access to a file region by having each thread perform its own "
5647 "B<open>(2) on the file and applying locks via the resulting file "
5652 #: build/C/man2/fcntl.2:535
5654 "As with traditional advisory locks, the third argument to B<fcntl>(), "
5655 "I<lock>, is a pointer to an I<flock> structure. By contrast with "
5656 "traditional record locks, the I<l_pid> field of that structure must be set "
5657 "to zero when using the commands described below."
5661 #: build/C/man2/fcntl.2:538
5663 "The commands for working with open file description locks are analogous to "
5664 "those used with traditional locks:"
5668 #: build/C/man2/fcntl.2:538
5670 msgid "B<F_OFD_SETLK> (I<struct flock *>)"
5674 #: build/C/man2/fcntl.2:559
5676 "Acquire an open file description lock (when I<l_type> is B<F_RDLCK> or "
5677 "B<F_WRLCK>) or release an open file description lock (when I<l_type> is "
5678 "B<F_UNLCK>) on the bytes specified by the I<l_whence>, I<l_start>, and "
5679 "I<l_len> fields of I<lock>. If a conflicting lock is held by another "
5680 "process, this call returns -1 and sets I<errno> to B<EAGAIN>."
5684 #: build/C/man2/fcntl.2:559
5686 msgid "B<F_OFD_SETLKW> (I<struct flock *>)"
5690 #: build/C/man2/fcntl.2:573
5692 "As for B<F_OFD_SETLK>, but if a conflicting lock is held on the file, then "
5693 "wait for that lock to be released. If a signal is caught while waiting, "
5694 "then the call is interrupted and (after the signal handler has returned) "
5695 "returns immediately (with return value -1 and I<errno> set to B<EINTR>; see "
5700 #: build/C/man2/fcntl.2:573
5702 msgid "B<F_OFD_GETLK> (I<struct flock *>)"
5706 #: build/C/man2/fcntl.2:592
5708 "On input to this call, I<lock> describes an open file description lock we "
5709 "would like to place on the file. If the lock could be placed, B<fcntl>() "
5710 "does not actually place it, but returns B<F_UNLCK> in the I<l_type> field of "
5711 "I<lock> and leaves the other fields of the structure unchanged. If one or "
5712 "more incompatible locks would prevent this lock being placed, then details "
5713 "about one of these locks are returned via I<lock>, as described above for "
5717 #. commit 57b65325fe34ec4c917bc4e555144b4a94d9e1f7
5719 #: build/C/man2/fcntl.2:599
5721 "In the current implementation, no deadlock detection is performed for open "
5722 "file description locks. (This contrasts with process-associated record "
5723 "locks, for which the kernel does perform deadlock detection.)"
5727 #: build/C/man2/fcntl.2:599 build/C/man2/fcntl.2:1894
5729 msgid "Mandatory locking"
5733 #: build/C/man2/fcntl.2:603
5735 "I<Warning>: the Linux implementation of mandatory locking is unreliable. "
5740 #: build/C/man2/fcntl.2:608
5742 "By default, both traditional (process-associated) and open file description "
5743 "record locks are advisory. Advisory locks are not enforced and are useful "
5744 "only between cooperating processes."
5748 #: build/C/man2/fcntl.2:628
5750 "Both lock types can also be mandatory. Mandatory locks are enforced for all "
5751 "processes. If a process tries to perform an incompatible access (e.g., "
5752 "B<read>(2) or B<write>(2)) on a file region that has an incompatible "
5753 "mandatory lock, then the result depends upon whether the B<O_NONBLOCK> flag "
5754 "is enabled for its open file description. If the B<O_NONBLOCK> flag is not "
5755 "enabled, then the system call is blocked until the lock is removed or "
5756 "converted to a mode that is compatible with the access. If the "
5757 "B<O_NONBLOCK> flag is enabled, then the system call fails with the error "
5762 #: build/C/man2/fcntl.2:645
5764 "To make use of mandatory locks, mandatory locking must be enabled both on "
5765 "the filesystem that contains the file to be locked, and on the file itself. "
5766 "Mandatory locking is enabled on a filesystem using the \"-o mand\" option to "
5767 "B<mount>(8), or the B<MS_MANDLOCK> flag for B<mount>(2). Mandatory locking "
5768 "is enabled on a file by disabling group execute permission on the file and "
5769 "enabling the set-group-ID permission bit (see B<chmod>(1) and B<chmod>(2))."
5773 #: build/C/man2/fcntl.2:649
5775 "Mandatory locking is not specified by POSIX. Some other systems also "
5776 "support mandatory locking, although the details of how to enable it vary "
5781 #: build/C/man2/fcntl.2:649
5783 msgid "Managing signals"
5787 #: build/C/man2/fcntl.2:658
5789 "B<F_GETOWN>, B<F_SETOWN>, B<F_GETOWN_EX>, B<F_SETOWN_EX>, B<F_GETSIG> and "
5790 "B<F_SETSIG> are used to manage I/O availability signals:"
5794 #: build/C/man2/fcntl.2:658
5796 msgid "B<F_GETOWN> (I<void>)"
5800 #: build/C/man2/fcntl.2:671
5802 "Return (as the function result) the process ID or process group currently "
5803 "receiving B<SIGIO> and B<SIGURG> signals for events on file descriptor "
5804 "I<fd>. Process IDs are returned as positive values; process group IDs are "
5805 "returned as negative values (but see BUGS below). I<arg> is ignored."
5809 #: build/C/man2/fcntl.2:671
5811 msgid "B<F_SETOWN> (I<int>)"
5815 #: build/C/man2/fcntl.2:688
5817 "Set the process ID or process group ID that will receive B<SIGIO> and "
5818 "B<SIGURG> signals for events on file descriptor I<fd> to the ID given in "
5819 "I<arg>. A process ID is specified as a positive value; a process group ID "
5820 "is specified as a negative value. Most commonly, the calling process "
5821 "specifies itself as the owner (that is, I<arg> is specified as "
5827 #: build/C/man2/fcntl.2:705
5829 "If you set the B<O_ASYNC> status flag on a file descriptor by using the "
5830 "B<F_SETFL> command of B<fcntl>(), a B<SIGIO> signal is sent whenever input "
5831 "or output becomes possible on that file descriptor. B<F_SETSIG> can be used "
5832 "to obtain delivery of a signal other than B<SIGIO>. If this permission "
5833 "check fails, then the signal is silently discarded."
5837 #: build/C/man2/fcntl.2:713
5839 "Sending a signal to the owner process (group) specified by B<F_SETOWN> is "
5840 "subject to the same permissions checks as are described for B<kill>(2), "
5841 "where the sending process is the one that employs B<F_SETOWN> (but see BUGS "
5845 #. The following appears to be rubbish. It doesn't seem to
5846 #. be true according to the kernel source, and I can write
5847 #. a program that gets a terminal-generated SIGIO even though
5848 #. it is not the foreground process group of the terminal.
5851 #. If the file descriptor
5853 #. refers to a terminal device, then SIGIO
5854 #. signals are sent to the foreground process group of the terminal.
5856 #: build/C/man2/fcntl.2:737
5858 "If the file descriptor I<fd> refers to a socket, B<F_SETOWN> also selects "
5859 "the recipient of B<SIGURG> signals that are delivered when out-of-band data "
5860 "arrives on that socket. (B<SIGURG> is sent in any situation where "
5861 "B<select>(2) would report the socket as having an \"exceptional "
5866 #: build/C/man2/fcntl.2:740
5867 msgid "The following was true in 2.6.x kernels up to and including kernel 2.6.11:"
5870 #. The relevant place in the (2.6) kernel source is the
5871 #. 'switch' in fs/fcntl.c::send_sigio_to_task() -- MTK, Apr 2005
5872 #. send_sigurg()/send_sigurg_to_task() bypasses
5873 #. kill_fasync()/send_sigio()/send_sigio_to_task()
5874 #. to directly call send_group_sig_info()
5875 #. -- MTK, Apr 2005 (kernel 2.6.11)
5877 #: build/C/man2/fcntl.2:780
5879 "If a nonzero value is given to B<F_SETSIG> in a multithreaded process "
5880 "running with a threading library that supports thread groups (e.g., NPTL), "
5881 "then a positive value given to B<F_SETOWN> has a different meaning: instead "
5882 "of being a process ID identifying a whole process, it is a thread ID "
5883 "identifying a specific thread within a process. Consequently, it may be "
5884 "necessary to pass B<F_SETOWN> the result of B<gettid>(2) instead of "
5885 "B<getpid>(2) to get sensible results when B<F_SETSIG> is used. (In current "
5886 "Linux threading implementations, a main thread's thread ID is the same as "
5887 "its process ID. This means that a single-threaded program can equally use "
5888 "B<gettid>(2) or B<getpid>(2) in this scenario.) Note, however, that the "
5889 "statements in this paragraph do not apply to the B<SIGURG> signal generated "
5890 "for out-of-band data on a socket: this signal is always sent to either a "
5891 "process or a process group, depending on the value given to B<F_SETOWN>."
5895 #: build/C/man2/fcntl.2:791
5897 "The above behavior was accidentally dropped in Linux 2.6.12, and won't be "
5898 "restored. From Linux 2.6.32 onward, use B<F_SETOWN_EX> to target B<SIGIO> "
5899 "and B<SIGURG> signals at a particular thread."
5903 #: build/C/man2/fcntl.2:791
5905 msgid "B<F_GETOWN_EX> (struct f_owner_ex *) (since Linux 2.6.32)"
5909 #: build/C/man2/fcntl.2:800
5911 "Return the current file descriptor owner settings as defined by a previous "
5912 "B<F_SETOWN_EX> operation. The information is returned in the structure "
5913 "pointed to by I<arg>, which has the following form:"
5917 #: build/C/man2/fcntl.2:807
5920 "struct f_owner_ex {\n"
5927 #: build/C/man2/fcntl.2:824
5929 "The I<type> field will have one of the values B<F_OWNER_TID>, "
5930 "B<F_OWNER_PID>, or B<F_OWNER_PGRP>. The I<pid> field is a positive integer "
5931 "representing a thread ID, process ID, or process group ID. See "
5932 "B<F_SETOWN_EX> for more details."
5936 #: build/C/man2/fcntl.2:824
5938 msgid "B<F_SETOWN_EX> (struct f_owner_ex *) (since Linux 2.6.32)"
5942 #: build/C/man2/fcntl.2:840
5944 "This operation performs a similar task to B<F_SETOWN>. It allows the caller "
5945 "to direct I/O availability signals to a specific thread, process, or process "
5946 "group. The caller specifies the target of signals via I<arg>, which is a "
5947 "pointer to a I<f_owner_ex> structure. The I<type> field has one of the "
5948 "following values, which define how I<pid> is interpreted:"
5952 #: build/C/man2/fcntl.2:841
5954 msgid "B<F_OWNER_TID>"
5958 #: build/C/man2/fcntl.2:850
5960 "Send the signal to the thread whose thread ID (the value returned by a call "
5961 "to B<clone>(2) or B<gettid>(2)) is specified in I<pid>."
5965 #: build/C/man2/fcntl.2:850
5967 msgid "B<F_OWNER_PID>"
5971 #: build/C/man2/fcntl.2:855
5972 msgid "Send the signal to the process whose ID is specified in I<pid>."
5976 #: build/C/man2/fcntl.2:855
5978 msgid "B<F_OWNER_PGRP>"
5982 #: build/C/man2/fcntl.2:863
5984 "Send the signal to the process group whose ID is specified in I<pid>. (Note "
5985 "that, unlike with B<F_SETOWN>, a process group ID is specified as a positive "
5990 #: build/C/man2/fcntl.2:864
5992 msgid "B<F_GETSIG> (I<void>)"
5996 #: build/C/man2/fcntl.2:879
5998 "Return (as the function result) the signal sent when input or output "
5999 "becomes possible. A value of zero means B<SIGIO> is sent. Any other value "
6000 "(including B<SIGIO>) is the signal sent instead, and in this case "
6001 "additional info is available to the signal handler if installed with "
6002 "B<SA_SIGINFO>. I<arg> is ignored."
6006 #: build/C/man2/fcntl.2:879
6008 msgid "B<F_SETSIG> (I<int>)"
6012 #. The following was true only up until 2.6.11:
6014 #. Additionally, passing a nonzero value to
6016 #. changes the signal recipient from a whole process to a specific thread
6017 #. within a process.
6018 #. See the description of
6020 #. for more details.
6022 #: build/C/man2/fcntl.2:902
6024 "Set the signal sent when input or output becomes possible to the value given "
6025 "in I<arg>. A value of zero means to send the default B<SIGIO> signal. Any "
6026 "other value (including B<SIGIO>) is the signal to send instead, and in this "
6027 "case additional info is available to the signal handler if installed with "
6032 #: build/C/man2/fcntl.2:930
6034 "By using B<F_SETSIG> with a nonzero value, and setting B<SA_SIGINFO> for the "
6035 "signal handler (see B<sigaction>(2)), extra information about I/O events is "
6036 "passed to the handler in a I<siginfo_t> structure. If the I<si_code> field "
6037 "indicates the source is B<SI_SIGIO>, the I<si_fd> field gives the file "
6038 "descriptor associated with the event. Otherwise, there is no indication "
6039 "which file descriptors are pending, and you should use the usual mechanisms "
6040 "(B<select>(2), B<poll>(2), B<read>(2) with B<O_NONBLOCK> set etc.) to "
6041 "determine which file descriptors are available for I/O."
6045 #: build/C/man2/fcntl.2:939
6047 "By selecting a real time signal (value E<gt>= B<SIGRTMIN>), multiple I/O "
6048 "events may be queued using the same signal numbers. (Queuing is dependent "
6049 "on available memory). Extra information is available if B<SA_SIGINFO> is "
6050 "set for the signal handler, as above."
6053 #. See fs/fcntl.c::send_sigio_to_task() (2.4/2.6) sources -- MTK, Apr 05
6055 #: build/C/man2/fcntl.2:952
6057 "Note that Linux imposes a limit on the number of real-time signals that may "
6058 "be queued to a process (see B<getrlimit>(2) and B<signal>(7)) and if this "
6059 "limit is reached, then the kernel reverts to delivering B<SIGIO>, and this "
6060 "signal is delivered to the entire process rather than to a specific thread."
6064 #: build/C/man2/fcntl.2:959
6066 "Using these mechanisms, a program can implement fully asynchronous I/O "
6067 "without using B<select>(2) or B<poll>(2) most of the time."
6071 #: build/C/man2/fcntl.2:983
6073 "The use of B<O_ASYNC> is specific to BSD and Linux. The only use of "
6074 "B<F_GETOWN> and B<F_SETOWN> specified in POSIX.1 is in conjunction with the "
6075 "use of the B<SIGURG> signal on sockets. (POSIX does not specify the "
6076 "B<SIGIO> signal.) B<F_GETOWN_EX>, B<F_SETOWN_EX>, B<F_GETSIG>, and "
6077 "B<F_SETSIG> are Linux-specific. POSIX has asynchronous I/O and the "
6078 "I<aio_sigevent> structure to achieve similar things; these are also "
6079 "available in Linux as part of the GNU C Library (Glibc)."
6083 #: build/C/man2/fcntl.2:983
6089 #: build/C/man2/fcntl.2:998
6091 "B<F_SETLEASE> and B<F_GETLEASE> (Linux 2.4 onward) are used (respectively) "
6092 "to establish a new lease, and retrieve the current lease, on the open file "
6093 "description referred to by the file descriptor I<fd>. A file lease provides "
6094 "a mechanism whereby the process holding the lease (the \"lease holder\") is "
6095 "notified (via delivery of a signal) when a process (the \"lease breaker\") "
6096 "tries to B<open>(2) or B<truncate>(2) the file referred to by that file "
6101 #: build/C/man2/fcntl.2:998
6103 msgid "B<F_SETLEASE> (I<int>)"
6107 #: build/C/man2/fcntl.2:1003
6109 "Set or remove a file lease according to which of the following values is "
6110 "specified in the integer I<arg>:"
6114 #: build/C/man2/fcntl.2:1004
6119 #. The following became true in kernel 2.6.10:
6120 #. See the man-pages-2.09 Changelog for further info.
6122 #: build/C/man2/fcntl.2:1013
6124 "Take out a read lease. This will cause the calling process to be notified "
6125 "when the file is opened for writing or is truncated. A read lease can be "
6126 "placed only on a file descriptor that is opened read-only."
6130 #: build/C/man2/fcntl.2:1013
6136 #: build/C/man2/fcntl.2:1020
6138 "Take out a write lease. This will cause the caller to be notified when the "
6139 "file is opened for reading or writing or is truncated. A write lease may be "
6140 "placed on a file only if there are no other open file descriptors for the "
6145 #: build/C/man2/fcntl.2:1020
6151 #: build/C/man2/fcntl.2:1023
6152 msgid "Remove our lease from the file."
6156 #: build/C/man2/fcntl.2:1037
6158 "Leases are associated with an open file description (see B<open>(2)). This "
6159 "means that duplicate file descriptors (created by, for example, B<fork>(2) "
6160 "or B<dup>(2)) refer to the same lease, and this lease may be modified or "
6161 "released using any of these descriptors. Furthermore, the lease is released "
6162 "by either an explicit B<F_UNLCK> operation on any of these duplicate "
6163 "descriptors, or when all such descriptors have been closed."
6167 #: build/C/man2/fcntl.2:1044
6169 "Leases may be taken out only on regular files. An unprivileged process may "
6170 "take out a lease only on a file whose UID (owner) matches the filesystem UID "
6171 "of the process. A process with the B<CAP_LEASE> capability may take out "
6172 "leases on arbitrary files."
6176 #: build/C/man2/fcntl.2:1044
6178 msgid "B<F_GETLEASE> (I<void>)"
6182 #: build/C/man2/fcntl.2:1053
6184 "Indicates what type of lease is associated with the file descriptor I<fd> by "
6185 "returning either B<F_RDLCK>, B<F_WRLCK>, or B<F_UNLCK>, indicating, "
6186 "respectively, a read lease , a write lease, or no lease. I<arg> is ignored."
6190 #: build/C/man2/fcntl.2:1084
6192 "When a process (the \"lease breaker\") performs an B<open>(2) or "
6193 "B<truncate>(2) that conflicts with a lease established via B<F_SETLEASE>, "
6194 "the system call is blocked by the kernel and the kernel notifies the lease "
6195 "holder by sending it a signal (B<SIGIO> by default). The lease holder "
6196 "should respond to receipt of this signal by doing whatever cleanup is "
6197 "required in preparation for the file to be accessed by another process "
6198 "(e.g., flushing cached buffers) and then either remove or downgrade its "
6199 "lease. A lease is removed by performing an B<F_SETLEASE> command specifying "
6200 "I<arg> as B<F_UNLCK>. If the lease holder currently holds a write lease on "
6201 "the file, and the lease breaker is opening the file for reading, then it is "
6202 "sufficient for the lease holder to downgrade the lease to a read lease. "
6203 "This is done by performing an B<F_SETLEASE> command specifying I<arg> as "
6208 #: build/C/man2/fcntl.2:1089
6210 "If the lease holder fails to downgrade or remove the lease within the number "
6211 "of seconds specified in I</proc/sys/fs/lease-break-time>, then the kernel "
6212 "forcibly removes or downgrades the lease holder's lease."
6216 #: build/C/man2/fcntl.2:1099
6218 "Once a lease break has been initiated, B<F_GETLEASE> returns the target "
6219 "lease type (either B<F_RDLCK> or B<F_UNLCK>, depending on what would be "
6220 "compatible with the lease breaker) until the lease holder voluntarily "
6221 "downgrades or removes the lease or the kernel forcibly does so after the "
6222 "lease break timer expires."
6226 #: build/C/man2/fcntl.2:1103
6228 "Once the lease has been voluntarily or forcibly removed or downgraded, and "
6229 "assuming the lease breaker has not unblocked its system call, the kernel "
6230 "permits the lease breaker's system call to proceed."
6234 #: build/C/man2/fcntl.2:1124
6236 "If the lease breaker's blocked B<open>(2) or B<truncate>(2) is interrupted "
6237 "by a signal handler, then the system call fails with the error B<EINTR>, but "
6238 "the other steps still occur as described above. If the lease breaker is "
6239 "killed by a signal while blocked in B<open>(2) or B<truncate>(2), then the "
6240 "other steps still occur as described above. If the lease breaker specifies "
6241 "the B<O_NONBLOCK> flag when calling B<open>(2), then the call immediately "
6242 "fails with the error B<EWOULDBLOCK>, but the other steps still occur as "
6247 #: build/C/man2/fcntl.2:1145
6249 "The default signal used to notify the lease holder is B<SIGIO>, but this can "
6250 "be changed using the B<F_SETSIG> command to B<fcntl>(). If a B<F_SETSIG> "
6251 "command is performed (even one specifying B<SIGIO>), and the signal handler "
6252 "is established using B<SA_SIGINFO>, then the handler will receive a "
6253 "I<siginfo_t> structure as its second argument, and the I<si_fd> field of "
6254 "this argument will hold the descriptor of the leased file that has been "
6255 "accessed by another process. (This is useful if the caller holds leases "
6256 "against multiple files)."
6260 #: build/C/man2/fcntl.2:1145
6262 msgid "File and directory change notification (dnotify)"
6266 #: build/C/man2/fcntl.2:1146
6268 msgid "B<F_NOTIFY> (I<int>)"
6272 #: build/C/man2/fcntl.2:1156
6274 "(Linux 2.4 onward) Provide notification when the directory referred to by "
6275 "I<fd> or any of the files that it contains is changed. The events to be "
6276 "notified are specified in I<arg>, which is a bit mask specified by ORing "
6277 "together zero or more of the following bits:"
6281 #: build/C/man2/fcntl.2:1159
6283 msgid "B<DN_ACCESS>"
6287 #: build/C/man2/fcntl.2:1166
6288 msgid "A file was accessed (B<read>(2), B<pread>(2), B<readv>(2), and similar)"
6292 #: build/C/man2/fcntl.2:1166
6294 msgid "B<DN_MODIFY>"
6298 #: build/C/man2/fcntl.2:1175
6300 "A file was modified (B<write>(2), B<pwrite>(2), B<writev>(2), "
6301 "B<truncate>(2), B<ftruncate>(2), and similar)."
6305 #: build/C/man2/fcntl.2:1175
6307 msgid "B<DN_CREATE>"
6311 #: build/C/man2/fcntl.2:1186
6313 "A file was created (B<open>(2), B<creat>(2), B<mknod>(2), B<mkdir>(2), "
6314 "B<link>(2), B<symlink>(2), B<rename>(2) into this directory)."
6318 #: build/C/man2/fcntl.2:1186
6320 msgid "B<DN_DELETE>"
6324 #: build/C/man2/fcntl.2:1193
6326 "A file was unlinked (B<unlink>(2), B<rename>(2) to another directory, "
6331 #: build/C/man2/fcntl.2:1193
6333 msgid "B<DN_RENAME>"
6337 #: build/C/man2/fcntl.2:1197
6338 msgid "A file was renamed within this directory (B<rename>(2))."
6342 #: build/C/man2/fcntl.2:1197
6344 msgid "B<DN_ATTRIB>"
6348 #: build/C/man2/fcntl.2:1205
6350 "The attributes of a file were changed (B<chown>(2), B<chmod>(2), "
6351 "B<utime>(2), B<utimensat>(2), and similar)."
6355 #: build/C/man2/fcntl.2:1213
6357 "(In order to obtain these definitions, the B<_GNU_SOURCE> feature test macro "
6358 "must be defined before including I<any> header files.)"
6362 #: build/C/man2/fcntl.2:1221
6364 "Directory notifications are normally \"one-shot\", and the application must "
6365 "reregister to receive further notifications. Alternatively, if "
6366 "B<DN_MULTISHOT> is included in I<arg>, then notification will remain in "
6367 "effect until explicitly removed."
6370 #. The following does seem a poor API-design choice...
6372 #: build/C/man2/fcntl.2:1233
6374 "A series of B<F_NOTIFY> requests is cumulative, with the events in I<arg> "
6375 "being added to the set already monitored. To disable notification of all "
6376 "events, make an B<F_NOTIFY> call specifying I<arg> as 0."
6380 #: build/C/man2/fcntl.2:1256
6382 "Notification occurs via delivery of a signal. The default signal is "
6383 "B<SIGIO>, but this can be changed using the B<F_SETSIG> command to "
6384 "B<fcntl>(). (Note that B<SIGIO> is one of the nonqueuing standard signals; "
6385 "switching to the use of a real-time signal means that multiple notifications "
6386 "can be queued to the process.) In the latter case, the signal handler "
6387 "receives a I<siginfo_t> structure as its second argument (if the handler was "
6388 "established using B<SA_SIGINFO>) and the I<si_fd> field of this structure "
6389 "contains the file descriptor which generated the notification (useful when "
6390 "establishing notification on multiple directories)."
6394 #: build/C/man2/fcntl.2:1261
6396 "Especially when using B<DN_MULTISHOT>, a real time signal should be used for "
6397 "notification, so that multiple notifications can be queued."
6401 #: build/C/man2/fcntl.2:1270
6403 "B<NOTE:> New applications should use the I<inotify> interface (available "
6404 "since kernel 2.6.13), which provides a much superior interface for obtaining "
6405 "notifications of filesystem events. See B<inotify>(7)."
6409 #: build/C/man2/fcntl.2:1270
6411 msgid "Changing the capacity of a pipe"
6415 #: build/C/man2/fcntl.2:1271
6417 msgid "B<F_SETPIPE_SZ> (I<int>; since Linux 2.6.35)"
6421 #: build/C/man2/fcntl.2:1300
6423 "Change the capacity of the pipe referred to by I<fd> to be at least I<arg> "
6424 "bytes. An unprivileged process can adjust the pipe capacity to any value "
6425 "between the system page size and the limit defined in "
6426 "I</proc/sys/fs/pipe-max-size> (see B<proc>(5)). Attempts to set the pipe "
6427 "capacity below the page size are silently rounded up to the page size. "
6428 "Attempts by an unprivileged process to set the pipe capacity above the limit "
6429 "in I</proc/sys/fs/pipe-max-size> yield the error B<EPERM>; a privileged "
6430 "process (B<CAP_SYS_RESOURCE>) can override the limit. When allocating the "
6431 "buffer for the pipe, the kernel may use a capacity larger than I<arg>, if "
6432 "that is convenient for the implementation. The actual capacity that is set "
6433 "is returned as the function result. Attempting to set the pipe capacity "
6434 "smaller than the amount of buffer space currently used to store data "
6435 "produces the error B<EBUSY>."
6439 #: build/C/man2/fcntl.2:1300
6441 msgid "B<F_GETPIPE_SZ> (I<void>; since Linux 2.6.35)"
6445 #: build/C/man2/fcntl.2:1305
6447 "Return (as the function result) the capacity of the pipe referred to by "
6452 #: build/C/man2/fcntl.2:1305
6454 msgid "File Sealing"
6458 #: build/C/man2/fcntl.2:1317
6460 "File seals limit the set of allowed operations on a given file. For each "
6461 "seal that is set on a file, a specific set of operations will fail with "
6462 "B<EPERM> on this file from now on. The file is said to be sealed. The "
6463 "default set of seals depends on the type of the underlying file and "
6464 "filesystem. For an overview of file sealing, a discussion of its purpose, "
6465 "and some code examples, see B<memfd_create>(2)."
6469 #: build/C/man2/fcntl.2:1325
6471 "Currently, only the I<tmpfs> filesystem supports sealing. On other "
6472 "filesystems, all B<fcntl>(2) operations that operate on seals will return "
6477 #: build/C/man2/fcntl.2:1330
6479 "Seals are a property of an inode. Thus, all open file descriptors referring "
6480 "to the same inode share the same set of seals. Furthermore, seals can never "
6481 "be removed, only added."
6485 #: build/C/man2/fcntl.2:1330
6487 msgid "B<F_ADD_SEALS> (I<int>; since Linux 3.17)"
6491 #: build/C/man2/fcntl.2:1348
6493 "Add the seals given in the bit-mask argument I<arg> to the set of seals of "
6494 "the inode referred to by the file descriptor I<fd>. Seals cannot be removed "
6495 "again. Once this call succeeds, the seals are enforced by the kernel "
6496 "immediately. If the current set of seals includes B<F_SEAL_SEAL> (see "
6497 "below), then this call will be rejected with B<EPERM>. Adding a seal that "
6498 "is already set is a no-op, in case B<F_SEAL_SEAL> is not set already. In "
6499 "order to place a seal, the file descriptor I<fd> must be writable."
6503 #: build/C/man2/fcntl.2:1348
6505 msgid "B<F_GET_SEALS> (I<void>; since Linux 3.17)"
6509 #: build/C/man2/fcntl.2:1358
6511 "Return (as the function result) the current set of seals of the inode "
6512 "referred to by I<fd>. If no seals are set, 0 is returned. If the file does "
6513 "not support sealing, -1 is returned and I<errno> is set to B<EINVAL>."
6517 #: build/C/man2/fcntl.2:1360
6518 msgid "The following seals are available:"
6522 #: build/C/man2/fcntl.2:1360
6524 msgid "B<F_SEAL_SEAL>"
6528 #: build/C/man2/fcntl.2:1372
6530 "If this seal is set, any further call to B<fcntl>(2) with B<F_ADD_SEALS> "
6531 "will fail with B<EPERM>. Therefore, this seal prevents any modifications to "
6532 "the set of seals itself. If the initial set of seals of a file includes "
6533 "B<F_SEAL_SEAL>, then this effectively causes the set of seals to be constant "
6538 #: build/C/man2/fcntl.2:1372
6540 msgid "B<F_SEAL_SHRINK>"
6544 #: build/C/man2/fcntl.2:1387
6546 "If this seal is set, the file in question cannot be reduced in size. This "
6547 "affects B<open>(2) with the B<O_TRUNC> flag as well as B<truncate>(2) and "
6548 "B<ftruncate>(2). Those calls will fail with B<EPERM> if you try to shrink "
6549 "the file in question. Increasing the file size is still possible."
6553 #: build/C/man2/fcntl.2:1387
6555 msgid "B<F_SEAL_GROW>"
6559 #: build/C/man2/fcntl.2:1401
6561 "If this seal is set, the size of the file in question cannot be increased. "
6562 "This affects B<write>(2) beyond the end of the file, B<truncate>(2), "
6563 "B<ftruncate>(2), and B<fallocate>(2). These calls will fail with B<EPERM> "
6564 "if you use them to increase the file size. If you keep the size or shrink "
6565 "it, those calls still work as expected."
6569 #: build/C/man2/fcntl.2:1401
6571 msgid "B<F_SEAL_WRITE>"
6574 #. One or more other seals are typically used with F_SEAL_WRITE
6575 #. because, given a file with the F_SEAL_WRITE seal set, then,
6576 #. while it would no longer be possinle to (say) write zeros into
6577 #. the last 100 bytes of a file, it would still be possible
6578 #. to (say) shrink the file by 100 bytes using ftruncate(), and
6579 #. then increase the file size by 100 bytes, which would have
6580 #. the effect of replacing the last hundred bytes by zeros.
6582 #: build/C/man2/fcntl.2:1429
6584 "If this seal is set, you cannot modify the contents of the file. Note that "
6585 "shrinking or growing the size of the file is still possible and allowed. "
6586 "Thus, this seal is normally used in combination with one of the other "
6587 "seals. This seal affects B<write>(2) and B<fallocate>(2) (only in "
6588 "combination with the B<FALLOC_FL_PUNCH_HOLE> flag). Those calls will fail "
6589 "with B<EPERM> if this seal is set. Furthermore, trying to create new "
6590 "shared, writable memory-mappings via B<mmap>(2) will also fail with "
6595 #: build/C/man2/fcntl.2:1444
6597 "Setting B<F_SEAL_WRITE> via B<fcntl>(2) with B<F_ADD_SEALS> will fail with "
6598 "B<EBUSY> if any writable, shared mapping exists. Such mappings must be "
6599 "unmapped before you can add this seal. Furthermore, if there are any "
6600 "asynchronous I/O operations (B<io_submit>(2)) pending on the file, all "
6601 "outstanding writes will be discarded."
6605 #: build/C/man2/fcntl.2:1446
6606 msgid "For a successful call, the return value depends on the operation:"
6610 #: build/C/man2/fcntl.2:1446
6616 #: build/C/man2/fcntl.2:1449
6617 msgid "The new descriptor."
6621 #: build/C/man2/fcntl.2:1449
6627 #: build/C/man2/fcntl.2:1452
6628 msgid "Value of file descriptor flags."
6632 #: build/C/man2/fcntl.2:1452
6638 #: build/C/man2/fcntl.2:1455
6639 msgid "Value of file status flags."
6643 #: build/C/man2/fcntl.2:1455
6645 msgid "B<F_GETLEASE>"
6649 #: build/C/man2/fcntl.2:1458
6650 msgid "Type of lease held on file descriptor."
6654 #: build/C/man2/fcntl.2:1458
6660 #: build/C/man2/fcntl.2:1461
6661 msgid "Value of descriptor owner."
6665 #: build/C/man2/fcntl.2:1461
6671 #: build/C/man2/fcntl.2:1467
6673 "Value of signal sent when read or write becomes possible, or zero for "
6674 "traditional B<SIGIO> behavior."
6678 #: build/C/man2/fcntl.2:1467
6680 msgid "B<F_GETPIPE_SZ>, B<F_SETPIPE_SZ>"
6684 #: build/C/man2/fcntl.2:1470
6685 msgid "The pipe capacity."
6689 #: build/C/man2/fcntl.2:1470
6691 msgid "B<F_GET_SEALS>"
6695 #: build/C/man2/fcntl.2:1475
6697 "A bit mask identifying the seals that have been set for the inode referred "
6702 #: build/C/man2/fcntl.2:1475
6704 msgid "All other commands"
6708 #: build/C/man2/fcntl.2:1478
6713 #: build/C/man2/fcntl.2:1482
6714 msgid "On error, -1 is returned, and I<errno> is set appropriately."
6718 #: build/C/man2/fcntl.2:1483 build/C/man3/lockf.3:122
6720 msgid "B<EACCES> or B<EAGAIN>"
6724 #: build/C/man2/fcntl.2:1486
6725 msgid "Operation is prohibited by locks held by other processes."
6729 #: build/C/man2/fcntl.2:1486 build/C/man2/fork.2:186 build/C/man2/fork.2:191 build/C/man2/fork.2:209
6735 #: build/C/man2/fcntl.2:1490
6737 "The operation is prohibited because the file has been memory-mapped by "
6742 #: build/C/man2/fcntl.2:1494
6743 msgid "I<fd> is not an open file descriptor"
6747 #: build/C/man2/fcntl.2:1503
6749 "I<cmd> is B<F_SETLK> or B<F_SETLKW> and the file descriptor open mode "
6750 "doesn't match with the type of lock requested."
6754 #: build/C/man2/fcntl.2:1512
6756 "I<cmd> is B<F_SETPIPE_SZ> and the new pipe capacity specified in I<arg> is "
6757 "smaller than the amount of buffer space currently used to store data in the "
6762 #: build/C/man2/fcntl.2:1522
6764 "I<cmd> is B<F_ADD_SEALS>, I<arg> includes B<F_SEAL_WRITE>, and there exists "
6765 "a writable, shared mapping on the file referred to by I<fd>."
6769 #: build/C/man2/fcntl.2:1522 build/C/man3/lockf.3:142
6775 #: build/C/man2/fcntl.2:1527
6777 "It was detected that the specified B<F_SETLKW> command would cause a "
6782 #: build/C/man2/fcntl.2:1531
6783 msgid "I<lock> is outside your accessible address space."
6787 #: build/C/man2/fcntl.2:1540
6789 "I<cmd> is B<F_SETLKW> or B<F_OFD_SETLKW> and the operation was interrupted "
6790 "by a signal; see B<signal>(7)."
6794 #: build/C/man2/fcntl.2:1553
6796 "I<cmd> is B<F_GETLK>, B<F_SETLK>, B<F_OFD_GETLK>, or B<F_OFD_SETLK>, and the "
6797 "operation was interrupted by a signal before the lock was checked or "
6798 "acquired. Most likely when locking a remote file (e.g., locking over NFS), "
6799 "but can sometimes happen locally."
6803 #: build/C/man2/fcntl.2:1558
6804 msgid "The value specified in I<cmd> is not recognized by this kernel."
6808 #: build/C/man2/fcntl.2:1566
6809 msgid "I<cmd> is B<F_ADD_SEALS> and I<arg> includes an unrecognized sealing bit."
6813 #: build/C/man2/fcntl.2:1576
6815 "I<cmd> is B<F_ADD_SEALS> or B<F_GET_SEALS> and the filesystem containing the "
6816 "inode referred to by I<fd> does not support sealing."
6820 #: build/C/man2/fcntl.2:1588
6822 "I<cmd> is B<F_DUPFD> and I<arg> is negative or is greater than the maximum "
6823 "allowable value (see the discussion of B<RLIMIT_NOFILE> in B<getrlimit>(2))."
6827 #: build/C/man2/fcntl.2:1596
6828 msgid "I<cmd> is B<F_SETSIG> and I<arg> is not an allowable signal number."
6832 #: build/C/man2/fcntl.2:1607
6834 "I<cmd> is B<F_OFD_SETLK>, B<F_OFD_SETLKW>, or B<F_OFD_GETLK>, and I<l_pid> "
6835 "was not specified as zero."
6839 #: build/C/man2/fcntl.2:1613
6841 "I<cmd> is B<F_DUPFD> and the process already has the maximum number of file "
6846 #: build/C/man2/fcntl.2:1613 build/C/man2/flock.2:131 build/C/man3/lockf.3:151
6852 #: build/C/man2/fcntl.2:1617
6854 "Too many segment locks open, lock table is full, or a remote locking "
6855 "protocol failed (e.g., locking over NFS)."
6859 #: build/C/man2/fcntl.2:1625
6861 "B<F_NOTIFY> was specified in I<cmd>, but I<fd> does not refer to a "
6866 #: build/C/man2/fcntl.2:1630
6868 "Attempted to clear the B<O_APPEND> flag on a file that has the append-only "
6873 #: build/C/man2/fcntl.2:1640
6875 "I<cmd> was B<F_ADD_SEALS>, but I<fd> was not open for writing or the current "
6876 "set of seals on the file already includes B<F_SEAL_SEAL>."
6880 #: build/C/man2/fcntl.2:1653
6882 "SVr4, 4.3BSD, POSIX.1-2001. Only the operations B<F_DUPFD>, B<F_GETFD>, "
6883 "B<F_SETFD>, B<F_GETFL>, B<F_SETFL>, B<F_GETLK>, B<F_SETLK>, and B<F_SETLKW> "
6884 "are specified in POSIX.1-2001."
6888 #: build/C/man2/fcntl.2:1665
6890 "B<F_GETOWN> and B<F_SETOWN> are specified in POSIX.1-2001. (To get their "
6891 "definitions, define either B<_BSD_SOURCE>, or B<_XOPEN_SOURCE> with the "
6892 "value 500 or greater, or B<_POSIX_C_SOURCE> with the value 200809L or "
6897 #: build/C/man2/fcntl.2:1673
6899 "B<F_DUPFD_CLOEXEC> is specified in POSIX.1-2008. (To get this definition, "
6900 "define B<_POSIX_C_SOURCE> with the value 200809L or greater, or "
6901 "B<_XOPEN_SOURCE> with the value 700 or greater.)"
6905 #. SVr4 documents additional EIO, ENOLINK and EOVERFLOW error conditions.
6907 #: build/C/man2/fcntl.2:1690
6909 "B<F_GETOWN_EX>, B<F_SETOWN_EX>, B<F_SETPIPE_SZ>, B<F_GETPIPE_SZ>, "
6910 "B<F_GETSIG>, B<F_SETSIG>, B<F_NOTIFY>, B<F_GETLEASE>, and B<F_SETLEASE> are "
6911 "Linux-specific. (Define the B<_GNU_SOURCE> macro to obtain these "
6916 #: build/C/man2/fcntl.2:1699
6918 "B<F_OFD_SETLK>, B<F_OFD_SETLKW>, and B<F_OFD_GETLK> are Linux-specific (and "
6919 "one must define B<_GNU_SOURCE> to obtain their definitions), but work is "
6920 "being done to have them included in the next version of POSIX.1."
6923 #. FIXME . Once glibc adds support, add a note about FTM requirements
6925 #: build/C/man2/fcntl.2:1705
6926 msgid "B<F_ADD_SEALS> and B<F_GET_SEALS> are Lnux-specific."
6930 #: build/C/man2/fcntl.2:1711 build/C/man2/fcntl.2:1737
6932 "The errors returned by B<dup2>(2) are different from those returned by "
6937 #: build/C/man2/fcntl.2:1711
6939 msgid "File locking"
6943 #: build/C/man2/fcntl.2:1732 build/C/man2/fcntl.2:1776
6945 "The original Linux B<fcntl>() system call was not designed to handle large "
6946 "file offsets (in the I<flock> structure). Consequently, an B<fcntl64>() "
6947 "system call was added in Linux 2.4. The newer system call employs a "
6948 "different structure for file locking, I<flock64>, and corresponding "
6949 "commands, B<F_GETLK64>, B<F_SETLK64>, and B<F_SETLKW64>. However, these "
6950 "details can be ignored by applications using glibc, whose B<fcntl>() "
6951 "wrapper function transparently employs the more recent system call where it "
6956 #: build/C/man2/fcntl.2:1737
6958 msgid "Record locks"
6962 #: build/C/man2/fcntl.2:1743
6964 "Since kernel 2.0, there is no interaction between the types of lock placed "
6965 "by B<flock>(2) and B<fcntl>()."
6968 #. e.g., Solaris 8 documents this field in fcntl(2), and Irix 6.5
6969 #. documents it in fcntl(5). mtk, May 2007
6970 #. Also, FreeBSD documents it (Apr 2014).
6972 #: build/C/man2/fcntl.2:1755
6974 "Several systems have more fields in I<struct flock> such as, for example, "
6975 "I<l_sysid>. Clearly, I<l_pid> alone is not going to be very useful if the "
6976 "process holding the lock may live on a different machine."
6980 #: build/C/man2/fcntl.2:1776
6982 msgid "Record locking and NFS"
6986 #. Neil Brown: With NFSv3 the failure mode is the reverse. If
6987 #. the server loses contact with a client then any lock stays in place
6988 #. indefinitely ("why can't I read my mail"... I remember it well).
6992 #. Note that this is not a firm timeout. The server runs a job
6993 #. periodically to clean out expired stateful objects, and it's likely
6994 #. that there is some time (maybe even up to another whole lease period)
6995 #. between when the timeout expires and the job actually runs. If the
6996 #. client gets a RENEW in there within that window, its lease will be
6997 #. renewed and its state preserved.
6999 #: build/C/man2/fcntl.2:1804
7001 "Before Linux 3.12, if an NFSv4 client loses contact with the server for a "
7002 "period of time (defined as more than 90 seconds with no communication), it "
7003 "might lose and regain a lock without ever being aware of the fact. (The "
7004 "period of time after which contact is assumed lost is known as the NFSv4 "
7005 "leasetime. On a Linux NFS server, this can be determined by looking at "
7006 "I</proc/fs/nfsd/nfsv4leasetime>, which expresses the period in seconds. The "
7007 "default value for this file is 90.) This scenario potentially risks data "
7008 "corruption, since another process might acquire a lock in the intervening "
7009 "period and perform file I/O."
7012 #. commit ef1820f9be27b6ad158f433ab38002ab8131db4d
7013 #. commit f6de7a39c181dfb8a2c534661a53c73afb3081cd
7015 #: build/C/man2/fcntl.2:1818
7017 "Since Linux 3.12, if an NFSv4 client loses contact with the server, any I/O "
7018 "to the file by a process which \"thinks\" it holds a lock will fail until "
7019 "that process closes and reopens the file. A kernel parameter, "
7020 "I<nfs.recover_lost_locks>, can be set to 1 to obtain the pre-3.12 behavior, "
7021 "whereby the client will attempt to recover lost locks when contact is "
7022 "reestablished with the server. Because of the attendant risk of data "
7023 "corruption, this parameter defaults to 0 (disabled)."
7027 #: build/C/man2/fcntl.2:1819
7032 #. FIXME . According to POSIX.1-2001, O_SYNC should also be modifiable
7033 #. via fcntl(2), but currently Linux does not permit this
7034 #. See http://bugzilla.kernel.org/show_bug.cgi?id=5994
7036 #: build/C/man2/fcntl.2:1831
7038 "It is not possible to use B<F_SETFL> to change the state of the B<O_DSYNC> "
7039 "and B<O_SYNC> flags. Attempts to change the state of these flags are "
7044 #: build/C/man2/fcntl.2:1831
7049 #. glibc source: sysdeps/unix/sysv/linux/i386/sysdep.h
7050 #. mtk, Dec 04: some limited testing on alpha and ia64 seems to
7051 #. indicate that ANY negative PGID value will cause F_GETOWN
7052 #. to misinterpret the return as an error. Some other architectures
7053 #. seem to have the same range check as i386.
7055 #: build/C/man2/fcntl.2:1857
7057 "A limitation of the Linux system call conventions on some architectures "
7058 "(notably i386) means that if a (negative) process group ID to be returned "
7059 "by B<F_GETOWN> falls in the range -1 to -4095, then the return value is "
7060 "wrongly interpreted by glibc as an error in the system call; that is, the "
7061 "return value of B<fcntl>() will be -1, and I<errno> will contain the "
7062 "(positive) process group ID. The Linux-specific B<F_GETOWN_EX> operation "
7063 "avoids this problem. Since glibc version 2.11, glibc makes the kernel "
7064 "B<F_GETOWN> problem invisible by implementing B<F_GETOWN> using "
7069 #: build/C/man2/fcntl.2:1857
7075 #: build/C/man2/fcntl.2:1875
7077 "In Linux 2.4 and earlier, there is bug that can occur when an unprivileged "
7078 "process uses B<F_SETOWN> to specify the owner of a socket file descriptor as "
7079 "a process (group) other than the caller. In this case, B<fcntl>() can "
7080 "return -1 with I<errno> set to B<EPERM>, even when the owner process (group) "
7081 "is one that the caller has permission to send signals to. Despite this "
7082 "error return, the file descriptor owner is set, and signals will be sent to "
7087 #: build/C/man2/fcntl.2:1875
7089 msgid "Deadlock detection"
7093 #: build/C/man2/fcntl.2:1894
7095 "The deadlock-detection algorithm employed by the kernel when dealing with "
7096 "B<F_SETLKW> requests can yield both false negatives (failures to detect "
7097 "deadlocks, leaving a set of deadlocked processes blocked indefinitely) and "
7098 "false positives (B<EDEADLK> errors when there is no deadlock). For example, "
7099 "the kernel limits the lock depth of its dependency search to 10 steps, "
7100 "meaning that circular deadlock chains that exceed that size will not be "
7101 "detected. In addition, the kernel may falsely indicate a deadlock when two "
7102 "or more processes created using the B<clone>(2) B<CLONE_FILES> flag place "
7103 "locks that appear (to the kernel) to conflict."
7106 #. http://marc.info/?l=linux-kernel&m=119013491707153&w=2
7108 #. Reconfirmed by Jeff Layton
7109 #. From: Jeff Layton <jlayton <at> redhat.com>
7110 #. Subject: Re: Status of fcntl() mandatory locking
7111 #. Newsgroups: gmane.linux.file-systems
7112 #. Date: 2014-04-28 10:07:57 GMT
7113 #. http://thread.gmane.org/gmane.linux.file-systems/84481/focus=84518
7115 #: build/C/man2/fcntl.2:1916
7117 "The Linux implementation of mandatory locking is subject to race conditions "
7118 "which render it unreliable: a B<write>(2) call that overlaps with a lock "
7119 "may modify data after the mandatory lock is acquired; a B<read>(2) call "
7120 "that overlaps with a lock may detect changes to data that were made only "
7121 "after a write lock was acquired. Similar races exist between mandatory "
7122 "locks and B<mmap>(2). It is therefore inadvisable to rely on mandatory "
7127 #: build/C/man2/fcntl.2:1924
7129 "B<dup2>(2), B<flock>(2), B<open>(2), B<socket>(2), B<lockf>(3), "
7130 "B<capabilities>(7), B<feature_test_macros>(7)"
7134 #: build/C/man2/fcntl.2:1937
7136 "I<locks.txt>, I<mandatory-locking.txt>, and I<dnotify.txt> in the Linux "
7137 "kernel source directory I<Documentation/filesystems/> (on older kernels, "
7138 "these files are directly under the I<Documentation/> directory, and "
7139 "I<mandatory-locking.txt> is called I<mandatory.txt>)"
7143 #: build/C/man3/fexecve.3:25
7149 #: build/C/man3/fexecve.3:28
7150 msgid "fexecve - execute program specified via file descriptor"
7154 #: build/C/man3/fexecve.3:33
7157 "B<int fexecve(int >I<fd>B<, char *const >I<argv>B<[], char *const "
7162 #: build/C/man3/fexecve.3:41
7163 msgid "B<fexecve>():"
7167 #: build/C/man3/fexecve.3:50 build/C/man3/getcwd.3:54
7171 #. POSIX.1-2008 specifies the O_EXEC flag for open as an alternative,
7172 #. but Linux doesn't support this flag yet.
7174 #: build/C/man3/fexecve.3:67
7176 "B<fexecve>() performs the same task as B<execve>(2), with the difference "
7177 "that the file to be executed is specified via a file descriptor, I<fd>, "
7178 "rather than via a pathname. The file descriptor I<fd> must be opened "
7179 "read-only, and the caller must have permission to execute the file that it "
7184 #: build/C/man3/fexecve.3:74
7186 "A successful call to B<fexecve>() never returns. On error, the function "
7187 "does return, with a result value of -1, and I<errno> is set appropriately."
7191 #: build/C/man3/fexecve.3:78
7192 msgid "Errors are as for B<execve>(2), with the following additions:"
7196 #: build/C/man3/fexecve.3:86
7198 "I<fd> is not a valid file descriptor, or I<argv> is NULL, or I<envp> is "
7203 #: build/C/man3/fexecve.3:91
7204 msgid "The I</proc> filesystem could not be accessed."
7208 #: build/C/man3/fexecve.3:94
7209 msgid "B<fexecve>() is implemented since glibc 2.3.2."
7213 #: build/C/man3/fexecve.3:99
7215 "POSIX.1-2008. This function is not specified in POSIX.1-2001, and is not "
7216 "widely available on other systems. It is specified in POSIX.1-2008."
7220 #. With the addition of the execveat(2), fexecve() can be implemented
7221 #. even where /proc is unavailable. Review future glibc releases to
7222 #. see if the implementation is changed to use execveat(2).
7224 #: build/C/man3/fexecve.3:111
7226 "On Linux, B<fexecve>() is implemented using the B<proc>(5) filesystem, so "
7227 "I</proc> needs to be mounted and available at the time of the call."
7231 #: build/C/man3/fexecve.3:128
7233 "The idea behind B<fexecve>() is to allow the caller to verify (checksum) "
7234 "the contents of an executable before executing it. Simply opening the file, "
7235 "checksumming the contents, and then doing an B<execve>(2) would not "
7236 "suffice, since, between the two steps, the filename, or a directory prefix "
7237 "of the pathname, could have been exchanged (by, for example, modifying the "
7238 "target of a symbolic link). B<fexecve>() does not mitigate the problem "
7239 "that the I<contents> of a file could be changed between the checksumming and "
7240 "the call to B<fexecve>(); for that, the solution is to ensure that the "
7241 "permissions on the file prevent it from being modified by malicious users."
7245 #: build/C/man3/fexecve.3:146
7247 "The natural idiom when using B<fexecve>() is to set the close-on-exec flag "
7248 "on I<fd>, so that the file descriptor does not leak through to the program "
7249 "that is executed. This approach is natural for two reasons. First, it "
7250 "prevents file descriptors being consumed unnecessarily. (The executed "
7251 "program normally has no need of a file descriptor that refers to the program "
7252 "itself.) Second, if B<fexecve>() is used recursively, employing the "
7253 "close-on-exec flag prevents the file descriptor exhaustion that would result "
7254 "from the fact that each step in the recursion would cause one more file "
7255 "descriptor to be passed to the new program. (But see BUGS.)"
7259 #: build/C/man3/fexecve.3:165
7261 "If I<fd> refers to a script (i.e., it is an executable text file that names "
7262 "a script interpreter with a first line that begins with the characters "
7263 "I<#!>) and the close-on-exec flag has been set for I<fd>, then B<fexecve>() "
7264 "fails with the error B<ENOENT>. This error occurs because, by the time the "
7265 "script interpreter is executed, I<fd> has already been closed because of the "
7266 "close-on-exec flag. Thus, the close-on-exec flag can't be set on I<fd> if "
7267 "it refers to a script, leading to the problems described in NOTES."
7271 #: build/C/man3/fexecve.3:168
7272 msgid "B<execve>(2), B<execveat>(2)"
7276 #: build/C/man2/flock.2:35
7282 #: build/C/man2/flock.2:35 build/C/man2/uname.2:27
7288 #: build/C/man2/flock.2:38
7289 msgid "flock - apply or remove an advisory lock on an open file"
7293 #: build/C/man2/flock.2:40
7294 msgid "B<#include E<lt>sys/file.hE<gt>>"
7298 #: build/C/man2/flock.2:42
7299 msgid "B<int flock(int >I<fd>B<, int >I<operation>B<);>"
7303 #: build/C/man2/flock.2:48
7305 "Apply or remove an advisory lock on the open file specified by I<fd>. The "
7306 "argument I<operation> is one of the following:"
7310 #: build/C/man2/flock.2:49
7316 #: build/C/man2/flock.2:54
7318 "Place a shared lock. More than one process may hold a shared lock for a "
7319 "given file at a given time."
7323 #: build/C/man2/flock.2:54
7329 #: build/C/man2/flock.2:59
7331 "Place an exclusive lock. Only one process may hold an exclusive lock for a "
7332 "given file at a given time."
7336 #: build/C/man2/flock.2:59
7342 #: build/C/man2/flock.2:62
7343 msgid "Remove an existing lock held by this process."
7347 #: build/C/man2/flock.2:71
7349 "A call to B<flock>() may block if an incompatible lock is held by another "
7350 "process. To make a nonblocking request, include B<LOCK_NB> (by ORing) with "
7351 "any of the above operations."
7355 #: build/C/man2/flock.2:73
7356 msgid "A single file may not simultaneously have both shared and exclusive locks."
7360 #: build/C/man2/flock.2:88
7362 "Locks created by B<flock>() are associated with an open file description "
7363 "(see B<open>(2)). This means that duplicate file descriptors (created by, "
7364 "for example, B<fork>(2) or B<dup>(2)) refer to the same lock, and this "
7365 "lock may be modified or released using any of these descriptors. "
7366 "Furthermore, the lock is released either by an explicit B<LOCK_UN> operation "
7367 "on any of these duplicate descriptors, or when all such descriptors have "
7372 #: build/C/man2/flock.2:97
7374 "If a process uses B<open>(2) (or similar) to obtain more than one "
7375 "descriptor for the same file, these descriptors are treated independently by "
7376 "B<flock>(). An attempt to lock the file using one of these file descriptors "
7377 "may be denied by a lock that the calling process has already placed via "
7378 "another descriptor."
7382 #: build/C/man2/flock.2:104
7384 "A process may hold only one type of lock (shared or exclusive) on a file. "
7385 "Subsequent B<flock>() calls on an already locked file will convert an "
7386 "existing lock to the new lock mode."
7390 #: build/C/man2/flock.2:109
7391 msgid "Locks created by B<flock>() are preserved across an B<execve>(2)."
7395 #: build/C/man2/flock.2:112
7397 "A shared or exclusive lock can be placed on a file regardless of the mode in "
7398 "which the file was opened."
7402 #: build/C/man2/flock.2:122
7403 msgid "I<fd> is not an open file descriptor."
7407 #: build/C/man2/flock.2:127
7409 "While waiting to acquire a lock, the call was interrupted by delivery of a "
7410 "signal caught by a handler; see B<signal>(7)."
7414 #: build/C/man2/flock.2:131
7415 msgid "I<operation> is invalid."
7419 #: build/C/man2/flock.2:134
7420 msgid "The kernel ran out of memory for allocating lock records."
7424 #: build/C/man2/flock.2:134
7426 msgid "B<EWOULDBLOCK>"
7430 #: build/C/man2/flock.2:139
7431 msgid "The file is locked and the B<LOCK_NB> flag was selected."
7435 #: build/C/man2/flock.2:148
7437 "4.4BSD (the B<flock>() call first appeared in 4.2BSD). A version of "
7438 "B<flock>(), possibly implemented in terms of B<fcntl>(2), appears on most "
7442 #. E.g., according to the flock(2) man page, FreeBSD since at least 5.3
7444 #: build/C/man2/flock.2:171
7446 "Since kernel 2.0, B<flock>() is implemented as a system call in its own "
7447 "right rather than being emulated in the GNU C library as a call to "
7448 "B<fcntl>(2). With this implementation, there is no interaction between the "
7449 "types of lock placed by B<flock>() and B<fcntl>(2), and B<flock>() does "
7450 "not detect deadlock. (Note, however, that on some systems, such as the "
7451 "modern BSDs, B<flock>() and B<fcntl>(2) locks I<do> interact with one "
7455 #. commit 5eebde23223aeb0ad2d9e3be6590ff8bbfab0fc2
7457 #: build/C/man2/flock.2:202
7459 "In Linux kernels up to 2.6.11, B<flock>() does not lock files over NFS "
7460 "(i.e., the scope of locks was limited to the local system). Instead, one "
7461 "could use B<fcntl>(2) byte-range locking, which does work over NFS, given a "
7462 "sufficiently recent version of Linux and a server which supports locking. "
7463 "Since Linux 2.6.12, NFS clients support B<flock>() locks by emulating them "
7464 "as byte-range locks on the entire file. This means that B<fcntl>(2) and "
7465 "B<flock>() locks I<do> interact with one another over NFS. Since Linux "
7466 "2.6.37, the kernel supports a compatibility mode that allows B<flock>() "
7467 "locks (and also B<fcntl>(2) byte region locks) to be treated as local; see "
7468 "the discussion of the I<local_lock> option in B<nfs>(5)."
7472 #: build/C/man2/flock.2:208
7474 "B<flock>() places advisory locks only; given suitable permissions on a "
7475 "file, a process is free to ignore the use of B<flock>() and perform I/O on "
7480 #: build/C/man2/flock.2:221
7482 "B<flock>() and B<fcntl>(2) locks have different semantics with respect to "
7483 "forked processes and B<dup>(2). On systems that implement B<flock>() using "
7484 "B<fcntl>(2), the semantics of B<flock>() will be different from those "
7485 "described in this manual page."
7488 #. Kernel 2.5.21 changed things a little: during lock conversion
7489 #. it is now the highest priority process that will get the lock -- mtk
7491 #: build/C/man2/flock.2:234
7493 "Converting a lock (shared to exclusive, or vice versa) is not guaranteed to "
7494 "be atomic: the existing lock is first removed, and then a new lock is "
7495 "established. Between these two steps, a pending lock request by another "
7496 "process may be granted, with the result that the conversion either blocks, "
7497 "or fails if B<LOCK_NB> was specified. (This is the original BSD behavior, "
7498 "and occurs on many other implementations.)"
7502 #: build/C/man2/flock.2:243
7504 "B<flock>(1), B<close>(2), B<dup>(2), B<execve>(2), B<fcntl>(2), B<fork>(2), "
7505 "B<open>(2), B<lockf>(3)"
7509 #: build/C/man2/flock.2:248
7511 "I<Documentation/filesystems/locks.txt> in the Linux kernel source tree "
7512 "(I<Documentation/locks.txt> in older kernels)"
7516 #: build/C/man2/fork.2:39
7522 #: build/C/man2/fork.2:39 build/C/man3/fpathconf.3:41 build/C/man2/swapon.2:42
7528 #: build/C/man2/fork.2:42
7529 msgid "fork - create a child process"
7533 #: build/C/man2/fork.2:46
7534 msgid "B<pid_t fork(void);>"
7538 #: build/C/man2/fork.2:52
7540 "B<fork>() creates a new process by duplicating the calling process. The "
7541 "new process, referred to as the I<child>, is an exact duplicate of the "
7542 "calling process, referred to as the I<parent>, except for the following "
7547 #: build/C/man2/fork.2:56
7549 "The child has its own unique process ID, and this PID does not match the ID "
7550 "of any existing process group (B<setpgid>(2))."
7554 #: build/C/man2/fork.2:58
7555 msgid "The child's parent process ID is the same as the parent's process ID."
7559 #: build/C/man2/fork.2:62
7561 "The child does not inherit its parent's memory locks (B<mlock>(2), "
7566 #: build/C/man2/fork.2:68
7568 "Process resource utilizations (B<getrusage>(2)) and CPU time counters "
7569 "(B<times>(2)) are reset to zero in the child."
7573 #: build/C/man2/fork.2:71
7574 msgid "The child's set of pending signals is initially empty (B<sigpending>(2))."
7578 #: build/C/man2/fork.2:74
7580 "The child does not inherit semaphore adjustments from its parent "
7585 #: build/C/man2/fork.2:82
7587 "The child does not inherit process-associated record locks from its parent "
7588 "(B<fcntl>(2)). (On the other hand, it does inherit B<fcntl>(2) open file "
7589 "description locks and B<flock>(2) locks from its parent.)"
7593 #: build/C/man2/fork.2:87
7595 "The child does not inherit timers from its parent (B<setitimer>(2), "
7596 "B<alarm>(2), B<timer_create>(2))."
7600 #: build/C/man2/fork.2:94
7602 "The child does not inherit outstanding asynchronous I/O operations from its "
7603 "parent (B<aio_read>(3), B<aio_write>(3)), nor does it inherit any "
7604 "asynchronous I/O contexts from its parent (see B<io_setup>(2))."
7608 #: build/C/man2/fork.2:99
7610 "The process attributes in the preceding list are all specified in "
7611 "POSIX.1-2001. The parent and child also differ with respect to the "
7612 "following Linux-specific process attributes:"
7616 #: build/C/man2/fork.2:106
7618 "The child does not inherit directory change notifications (dnotify) from "
7619 "its parent (see the description of B<F_NOTIFY> in B<fcntl>(2))."
7623 #: build/C/man2/fork.2:112
7625 "The B<prctl>(2) B<PR_SET_PDEATHSIG> setting is reset so that the child does "
7626 "not receive a signal when its parent terminates."
7630 #: build/C/man2/fork.2:119
7632 "The default timer slack value is set to the parent's current timer slack "
7633 "value. See the description of B<PR_SET_TIMERSLACK> in B<prctl>(2)."
7637 #: build/C/man2/fork.2:125
7639 "Memory mappings that have been marked with the B<madvise>(2) "
7640 "B<MADV_DONTFORK> flag are not inherited across a B<fork>()."
7644 #: build/C/man2/fork.2:130
7645 msgid "The termination signal of the child is always B<SIGCHLD> (see B<clone>(2))."
7649 #: build/C/man2/fork.2:136
7651 "The port access permission bits set by B<ioperm>(2) are not inherited by "
7652 "the child; the child must turn on any bits that it requires using "
7657 #: build/C/man2/fork.2:147
7659 "The child process is created with a single thread\\(emthe one that called "
7660 "B<fork>(). The entire virtual address space of the parent is replicated in "
7661 "the child, including the states of mutexes, condition variables, and other "
7662 "pthreads objects; the use of B<pthread_atfork>(3) may be helpful for "
7663 "dealing with problems that this can cause."
7667 #: build/C/man2/fork.2:161
7669 "The child inherits copies of the parent's set of open file descriptors. "
7670 "Each file descriptor in the child refers to the same open file description "
7671 "(see B<open>(2)) as the corresponding file descriptor in the parent. This "
7672 "means that the two descriptors share open file status flags, current file "
7673 "offset, and signal-driven I/O attributes (see the description of B<F_SETOWN> "
7674 "and B<F_SETSIG> in B<fcntl>(2))."
7678 #: build/C/man2/fork.2:170
7680 "The child inherits copies of the parent's set of open message queue "
7681 "descriptors (see B<mq_overview>(7)). Each descriptor in the child refers to "
7682 "the same open message queue description as the corresponding descriptor in "
7683 "the parent. This means that the two descriptors share the same flags "
7688 #: build/C/man2/fork.2:178
7690 "The child inherits copies of the parent's set of open directory streams (see "
7691 "B<opendir>(3)). POSIX.1-2001 says that the corresponding directory streams "
7692 "in the parent and child I<may> share the directory stream positioning; on "
7693 "Linux/glibc they do not."
7697 #: build/C/man2/fork.2:185
7699 "On success, the PID of the child process is returned in the parent, and 0 is "
7700 "returned in the child. On failure, -1 is returned in the parent, no child "
7701 "process is created, and I<errno> is set appropriately."
7705 #: build/C/man2/fork.2:191
7707 "B<fork>() cannot allocate sufficient memory to copy the parent's page "
7708 "tables and allocate a task structure for the child."
7711 #. NOTE! The following should match the description in pthread_create(3)
7713 #: build/C/man2/fork.2:209
7715 "A system-imposed limit on the number of threads was encountered. There are "
7716 "a number of limits that may trigger this error: the B<RLIMIT_NPROC> soft "
7717 "resource limit (set via B<setrlimit>(2)), which limits the number of "
7718 "processes and threads for a real user ID, was reached; the kernel's "
7719 "system-wide limit on the number of processes and threads, "
7720 "I</proc/sys/kernel/threads-max>, was reached (see B<proc>(5)); or the "
7721 "maximum number of PIDs, I</proc/sys/kernel/pid_max>, was reached (see "
7726 #: build/C/man2/fork.2:216
7728 "The caller is operating under the B<SCHED_DEADLINE> scheduling policy and "
7729 "does not have the reset-on-fork flag set. See B<sched>(7)."
7733 #: build/C/man2/fork.2:220
7735 "B<fork>() failed to allocate the necessary kernel structures because memory "
7739 #. e.g., arm (optionally), blackfin, c6x, frv, h8300, microblaze, xtensa
7741 #: build/C/man2/fork.2:226
7743 "B<fork>() is not supported on this platform (for example, hardware without "
7744 "a Memory-Management Unit)."
7748 #: build/C/man2/fork.2:235
7750 "Under Linux, B<fork>() is implemented using copy-on-write pages, so the "
7751 "only penalty that it incurs is the time and memory required to duplicate the "
7752 "parent's page tables, and to create a unique task structure for the child."
7755 #. nptl/sysdeps/unix/sysv/linux/fork.c
7756 #. and does some magic to ensure that getpid(2) returns the right value.
7758 #: build/C/man2/fork.2:259
7760 "Since version 2.3.3, rather than invoking the kernel's B<fork>() system "
7761 "call, the glibc B<fork>() wrapper that is provided as part of the NPTL "
7762 "threading implementation invokes B<clone>(2) with flags that provide the "
7763 "same effect as the traditional system call. (A call to B<fork>() is "
7764 "equivalent to a call to B<clone>(2) specifying I<flags> as just "
7765 "B<SIGCHLD>.) The glibc wrapper invokes any fork handlers that have been "
7766 "established using B<pthread_atfork>(3)."
7770 #: build/C/man2/fork.2:264
7771 msgid "See B<pipe>(2) and B<wait>(2)."
7775 #: build/C/man2/fork.2:275
7777 "B<clone>(2), B<execve>(2), B<exit>(2), B<setrlimit>(2), B<unshare>(2), "
7778 "B<vfork>(2), B<wait>(2), B<daemon>(3), B<capabilities>(7), B<credentials>(7)"
7782 #: build/C/man3/fpathconf.3:41
7788 #: build/C/man3/fpathconf.3:44
7789 msgid "fpathconf, pathconf - get configuration values for files"
7793 #: build/C/man3/fpathconf.3:49
7795 msgid "B<long fpathconf(int >I<fd>B<, int >I<name>B<);>\n"
7799 #: build/C/man3/fpathconf.3:51
7801 msgid "B<long pathconf(const char *>I<path>B<, int >I<name>B<);>\n"
7805 #: build/C/man3/fpathconf.3:58
7807 "B<fpathconf>() gets a value for the configuration option I<name> for the "
7808 "open file descriptor I<fd>."
7812 #: build/C/man3/fpathconf.3:64
7814 "B<pathconf>() gets a value for configuration option I<name> for the "
7819 #: build/C/man3/fpathconf.3:73
7821 "The corresponding macros defined in I<E<lt>unistd.hE<gt>> are minimum "
7822 "values; if an application wants to take advantage of values which may "
7823 "change, a call to B<fpathconf>() or B<pathconf>() can be made, which may "
7824 "yield more liberal results."
7828 #: build/C/man3/fpathconf.3:78
7830 "Setting I<name> equal to one of the following constants returns the "
7831 "following configuration options:"
7835 #: build/C/man3/fpathconf.3:78
7837 msgid "B<_PC_LINK_MAX>"
7841 #: build/C/man3/fpathconf.3:88
7843 "returns the maximum number of links to the file. If I<fd> or I<path> refer "
7844 "to a directory, then the value applies to the whole directory. The "
7845 "corresponding macro is B<_POSIX_LINK_MAX>."
7849 #: build/C/man3/fpathconf.3:88
7851 msgid "B<_PC_MAX_CANON>"
7855 #: build/C/man3/fpathconf.3:97
7857 "returns the maximum length of a formatted input line, where I<fd> or I<path> "
7858 "must refer to a terminal. The corresponding macro is B<_POSIX_MAX_CANON>."
7862 #: build/C/man3/fpathconf.3:97
7864 msgid "B<_PC_MAX_INPUT>"
7868 #: build/C/man3/fpathconf.3:106
7870 "returns the maximum length of an input line, where I<fd> or I<path> must "
7871 "refer to a terminal. The corresponding macro is B<_POSIX_MAX_INPUT>."
7875 #: build/C/man3/fpathconf.3:106
7877 msgid "B<_PC_NAME_MAX>"
7881 #: build/C/man3/fpathconf.3:115
7883 "returns the maximum length of a filename in the directory I<path> or I<fd> "
7884 "that the process is allowed to create. The corresponding macro is "
7885 "B<_POSIX_NAME_MAX>."
7889 #: build/C/man3/fpathconf.3:115
7891 msgid "B<_PC_PATH_MAX>"
7895 #: build/C/man3/fpathconf.3:124
7897 "returns the maximum length of a relative pathname when I<path> or I<fd> is "
7898 "the current working directory. The corresponding macro is "
7899 "B<_POSIX_PATH_MAX>."
7903 #: build/C/man3/fpathconf.3:124
7905 msgid "B<_PC_PIPE_BUF>"
7909 #: build/C/man3/fpathconf.3:133
7911 "returns the size of the pipe buffer, where I<fd> must refer to a pipe or "
7912 "FIFO and I<path> must refer to a FIFO. The corresponding macro is "
7913 "B<_POSIX_PIPE_BUF>."
7917 #: build/C/man3/fpathconf.3:133
7919 msgid "B<_PC_CHOWN_RESTRICTED>"
7923 #: build/C/man3/fpathconf.3:146
7925 "returns nonzero if the B<chown>(2) call may not be used on this file. If "
7926 "I<fd> or I<path> refer to a directory, then this applies to all files in "
7927 "that directory. The corresponding macro is B<_POSIX_CHOWN_RESTRICTED>."
7931 #: build/C/man3/fpathconf.3:146
7933 msgid "B<_PC_NO_TRUNC>"
7937 #: build/C/man3/fpathconf.3:153
7939 "returns nonzero if accessing filenames longer than B<_POSIX_NAME_MAX> "
7940 "generates an error. The corresponding macro is B<_POSIX_NO_TRUNC>."
7944 #: build/C/man3/fpathconf.3:153
7946 msgid "B<_PC_VDISABLE>"
7950 #: build/C/man3/fpathconf.3:160
7952 "returns nonzero if special character processing can be disabled, where I<fd> "
7953 "or I<path> must refer to a terminal."
7957 #: build/C/man3/fpathconf.3:169
7959 "The limit is returned, if one exists. If the system does not have a limit "
7960 "for the requested resource, -1 is returned, and I<errno> is unchanged. If "
7961 "there is an error, -1 is returned, and I<errno> is set to reflect the nature "
7966 #: build/C/man3/fpathconf.3:177
7968 "Files with name lengths longer than the value returned for I<name> equal to "
7969 "B<_PC_NAME_MAX> may exist in the given directory."
7973 #: build/C/man3/fpathconf.3:180 build/C/man3/sysconf.3:338
7975 "Some returned values may be huge; they are not suitable for allocating "
7980 #: build/C/man3/fpathconf.3:186
7981 msgid "B<getconf>(1), B<open>(2), B<statfs>(2), B<confstr>(3), B<sysconf>(3)"
7985 #: build/C/man2/fsync.2:38
7991 #: build/C/man2/fsync.2:41
7992 msgid "fsync, fdatasync - synchronize a file's in-core state with storage device"
7996 #: build/C/man2/fsync.2:45
7997 msgid "B<int fsync(int >I<fd>B<);>"
8001 #: build/C/man2/fsync.2:47
8002 msgid "B<int fdatasync(int >I<fd>B<);>"
8006 #: build/C/man2/fsync.2:55
8007 msgid "B<fsync>(): _BSD_SOURCE || _XOPEN_SOURCE"
8010 #. _POSIX_C_SOURCE\ >=\ 200112L only since glibc 2.8
8012 #: build/C/man2/fsync.2:58
8014 msgid " || /* since glibc 2.8: */ _POSIX_C_SOURCE\\ E<gt>=\\ 200112L\n"
8018 #: build/C/man2/fsync.2:61
8020 "B<fdatasync>(): _POSIX_C_SOURCE\\ E<gt>=\\ 199309L || _XOPEN_SOURCE\\ "
8025 #: build/C/man2/fsync.2:74
8027 "B<fsync>() transfers (\"flushes\") all modified in-core data of (i.e., "
8028 "modified buffer cache pages for) the file referred to by the file descriptor "
8029 "I<fd> to the disk device (or other permanent storage device) so that all "
8030 "changed information can be retrieved even after the system crashed or was "
8031 "rebooted. This includes writing through or flushing a disk cache if "
8032 "present. The call blocks until the device reports that the transfer has "
8033 "completed. It also flushes metadata information associated with the file "
8038 #: build/C/man2/fsync.2:82
8040 "Calling B<fsync>() does not necessarily ensure that the entry in the "
8041 "directory containing the file has also reached disk. For that an explicit "
8042 "B<fsync>() on a file descriptor for the directory is also needed."
8046 #: build/C/man2/fsync.2:103
8048 "B<fdatasync>() is similar to B<fsync>(), but does not flush modified "
8049 "metadata unless that metadata is needed in order to allow a subsequent data "
8050 "retrieval to be correctly handled. For example, changes to I<st_atime> or "
8051 "I<st_mtime> (respectively, time of last access and time of last "
8052 "modification; see B<stat>(2)) do not require flushing because they are not "
8053 "necessary for a subsequent data read to be handled correctly. On the other "
8054 "hand, a change to the file size (I<st_size>, as made by say "
8055 "B<ftruncate>(2)), would require a metadata flush."
8059 #: build/C/man2/fsync.2:108
8061 "The aim of B<fdatasync>() is to reduce disk activity for applications that "
8062 "do not require all metadata to be synchronized with the disk."
8066 #: build/C/man2/fsync.2:113
8068 "On success, these system calls return zero. On error, -1 is returned, and "
8069 "I<errno> is set appropriately."
8073 #: build/C/man2/fsync.2:118
8074 msgid "I<fd> is not a valid open file descriptor."
8078 #: build/C/man2/fsync.2:121
8079 msgid "An error occurred during synchronization."
8083 #: build/C/man2/fsync.2:121
8085 msgid "B<EROFS>, B<EINVAL>"
8089 #: build/C/man2/fsync.2:125
8090 msgid "I<fd> is bound to a special file which does not support synchronization."
8094 #: build/C/man2/fsync.2:127
8095 msgid "4.3BSD, POSIX.1-2001."
8099 #: build/C/man2/fsync.2:127
8101 msgid "AVAILABILITY"
8104 #. POSIX.1-2001: It shall be defined to -1 or 0 or 200112L.
8105 #. -1: unavailable, 0: ask using sysconf().
8106 #. glibc defines them to 1.
8108 #: build/C/man2/fsync.2:140
8110 "On POSIX systems on which B<fdatasync>() is available, "
8111 "B<_POSIX_SYNCHRONIZED_IO> is defined in I<E<lt>unistd.hE<gt>> to a value "
8112 "greater than 0. (See also B<sysconf>(3).)"
8116 #: build/C/man2/fsync.2:146
8118 "On some UNIX systems (but not Linux), I<fd> must be a I<writable> file "
8123 #: build/C/man2/fsync.2:152
8125 "In Linux 2.2 and earlier, B<fdatasync>() is equivalent to B<fsync>(), and "
8126 "so has no performance advantage."
8130 #: build/C/man2/fsync.2:162
8132 "The B<fsync>() implementations in older kernels and lesser used filesystems "
8133 "does not know how to flush disk caches. In these cases disk caches need to "
8134 "be disabled using B<hdparm>(8) or B<sdparm>(8) to guarantee safe "
8139 #: build/C/man2/fsync.2:170
8141 "B<bdflush>(2), B<open>(2), B<sync>(2), B<sync_file_range>(2), B<hdparm>(8), "
8142 "B<mount>(8), B<sync>(1)"
8146 #: build/C/man3/get_nprocs_conf.3:26
8152 #: build/C/man3/get_nprocs_conf.3:26
8158 #: build/C/man3/get_nprocs_conf.3:29
8159 msgid "get_nprocs, get_nprocs_conf - get number of processors"
8163 #: build/C/man3/get_nprocs_conf.3:31 build/C/man2/sysinfo.2:19
8164 msgid "B<#include E<lt>sys/sysinfo.hE<gt>>"
8168 #: build/C/man3/get_nprocs_conf.3:33
8169 msgid "B<int get_nprocs(void);>"
8173 #: build/C/man3/get_nprocs_conf.3:35
8174 msgid "B<int get_nprocs_conf(void);>"
8178 #: build/C/man3/get_nprocs_conf.3:39
8180 "The function B<get_nprocs_conf>() returns the number of processors "
8181 "configured by the operating system."
8185 #: build/C/man3/get_nprocs_conf.3:46
8187 "The function B<get_nprocs>() returns the number of processors currently "
8188 "available in the system. This may be less than the number returned by "
8189 "B<get_nprocs_conf>() because processors may be offline (e.g., on "
8190 "hotpluggable systems)."
8194 #: build/C/man3/get_nprocs_conf.3:48
8195 msgid "As given in DESCRIPTION."
8199 #: build/C/man3/get_nprocs_conf.3:50 build/C/man3/getopt.3:350
8200 msgid "These functions are GNU extensions."
8205 #: build/C/man3/get_nprocs_conf.3:57
8207 "The current implementation of these functions is rather expensive, since "
8208 "they open and parse files in the I</sys> filesystem each time they are "
8213 #: build/C/man3/get_nprocs_conf.3:62
8215 "The following B<sysconf>(3) calls make use of the functions documented on "
8216 "this page to return the same information."
8220 #: build/C/man3/get_nprocs_conf.3:66
8223 " np = sysconf(_SC_NPROCESSORS_CONF); /* processors configured */\n"
8224 " np = sysconf(_SC_NPROCESSORS_ONLN); /* processors available */\n"
8228 #: build/C/man3/get_nprocs_conf.3:73
8230 "The following example shows how B<get_nprocs>() and B<get_nprocs_conf>() "
8235 #: build/C/man3/get_nprocs_conf.3:77
8238 "#include E<lt>stdio.hE<gt>\n"
8239 "#include E<lt>sys/sysinfo.hE<gt>\n"
8243 #: build/C/man3/get_nprocs_conf.3:86
8247 "main(int argc, char *argv[])\n"
8249 " printf(\"This system has %d processors configured and \"\n"
8250 " \"%d processors available.\\en\",\n"
8251 " get_nprocs_conf(), get_nprocs());\n"
8257 #: build/C/man2/get_thread_area.2:8
8259 msgid "GET_THREAD_AREA"
8263 #: build/C/man2/get_thread_area.2:8 build/C/man2/set_thread_area.2:8
8269 #: build/C/man2/get_thread_area.2:11
8270 msgid "get_thread_area - get a thread-local storage (TLS) area"
8274 #: build/C/man2/get_thread_area.2:15 build/C/man2/set_thread_area.2:15
8275 msgid "B<#include E<lt>asm/ldt.hE<gt>>"
8279 #: build/C/man2/get_thread_area.2:17
8280 msgid "B<int get_thread_area(struct user_desc *>I<u_info>B<);>"
8284 #: build/C/man2/get_thread_area.2:20 build/C/man2/gettid.2:38 build/C/man2/set_thread_area.2:20 build/C/man2/sysctl.2:44
8285 msgid "I<Note>: There is no glibc wrapper for this system call; see NOTES."
8289 #: build/C/man2/get_thread_area.2:29
8291 "B<get_thread_area>() returns an entry in the current thread's thread-local "
8292 "storage (TLS) array. The index of the entry corresponds to the value of "
8293 "I<u_info-E<gt>entry_number>, passed in by the user. If the value is in "
8294 "bounds, B<get_thread_area>() copies the corresponding TLS entry into the "
8295 "area pointed to by I<u_info>."
8299 #: build/C/man2/get_thread_area.2:35
8301 "B<get_thread_area>() returns 0 on success. Otherwise, it returns -1 and "
8302 "sets I<errno> appropriately."
8306 #: build/C/man2/get_thread_area.2:39 build/C/man2/set_thread_area.2:56
8307 msgid "I<u_info> is an invalid pointer."
8311 #: build/C/man2/get_thread_area.2:42 build/C/man2/set_thread_area.2:53
8312 msgid "I<u_info-E<gt>entry_number> is out of bounds."
8316 #: build/C/man2/get_thread_area.2:46
8317 msgid "A version of B<get_thread_area>() first appeared in Linux 2.5.32."
8321 #: build/C/man2/get_thread_area.2:50
8323 "B<get_thread_area>() is Linux-specific and should not be used in programs "
8324 "that are intended to be portable."
8328 #: build/C/man2/get_thread_area.2:55
8330 "Glibc does not provide a wrapper for this system call, since it is generally "
8331 "intended for use only by threading libraries. In the unlikely event that "
8332 "you want to call it directly, use B<syscall>(2)."
8336 #: build/C/man2/get_thread_area.2:58
8337 msgid "B<modify_ldt>(2), B<set_thread_area>(2)"
8341 #: build/C/man3/getcwd.3:32
8347 #: build/C/man3/getcwd.3:35
8348 msgid "getcwd, getwd, get_current_dir_name - get current working directory"
8352 #: build/C/man3/getcwd.3:40
8354 msgid "B<char *getcwd(char *>I<buf>B<, size_t >I<size>B<);>\n"
8358 #: build/C/man3/getcwd.3:42
8360 msgid "B<char *getwd(char *>I<buf>B<);>\n"
8364 #: build/C/man3/getcwd.3:44
8366 msgid "B<char *get_current_dir_name(void);>\n"
8370 #: build/C/man3/getcwd.3:52
8371 msgid "B<get_current_dir_name>():"
8375 #: build/C/man3/getcwd.3:57
8380 #: build/C/man3/getcwd.3:67 build/C/man3/ualarm.3:50 build/C/man3/usleep.3:59 build/C/man2/vfork.2:54
8384 " (_XOPEN_SOURCE\\ E<gt>=\\ 500 ||\n"
8385 " _XOPEN_SOURCE\\ &&\\ _XOPEN_SOURCE_EXTENDED) &&\n"
8386 " !(_POSIX_C_SOURCE\\ E<gt>=\\ 200809L || _XOPEN_SOURCE\\ E<gt>=\\ 700)\n"
8390 #: build/C/man3/getcwd.3:72 build/C/man3/getdtablesize.3:54 build/C/man2/getpagesize.2:52 build/C/man3/ualarm.3:55 build/C/man3/usleep.3:64 build/C/man2/vfork.2:59
8392 "Before glibc 2.12: _BSD_SOURCE || _XOPEN_SOURCE\\ E<gt>=\\ 500 || "
8393 "_XOPEN_SOURCE\\ &&\\ _XOPEN_SOURCE_EXTENDED"
8397 #: build/C/man3/getcwd.3:82
8399 "These functions return a null-terminated string containing an absolute "
8400 "pathname that is the current working directory of the calling process. The "
8401 "pathname is returned as the function result and via the argument I<buf>, if "
8406 #: build/C/man3/getcwd.3:90
8408 "The B<getcwd>() function copies an absolute pathname of the current working "
8409 "directory to the array pointed to by I<buf>, which is of length I<size>."
8413 #: build/C/man3/getcwd.3:100
8415 "If the length of the absolute pathname of the current working directory, "
8416 "including the terminating null byte, exceeds I<size> bytes, NULL is "
8417 "returned, and I<errno> is set to B<ERANGE>; an application should check for "
8418 "this error, and allocate a larger buffer if necessary."
8422 #: build/C/man3/getcwd.3:118
8424 "As an extension to the POSIX.1-2001 standard, glibc's B<getcwd>() allocates "
8425 "the buffer dynamically using B<malloc>(3) if I<buf> is NULL. In this case, "
8426 "the allocated buffer has the length I<size> unless I<size> is zero, when "
8427 "I<buf> is allocated as big as necessary. The caller should B<free>(3) the "
8432 #: build/C/man3/getcwd.3:131
8434 "B<get_current_dir_name>() will B<malloc>(3) an array big enough to hold "
8435 "the absolute pathname of the current working directory. If the environment "
8436 "variable B<PWD> is set, and its value is correct, then that value will be "
8437 "returned. The caller should B<free>(3) the returned buffer."
8441 #: build/C/man3/getcwd.3:156
8443 "B<getwd>() does not B<malloc>(3) any memory. The I<buf> argument should "
8444 "be a pointer to an array at least B<PATH_MAX> bytes long. If the length of "
8445 "the absolute pathname of the current working directory, including the "
8446 "terminating null byte, exceeds B<PATH_MAX> bytes, NULL is returned, and "
8447 "I<errno> is set to B<ENAMETOOLONG>. (Note that on some systems, B<PATH_MAX> "
8448 "may not be a compile-time constant; furthermore, its value may depend on the "
8449 "filesystem, see B<pathconf>(3).) For portability and security reasons, use "
8450 "of B<getwd>() is deprecated."
8454 #: build/C/man3/getcwd.3:165
8456 "On success, these functions return a pointer to a string containing the "
8457 "pathname of the current working directory. In the case B<getcwd>() and "
8458 "B<getwd>() this is the same value as I<buf>."
8462 #: build/C/man3/getcwd.3:172
8464 "On failure, these functions return NULL, and I<errno> is set to indicate the "
8465 "error. The contents of the array pointed to by I<buf> are undefined on "
8470 #: build/C/man3/getcwd.3:176
8471 msgid "Permission to read or search a component of the filename was denied."
8475 #: build/C/man3/getcwd.3:180
8476 msgid "I<buf> points to a bad address."
8480 #: build/C/man3/getcwd.3:187
8481 msgid "The I<size> argument is zero and I<buf> is not a null pointer."
8485 #: build/C/man3/getcwd.3:187
8491 #: build/C/man3/getcwd.3:192
8492 msgid "B<getwd>(): I<buf> is NULL."
8496 #: build/C/man3/getcwd.3:192
8498 msgid "ENAMETOOLONG"
8502 #: build/C/man3/getcwd.3:198
8504 "B<getwd>(): The size of the null-terminated absolute pathname string exceeds "
8505 "B<PATH_MAX> bytes."
8509 #: build/C/man3/getcwd.3:201
8510 msgid "The current working directory has been unlinked."
8514 #: build/C/man3/getcwd.3:201 build/C/man3/getlogin.3:114
8520 #: build/C/man3/getcwd.3:208
8522 "The I<size> argument is less than the length of the absolute pathname of the "
8523 "working directory, including the terminating null byte. You need to "
8524 "allocate a bigger array and try again."
8528 #: build/C/man3/getcwd.3:216
8530 "B<getcwd>() conforms to POSIX.1-2001. Note however that POSIX.1-2001 "
8531 "leaves the behavior of B<getcwd>() unspecified if I<buf> is NULL."
8535 #: build/C/man3/getcwd.3:227
8537 "B<getwd>() is present in POSIX.1-2001, but marked LEGACY. POSIX.1-2008 "
8538 "removes the specification of B<getwd>(). Use B<getcwd>() instead. "
8539 "POSIX.1-2001 does not define any errors for B<getwd>()."
8543 #: build/C/man3/getcwd.3:230
8544 msgid "B<get_current_dir_name>() is a GNU extension."
8548 #: build/C/man3/getcwd.3:241
8550 "Under Linux, the function B<getcwd>() is a system call (since 2.1.92). On "
8551 "older systems it would query I</proc/self/cwd>. If both system call and "
8552 "proc filesystem are missing, a generic implementation is called. Only in "
8553 "that case can these calls fail under Linux with B<EACCES>."
8557 #: build/C/man3/getcwd.3:249
8559 "These functions are often used to save the location of the current working "
8560 "directory for the purpose of returning to it later. Opening the current "
8561 "directory (\".\") and calling B<fchdir>(2) to return is usually a faster "
8562 "and more reliable alternative when sufficiently many file descriptors are "
8563 "available, especially on platforms other than Linux."
8567 #: build/C/man3/getcwd.3:256
8569 "B<chdir>(2), B<fchdir>(2), B<open>(2), B<unlink>(2), B<free>(3), "
8574 #: build/C/man2/getdomainname.2:29
8576 msgid "GETDOMAINNAME"
8580 #: build/C/man2/getdomainname.2:29
8586 #: build/C/man2/getdomainname.2:32
8587 msgid "getdomainname, setdomainname - get/set NIS domain name"
8591 #: build/C/man2/getdomainname.2:36
8592 msgid "B<int getdomainname(char *>I<name>B<, size_t >I<len>B<);>"
8596 #: build/C/man2/getdomainname.2:38
8597 msgid "B<int setdomainname(const char *>I<name>B<, size_t >I<len>B<);>"
8601 #: build/C/man2/getdomainname.2:47
8602 msgid "B<getdomainname>(), B<setdomainname>():"
8606 #: build/C/man2/getdomainname.2:49 build/C/man3/gethostid.3:54 build/C/man2/gethostname.2:60 build/C/man3/getusershell.3:55
8607 msgid "_BSD_SOURCE || (_XOPEN_SOURCE && _XOPEN_SOURCE\\ E<lt>\\ 500)"
8611 #: build/C/man2/getdomainname.2:54
8613 "These functions are used to access or to change the NIS domain name of the "
8618 #: build/C/man2/getdomainname.2:65
8620 "B<setdomainname>() sets the domain name to the value given in the character "
8621 "array I<name>. The I<len> argument specifies the number of bytes in "
8622 "I<name>. (Thus, I<name> does not require a terminating null byte.)"
8626 #: build/C/man2/getdomainname.2:75
8628 "B<getdomainname>() returns the null-terminated domain name in the character "
8629 "array I<name>, which has a length of I<len> bytes. If the null-terminated "
8630 "domain name requires more than I<len> bytes, B<getdomainname>() returns the "
8631 "first I<len> bytes (glibc) or gives an error (libc)."
8635 #: build/C/man2/getdomainname.2:83
8636 msgid "B<setdomainname>() can fail with the following errors:"
8640 #: build/C/man2/getdomainname.2:87
8641 msgid "I<name> pointed outside of user address space."
8645 #: build/C/man2/getdomainname.2:91
8646 msgid "I<len> was negative or too large."
8650 #: build/C/man2/getdomainname.2:96
8652 "the caller is unprivileged (Linux: does not have the B<CAP_SYS_ADMIN> "
8657 #: build/C/man2/getdomainname.2:99
8658 msgid "B<getdomainname>() can fail with the following errors:"
8662 #: build/C/man2/getdomainname.2:110
8664 "For B<getdomainname>() under libc: I<name> is NULL or I<name> is longer "
8665 "than I<len> bytes."
8668 #. But they appear on most systems...
8670 #: build/C/man2/getdomainname.2:113
8671 msgid "POSIX does not specify these calls."
8675 #: build/C/man2/getdomainname.2:117
8677 "Since Linux 1.0, the limit on the length of a domain name, including the "
8678 "terminating null byte, is 64 bytes. In older kernels, it was 8 bytes."
8682 #: build/C/man2/getdomainname.2:127
8684 "On most Linux architectures (including x86), there is no B<getdomainname>() "
8685 "system call; instead, glibc implements B<getdomainname>() as a library "
8686 "function that returns a copy of the I<domainname> field returned from a call "
8691 #: build/C/man2/getdomainname.2:131
8692 msgid "B<gethostname>(2), B<sethostname>(2), B<uname>(2)"
8696 #: build/C/man3/getdtablesize.3:27
8698 msgid "GETDTABLESIZE"
8702 #: build/C/man3/getdtablesize.3:30
8703 msgid "getdtablesize - get descriptor table size"
8707 #: build/C/man3/getdtablesize.3:34
8708 msgid "B<int getdtablesize(void);>"
8712 #: build/C/man3/getdtablesize.3:41
8713 msgid "B<getdtablesize>():"
8717 #: build/C/man3/getdtablesize.3:49 build/C/man2/getpagesize.2:47
8721 " !(_POSIX_C_SOURCE\\ E<gt>=\\ 200112L || _XOPEN_SOURCE\\ E<gt>=\\ 600)\n"
8725 #: build/C/man3/getdtablesize.3:61
8727 "B<getdtablesize>() returns the maximum number of files a process can have "
8728 "open, one more than the largest possible value for a file descriptor."
8732 #: build/C/man3/getdtablesize.3:63
8733 msgid "The current limit on the number of open files per process."
8737 #: build/C/man3/getdtablesize.3:69
8739 "On Linux, B<getdtablesize>() can return any of the errors described for "
8740 "B<getrlimit>(2); see NOTES below."
8744 #: build/C/man3/getdtablesize.3:74
8745 msgid "The B<getdtablesize>() function is thread-safe."
8749 #: build/C/man3/getdtablesize.3:82
8751 "SVr4, 4.4BSD (the B<getdtablesize>() function first appeared in 4.2BSD). "
8752 "It is not specified in POSIX.1-2001; portable applications should employ "
8753 "I<sysconf(_SC_OPEN_MAX)> instead of this call."
8756 #. The libc4 and libc5 versions return
8758 #. (set to 256 since Linux 0.98.4).
8760 #: build/C/man3/getdtablesize.3:95
8762 "B<getdtablesize>() is implemented as a libc library function. The glibc "
8763 "version calls B<getrlimit>(2) and returns the current B<RLIMIT_NOFILE> "
8764 "limit, or B<OPEN_MAX> when that fails."
8768 #: build/C/man3/getdtablesize.3:100
8769 msgid "B<close>(2), B<dup>(2), B<getrlimit>(2), B<open>(2)"
8773 #: build/C/man3/gethostid.3:29
8779 #: build/C/man3/gethostid.3:32
8780 msgid "gethostid, sethostid - get or set the unique identifier of the current host"
8784 #: build/C/man3/gethostid.3:36
8785 msgid "B<long gethostid(void);>"
8789 #: build/C/man3/gethostid.3:38
8790 msgid "B<int sethostid(long >I<hostid>B<);>"
8794 #: build/C/man3/gethostid.3:47
8795 msgid "B<gethostid>():"
8799 #: build/C/man3/gethostid.3:52
8800 msgid "B<sethostid>():"
8804 #: build/C/man3/gethostid.3:67
8806 "B<gethostid>() and B<sethostid>() respectively get or set a unique 32-bit "
8807 "identifier for the current machine. The 32-bit identifier is intended to be "
8808 "unique among all UNIX systems in existence. This normally resembles the "
8809 "Internet address for the local machine, as returned by B<gethostbyname>(3), "
8810 "and thus usually never needs to be set."
8814 #: build/C/man3/gethostid.3:71
8815 msgid "The B<sethostid>() call is restricted to the superuser."
8819 #: build/C/man3/gethostid.3:75
8821 "B<gethostid>() returns the 32-bit identifier for the current host as set by "
8826 #: build/C/man3/gethostid.3:81
8828 "On success, B<sethostid>() returns 0; on error, -1 is returned, and "
8829 "I<errno> is set to indicate the error."
8833 #: build/C/man3/gethostid.3:84
8834 msgid "B<sethostid>() can fail with the following errors:"
8838 #: build/C/man3/gethostid.3:88
8840 "The caller did not have permission to write to the file used to store the "
8845 #: build/C/man3/gethostid.3:92
8847 "The calling process's effective user or group ID is not the same as its "
8848 "corresponding real ID."
8852 #: build/C/man3/gethostid.3:102
8854 "4.2BSD; these functions were dropped in 4.4BSD. SVr4 includes "
8855 "B<gethostid>() but not B<sethostid>(). POSIX.1-2001 specifies "
8856 "B<gethostid>() but not B<sethostid>()."
8859 #. libc5 used /etc/hostid; libc4 didn't have these functions
8861 #: build/C/man3/gethostid.3:111
8863 "In the glibc implementation, the I<hostid> is stored in the file "
8864 "I</etc/hostid>. (In glibc versions before 2.2, the file I</var/adm/hostid> "
8869 #: build/C/man3/gethostid.3:122
8871 "In the glibc implementation, if B<gethostid>() cannot open the file "
8872 "containing the host ID, then it obtains the hostname using "
8873 "B<gethostname>(2), passes that hostname to B<gethostbyname_r>(3) in order "
8874 "to obtain the host's IPv4 address, and returns a value obtained by "
8875 "bit-twiddling the IPv4 address. (This value may not be unique.)"
8879 #: build/C/man3/gethostid.3:124
8880 msgid "It is impossible to ensure that the identifier is globally unique."
8884 #: build/C/man3/gethostid.3:127
8885 msgid "B<hostid>(1), B<gethostbyname>(3)"
8889 #: build/C/man2/gethostname.2:32
8895 #: build/C/man2/gethostname.2:35
8896 msgid "gethostname, sethostname - get/set hostname"
8900 #: build/C/man2/gethostname.2:39
8901 msgid "B<int gethostname(char *>I<name>B<, size_t >I<len>B<);>"
8905 #: build/C/man2/gethostname.2:41
8906 msgid "B<int sethostname(const char *>I<name>B<, size_t >I<len>B<);>"
8910 #: build/C/man2/gethostname.2:50
8911 msgid "B<gethostname>():"
8915 #: build/C/man2/gethostname.2:53
8916 msgid "Since glibc 2.12: _BSD_SOURCE || _XOPEN_SOURCE\\ E<gt>=\\ 500"
8920 #: build/C/man2/gethostname.2:55
8921 msgid "|| /* Since glibc 2.12: */ _POSIX_C_SOURCE\\ E<gt>=\\ 200112L"
8925 #: build/C/man2/gethostname.2:58
8926 msgid "B<sethostname>():"
8930 #: build/C/man2/gethostname.2:66
8932 "These system calls are used to access or to change the hostname of the "
8933 "current processor."
8937 #: build/C/man2/gethostname.2:77
8939 "B<sethostname>() sets the hostname to the value given in the character "
8940 "array I<name>. The I<len> argument specifies the number of bytes in "
8941 "I<name>. (Thus, I<name> does not require a terminating null byte.)"
8945 #: build/C/man2/gethostname.2:89
8947 "B<gethostname>() returns the null-terminated hostname in the character "
8948 "array I<name>, which has a length of I<len> bytes. If the null-terminated "
8949 "hostname is too large to fit, then the name is truncated, and no error is "
8950 "returned (but see NOTES below). POSIX.1-2001 says that if such truncation "
8951 "occurs, then it is unspecified whether the returned buffer includes a "
8952 "terminating null byte."
8956 #: build/C/man2/gethostname.2:99
8957 msgid "I<name> is an invalid address."
8960 #. Can't occur for gethostbyname() wrapper, since 'len' has an
8961 #. unsigned type; can occur for the underlying system call.
8963 #: build/C/man2/gethostname.2:109
8965 "I<len> is negative or, for B<sethostname>(), I<len> is larger than the "
8966 "maximum allowed size."
8970 #: build/C/man2/gethostname.2:117
8972 "(glibc B<gethostname>()) I<len> is smaller than the actual size. (Before "
8973 "version 2.1, glibc uses B<EINVAL> for this case.)"
8977 #: build/C/man2/gethostname.2:124
8979 "For B<sethostname>(), the caller did not have the B<CAP_SYS_ADMIN> "
8984 #: build/C/man2/gethostname.2:130
8986 "SVr4, 4.4BSD (these interfaces first appeared in 4.2BSD). POSIX.1-2001 "
8987 "specifies B<gethostname>() but not B<sethostname>()."
8991 #: build/C/man2/gethostname.2:140
8993 "SUSv2 guarantees that \"Host names are limited to 255 bytes\". POSIX.1-2001 "
8994 "guarantees that \"Host names (not including the terminating null byte) are "
8995 "limited to B<HOST_NAME_MAX> bytes\". On Linux, B<HOST_NAME_MAX> is defined "
8996 "with the value 64, which has been the limit since Linux 1.0 (earlier kernels "
8997 "imposed a limit of 8 bytes)."
9001 #: build/C/man2/gethostname.2:163
9003 "The GNU C library does not employ the B<gethostname>() system call; "
9004 "instead, it implements B<gethostname>() as a library function that calls "
9005 "B<uname>(2) and copies up to I<len> bytes from the returned I<nodename> "
9006 "field into I<name>. Having performed the copy, the function then checks if "
9007 "the length of the I<nodename> was greater than or equal to I<len>, and if it "
9008 "is, then the function returns -1 with I<errno> set to B<ENAMETOOLONG>; in "
9009 "this case, a terminating null byte is not included in the returned I<name>."
9012 #. At least glibc 2.0 and 2.1, older versions not checked
9014 #: build/C/man2/gethostname.2:176
9016 "Versions of glibc before 2.2 handle the case where the length of the "
9017 "I<nodename> was greater than or equal to I<len> differently: nothing is "
9018 "copied into I<name> and the function returns -1 with I<errno> set to "
9023 #: build/C/man2/gethostname.2:180
9024 msgid "B<getdomainname>(2), B<setdomainname>(2), B<uname>(2)"
9028 #: build/C/man3/getlogin.3:28
9034 #: build/C/man3/getlogin.3:28
9040 #: build/C/man3/getlogin.3:31
9041 msgid "getlogin, getlogin_r, cuserid - get username"
9045 #: build/C/man3/getlogin.3:35
9046 msgid "B<char *getlogin(void);>"
9050 #: build/C/man3/getlogin.3:37
9051 msgid "B<int getlogin_r(char *>I<buf>B<, size_t >I<bufsize>B<);>"
9055 #: build/C/man3/getlogin.3:39
9056 msgid "B<#include E<lt>stdio.hE<gt>>"
9060 #: build/C/man3/getlogin.3:41
9061 msgid "B<char *cuserid(char *>I<string>B<);>"
9065 #: build/C/man3/getlogin.3:49
9066 msgid "B<getlogin_r>(): _REENTRANT || _POSIX_C_SOURCE\\ E<gt>=\\ 199506L"
9070 #: build/C/man3/getlogin.3:52
9071 msgid "B<cuserid>(): _XOPEN_SOURCE"
9075 #: build/C/man3/getlogin.3:61
9077 "B<getlogin>() returns a pointer to a string containing the name of the user "
9078 "logged in on the controlling terminal of the process, or a null pointer if "
9079 "this information cannot be determined. The string is statically allocated "
9080 "and might be overwritten on subsequent calls to this function or to "
9085 #: build/C/man3/getlogin.3:67
9087 "B<getlogin_r>() returns this same username in the array I<buf> of size "
9092 #: build/C/man3/getlogin.3:79
9094 "B<cuserid>() returns a pointer to a string containing a username associated "
9095 "with the effective user ID of the process. If I<string> is not a null "
9096 "pointer, it should be an array that can hold at least B<L_cuserid> "
9097 "characters; the string is returned in this array. Otherwise, a pointer to a "
9098 "string in a static area is returned. This string is statically allocated "
9099 "and might be overwritten on subsequent calls to this function or to "
9104 #: build/C/man3/getlogin.3:83
9106 "The macro B<L_cuserid> is an integer constant that indicates how long an "
9107 "array you might need to store a username. B<L_cuserid> is declared in "
9108 "I<E<lt>stdio.hE<gt>>."
9112 #: build/C/man3/getlogin.3:90
9114 "These functions let your program identify positively the user who is running "
9115 "(B<cuserid>()) or the user who logged in this session (B<getlogin>()). "
9116 "(These can differ when set-user-ID programs are involved.)"
9120 #: build/C/man3/getlogin.3:95
9122 "For most purposes, it is more useful to use the environment variable "
9123 "B<LOGNAME> to find out who the user is. This is more flexible precisely "
9124 "because the user can set B<LOGNAME> arbitrarily."
9128 #: build/C/man3/getlogin.3:103
9130 "B<getlogin>() returns a pointer to the username when successful, and NULL "
9131 "on failure, with I<errno> set to indicate the cause of the error. "
9132 "B<getlogin_r>() returns 0 when successful, and nonzero on failure."
9136 #: build/C/man3/getlogin.3:105
9137 msgid "POSIX specifies"
9141 #: build/C/man3/getlogin.3:108
9142 msgid "The calling process already has the maximum allowed number of open files."
9146 #: build/C/man3/getlogin.3:111
9147 msgid "The system already has the maximum allowed number of open files."
9151 #: build/C/man3/getlogin.3:111
9157 #: build/C/man3/getlogin.3:114
9158 msgid "The calling process has no controlling terminal."
9162 #: build/C/man3/getlogin.3:120
9164 "(getlogin_r) The length of the username, including the terminating null "
9165 "byte (\\(aq\\e0\\(aq), is larger than I<bufsize>."
9169 #: build/C/man3/getlogin.3:122
9170 msgid "Linux/glibc also has"
9174 #: build/C/man3/getlogin.3:125
9175 msgid "There was no corresponding entry in the utmp-file."
9179 #: build/C/man3/getlogin.3:128
9180 msgid "Insufficient memory to allocate passwd structure."
9184 #: build/C/man3/getlogin.3:128 build/C/man2/ioctl.2:109 build/C/man2/ioctl.2:113 build/C/man3/tcgetpgrp.3:95
9190 #: build/C/man3/getlogin.3:132
9191 msgid "Standard input didn't refer to a terminal. (See BUGS.)"
9195 #: build/C/man3/getlogin.3:133
9197 msgid "I</etc/passwd>"
9201 #: build/C/man3/getlogin.3:136
9202 msgid "password database file"
9206 #: build/C/man3/getlogin.3:136
9208 msgid "I</var/run/utmp>"
9212 #: build/C/man3/getlogin.3:140
9213 msgid "(traditionally I</etc/utmp>; some libc versions used I</var/adm/utmp>)"
9217 #: build/C/man3/getlogin.3:145
9218 msgid "The B<getlogin>() function is not thread-safe."
9222 #: build/C/man3/getlogin.3:149
9223 msgid "The B<getlogin_r>() function is thread-safe."
9227 #: build/C/man3/getlogin.3:154
9229 "The B<cuserid>() function is thread-safe with exceptions. It is not "
9230 "thread-safe if called with a NULL parameter."
9234 #: build/C/man3/getlogin.3:159
9235 msgid "B<getlogin>() and B<getlogin_r>() specified in POSIX.1-2001."
9239 #: build/C/man3/getlogin.3:170
9241 "System V has a B<cuserid>() function which uses the real user ID rather "
9242 "than the effective user ID. The B<cuserid>() function was included in the "
9243 "1988 version of POSIX, but removed from the 1990 version. It was present in "
9244 "SUSv2, but removed in POSIX.1-2001."
9248 #: build/C/man3/getlogin.3:177
9250 "OpenBSD has B<getlogin>() and B<setlogin>(), and a username associated with "
9251 "a session, even if it has no controlling terminal."
9255 #: build/C/man3/getlogin.3:189
9257 "Unfortunately, it is often rather easy to fool B<getlogin>(). Sometimes it "
9258 "does not work at all, because some program messed up the utmp file. Often, "
9259 "it gives only the first 8 characters of the login name. The user currently "
9260 "logged in on the controlling terminal of our program need not be the user "
9261 "who started it. Avoid B<getlogin>() for security-related purposes."
9265 #: build/C/man3/getlogin.3:199
9267 "Note that glibc does not follow the POSIX specification and uses I<stdin> "
9268 "instead of I</dev/tty>. A bug. (Other recent systems, like SunOS 5.8 and "
9269 "HP-UX 11.11 and FreeBSD 4.8 all return the login name also when I<stdin> is "
9274 #: build/C/man3/getlogin.3:209
9276 "Nobody knows precisely what B<cuserid>() does; avoid it in portable "
9277 "programs. Or avoid it altogether: use I<getpwuid(geteuid())> instead, if "
9278 "that is what you meant. B<Do not use> B<cuserid>()."
9282 #: build/C/man3/getlogin.3:213
9283 msgid "B<geteuid>(2), B<getuid>(2), B<utmp>(5)"
9287 #: build/C/man3/getopt.3:41
9293 #: build/C/man3/getopt.3:41
9299 #: build/C/man3/getopt.3:45
9301 "getopt, getopt_long, getopt_long_only, optarg, optind, opterr, optopt - "
9302 "Parse command-line options"
9306 #: build/C/man3/getopt.3:51
9309 "B<int getopt(int >I<argc>B<, char * const >I<argv[]>B<,>\n"
9310 "B< const char *>I<optstring>B<);>\n"
9314 #: build/C/man3/getopt.3:54
9317 "B<extern char *>I<optarg>B<;>\n"
9318 "B<extern int >I<optind>B<, >I<opterr>B<, >I<optopt>B<;>\n"
9322 #: build/C/man3/getopt.3:56
9324 msgid "B<#include E<lt>getopt.hE<gt>>\n"
9328 #: build/C/man3/getopt.3:60
9331 "B<int getopt_long(int >I<argc>B<, char * const >I<argv[]>B<,>\n"
9332 "B< const char *>I<optstring>B<,>\n"
9333 "B< const struct option *>I<longopts>B<, int *>I<longindex>B<);>\n"
9337 #: build/C/man3/getopt.3:64
9340 "B<int getopt_long_only(int >I<argc>B<, char * const >I<argv[]>B<,>\n"
9341 "B< const char *>I<optstring>B<,>\n"
9342 "B< const struct option *>I<longopts>B<, int *>I<longindex>B<);>\n"
9346 #: build/C/man3/getopt.3:74
9347 msgid "B<getopt>(): _POSIX_C_SOURCE\\ E<gt>=\\ 2 || _XOPEN_SOURCE"
9351 #: build/C/man3/getopt.3:78
9352 msgid "B<getopt_long>(), B<getopt_long_only>(): _GNU_SOURCE"
9356 #: build/C/man3/getopt.3:99
9358 "The B<getopt>() function parses the command-line arguments. Its arguments "
9359 "I<argc> and I<argv> are the argument count and array as passed to the "
9360 "I<main>() function on program invocation. An element of I<argv> that "
9361 "starts with \\(aq-\\(aq (and is not exactly \"-\" or \"--\") is an option "
9362 "element. The characters of this element (aside from the initial "
9363 "\\(aq-\\(aq) are option characters. If B<getopt>() is called repeatedly, "
9364 "it returns successively each of the option characters from each of the "
9369 #: build/C/man3/getopt.3:108
9371 "The variable I<optind> is the index of the next element to be processed in "
9372 "I<argv>. The system initializes this value to 1. The caller can reset it "
9373 "to 1 to restart scanning of the same I<argv>, or when scanning a new "
9378 #: build/C/man3/getopt.3:118
9380 "If B<getopt>() finds another option character, it returns that character, "
9381 "updating the external variable I<optind> and a static variable I<nextchar> "
9382 "so that the next call to B<getopt>() can resume the scan with the following "
9383 "option character or I<argv>-element."
9387 #: build/C/man3/getopt.3:124
9389 "If there are no more option characters, B<getopt>() returns -1. Then "
9390 "I<optind> is the index in I<argv> of the first I<argv>-element that is not "
9395 #: build/C/man3/getopt.3:151
9397 "I<optstring> is a string containing the legitimate option characters. If "
9398 "such a character is followed by a colon, the option requires an argument, so "
9399 "B<getopt>() places a pointer to the following text in the same "
9400 "I<argv>-element, or the text of the following I<argv>-element, in "
9401 "I<optarg>. Two colons mean an option takes an optional arg; if there is "
9402 "text in the current I<argv>-element (i.e., in the same word as the option "
9403 "name itself, for example, \"-oarg\"), then it is returned in I<optarg>, "
9404 "otherwise I<optarg> is set to zero. This is a GNU extension. If "
9405 "I<optstring> contains B<W> followed by a semicolon, then B<-W foo> is "
9406 "treated as the long option B<--foo>. (The B<-W> option is reserved by "
9407 "POSIX.2 for implementation extensions.) This behavior is a GNU extension, "
9408 "not available with libraries before glibc 2."
9412 #: build/C/man3/getopt.3:169
9414 "By default, B<getopt>() permutes the contents of I<argv> as it scans, so "
9415 "that eventually all the nonoptions are at the end. Two other modes are also "
9416 "implemented. If the first character of I<optstring> is \\(aq+\\(aq or the "
9417 "environment variable B<POSIXLY_CORRECT> is set, then option processing stops "
9418 "as soon as a nonoption argument is encountered. If the first character of "
9419 "I<optstring> is \\(aq-\\(aq, then each nonoption I<argv>-element is handled "
9420 "as if it were the argument of an option with character code 1. (This is "
9421 "used by programs that were written to expect options and other "
9422 "I<argv>-elements in any order and that care about the ordering of the two.) "
9423 "The special argument \"--\" forces an end of option-scanning regardless of "
9424 "the scanning mode."
9428 #: build/C/man3/getopt.3:177
9430 "If B<getopt>() does not recognize an option character, it prints an error "
9431 "message to I<stderr>, stores the character in I<optopt>, and returns "
9432 "\\(aq?\\(aq. The calling program may prevent the error message by setting "
9437 #: build/C/man3/getopt.3:196
9439 "If B<getopt>() finds an option character in I<argv> that was not included "
9440 "in I<optstring>, or if it detects a missing option argument, it returns "
9441 "\\(aq?\\(aq and sets the external variable I<optopt> to the actual option "
9442 "character. If the first character (following any optional \\(aq+\\(aq or "
9443 "\\(aq-\\(aq described above) of I<optstring> is a colon (\\(aq:\\(aq), then "
9444 "B<getopt>() returns \\(aq:\\(aq instead of \\(aq?\\(aq to indicate a "
9445 "missing option argument. If an error was detected, and the first character "
9446 "of I<optstring> is not a colon, and the external variable I<opterr> is "
9447 "nonzero (which is the default), B<getopt>() prints an error message."
9451 #: build/C/man3/getopt.3:196
9453 msgid "getopt_long() and getopt_long_only()"
9457 #: build/C/man3/getopt.3:212
9459 "The B<getopt_long>() function works like B<getopt>() except that it also "
9460 "accepts long options, started with two dashes. (If the program accepts only "
9461 "long options, then I<optstring> should be specified as an empty string "
9462 "(\"\"), not NULL.) Long option names may be abbreviated if the abbreviation "
9463 "is unique or is an exact match for some defined option. A long option may "
9464 "take a parameter, of the form B<--arg=param> or B<--arg param>."
9468 #: build/C/man3/getopt.3:219
9470 "I<longopts> is a pointer to the first element of an array of I<struct "
9471 "option> declared in I<E<lt>getopt.hE<gt>> as"
9475 #: build/C/man3/getopt.3:228
9479 " const char *name;\n"
9487 #: build/C/man3/getopt.3:232
9488 msgid "The meanings of the different fields are:"
9492 #: build/C/man3/getopt.3:232
9498 #: build/C/man3/getopt.3:235
9499 msgid "is the name of the long option."
9503 #: build/C/man3/getopt.3:235
9509 #: build/C/man3/getopt.3:241
9511 "is: B<no_argument> (or 0) if the option does not take an argument; "
9512 "B<required_argument> (or 1) if the option requires an argument; or "
9513 "B<optional_argument> (or 2) if the option takes an optional argument."
9517 #: build/C/man3/getopt.3:241
9523 #: build/C/man3/getopt.3:255
9525 "specifies how results are returned for a long option. If I<flag> is NULL, "
9526 "then B<getopt_long>() returns I<val>. (For example, the calling program "
9527 "may set I<val> to the equivalent short option character.) Otherwise, "
9528 "B<getopt_long>() returns 0, and I<flag> points to a variable which is set "
9529 "to I<val> if the option is found, but left unchanged if the option is not "
9534 #: build/C/man3/getopt.3:255
9540 #: build/C/man3/getopt.3:259
9541 msgid "is the value to return, or to load into the variable pointed to by I<flag>."
9545 #: build/C/man3/getopt.3:261
9546 msgid "The last element of the array has to be filled with zeros."
9550 #: build/C/man3/getopt.3:265
9552 "If I<longindex> is not NULL, it points to a variable which is set to the "
9553 "index of the long option relative to I<longopts>."
9557 #: build/C/man3/getopt.3:274
9559 "B<getopt_long_only>() is like B<getopt_long>(), but \\(aq-\\(aq as well as "
9560 "\"--\" can indicate a long option. If an option that starts with "
9561 "\\(aq-\\(aq (not \"--\") doesn't match a long option, but does match a short "
9562 "option, it is parsed as a short option instead."
9566 #: build/C/man3/getopt.3:292
9568 "If an option was successfully found, then B<getopt>() returns the option "
9569 "character. If all command-line options have been parsed, then B<getopt>() "
9570 "returns -1. If B<getopt>() encounters an option character that was not in "
9571 "I<optstring>, then \\(aq?\\(aq is returned. If B<getopt>() encounters an "
9572 "option with a missing argument, then the return value depends on the first "
9573 "character in I<optstring>: if it is \\(aq:\\(aq, then \\(aq:\\(aq is "
9574 "returned; otherwise \\(aq?\\(aq is returned."
9578 #: build/C/man3/getopt.3:304
9580 "B<getopt_long>() and B<getopt_long_only>() also return the option "
9581 "character when a short option is recognized. For a long option, they return "
9582 "I<val> if I<flag> is NULL, and 0 otherwise. Error and -1 returns are the "
9583 "same as for B<getopt>(), plus \\(aq?\\(aq for an ambiguous match or an "
9584 "extraneous parameter."
9588 #: build/C/man3/getopt.3:304
9594 #: build/C/man3/getopt.3:305
9596 msgid "B<POSIXLY_CORRECT>"
9600 #: build/C/man3/getopt.3:309
9602 "If this is set, then option processing stops as soon as a nonoption argument "
9607 #: build/C/man3/getopt.3:309
9609 msgid "B<_E<lt>PIDE<gt>_GNU_nonoption_argv_flags_>"
9613 #: build/C/man3/getopt.3:318
9615 "This variable was used by B<bash>(1) 2.0 to communicate to glibc which "
9616 "arguments are the results of wildcard expansion and so should not be "
9617 "considered as options. This behavior was removed in B<bash>(1) version "
9618 "2.01, but the support remains in glibc."
9622 #: build/C/man3/getopt.3:319
9624 msgid "B<getopt>():"
9628 #: build/C/man3/getopt.3:329
9630 "POSIX.2 and POSIX.1-2001, provided the environment variable "
9631 "B<POSIXLY_CORRECT> is set. Otherwise, the elements of I<argv> aren't really "
9632 "const, because we permute them. We pretend they're const in the prototype "
9633 "to be compatible with other systems."
9637 #: build/C/man3/getopt.3:333
9638 msgid "The use of \\(aq+\\(aq and \\(aq-\\(aq in I<optstring> is a GNU extension."
9642 #: build/C/man3/getopt.3:347
9644 "On some older implementations, B<getopt>() was declared in "
9645 "I<E<lt>stdio.hE<gt>>. SUSv1 permitted the declaration to appear in either "
9646 "I<E<lt>unistd.hE<gt>> or I<E<lt>stdio.hE<gt>>. POSIX.1-2001 marked the use "
9647 "of I<E<lt>stdio.hE<gt>> for this purpose as LEGACY. POSIX.1-2001 does not "
9648 "allow the declaration to appear in I<E<lt>stdio.hE<gt>>."
9652 #: build/C/man3/getopt.3:347
9654 msgid "B<getopt_long>() and B<getopt_long_only>():"
9658 #: build/C/man3/getopt.3:369
9660 "A program that scans multiple argument vectors, or rescans the same vector "
9661 "more than once, and wants to make use of GNU extensions such as \\(aq+\\(aq "
9662 "and \\(aq-\\(aq at the start of I<optstring>, or changes the value of "
9663 "B<POSIXLY_CORRECT> between scans, must reinitialize B<getopt>() by "
9664 "resetting I<optind> to 0, rather than the traditional value of 1. "
9665 "(Resetting to 0 forces the invocation of an internal initialization routine "
9666 "that rechecks B<POSIXLY_CORRECT> and checks for GNU extensions in "
9671 #: build/C/man3/getopt.3:376
9673 "The POSIX.2 specification of B<getopt>() has a technical error described in "
9674 "POSIX.2 Interpretation 150. The GNU implementation (and probably all other "
9675 "implementations) implements the correct behavior rather than that specified."
9679 #: build/C/man3/getopt.3:377
9685 #: build/C/man3/getopt.3:385
9687 "The following trivial example program uses B<getopt>() to handle two "
9688 "program options: I<-n>, with no associated value; and I<-t val>, which "
9689 "expects an associated value."
9693 #: build/C/man3/getopt.3:390
9696 "#include E<lt>unistd.hE<gt>\n"
9697 "#include E<lt>stdlib.hE<gt>\n"
9698 "#include E<lt>stdio.hE<gt>\n"
9702 #: build/C/man3/getopt.3:396
9706 "main(int argc, char *argv[])\n"
9708 " int flags, opt;\n"
9709 " int nsecs, tfnd;\n"
9713 #: build/C/man3/getopt.3:415
9719 " while ((opt = getopt(argc, argv, \"nt:\")) != -1) {\n"
9721 " case \\(aqn\\(aq:\n"
9724 " case \\(aqt\\(aq:\n"
9725 " nsecs = atoi(optarg);\n"
9728 " default: /* \\(aq?\\(aq */\n"
9729 " fprintf(stderr, \"Usage: %s [-t nsecs] [-n] name\\en\",\n"
9731 " exit(EXIT_FAILURE);\n"
9737 #: build/C/man3/getopt.3:418
9740 " printf(\"flags=%d; tfnd=%d; nsecs=%d; optind=%d\\en\",\n"
9741 " flags, tfnd, nsecs, optind);\n"
9745 #: build/C/man3/getopt.3:423
9748 " if (optind E<gt>= argc) {\n"
9749 " fprintf(stderr, \"Expected argument after options\\en\");\n"
9750 " exit(EXIT_FAILURE);\n"
9755 #: build/C/man3/getopt.3:425
9757 msgid " printf(\"name argument = %s\\en\", argv[optind]);\n"
9761 #: build/C/man3/getopt.3:427
9763 msgid " /* Other code omitted */\n"
9767 #: build/C/man3/getopt.3:431
9769 msgid "getopt_long()"
9773 #: build/C/man3/getopt.3:435
9775 "The following example program illustrates the use of B<getopt_long>() with "
9776 "most of its features."
9780 #: build/C/man3/getopt.3:440
9783 "#include E<lt>stdio.hE<gt> /* for printf */\n"
9784 "#include E<lt>stdlib.hE<gt> /* for exit */\n"
9785 "#include E<lt>getopt.hE<gt>\n"
9789 #: build/C/man3/getopt.3:446
9793 "main(int argc, char **argv)\n"
9796 " int digit_optind = 0;\n"
9800 #: build/C/man3/getopt.3:459
9804 " int this_option_optind = optind ? optind : 1;\n"
9805 " int option_index = 0;\n"
9806 " static struct option long_options[] = {\n"
9807 " {\"add\", required_argument, 0, 0 },\n"
9808 " {\"append\", no_argument, 0, 0 },\n"
9809 " {\"delete\", required_argument, 0, 0 },\n"
9810 " {\"verbose\", no_argument, 0, 0 },\n"
9811 " {\"create\", required_argument, 0, \\(aqc\\(aq},\n"
9812 " {\"file\", required_argument, 0, 0 },\n"
9818 #: build/C/man3/getopt.3:464
9821 " c = getopt_long(argc, argv, \"abc:d:012\",\n"
9822 " long_options, &option_index);\n"
9828 #: build/C/man3/getopt.3:472
9833 " printf(\"option %s\", long_options[option_index].name);\n"
9835 " printf(\" with arg %s\", optarg);\n"
9836 " printf(\"\\en\");\n"
9841 #: build/C/man3/getopt.3:481
9844 " case \\(aq0\\(aq:\n"
9845 " case \\(aq1\\(aq:\n"
9846 " case \\(aq2\\(aq:\n"
9847 " if (digit_optind != 0 && digit_optind != this_option_optind)\n"
9848 " printf(\"digits occur in two different "
9849 "argv-elements.\\en\");\n"
9850 " digit_optind = this_option_optind;\n"
9851 " printf(\"option %c\\en\", c);\n"
9856 #: build/C/man3/getopt.3:485
9859 " case \\(aqa\\(aq:\n"
9860 " printf(\"option a\\en\");\n"
9865 #: build/C/man3/getopt.3:489
9868 " case \\(aqb\\(aq:\n"
9869 " printf(\"option b\\en\");\n"
9874 #: build/C/man3/getopt.3:493
9877 " case \\(aqc\\(aq:\n"
9878 " printf(\"option c with value \\(aq%s\\(aq\\en\", optarg);\n"
9883 #: build/C/man3/getopt.3:497
9886 " case \\(aqd\\(aq:\n"
9887 " printf(\"option d with value \\(aq%s\\(aq\\en\", optarg);\n"
9892 #: build/C/man3/getopt.3:500
9895 " case \\(aq?\\(aq:\n"
9900 #: build/C/man3/getopt.3:505
9904 " printf(\"?? getopt returned character code 0%o ??\\en\", c);\n"
9910 #: build/C/man3/getopt.3:512
9913 " if (optind E<lt> argc) {\n"
9914 " printf(\"non-option ARGV-elements: \");\n"
9915 " while (optind E<lt> argc)\n"
9916 " printf(\"%s \", argv[optind++]);\n"
9917 " printf(\"\\en\");\n"
9922 #: build/C/man3/getopt.3:519
9923 msgid "B<getopt>(1), B<getsubopt>(3)"
9927 #: build/C/man2/getpagesize.2:25
9933 #: build/C/man2/getpagesize.2:28
9934 msgid "getpagesize - get memory page size"
9938 #: build/C/man2/getpagesize.2:32
9939 msgid "B<int getpagesize(void);>"
9943 #: build/C/man2/getpagesize.2:39
9944 msgid "B<getpagesize>():"
9948 #. This call first appeared in 4.2BSD.
9950 #: build/C/man2/getpagesize.2:64
9952 "The function B<getpagesize>() returns the number of bytes in a memory page, "
9953 "where \"page\" is a fixed-length block, the unit for memory allocation and "
9954 "file mapping performed by B<mmap>(2)."
9958 #: build/C/man2/getpagesize.2:71
9960 "SVr4, 4.4BSD, SUSv2. In SUSv2 the B<getpagesize>() call is labeled LEGACY, "
9961 "and in POSIX.1-2001 it has been dropped; HP-UX does not have this call."
9965 #: build/C/man2/getpagesize.2:76
9967 "Portable applications should employ I<sysconf(_SC_PAGESIZE)> instead of "
9972 #: build/C/man2/getpagesize.2:81
9975 "#include E<lt>unistd.hE<gt>\n"
9976 "long sz = sysconf(_SC_PAGESIZE);\n"
9980 #: build/C/man2/getpagesize.2:88
9981 msgid "(Most systems allow the synonym B<_SC_PAGE_SIZE> for B<_SC_PAGESIZE>.)"
9985 #: build/C/man2/getpagesize.2:108
9987 "Whether B<getpagesize>() is present as a Linux system call depends on the "
9988 "architecture. If it is, it returns the kernel symbol B<PAGE_SIZE>, whose "
9989 "value depends on the architecture and machine model. Generally, one uses "
9990 "binaries that are dependent on the architecture but not on the machine "
9991 "model, in order to have a single binary distribution per architecture. This "
9992 "means that a user program should not find B<PAGE_SIZE> at compile time from "
9993 "a header file, but use an actual system call, at least for those "
9994 "architectures (like sun4) where this dependency exists. Here glibc 2.0 "
9995 "fails because its B<getpagesize>() returns a statically derived value, and "
9996 "does not use a system call. Things are OK in glibc 2.1."
10000 #: build/C/man2/getpagesize.2:111
10001 msgid "B<mmap>(2), B<sysconf>(3)"
10005 #: build/C/man2/gettid.2:26
10011 #: build/C/man2/gettid.2:26
10016 #. type: Plain text
10017 #: build/C/man2/gettid.2:29
10018 msgid "gettid - get thread identification"
10021 #. type: Plain text
10022 #: build/C/man2/gettid.2:32
10024 msgid "B<#include E<lt>sys/types.hE<gt>>\n"
10027 #. type: Plain text
10028 #: build/C/man2/gettid.2:34
10030 msgid "B<pid_t gettid(void);>\n"
10033 #. type: Plain text
10034 #: build/C/man2/gettid.2:50
10036 "B<gettid>() returns the caller's thread ID (TID). In a single-threaded "
10037 "process, the thread ID is equal to the process ID (PID, as returned by "
10038 "B<getpid>(2)). In a multithreaded process, all threads have the same PID, "
10039 "but each one has a unique TID. For further details, see the discussion of "
10040 "B<CLONE_THREAD> in B<clone>(2)."
10043 #. type: Plain text
10044 #: build/C/man2/gettid.2:52
10045 msgid "On success, returns the thread ID of the calling process."
10048 #. type: Plain text
10049 #: build/C/man2/gettid.2:54
10050 msgid "This call is always successful."
10053 #. type: Plain text
10054 #: build/C/man2/gettid.2:58
10055 msgid "The B<gettid>() system call first appeared on Linux in kernel 2.4.11."
10058 #. type: Plain text
10059 #: build/C/man2/gettid.2:62
10061 "B<gettid>() is Linux-specific and should not be used in programs that are "
10062 "intended to be portable."
10065 #. FIXME . See http://sourceware.org/bugzilla/show_bug.cgi?id=6399
10066 #. "gettid() should have a wrapper"
10067 #. type: Plain text
10068 #: build/C/man2/gettid.2:67
10070 "Glibc does not provide a wrapper for this system call; call it using "
10074 #. type: Plain text
10075 #: build/C/man2/gettid.2:71
10077 "The thread ID returned by this call is not the same thing as a POSIX thread "
10078 "ID (i.e., the opaque value returned by B<pthread_self>(3))."
10082 #. .BR move_pages (2),
10083 #. .BR migrate_pages (2),
10084 #. .BR process_vm_readv (2),
10086 #. type: Plain text
10087 #: build/C/man2/gettid.2:90
10089 "B<capget>(2), B<clone>(2), B<fcntl>(2), B<fork>(2), B<get_robust_list>(2), "
10090 "B<getpid>(2), B<ioprio_set>(2), B<perf_event_open>(2), "
10091 "B<sched_setaffinity>(2), B<sched_setparam>(2), B<sched_setscheduler>(2), "
10092 "B<tgkill>(2), B<timer_create>(2)"
10096 #: build/C/man3/getumask.3:28
10102 #: build/C/man3/getumask.3:28
10107 #. type: Plain text
10108 #: build/C/man3/getumask.3:31
10109 msgid "getumask - get file creation mask"
10112 #. type: Plain text
10113 #: build/C/man3/getumask.3:35 build/C/man2/truncate.2:50 build/C/man2/umask.2:39 build/C/man2/vfork.2:33
10114 msgid "B<#include E<lt>sys/types.hE<gt>>"
10117 #. type: Plain text
10118 #: build/C/man3/getumask.3:37 build/C/man2/umask.2:41
10119 msgid "B<#include E<lt>sys/stat.hE<gt>>"
10122 #. type: Plain text
10123 #: build/C/man3/getumask.3:39
10124 msgid "B<mode_t getumask(void);>"
10127 #. type: Plain text
10128 #: build/C/man3/getumask.3:42
10129 msgid "This function returns the current file creation mask. It is equivalent to"
10132 #. type: Plain text
10133 #: build/C/man3/getumask.3:51
10136 "mode_t getumask(void)\n"
10138 " mode_t mask = umask( 0 );\n"
10144 #. type: Plain text
10145 #: build/C/man3/getumask.3:58
10147 "except that it is documented to be thread-safe (that is, shares a lock with "
10148 "the B<umask>(2) library call)."
10151 #. type: Plain text
10152 #: build/C/man3/getumask.3:60
10153 msgid "This is a vaporware GNU extension."
10156 #. type: Plain text
10157 #: build/C/man3/getumask.3:63
10159 "This function is documented but not implemented yet in glibc, as at version "
10163 #. type: Plain text
10164 #: build/C/man3/getumask.3:65
10165 msgid "B<umask>(2)"
10169 #: build/C/man3/getusershell.3:30
10171 msgid "GETUSERSHELL"
10175 #: build/C/man3/getusershell.3:30 build/C/man2/pread.2:25
10180 #. type: Plain text
10181 #: build/C/man3/getusershell.3:33
10182 msgid "getusershell, setusershell, endusershell - get permitted user shells"
10185 #. type: Plain text
10186 #: build/C/man3/getusershell.3:38
10188 msgid "B<char *getusershell(void);>\n"
10191 #. type: Plain text
10192 #: build/C/man3/getusershell.3:40
10194 msgid "B<void setusershell(void);>\n"
10197 #. type: Plain text
10198 #: build/C/man3/getusershell.3:42
10200 msgid "B<void endusershell(void);>\n"
10203 #. type: Plain text
10204 #: build/C/man3/getusershell.3:53
10205 msgid "B<getusershell>(), B<setusershell>(), B<endusershell>():"
10208 #. type: Plain text
10209 #: build/C/man3/getusershell.3:75
10211 "The B<getusershell>() function returns the next line from the file "
10212 "I</etc/shells>, opening the file if necessary. The line should contain the "
10213 "pathname of a valid user shell. If I</etc/shells> does not exist or is "
10214 "unreadable, B<getusershell>() behaves as if I</bin/sh> and I</bin/csh> were "
10215 "listed in the file."
10218 #. type: Plain text
10219 #: build/C/man3/getusershell.3:80
10220 msgid "The B<setusershell>() function rewinds I</etc/shells>."
10223 #. type: Plain text
10224 #: build/C/man3/getusershell.3:85
10225 msgid "The B<endusershell>() function closes I</etc/shells>."
10228 #. type: Plain text
10229 #: build/C/man3/getusershell.3:89
10230 msgid "The B<getusershell>() function returns NULL on end-of-file."
10233 #. type: Plain text
10234 #: build/C/man3/getusershell.3:92
10236 msgid "/etc/shells\n"
10239 #. type: Plain text
10240 #: build/C/man3/getusershell.3:101
10242 "The B<getusershell>(), B<setusershell>() and B<endusershell>() functions "
10243 "are not thread-safe."
10246 #. type: Plain text
10247 #: build/C/man3/getusershell.3:103
10251 #. type: Plain text
10252 #: build/C/man3/getusershell.3:105
10253 msgid "B<shells>(5)"
10257 #: build/C/man2/idle.2:32
10263 #: build/C/man2/idle.2:32 build/C/man5/shells.5:28
10268 #. type: Plain text
10269 #: build/C/man2/idle.2:35
10270 msgid "idle - make process 0 idle"
10273 #. type: Plain text
10274 #: build/C/man2/idle.2:39
10275 msgid "B<int idle(void);>"
10278 #. type: Plain text
10279 #: build/C/man2/idle.2:46
10281 "B<idle>() is an internal system call used during bootstrap. It marks the "
10282 "process's pages as swappable, lowers its priority, and enters the main "
10283 "scheduling loop. B<idle>() never returns."
10286 #. type: Plain text
10287 #: build/C/man2/idle.2:52
10289 "Only process 0 may call B<idle>(). Any user process, even a process with "
10290 "superuser permission, will receive B<EPERM>."
10293 #. type: Plain text
10294 #: build/C/man2/idle.2:55
10296 "B<idle>() never returns for process 0, and always returns -1 for a user "
10300 #. type: Plain text
10301 #: build/C/man2/idle.2:59 build/C/man2/setup.2:60
10302 msgid "Always, for a user process."
10305 #. type: Plain text
10306 #: build/C/man2/idle.2:61
10307 msgid "Since Linux 2.3.13, this system call does not exist anymore."
10310 #. type: Plain text
10311 #: build/C/man2/idle.2:64 build/C/man2/sysinfo.2:90
10313 "This function is Linux-specific, and should not be used in programs intended "
10318 #: build/C/man2/ioctl.2:41
10324 #: build/C/man2/ioctl.2:41 build/C/man3/sysconf.3:27
10329 #. type: Plain text
10330 #: build/C/man2/ioctl.2:44
10331 msgid "ioctl - control device"
10334 #. type: Plain text
10335 #: build/C/man2/ioctl.2:46
10336 msgid "B<#include E<lt>sys/ioctl.hE<gt>>"
10339 #. POSIX says 'request' is int, but glibc has the above
10340 #. See https://bugzilla.kernel.org/show_bug.cgi?id=42705
10341 #. type: Plain text
10342 #: build/C/man2/ioctl.2:50
10343 msgid "B<int ioctl(int >I<fd>B<, unsigned long >I<request>B<, ...);>"
10346 #. type: Plain text
10347 #: build/C/man2/ioctl.2:61
10349 "The B<ioctl>() function manipulates the underlying device parameters of "
10350 "special files. In particular, many operating characteristics of character "
10351 "special files (e.g., terminals) may be controlled with B<ioctl>() "
10352 "requests. The argument I<fd> must be an open file descriptor."
10355 #. type: Plain text
10356 #: build/C/man2/ioctl.2:69
10358 "The second argument is a device-dependent request code. The third argument "
10359 "is an untyped pointer to memory. It's traditionally B<char *>I<argp> (from "
10360 "the days before B<void *> was valid C), and will be so named for this "
10364 #. type: Plain text
10365 #: build/C/man2/ioctl.2:85
10367 "An B<ioctl>() I<request> has encoded in it whether the argument is an I<in> "
10368 "parameter or I<out> parameter, and the size of the argument I<argp> in "
10369 "bytes. Macros and defines used in specifying an B<ioctl>() I<request> are "
10370 "located in the file I<E<lt>sys/ioctl.hE<gt>>."
10373 #. type: Plain text
10374 #: build/C/man2/ioctl.2:94
10376 "Usually, on success zero is returned. A few B<ioctl>() requests use the "
10377 "return value as an output parameter and return a nonnegative value on "
10378 "success. On error, -1 is returned, and I<errno> is set appropriately."
10381 #. type: Plain text
10382 #: build/C/man2/ioctl.2:99 build/C/man2/truncate.2:192
10383 msgid "I<fd> is not a valid descriptor."
10386 #. type: Plain text
10387 #: build/C/man2/ioctl.2:103
10388 msgid "I<argp> references an inaccessible memory area."
10391 #. type: Plain text
10392 #: build/C/man2/ioctl.2:109
10393 msgid "I<request> or I<argp> is not valid."
10396 #. type: Plain text
10397 #: build/C/man2/ioctl.2:113
10398 msgid "I<fd> is not associated with a character special device."
10401 #. type: Plain text
10402 #: build/C/man2/ioctl.2:119
10404 "The specified request does not apply to the kind of object that the "
10405 "descriptor I<fd> references."
10408 #. type: Plain text
10409 #: build/C/man2/ioctl.2:134
10411 "No single standard. Arguments, returns, and semantics of B<ioctl>() vary "
10412 "according to the device driver in question (the call is used as a catch-all "
10413 "for operations that don't cleanly fit the UNIX stream I/O model). See "
10414 "B<ioctl_list>(2) for a list of many of the known B<ioctl>() calls. The "
10415 "B<ioctl>() function call appeared in Version 7 AT&T UNIX."
10418 #. type: Plain text
10419 #: build/C/man2/ioctl.2:142
10421 "In order to use this call, one needs an open file descriptor. Often the "
10422 "B<open>(2) call has unwanted side effects, that can be avoided under Linux "
10423 "by giving it the B<O_NONBLOCK> flag."
10427 #. type: Plain text
10428 #: build/C/man2/ioctl.2:150
10429 msgid "B<execve>(2), B<fcntl>(2), B<ioctl_list>(2), B<open>(2), B<sd>(4), B<tty>(4)"
10433 #: build/C/man2/ioctl_list.2:30
10439 #: build/C/man2/ioctl_list.2:30
10444 #. type: Plain text
10445 #: build/C/man2/ioctl_list.2:33
10446 msgid "ioctl_list - list of ioctl calls in Linux/i386 kernel"
10449 #. type: Plain text
10450 #: build/C/man2/ioctl_list.2:40
10452 "This is Ioctl List 1.3.27, a list of ioctl calls in Linux/i386 kernel "
10453 "1.3.27. It contains 421 ioctls from "
10454 "I<E<lt>/usr/include/{asm,linux}/*.hE<gt>>. For each ioctl, its numerical "
10455 "value, its name, and its argument type are given."
10458 #. type: Plain text
10459 #: build/C/man2/ioctl_list.2:48
10461 "An argument type of I<const struct foo\\ *> means the argument is input to "
10462 "the kernel. I<struct foo\\ *> means the kernel outputs the argument. If "
10463 "the kernel uses the argument for both input and output, this is marked with "
10467 #. type: Plain text
10468 #: build/C/man2/ioctl_list.2:53
10470 "Some ioctls take more arguments or return more values than a single "
10471 "structure. These are marked I<//\\ MORE> and documented further in a "
10472 "separate section."
10475 #. type: Plain text
10476 #: build/C/man2/ioctl_list.2:55
10477 msgid "This list is very incomplete."
10481 #: build/C/man2/ioctl_list.2:55
10483 msgid "ioctl structure"
10486 #. added two sections - aeb
10487 #. type: Plain text
10488 #: build/C/man2/ioctl_list.2:60
10490 "Ioctl command values are 32-bit constants. In principle these constants are "
10491 "completely arbitrary, but people have tried to build some structure into "
10495 #. type: Plain text
10496 #: build/C/man2/ioctl_list.2:79
10498 "The old Linux situation was that of mostly 16-bit constants, where the last "
10499 "byte is a serial number, and the preceding byte(s) give a type indicating "
10500 "the driver. Sometimes the major number was used: 0x03 for the B<HDIO_*> "
10501 "ioctls, 0x06 for the B<LP*> ioctls. And sometimes one or more ASCII letters "
10502 "were used. For example, B<TCGETS> has value 0x00005401, with 0x54 = "
10503 "\\(aqT\\(aq indicating the terminal driver, and B<CYGETTIMEOUT> has value "
10504 "0x00435906, with 0x43 0x59 = \\(aqC\\(aq \\(aqY\\(aq indicating the cyclades "
10508 #. type: Plain text
10509 #: build/C/man2/ioctl_list.2:87
10511 "Later (0.98p5) some more information was built into the number. One has 2 "
10512 "direction bits (00: none, 01: write, 10: read, 11: read/write) followed by "
10513 "14 size bits (giving the size of the argument), followed by an 8-bit type "
10514 "(collecting the ioctls in groups for a common purpose or a common driver), "
10515 "and an 8-bit serial number."
10518 #. type: Plain text
10519 #: build/C/man2/ioctl_list.2:98
10521 "The macros describing this structure live in I<E<lt>asm/ioctl.hE<gt>> and "
10522 "are B<_IO(type,nr)> and B<{_IOR,_IOW,_IOWR}(type,nr,size)>. They use "
10523 "I<sizeof(size)> so that size is a misnomer here: this third argument is a "
10527 #. type: Plain text
10528 #: build/C/man2/ioctl_list.2:103
10530 "Note that the size bits are very unreliable: in lots of cases they are "
10531 "wrong, either because of buggy macros using I<sizeof(sizeof(struct))>, or "
10532 "because of legacy values."
10535 #. type: Plain text
10536 #: build/C/man2/ioctl_list.2:107
10538 "Thus, it seems that the new structure only gave disadvantages: it does not "
10539 "help in checking, but it causes varying values for the various "
10543 #. type: Plain text
10544 #: build/C/man2/ioctl_list.2:113
10546 "Decent ioctls return 0 on success and -1 on error, while any output value is "
10547 "stored via the argument. However, quite a few ioctls in fact return an "
10548 "output value. This is not yet indicated below."
10551 #. type: Plain text
10552 #: build/C/man2/ioctl_list.2:115
10553 msgid "// Main table."
10556 #. type: Plain text
10557 #: build/C/man2/ioctl_list.2:117
10558 msgid "// E<lt>include/asm-i386/socket.hE<gt>"
10562 #: build/C/man2/ioctl_list.2:119
10564 msgid "0x00008901\tFIOSETOWN\tconst int *\n"
10568 #: build/C/man2/ioctl_list.2:120
10570 msgid "0x00008902\tSIOCSPGRP\tconst int *\n"
10574 #: build/C/man2/ioctl_list.2:121
10576 msgid "0x00008903\tFIOGETOWN\tint *\n"
10580 #: build/C/man2/ioctl_list.2:122
10582 msgid "0x00008904\tSIOCGPGRP\tint *\n"
10586 #: build/C/man2/ioctl_list.2:123
10588 msgid "0x00008905\tSIOCATMAR\tint *\n"
10592 #: build/C/man2/ioctl_list.2:124
10594 msgid "0x00008906\tSIOCGSTAMP\ttimeval *\n"
10597 #. type: Plain text
10598 #: build/C/man2/ioctl_list.2:128
10599 msgid "// E<lt>include/asm-i386/termios.hE<gt>"
10603 #: build/C/man2/ioctl_list.2:130
10605 msgid "0x00005401\tTCGETS\tstruct termios *\n"
10609 #: build/C/man2/ioctl_list.2:131
10611 msgid "0x00005402\tTCSETS\tconst struct termios *\n"
10615 #: build/C/man2/ioctl_list.2:132
10617 msgid "0x00005403\tTCSETSW\tconst struct termios *\n"
10621 #: build/C/man2/ioctl_list.2:133
10623 msgid "0x00005404\tTCSETSF\tconst struct termios *\n"
10627 #: build/C/man2/ioctl_list.2:134
10629 msgid "0x00005405\tTCGETA\tstruct termio *\n"
10633 #: build/C/man2/ioctl_list.2:135
10635 msgid "0x00005406\tTCSETA\tconst struct termio *\n"
10639 #: build/C/man2/ioctl_list.2:136
10641 msgid "0x00005407\tTCSETAW\tconst struct termio *\n"
10645 #: build/C/man2/ioctl_list.2:137
10647 msgid "0x00005408\tTCSETAF\tconst struct termio *\n"
10651 #: build/C/man2/ioctl_list.2:138
10653 msgid "0x00005409\tTCSBRK\tint\n"
10657 #: build/C/man2/ioctl_list.2:139
10659 msgid "0x0000540A\tTCXONC\tint\n"
10663 #: build/C/man2/ioctl_list.2:140
10665 msgid "0x0000540B\tTCFLSH\tint\n"
10669 #: build/C/man2/ioctl_list.2:141
10671 msgid "0x0000540C\tTIOCEXCL\tvoid\n"
10675 #: build/C/man2/ioctl_list.2:142
10677 msgid "0x0000540D\tTIOCNXCL\tvoid\n"
10681 #: build/C/man2/ioctl_list.2:143
10683 msgid "0x0000540E\tTIOCSCTTY\tint\n"
10687 #: build/C/man2/ioctl_list.2:144
10689 msgid "0x0000540F\tTIOCGPGRP\tpid_t *\n"
10693 #: build/C/man2/ioctl_list.2:145
10695 msgid "0x00005410\tTIOCSPGRP\tconst pid_t *\n"
10699 #: build/C/man2/ioctl_list.2:146
10701 msgid "0x00005411\tTIOCOUTQ\tint *\n"
10705 #: build/C/man2/ioctl_list.2:147
10707 msgid "0x00005412\tTIOCSTI\tconst char *\n"
10711 #: build/C/man2/ioctl_list.2:148
10713 msgid "0x00005413\tTIOCGWINSZ\tstruct winsize *\n"
10717 #: build/C/man2/ioctl_list.2:149
10719 msgid "0x00005414\tTIOCSWINSZ\tconst struct winsize *\n"
10723 #: build/C/man2/ioctl_list.2:150
10725 msgid "0x00005415\tTIOCMGET\tint *\n"
10729 #: build/C/man2/ioctl_list.2:151
10731 msgid "0x00005416\tTIOCMBIS\tconst int *\n"
10735 #: build/C/man2/ioctl_list.2:152
10737 msgid "0x00005417\tTIOCMBIC\tconst int *\n"
10741 #: build/C/man2/ioctl_list.2:153
10743 msgid "0x00005418\tTIOCMSET\tconst int *\n"
10747 #: build/C/man2/ioctl_list.2:154
10749 msgid "0x00005419\tTIOCGSOFTCAR\tint *\n"
10753 #: build/C/man2/ioctl_list.2:155
10755 msgid "0x0000541A\tTIOCSSOFTCAR\tconst int *\n"
10759 #: build/C/man2/ioctl_list.2:156
10761 msgid "0x0000541B\tFIONREAD\tint *\n"
10765 #: build/C/man2/ioctl_list.2:157
10767 msgid "0x0000541B\tTIOCINQ\tint *\n"
10771 #: build/C/man2/ioctl_list.2:158
10773 msgid "0x0000541C\tTIOCLINUX\tconst char *\t// MORE\n"
10777 #: build/C/man2/ioctl_list.2:159
10779 msgid "0x0000541D\tTIOCCONS\tvoid\n"
10783 #: build/C/man2/ioctl_list.2:160
10785 msgid "0x0000541E\tTIOCGSERIAL\tstruct serial_struct *\n"
10789 #: build/C/man2/ioctl_list.2:161
10791 msgid "0x0000541F\tTIOCSSERIAL\tconst struct serial_struct *\n"
10795 #: build/C/man2/ioctl_list.2:162
10797 msgid "0x00005420\tTIOCPKT\tconst int *\n"
10801 #: build/C/man2/ioctl_list.2:163
10803 msgid "0x00005421\tFIONBIO\tconst int *\n"
10807 #: build/C/man2/ioctl_list.2:164
10809 msgid "0x00005422\tTIOCNOTTY\tvoid\n"
10813 #: build/C/man2/ioctl_list.2:165
10815 msgid "0x00005423\tTIOCSETD\tconst int *\n"
10819 #: build/C/man2/ioctl_list.2:166
10821 msgid "0x00005424\tTIOCGETD\tint *\n"
10825 #: build/C/man2/ioctl_list.2:167
10827 msgid "0x00005425\tTCSBRKP\tint\n"
10831 #: build/C/man2/ioctl_list.2:168
10833 msgid "0x00005426\tTIOCTTYGSTRUCT\tstruct tty_struct *\n"
10837 #: build/C/man2/ioctl_list.2:169
10839 msgid "0x00005450\tFIONCLEX\tvoid\n"
10843 #: build/C/man2/ioctl_list.2:170
10845 msgid "0x00005451\tFIOCLEX\tvoid\n"
10849 #: build/C/man2/ioctl_list.2:171
10851 msgid "0x00005452\tFIOASYNC\tconst int *\n"
10855 #: build/C/man2/ioctl_list.2:172
10857 msgid "0x00005453\tTIOCSERCONFIG\tvoid\n"
10861 #: build/C/man2/ioctl_list.2:173
10863 msgid "0x00005454\tTIOCSERGWILD\tint *\n"
10867 #: build/C/man2/ioctl_list.2:174
10869 msgid "0x00005455\tTIOCSERSWILD\tconst int *\n"
10873 #: build/C/man2/ioctl_list.2:175
10875 msgid "0x00005456\tTIOCGLCKTRMIOS\tstruct termios *\n"
10879 #: build/C/man2/ioctl_list.2:176
10881 msgid "0x00005457\tTIOCSLCKTRMIOS\tconst struct termios *\n"
10885 #: build/C/man2/ioctl_list.2:177
10887 msgid "0x00005458\tTIOCSERGSTRUCT\tstruct async_struct *\n"
10891 #: build/C/man2/ioctl_list.2:178
10893 msgid "0x00005459\tTIOCSERGETLSR\tint *\n"
10897 #: build/C/man2/ioctl_list.2:185
10899 msgid "0x0000545A\tTIOCSERGETMULTI\tstruct serial_multiport_struct *\n"
10903 #: build/C/man2/ioctl_list.2:186
10905 msgid "0x0000545B\tTIOCSERSETMULTI\tconst struct serial_multiport_struct *\n"
10908 #. type: Plain text
10909 #: build/C/man2/ioctl_list.2:190
10910 msgid "// E<lt>include/linux/ax25.hE<gt>"
10914 #: build/C/man2/ioctl_list.2:192
10916 msgid "0x000089E0\tSIOCAX25GETUID\tconst struct sockaddr_ax25 *\n"
10920 #: build/C/man2/ioctl_list.2:193
10922 msgid "0x000089E1\tSIOCAX25ADDUID\tconst struct sockaddr_ax25 *\n"
10926 #: build/C/man2/ioctl_list.2:194
10928 msgid "0x000089E2\tSIOCAX25DELUID\tconst struct sockaddr_ax25 *\n"
10932 #: build/C/man2/ioctl_list.2:195
10934 msgid "0x000089E3\tSIOCAX25NOUID\tconst int *\n"
10938 #: build/C/man2/ioctl_list.2:196
10940 msgid "0x000089E4\tSIOCAX25DIGCTL\tconst int *\n"
10944 #: build/C/man2/ioctl_list.2:197
10946 msgid "0x000089E5\tSIOCAX25GETPARMS\tstruct ax25_parms_struct *\t// I-O\n"
10950 #: build/C/man2/ioctl_list.2:201
10952 msgid "0x000089E6\tSIOCAX25SETPARMS\tconst struct ax25_parms_struct *\n"
10955 #. type: Plain text
10956 #: build/C/man2/ioctl_list.2:205
10957 msgid "// E<lt>include/linux/cdk.hE<gt>"
10961 #: build/C/man2/ioctl_list.2:207
10963 msgid "0x00007314\tSTL_BINTR\tvoid\n"
10967 #: build/C/man2/ioctl_list.2:208
10969 msgid "0x00007315\tSTL_BSTART\tvoid\n"
10973 #: build/C/man2/ioctl_list.2:209
10975 msgid "0x00007316\tSTL_BSTOP\tvoid\n"
10979 #: build/C/man2/ioctl_list.2:210
10981 msgid "0x00007317\tSTL_BRESET\tvoid\n"
10984 #. type: Plain text
10985 #: build/C/man2/ioctl_list.2:214
10986 msgid "// E<lt>include/linux/cdrom.hE<gt>"
10990 #: build/C/man2/ioctl_list.2:216
10992 msgid "0x00005301\tCDROMPAUSE\tvoid\n"
10996 #: build/C/man2/ioctl_list.2:217
10998 msgid "0x00005302\tCDROMRESUME\tvoid\n"
11002 #: build/C/man2/ioctl_list.2:218
11004 msgid "0x00005303\tCDROMPLAYMSF\tconst struct cdrom_msf *\n"
11008 #: build/C/man2/ioctl_list.2:219
11010 msgid "0x00005304\tCDROMPLAYTRKIND\tconst struct cdrom_ti *\n"
11014 #: build/C/man2/ioctl_list.2:220
11016 msgid "0x00005305\tCDROMREADTOCHDR\tstruct cdrom_tochdr *\n"
11020 #: build/C/man2/ioctl_list.2:224
11022 msgid "0x00005306\tCDROMREADTOCENTRY\tstruct cdrom_tocentry *\t// I-O\n"
11026 #: build/C/man2/ioctl_list.2:228
11028 msgid "0x00005307\tCDROMSTOP\tvoid\n"
11032 #: build/C/man2/ioctl_list.2:229
11034 msgid "0x00005308\tCDROMSTART\tvoid\n"
11038 #: build/C/man2/ioctl_list.2:230
11040 msgid "0x00005309\tCDROMEJECT\tvoid\n"
11044 #: build/C/man2/ioctl_list.2:231
11046 msgid "0x0000530A\tCDROMVOLCTRL\tconst struct cdrom_volctrl *\n"
11050 #: build/C/man2/ioctl_list.2:232
11052 msgid "0x0000530B\tCDROMSUBCHNL\tstruct cdrom_subchnl *\t// I-O\n"
11056 #: build/C/man2/ioctl_list.2:233
11058 msgid "0x0000530C\tCDROMREADMODE2\tconst struct cdrom_msf *\t// MORE\n"
11062 #: build/C/man2/ioctl_list.2:234
11064 msgid "0x0000530D\tCDROMREADMODE1\tconst struct cdrom_msf *\t// MORE\n"
11068 #: build/C/man2/ioctl_list.2:235
11070 msgid "0x0000530E\tCDROMREADAUDIO\tconst struct cdrom_read_audio *\t// MORE\n"
11074 #: build/C/man2/ioctl_list.2:236
11076 msgid "0x0000530F\tCDROMEJECT_SW\tint\n"
11080 #: build/C/man2/ioctl_list.2:240
11082 msgid "0x00005310\tCDROMMULTISESSION\tstruct cdrom_multisession *\t// I-O\n"
11086 #: build/C/man2/ioctl_list.2:244
11088 msgid "0x00005311\tCDROM_GET_UPC\tstruct { char [8]; } *\n"
11092 #: build/C/man2/ioctl_list.2:245
11094 msgid "0x00005312\tCDROMRESET\tvoid\n"
11098 #: build/C/man2/ioctl_list.2:246
11100 msgid "0x00005313\tCDROMVOLREAD\tstruct cdrom_volctrl *\n"
11104 #: build/C/man2/ioctl_list.2:247
11106 msgid "0x00005314\tCDROMREADRAW\tconst struct cdrom_msf *\t// MORE\n"
11110 #: build/C/man2/ioctl_list.2:248
11112 msgid "0x00005315\tCDROMREADCOOKED\tconst struct cdrom_msf *\t// MORE\n"
11116 #: build/C/man2/ioctl_list.2:249
11118 msgid "0x00005316\tCDROMSEEK\tconst struct cdrom_msf *\n"
11121 #. type: Plain text
11122 #: build/C/man2/ioctl_list.2:253
11123 msgid "// E<lt>include/linux/cm206.hE<gt>"
11127 #: build/C/man2/ioctl_list.2:255
11129 msgid "0x00002000\tCM206CTL_GET_STAT\tint\n"
11133 #: build/C/man2/ioctl_list.2:256
11135 msgid "0x00002001\tCM206CTL_GET_LAST_STAT\tint\n"
11138 #. type: Plain text
11139 #: build/C/man2/ioctl_list.2:260
11140 msgid "// E<lt>include/linux/cyclades.hE<gt>"
11144 #: build/C/man2/ioctl_list.2:262
11146 msgid "0x00435901\tCYGETMON\tstruct cyclades_monitor *\n"
11150 #: build/C/man2/ioctl_list.2:263
11152 msgid "0x00435902\tCYGETTHRESH\tint *\n"
11156 #: build/C/man2/ioctl_list.2:264
11158 msgid "0x00435903\tCYSETTHRESH\tint\n"
11162 #: build/C/man2/ioctl_list.2:265
11164 msgid "0x00435904\tCYGETDEFTHRESH\tint *\n"
11168 #: build/C/man2/ioctl_list.2:266
11170 msgid "0x00435905\tCYSETDEFTHRESH\tint\n"
11174 #: build/C/man2/ioctl_list.2:267
11176 msgid "0x00435906\tCYGETTIMEOUT\tint *\n"
11180 #: build/C/man2/ioctl_list.2:268
11182 msgid "0x00435907\tCYSETTIMEOUT\tint\n"
11186 #: build/C/man2/ioctl_list.2:269
11188 msgid "0x00435908\tCYGETDEFTIMEOUT\tint *\n"
11192 #: build/C/man2/ioctl_list.2:270
11194 msgid "0x00435909\tCYSETDEFTIMEOUT\tint\n"
11197 #. type: Plain text
11198 #: build/C/man2/ioctl_list.2:274
11199 msgid "// E<lt>include/linux/ext2_fs.hE<gt>"
11203 #: build/C/man2/ioctl_list.2:276
11205 msgid "0x80046601\tEXT2_IOC_GETFLAGS\tint *\n"
11209 #: build/C/man2/ioctl_list.2:277
11211 msgid "0x40046602\tEXT2_IOC_SETFLAGS\tconst int *\n"
11215 #: build/C/man2/ioctl_list.2:278
11217 msgid "0x80047601\tEXT2_IOC_GETVERSION\tint *\n"
11221 #: build/C/man2/ioctl_list.2:279
11223 msgid "0x40047602\tEXT2_IOC_SETVERSION\tconst int *\n"
11226 #. type: Plain text
11227 #: build/C/man2/ioctl_list.2:283
11228 msgid "// E<lt>include/linux/fd.hE<gt>"
11232 #: build/C/man2/ioctl_list.2:285
11234 msgid "0x00000000\tFDCLRPRM\tvoid\n"
11238 #: build/C/man2/ioctl_list.2:286
11240 msgid "0x00000001\tFDSETPRM\tconst struct floppy_struct *\n"
11244 #: build/C/man2/ioctl_list.2:287
11246 msgid "0x00000002\tFDDEFPRM\tconst struct floppy_struct *\n"
11250 #: build/C/man2/ioctl_list.2:288
11252 msgid "0x00000003\tFDGETPRM\tstruct floppy_struct *\n"
11256 #: build/C/man2/ioctl_list.2:289
11258 msgid "0x00000004\tFDMSGON\tvoid\n"
11262 #: build/C/man2/ioctl_list.2:290
11264 msgid "0x00000005\tFDMSGOFF\tvoid\n"
11268 #: build/C/man2/ioctl_list.2:291
11270 msgid "0x00000006\tFDFMTBEG\tvoid\n"
11274 #: build/C/man2/ioctl_list.2:292
11276 msgid "0x00000007\tFDFMTTRK\tconst struct format_descr *\n"
11280 #: build/C/man2/ioctl_list.2:293
11282 msgid "0x00000008\tFDFMTEND\tvoid\n"
11286 #: build/C/man2/ioctl_list.2:294
11288 msgid "0x0000000A\tFDSETEMSGTRESH\tint\n"
11292 #: build/C/man2/ioctl_list.2:295
11294 msgid "0x0000000B\tFDFLUSH\tvoid\n"
11298 #: build/C/man2/ioctl_list.2:296
11300 msgid "0x0000000C\tFDSETMAXERRS\tconst struct floppy_max_errors *\n"
11304 #: build/C/man2/ioctl_list.2:297
11306 msgid "0x0000000E\tFDGETMAXERRS\tstruct floppy_max_errors *\n"
11310 #: build/C/man2/ioctl_list.2:298
11312 msgid "0x00000010\tFDGETDRVTYP\tstruct { char [16]; } *\n"
11316 #: build/C/man2/ioctl_list.2:299
11318 msgid "0x00000014\tFDSETDRVPRM\tconst struct floppy_drive_params *\n"
11322 #: build/C/man2/ioctl_list.2:300
11324 msgid "0x00000015\tFDGETDRVPRM\tstruct floppy_drive_params *\n"
11328 #: build/C/man2/ioctl_list.2:301
11330 msgid "0x00000016\tFDGETDRVSTAT\tstruct floppy_drive_struct *\n"
11334 #: build/C/man2/ioctl_list.2:302
11336 msgid "0x00000017\tFDPOLLDRVSTAT\tstruct floppy_drive_struct *\n"
11340 #: build/C/man2/ioctl_list.2:303
11342 msgid "0x00000018\tFDRESET\tint\n"
11346 #: build/C/man2/ioctl_list.2:304
11348 msgid "0x00000019\tFDGETFDCSTAT\tstruct floppy_fdc_state *\n"
11352 #: build/C/man2/ioctl_list.2:305
11354 msgid "0x0000001B\tFDWERRORCLR\tvoid\n"
11358 #: build/C/man2/ioctl_list.2:306
11360 msgid "0x0000001C\tFDWERRORGET\tstruct floppy_write_errors *\n"
11364 #: build/C/man2/ioctl_list.2:310
11366 msgid "0x0000001E\tFDRAWCMD\tstruct floppy_raw_cmd *\t// MORE // I-O\n"
11370 #: build/C/man2/ioctl_list.2:311
11372 msgid "0x00000028\tFDTWADDLE\tvoid\n"
11375 #. type: Plain text
11376 #: build/C/man2/ioctl_list.2:315
11377 msgid "// E<lt>include/linux/fs.hE<gt>"
11381 #: build/C/man2/ioctl_list.2:317
11383 msgid "0x0000125D\tBLKROSET\tconst int *\n"
11387 #: build/C/man2/ioctl_list.2:318
11389 msgid "0x0000125E\tBLKROGET\tint *\n"
11393 #: build/C/man2/ioctl_list.2:319
11395 msgid "0x0000125F\tBLKRRPART\tvoid\n"
11399 #: build/C/man2/ioctl_list.2:320
11401 msgid "0x00001260\tBLKGETSIZE\tunsigned long *\n"
11405 #: build/C/man2/ioctl_list.2:321
11407 msgid "0x00001261\tBLKFLSBUF\tvoid\n"
11411 #: build/C/man2/ioctl_list.2:322
11413 msgid "0x00001262\tBLKRASET\tint\n"
11417 #: build/C/man2/ioctl_list.2:323
11419 msgid "0x00001263\tBLKRAGET\tint *\n"
11423 #: build/C/man2/ioctl_list.2:324
11425 msgid "0x00000001\tFIBMAP\tint *\t// I-O\n"
11429 #: build/C/man2/ioctl_list.2:325
11431 msgid "0x00000002\tFIGETBSZ\tint *\n"
11434 #. type: Plain text
11435 #: build/C/man2/ioctl_list.2:329
11436 msgid "// E<lt>include/linux/hdreg.hE<gt>"
11440 #: build/C/man2/ioctl_list.2:331
11442 msgid "0x00000301\tHDIO_GETGEO\tstruct hd_geometry *\n"
11446 #: build/C/man2/ioctl_list.2:332
11448 msgid "0x00000302\tHDIO_GET_UNMASKINTR\tint *\n"
11452 #: build/C/man2/ioctl_list.2:333
11454 msgid "0x00000304\tHDIO_GET_MULTCOUNT\tint *\n"
11458 #: build/C/man2/ioctl_list.2:334
11460 msgid "0x00000307\tHDIO_GET_IDENTITY\tstruct hd_driveid *\n"
11464 #: build/C/man2/ioctl_list.2:335
11466 msgid "0x00000308\tHDIO_GET_KEEPSETTINGS\tint *\n"
11470 #: build/C/man2/ioctl_list.2:336
11472 msgid "0x00000309\tHDIO_GET_CHIPSET\tint *\n"
11476 #: build/C/man2/ioctl_list.2:337
11478 msgid "0x0000030A\tHDIO_GET_NOWERR\tint *\n"
11482 #: build/C/man2/ioctl_list.2:338
11484 msgid "0x0000030B\tHDIO_GET_DMA\tint *\n"
11488 #: build/C/man2/ioctl_list.2:339
11490 msgid "0x0000031F\tHDIO_DRIVE_CMD\tint *\t// I-O\n"
11494 #: build/C/man2/ioctl_list.2:340
11496 msgid "0x00000321\tHDIO_SET_MULTCOUNT\tint\n"
11500 #: build/C/man2/ioctl_list.2:341
11502 msgid "0x00000322\tHDIO_SET_UNMASKINTR\tint\n"
11506 #: build/C/man2/ioctl_list.2:342
11508 msgid "0x00000323\tHDIO_SET_KEEPSETTINGS\tint\n"
11512 #: build/C/man2/ioctl_list.2:343
11514 msgid "0x00000324\tHDIO_SET_CHIPSET\tint\n"
11518 #: build/C/man2/ioctl_list.2:344
11520 msgid "0x00000325\tHDIO_SET_NOWERR\tint\n"
11524 #: build/C/man2/ioctl_list.2:345
11526 msgid "0x00000326\tHDIO_SET_DMA\tint\n"
11529 #. type: Plain text
11530 #: build/C/man2/ioctl_list.2:349
11531 msgid "// E<lt>include/linux/if_eql.hE<gt>"
11535 #: build/C/man2/ioctl_list.2:351
11537 msgid "0x000089F0\tEQL_ENSLAVE\tstruct ifreq *\t// MORE // I-O\n"
11541 #: build/C/man2/ioctl_list.2:352
11543 msgid "0x000089F1\tEQL_EMANCIPATE\tstruct ifreq *\t// MORE // I-O\n"
11547 #: build/C/man2/ioctl_list.2:353
11549 msgid "0x000089F2\tEQL_GETSLAVECFG\tstruct ifreq *\t// MORE // I-O\n"
11553 #: build/C/man2/ioctl_list.2:354
11555 msgid "0x000089F3\tEQL_SETSLAVECFG\tstruct ifreq *\t// MORE // I-O\n"
11559 #: build/C/man2/ioctl_list.2:355
11561 msgid "0x000089F4\tEQL_GETMASTRCFG\tstruct ifreq *\t// MORE // I-O\n"
11565 #: build/C/man2/ioctl_list.2:356
11567 msgid "0x000089F5\tEQL_SETMASTRCFG\tstruct ifreq *\t// MORE // I-O\n"
11570 #. type: Plain text
11571 #: build/C/man2/ioctl_list.2:360
11572 msgid "// E<lt>include/linux/if_plip.hE<gt>"
11576 #: build/C/man2/ioctl_list.2:362
11578 msgid "0x000089F0\tSIOCDEVPLIP\tstruct ifreq *\t// I-O\n"
11581 #. type: Plain text
11582 #: build/C/man2/ioctl_list.2:366
11583 msgid "// E<lt>include/linux/if_ppp.hE<gt>"
11587 #: build/C/man2/ioctl_list.2:368
11589 msgid "0x00005490\tPPPIOCGFLAGS\tint *\n"
11593 #: build/C/man2/ioctl_list.2:369
11595 msgid "0x00005491\tPPPIOCSFLAGS\tconst int *\n"
11599 #: build/C/man2/ioctl_list.2:370
11601 msgid "0x00005492\tPPPIOCGASYNCMAP\tint *\n"
11605 #: build/C/man2/ioctl_list.2:371
11607 msgid "0x00005493\tPPPIOCSASYNCMAP\tconst int *\n"
11611 #: build/C/man2/ioctl_list.2:372
11613 msgid "0x00005494\tPPPIOCGUNIT\tint *\n"
11617 #: build/C/man2/ioctl_list.2:373
11619 msgid "0x00005495\tPPPIOCSINPSIG\tconst int *\n"
11623 #: build/C/man2/ioctl_list.2:374
11625 msgid "0x00005497\tPPPIOCSDEBUG\tconst int *\n"
11629 #: build/C/man2/ioctl_list.2:375
11631 msgid "0x00005498\tPPPIOCGDEBUG\tint *\n"
11635 #: build/C/man2/ioctl_list.2:376
11637 msgid "0x00005499\tPPPIOCGSTAT\tstruct ppp_stats *\n"
11641 #: build/C/man2/ioctl_list.2:377
11643 msgid "0x0000549A\tPPPIOCGTIME\tstruct ppp_ddinfo *\n"
11647 #: build/C/man2/ioctl_list.2:378
11649 msgid "0x0000549B\tPPPIOCGXASYNCMAP\tstruct { int [8]; } *\n"
11653 #: build/C/man2/ioctl_list.2:379
11655 msgid "0x0000549C\tPPPIOCSXASYNCMAP\tconst struct { int [8]; } *\n"
11659 #: build/C/man2/ioctl_list.2:380
11661 msgid "0x0000549D\tPPPIOCSMRU\tconst int *\n"
11665 #: build/C/man2/ioctl_list.2:381
11667 msgid "0x0000549E\tPPPIOCRASYNCMAP\tconst int *\n"
11671 #: build/C/man2/ioctl_list.2:382
11673 msgid "0x0000549F\tPPPIOCSMAXCID\tconst int *\n"
11676 #. type: Plain text
11677 #: build/C/man2/ioctl_list.2:386
11678 msgid "// E<lt>include/linux/ipx.hE<gt>"
11682 #: build/C/man2/ioctl_list.2:388
11684 msgid "0x000089E0\tSIOCAIPXITFCRT\tconst char *\n"
11688 #: build/C/man2/ioctl_list.2:389
11690 msgid "0x000089E1\tSIOCAIPXPRISLT\tconst char *\n"
11694 #: build/C/man2/ioctl_list.2:390
11696 msgid "0x000089E2\tSIOCIPXCFGDATA\tstruct ipx_config_data *\n"
11699 #. type: Plain text
11700 #: build/C/man2/ioctl_list.2:394
11701 msgid "// E<lt>include/linux/kd.hE<gt>"
11705 #: build/C/man2/ioctl_list.2:396
11707 msgid "0x00004B60\tGIO_FONT\tstruct { char [8192]; } *\n"
11711 #: build/C/man2/ioctl_list.2:397
11713 msgid "0x00004B61\tPIO_FONT\tconst struct { char [8192]; } *\n"
11717 #: build/C/man2/ioctl_list.2:401
11719 msgid "0x00004B6B\tGIO_FONTX\tstruct console_font_desc *\t// MORE // I-O\n"
11723 #: build/C/man2/ioctl_list.2:402
11725 msgid "0x00004B6C\tPIO_FONTX\tconst struct console_font_desc *\t//MORE\n"
11729 #: build/C/man2/ioctl_list.2:406
11731 msgid "0x00004B70\tGIO_CMAP\tstruct { char [48]; } *\n"
11735 #: build/C/man2/ioctl_list.2:407
11737 msgid "0x00004B71\tPIO_CMAP\tconst struct { char [48]; }\n"
11741 #: build/C/man2/ioctl_list.2:411
11743 msgid "0x00004B2F\tKIOCSOUND\tint\n"
11747 #: build/C/man2/ioctl_list.2:412
11749 msgid "0x00004B30\tKDMKTONE\tint\n"
11753 #: build/C/man2/ioctl_list.2:413
11755 msgid "0x00004B31\tKDGETLED\tchar *\n"
11759 #: build/C/man2/ioctl_list.2:414
11761 msgid "0x00004B32\tKDSETLED\tint\n"
11765 #: build/C/man2/ioctl_list.2:415
11767 msgid "0x00004B33\tKDGKBTYPE\tchar *\n"
11771 #: build/C/man2/ioctl_list.2:416
11773 msgid "0x00004B34\tKDADDIO\tint\t// MORE\n"
11777 #: build/C/man2/ioctl_list.2:417
11779 msgid "0x00004B35\tKDDELIO\tint\t// MORE\n"
11783 #: build/C/man2/ioctl_list.2:418
11785 msgid "0x00004B36\tKDENABIO\tvoid\t// MORE\n"
11789 #: build/C/man2/ioctl_list.2:419
11791 msgid "0x00004B37\tKDDISABIO\tvoid\t// MORE\n"
11795 #: build/C/man2/ioctl_list.2:420
11797 msgid "0x00004B3A\tKDSETMODE\tint\n"
11801 #: build/C/man2/ioctl_list.2:421
11803 msgid "0x00004B3B\tKDGETMODE\tint *\n"
11807 #: build/C/man2/ioctl_list.2:422
11809 msgid "0x00004B3C\tKDMAPDISP\tvoid\t// MORE\n"
11813 #: build/C/man2/ioctl_list.2:423
11815 msgid "0x00004B3D\tKDUNMAPDISP\tvoid\t// MORE\n"
11819 #: build/C/man2/ioctl_list.2:424
11821 msgid "0x00004B40\tGIO_SCRNMAP\tstruct { char [E_TABSZ]; } *\n"
11825 #: build/C/man2/ioctl_list.2:428
11827 msgid "0x00004B41\tPIO_SCRNMAP\tconst struct { char [E_TABSZ]; } *\n"
11831 #: build/C/man2/ioctl_list.2:429
11833 msgid "0x00004B69\tGIO_UNISCRNMAP\tstruct { short [E_TABSZ]; } *\n"
11837 #: build/C/man2/ioctl_list.2:430
11839 msgid "0x00004B6A\tPIO_UNISCRNMAP\tconst struct { short [E_TABSZ]; } *\n"
11843 #: build/C/man2/ioctl_list.2:434
11845 msgid "0x00004B66\tGIO_UNIMAP\tstruct unimapdesc *\t// MORE // I-O\n"
11849 #: build/C/man2/ioctl_list.2:435
11851 msgid "0x00004B67\tPIO_UNIMAP\tconst struct unimapdesc *\t// MORE\n"
11855 #: build/C/man2/ioctl_list.2:436
11857 msgid "0x00004B68\tPIO_UNIMAPCLR\tconst struct unimapinit *\n"
11861 #: build/C/man2/ioctl_list.2:437
11863 msgid "0x00004B44\tKDGKBMODE\tint *\n"
11867 #: build/C/man2/ioctl_list.2:438
11869 msgid "0x00004B45\tKDSKBMODE\tint\n"
11873 #: build/C/man2/ioctl_list.2:439
11875 msgid "0x00004B62\tKDGKBMETA\tint *\n"
11879 #: build/C/man2/ioctl_list.2:440
11881 msgid "0x00004B63\tKDSKBMETA\tint\n"
11885 #: build/C/man2/ioctl_list.2:441
11887 msgid "0x00004B64\tKDGKBLED\tint *\n"
11891 #: build/C/man2/ioctl_list.2:442
11893 msgid "0x00004B65\tKDSKBLED\tint\n"
11897 #: build/C/man2/ioctl_list.2:443
11899 msgid "0x00004B46\tKDGKBENT\tstruct kbentry *\t// I-O\n"
11903 #: build/C/man2/ioctl_list.2:444
11905 msgid "0x00004B47\tKDSKBENT\tconst struct kbentry *\n"
11909 #: build/C/man2/ioctl_list.2:445
11911 msgid "0x00004B48\tKDGKBSENT\tstruct kbsentry *\t// I-O\n"
11915 #: build/C/man2/ioctl_list.2:446
11917 msgid "0x00004B49\tKDSKBSENT\tconst struct kbsentry *\n"
11921 #: build/C/man2/ioctl_list.2:447
11923 msgid "0x00004B4A\tKDGKBDIACR\tstruct kbdiacrs *\n"
11927 #: build/C/man2/ioctl_list.2:448
11929 msgid "0x00004B4B\tKDSKBDIACR\tconst struct kbdiacrs *\n"
11933 #: build/C/man2/ioctl_list.2:449
11935 msgid "0x00004B4C\tKDGETKEYCODE\tstruct kbkeycode *\t// I-O\n"
11939 #: build/C/man2/ioctl_list.2:450
11941 msgid "0x00004B4D\tKDSETKEYCODE\tconst struct kbkeycode *\n"
11945 #: build/C/man2/ioctl_list.2:451
11947 msgid "0x00004B4E\tKDSIGACCEPT\tint\n"
11950 #. type: Plain text
11951 #: build/C/man2/ioctl_list.2:455
11952 msgid "// E<lt>include/linux/lp.hE<gt>"
11956 #: build/C/man2/ioctl_list.2:457
11958 msgid "0x00000601\tLPCHAR\tint\n"
11962 #: build/C/man2/ioctl_list.2:458
11964 msgid "0x00000602\tLPTIME\tint\n"
11968 #: build/C/man2/ioctl_list.2:459
11970 msgid "0x00000604\tLPABORT\tint\n"
11974 #: build/C/man2/ioctl_list.2:460
11976 msgid "0x00000605\tLPSETIRQ\tint\n"
11980 #: build/C/man2/ioctl_list.2:461
11982 msgid "0x00000606\tLPGETIRQ\tint *\n"
11986 #: build/C/man2/ioctl_list.2:462
11988 msgid "0x00000608\tLPWAIT\tint\n"
11992 #: build/C/man2/ioctl_list.2:463
11994 msgid "0x00000609\tLPCAREFUL\tint\n"
11998 #: build/C/man2/ioctl_list.2:464
12000 msgid "0x0000060A\tLPABORTOPEN\tint\n"
12004 #: build/C/man2/ioctl_list.2:465
12006 msgid "0x0000060B\tLPGETSTATUS\tint *\n"
12010 #: build/C/man2/ioctl_list.2:466
12012 msgid "0x0000060C\tLPRESET\tvoid\n"
12016 #: build/C/man2/ioctl_list.2:467
12018 msgid "0x0000060D\tLPGETSTATS\tstruct lp_stats *\n"
12021 #. type: Plain text
12022 #: build/C/man2/ioctl_list.2:471
12023 msgid "// E<lt>include/linux/mroute.hE<gt>"
12027 #: build/C/man2/ioctl_list.2:473
12029 msgid "0x000089E0\tSIOCGETVIFCNT\tstruct sioc_vif_req *\t// I-O\n"
12033 #: build/C/man2/ioctl_list.2:474
12035 msgid "0x000089E1\tSIOCGETSGCNT\tstruct sioc_sg_req *\t// I-O\n"
12038 #. type: Plain text
12039 #: build/C/man2/ioctl_list.2:478
12040 msgid "// E<lt>include/linux/msdos_fs.hE<gt>"
12044 #: build/C/man2/ioctl_list.2:480
12046 msgid "0x82307201\tVFAT_IOCTL_READDIR_BOTH\tstruct dirent [2]\n"
12050 #: build/C/man2/ioctl_list.2:481
12052 msgid "0x82307202\tVFAT_IOCTL_READDIR_SHORT\tstruct dirent [2]\n"
12056 #: build/C/man2/ioctl_list.2:482
12058 msgid "0x80047210\tFAT_IOCTL_GET_ATTRIBUTES\t__u32 *\n"
12062 #: build/C/man2/ioctl_list.2:483
12064 msgid "0x40047211\tFAT_IOCTL_SET_ATTRIBUTES\tconst __u32 *\n"
12067 #. type: Plain text
12068 #: build/C/man2/ioctl_list.2:487
12069 msgid "// E<lt>include/linux/mtio.hE<gt>"
12073 #: build/C/man2/ioctl_list.2:489
12075 msgid "0x40086D01\tMTIOCTOP\tconst struct mtop *\n"
12079 #: build/C/man2/ioctl_list.2:490
12081 msgid "0x801C6D02\tMTIOCGET\tstruct mtget *\n"
12085 #: build/C/man2/ioctl_list.2:491
12087 msgid "0x80046D03\tMTIOCPOS\tstruct mtpos *\n"
12091 #: build/C/man2/ioctl_list.2:492
12093 msgid "0x80206D04\tMTIOCGETCONFIG\tstruct mtconfiginfo *\n"
12097 #: build/C/man2/ioctl_list.2:493
12099 msgid "0x40206D05\tMTIOCSETCONFIG\tconst struct mtconfiginfo *\n"
12102 #. type: Plain text
12103 #: build/C/man2/ioctl_list.2:497
12104 msgid "// E<lt>include/linux/netrom.hE<gt>"
12108 #: build/C/man2/ioctl_list.2:499
12110 msgid "0x000089E0\tSIOCNRGETPARMS\tstruct nr_parms_struct *\t// I-O\n"
12114 #: build/C/man2/ioctl_list.2:500
12116 msgid "0x000089E1\tSIOCNRSETPARMS\tconst struct nr_parms_struct *\n"
12120 #: build/C/man2/ioctl_list.2:501
12122 msgid "0x000089E2\tSIOCNRDECOBS\tvoid\n"
12126 #: build/C/man2/ioctl_list.2:502
12128 msgid "0x000089E3\tSIOCNRRTCTL\tconst int *\n"
12131 #. type: Plain text
12132 #: build/C/man2/ioctl_list.2:506
12133 msgid "// E<lt>include/linux/sbpcd.hE<gt>"
12137 #: build/C/man2/ioctl_list.2:508
12139 msgid "0x00009000\tDDIOCSDBG\tconst int *\n"
12143 #: build/C/man2/ioctl_list.2:509
12145 msgid "0x00005382\tCDROMAUDIOBUFSIZ\tint\n"
12148 #. type: Plain text
12149 #: build/C/man2/ioctl_list.2:513
12150 msgid "// E<lt>include/linux/scc.hE<gt>"
12154 #: build/C/man2/ioctl_list.2:515
12156 msgid "0x00005470\tTIOCSCCINI\tvoid\n"
12160 #: build/C/man2/ioctl_list.2:516
12162 msgid "0x00005471\tTIOCCHANINI\tconst struct scc_modem *\n"
12166 #: build/C/man2/ioctl_list.2:517
12168 msgid "0x00005472\tTIOCGKISS\tstruct ioctl_command *\t// I-O\n"
12172 #: build/C/man2/ioctl_list.2:518
12174 msgid "0x00005473\tTIOCSKISS\tconst struct ioctl_command *\n"
12178 #: build/C/man2/ioctl_list.2:519
12180 msgid "0x00005474\tTIOCSCCSTAT\tstruct scc_stat *\n"
12183 #. type: Plain text
12184 #: build/C/man2/ioctl_list.2:523
12185 msgid "// E<lt>include/linux/scsi.hE<gt>"
12189 #: build/C/man2/ioctl_list.2:525
12191 msgid "0x00005382\tSCSI_IOCTL_GET_IDLUN\tstruct { int [2]; } *\n"
12195 #: build/C/man2/ioctl_list.2:526
12197 msgid "0x00005383\tSCSI_IOCTL_TAGGED_ENABLE\tvoid\n"
12201 #: build/C/man2/ioctl_list.2:527
12203 msgid "0x00005384\tSCSI_IOCTL_TAGGED_DISABLE\tvoid\n"
12207 #: build/C/man2/ioctl_list.2:531
12209 msgid "0x00005385\tSCSI_IOCTL_PROBE_HOST\tconst int *\t// MORE\n"
12212 #. type: Plain text
12213 #: build/C/man2/ioctl_list.2:535
12214 msgid "// E<lt>include/linux/smb_fs.hE<gt>"
12218 #: build/C/man2/ioctl_list.2:537
12220 msgid "0x80027501\tSMB_IOC_GETMOUNTUID\tuid_t *\n"
12223 #. type: Plain text
12224 #: build/C/man2/ioctl_list.2:541
12225 msgid "// E<lt>include/linux/sockios.hE<gt>"
12229 #: build/C/man2/ioctl_list.2:543
12231 msgid "0x0000890B\tSIOCADDRT\tconst struct rtentry *\t// MORE\n"
12235 #: build/C/man2/ioctl_list.2:544
12237 msgid "0x0000890C\tSIOCDELRT\tconst struct rtentry *\t// MORE\n"
12241 #: build/C/man2/ioctl_list.2:545
12243 msgid "0x00008910\tSIOCGIFNAME\tchar []\n"
12247 #: build/C/man2/ioctl_list.2:546
12249 msgid "0x00008911\tSIOCSIFLINK\tvoid\n"
12253 #: build/C/man2/ioctl_list.2:547
12255 msgid "0x00008912\tSIOCGIFCONF\tstruct ifconf *\t// MORE // I-O\n"
12259 #: build/C/man2/ioctl_list.2:548
12261 msgid "0x00008913\tSIOCGIFFLAGS\tstruct ifreq *\t// I-O\n"
12265 #: build/C/man2/ioctl_list.2:549
12267 msgid "0x00008914\tSIOCSIFFLAGS\tconst struct ifreq *\n"
12271 #: build/C/man2/ioctl_list.2:550
12273 msgid "0x00008915\tSIOCGIFADDR\tstruct ifreq *\t// I-O\n"
12277 #: build/C/man2/ioctl_list.2:551
12279 msgid "0x00008916\tSIOCSIFADDR\tconst struct ifreq *\n"
12283 #: build/C/man2/ioctl_list.2:552
12285 msgid "0x00008917\tSIOCGIFDSTADDR\tstruct ifreq *\t// I-O\n"
12289 #: build/C/man2/ioctl_list.2:553
12291 msgid "0x00008918\tSIOCSIFDSTADDR\tconst struct ifreq *\n"
12295 #: build/C/man2/ioctl_list.2:554
12297 msgid "0x00008919\tSIOCGIFBRDADDR\tstruct ifreq *\t// I-O\n"
12301 #: build/C/man2/ioctl_list.2:555
12303 msgid "0x0000891A\tSIOCSIFBRDADDR\tconst struct ifreq *\n"
12307 #: build/C/man2/ioctl_list.2:556
12309 msgid "0x0000891B\tSIOCGIFNETMASK\tstruct ifreq *\t// I-O\n"
12313 #: build/C/man2/ioctl_list.2:557
12315 msgid "0x0000891C\tSIOCSIFNETMASK\tconst struct ifreq *\n"
12319 #: build/C/man2/ioctl_list.2:558
12321 msgid "0x0000891D\tSIOCGIFMETRIC\tstruct ifreq *\t// I-O\n"
12325 #: build/C/man2/ioctl_list.2:559
12327 msgid "0x0000891E\tSIOCSIFMETRIC\tconst struct ifreq *\n"
12331 #: build/C/man2/ioctl_list.2:560
12333 msgid "0x0000891F\tSIOCGIFMEM\tstruct ifreq *\t// I-O\n"
12337 #: build/C/man2/ioctl_list.2:561
12339 msgid "0x00008920\tSIOCSIFMEM\tconst struct ifreq *\n"
12343 #: build/C/man2/ioctl_list.2:562
12345 msgid "0x00008921\tSIOCGIFMTU\tstruct ifreq *\t// I-O\n"
12349 #: build/C/man2/ioctl_list.2:563
12351 msgid "0x00008922\tSIOCSIFMTU\tconst struct ifreq *\n"
12355 #: build/C/man2/ioctl_list.2:567
12357 msgid "0x00008923\tOLD_SIOCGIFHWADDR\tstruct ifreq *\t// I-O\n"
12361 #: build/C/man2/ioctl_list.2:568
12363 msgid "0x00008924\tSIOCSIFHWADDR\tconst struct ifreq *\t// MORE\n"
12367 #: build/C/man2/ioctl_list.2:569
12369 msgid "0x00008925\tSIOCGIFENCAP\tint *\n"
12373 #: build/C/man2/ioctl_list.2:570
12375 msgid "0x00008926\tSIOCSIFENCAP\tconst int *\n"
12379 #: build/C/man2/ioctl_list.2:571
12381 msgid "0x00008927\tSIOCGIFHWADDR\tstruct ifreq *\t// I-O\n"
12385 #: build/C/man2/ioctl_list.2:572
12387 msgid "0x00008929\tSIOCGIFSLAVE\tvoid\n"
12391 #: build/C/man2/ioctl_list.2:573
12393 msgid "0x00008930\tSIOCSIFSLAVE\tvoid\n"
12397 #: build/C/man2/ioctl_list.2:574
12399 msgid "0x00008931\tSIOCADDMULTI\tconst struct ifreq *\n"
12403 #: build/C/man2/ioctl_list.2:575
12405 msgid "0x00008932\tSIOCDELMULTI\tconst struct ifreq *\n"
12409 #: build/C/man2/ioctl_list.2:576
12411 msgid "0x00008940\tSIOCADDRTOLD\tvoid\n"
12415 #: build/C/man2/ioctl_list.2:577
12417 msgid "0x00008941\tSIOCDELRTOLD\tvoid\n"
12421 #: build/C/man2/ioctl_list.2:578
12423 msgid "0x00008950\tSIOCDARP\tconst struct arpreq *\n"
12427 #: build/C/man2/ioctl_list.2:579
12429 msgid "0x00008951\tSIOCGARP\tstruct arpreq *\t// I-O\n"
12433 #: build/C/man2/ioctl_list.2:580
12435 msgid "0x00008952\tSIOCSARP\tconst struct arpreq *\n"
12439 #: build/C/man2/ioctl_list.2:581
12441 msgid "0x00008960\tSIOCDRARP\tconst struct arpreq *\n"
12445 #: build/C/man2/ioctl_list.2:582
12447 msgid "0x00008961\tSIOCGRARP\tstruct arpreq *\t// I-O\n"
12451 #: build/C/man2/ioctl_list.2:583
12453 msgid "0x00008962\tSIOCSRARP\tconst struct arpreq *\n"
12457 #: build/C/man2/ioctl_list.2:584
12459 msgid "0x00008970\tSIOCGIFMAP\tstruct ifreq *\t// I-O\n"
12463 #: build/C/man2/ioctl_list.2:585
12465 msgid "0x00008971\tSIOCSIFMAP\tconst struct ifreq *\n"
12468 #. type: Plain text
12469 #: build/C/man2/ioctl_list.2:589
12470 msgid "// E<lt>include/linux/soundcard.hE<gt>"
12474 #: build/C/man2/ioctl_list.2:591
12476 msgid "0x00005100\tSNDCTL_SEQ_RESET\tvoid\n"
12480 #: build/C/man2/ioctl_list.2:592
12482 msgid "0x00005101\tSNDCTL_SEQ_SYNC\tvoid\n"
12486 #: build/C/man2/ioctl_list.2:596
12488 msgid "0xC08C5102\tSNDCTL_SYNTH_INFO\tstruct synth_info *\t// I-O\n"
12492 #: build/C/man2/ioctl_list.2:597
12494 msgid "0xC0045103\tSNDCTL_SEQ_CTRLRATE\tint *\t// I-O\n"
12498 #: build/C/man2/ioctl_list.2:598
12500 msgid "0x80045104\tSNDCTL_SEQ_GETOUTCOUNT\tint *\n"
12504 #: build/C/man2/ioctl_list.2:599
12506 msgid "0x80045105\tSNDCTL_SEQ_GETINCOUNT\tint *\n"
12510 #: build/C/man2/ioctl_list.2:600
12512 msgid "0x40045106\tSNDCTL_SEQ_PERCMODE\tvoid\n"
12516 #: build/C/man2/ioctl_list.2:604
12518 msgid "0x40285107\tSNDCTL_FM_LOAD_INSTR\tconst struct sbi_instrument *\n"
12522 #: build/C/man2/ioctl_list.2:608
12524 msgid "0x40045108\tSNDCTL_SEQ_TESTMIDI\tconst int *\n"
12528 #: build/C/man2/ioctl_list.2:609
12530 msgid "0x40045109\tSNDCTL_SEQ_RESETSAMPLES\tconst int *\n"
12534 #: build/C/man2/ioctl_list.2:610
12536 msgid "0x8004510A\tSNDCTL_SEQ_NRSYNTHS\tint *\n"
12540 #: build/C/man2/ioctl_list.2:611
12542 msgid "0x8004510B\tSNDCTL_SEQ_NRMIDIS\tint *\n"
12546 #: build/C/man2/ioctl_list.2:612
12548 msgid "0xC074510C\tSNDCTL_MIDI_INFO\tstruct midi_info *\t// I-O\n"
12552 #: build/C/man2/ioctl_list.2:613
12554 msgid "0x4004510D\tSNDCTL_SEQ_THRESHOLD\tconst int *\n"
12558 #: build/C/man2/ioctl_list.2:614
12560 msgid "0xC004510E\tSNDCTL_SYNTH_MEMAVL\tint *\t// I-O\n"
12564 #: build/C/man2/ioctl_list.2:615
12566 msgid "0x4004510F\tSNDCTL_FM_4OP_ENABLE\tconst int *\n"
12570 #: build/C/man2/ioctl_list.2:616
12572 msgid "0xCFB85110\tSNDCTL_PMGR_ACCESS\tstruct patmgr_info *\t// I-O\n"
12576 #: build/C/man2/ioctl_list.2:617
12578 msgid "0x00005111\tSNDCTL_SEQ_PANIC\tvoid\n"
12582 #: build/C/man2/ioctl_list.2:621
12584 msgid "0x40085112\tSNDCTL_SEQ_OUTOFBAND\tconst struct seq_event_rec *\n"
12588 #: build/C/man2/ioctl_list.2:625
12590 msgid "0xC0045401\tSNDCTL_TMR_TIMEBASE\tint *\t// I-O\n"
12594 #: build/C/man2/ioctl_list.2:626
12596 msgid "0x00005402\tSNDCTL_TMR_START\tvoid\n"
12600 #: build/C/man2/ioctl_list.2:627
12602 msgid "0x00005403\tSNDCTL_TMR_STOP\tvoid\n"
12606 #: build/C/man2/ioctl_list.2:628
12608 msgid "0x00005404\tSNDCTL_TMR_CONTINUE\tvoid\n"
12612 #: build/C/man2/ioctl_list.2:629
12614 msgid "0xC0045405\tSNDCTL_TMR_TEMPO\tint *\t// I-O\n"
12618 #: build/C/man2/ioctl_list.2:630
12620 msgid "0xC0045406\tSNDCTL_TMR_SOURCE\tint *\t// I-O\n"
12624 #: build/C/man2/ioctl_list.2:631
12626 msgid "0x40045407\tSNDCTL_TMR_METRONOME\tconst int *\n"
12630 #: build/C/man2/ioctl_list.2:632
12632 msgid "0x40045408\tSNDCTL_TMR_SELECT\tint *\t// I-O\n"
12636 #: build/C/man2/ioctl_list.2:633
12638 msgid "0xCFB85001\tSNDCTL_PMGR_IFACE\tstruct patmgr_info *\t// I-O\n"
12642 #: build/C/man2/ioctl_list.2:634
12644 msgid "0xC0046D00\tSNDCTL_MIDI_PRETIME\tint *\t// I-O\n"
12648 #: build/C/man2/ioctl_list.2:635
12650 msgid "0xC0046D01\tSNDCTL_MIDI_MPUMODE\tconst int *\n"
12654 #: build/C/man2/ioctl_list.2:639
12656 msgid "0xC0216D02\tSNDCTL_MIDI_MPUCMD\tstruct mpu_command_rec *\t// I-O\n"
12660 #: build/C/man2/ioctl_list.2:643
12662 msgid "0x00005000\tSNDCTL_DSP_RESET\tvoid\n"
12666 #: build/C/man2/ioctl_list.2:644
12668 msgid "0x00005001\tSNDCTL_DSP_SYNC\tvoid\n"
12672 #: build/C/man2/ioctl_list.2:645
12674 msgid "0xC0045002\tSNDCTL_DSP_SPEED\tint *\t// I-O\n"
12678 #: build/C/man2/ioctl_list.2:646
12680 msgid "0xC0045003\tSNDCTL_DSP_STEREO\tint *\t// I-O\n"
12684 #: build/C/man2/ioctl_list.2:647
12686 msgid "0xC0045004\tSNDCTL_DSP_GETBLKSIZE\tint *\t// I-O\n"
12690 #: build/C/man2/ioctl_list.2:648
12692 msgid "0xC0045006\tSOUND_PCM_WRITE_CHANNELS\tint *\t// I-O\n"
12696 #: build/C/man2/ioctl_list.2:649
12698 msgid "0xC0045007\tSOUND_PCM_WRITE_FILTER\tint *\t// I-O\n"
12702 #: build/C/man2/ioctl_list.2:650
12704 msgid "0x00005008\tSNDCTL_DSP_POST\tvoid\n"
12708 #: build/C/man2/ioctl_list.2:651
12710 msgid "0xC0045009\tSNDCTL_DSP_SUBDIVIDE\tint *\t// I-O\n"
12714 #: build/C/man2/ioctl_list.2:652
12716 msgid "0xC004500A\tSNDCTL_DSP_SETFRAGMENT\tint *\t// I-O\n"
12720 #: build/C/man2/ioctl_list.2:653
12722 msgid "0x8004500B\tSNDCTL_DSP_GETFMTS\tint *\n"
12726 #: build/C/man2/ioctl_list.2:654
12728 msgid "0xC0045005\tSNDCTL_DSP_SETFMT\tint *\t// I-O\n"
12732 #: build/C/man2/ioctl_list.2:658
12734 msgid "0x800C500C\tSNDCTL_DSP_GETOSPACE\tstruct audio_buf_info *\n"
12738 #: build/C/man2/ioctl_list.2:659
12740 msgid "0x800C500D\tSNDCTL_DSP_GETISPACE\tstruct audio_buf_info *\n"
12744 #: build/C/man2/ioctl_list.2:660
12746 msgid "0x0000500E\tSNDCTL_DSP_NONBLOCK\tvoid\n"
12750 #: build/C/man2/ioctl_list.2:661
12752 msgid "0x80045002\tSOUND_PCM_READ_RATE\tint *\n"
12756 #: build/C/man2/ioctl_list.2:662
12758 msgid "0x80045006\tSOUND_PCM_READ_CHANNELS\tint *\n"
12762 #: build/C/man2/ioctl_list.2:663
12764 msgid "0x80045005\tSOUND_PCM_READ_BITS\tint *\n"
12768 #: build/C/man2/ioctl_list.2:664
12770 msgid "0x80045007\tSOUND_PCM_READ_FILTER\tint *\n"
12774 #: build/C/man2/ioctl_list.2:665
12776 msgid "0x00004300\tSNDCTL_COPR_RESET\tvoid\n"
12780 #: build/C/man2/ioctl_list.2:666
12782 msgid "0xCFB04301\tSNDCTL_COPR_LOAD\tconst struct copr_buffer *\n"
12786 #: build/C/man2/ioctl_list.2:670
12788 msgid "0xC0144302\tSNDCTL_COPR_RDATA\tstruct copr_debug_buf *\t// I-O\n"
12792 #: build/C/man2/ioctl_list.2:671
12794 msgid "0xC0144303\tSNDCTL_COPR_RCODE\tstruct copr_debug_buf *\t// I-O\n"
12798 #: build/C/man2/ioctl_list.2:675
12800 msgid "0x40144304\tSNDCTL_COPR_WDATA\tconst struct copr_debug_buf *\n"
12804 #: build/C/man2/ioctl_list.2:676
12806 msgid "0x40144305\tSNDCTL_COPR_WCODE\tconst struct copr_debug_buf *\n"
12810 #: build/C/man2/ioctl_list.2:680
12812 msgid "0xC0144306\tSNDCTL_COPR_RUN\tstruct copr_debug_buf *\t// I-O\n"
12816 #: build/C/man2/ioctl_list.2:681
12818 msgid "0xC0144307\tSNDCTL_COPR_HALT\tstruct copr_debug_buf *\t// I-O\n"
12822 #: build/C/man2/ioctl_list.2:685
12824 msgid "0x4FA44308\tSNDCTL_COPR_SENDMSG\tconst struct copr_msg *\n"
12828 #: build/C/man2/ioctl_list.2:686
12830 msgid "0x8FA44309\tSNDCTL_COPR_RCVMSG\tstruct copr_msg *\n"
12834 #: build/C/man2/ioctl_list.2:687
12836 msgid "0x80044D00\tSOUND_MIXER_READ_VOLUME\tint *\n"
12840 #: build/C/man2/ioctl_list.2:688
12842 msgid "0x80044D01\tSOUND_MIXER_READ_BASS\tint *\n"
12846 #: build/C/man2/ioctl_list.2:689
12848 msgid "0x80044D02\tSOUND_MIXER_READ_TREBLE\tint *\n"
12852 #: build/C/man2/ioctl_list.2:690
12854 msgid "0x80044D03\tSOUND_MIXER_READ_SYNTH\tint *\n"
12858 #: build/C/man2/ioctl_list.2:691
12860 msgid "0x80044D04\tSOUND_MIXER_READ_PCM\tint *\n"
12864 #: build/C/man2/ioctl_list.2:692
12866 msgid "0x80044D05\tSOUND_MIXER_READ_SPEAKER\tint *\n"
12870 #: build/C/man2/ioctl_list.2:693
12872 msgid "0x80044D06\tSOUND_MIXER_READ_LINE\tint *\n"
12876 #: build/C/man2/ioctl_list.2:694
12878 msgid "0x80044D07\tSOUND_MIXER_READ_MIC\tint *\n"
12882 #: build/C/man2/ioctl_list.2:695
12884 msgid "0x80044D08\tSOUND_MIXER_READ_CD\tint *\n"
12888 #: build/C/man2/ioctl_list.2:696
12890 msgid "0x80044D09\tSOUND_MIXER_READ_IMIX\tint *\n"
12894 #: build/C/man2/ioctl_list.2:697
12896 msgid "0x80044D0A\tSOUND_MIXER_READ_ALTPCM\tint *\n"
12900 #: build/C/man2/ioctl_list.2:698
12902 msgid "0x80044D0B\tSOUND_MIXER_READ_RECLEV\tint *\n"
12906 #: build/C/man2/ioctl_list.2:699
12908 msgid "0x80044D0C\tSOUND_MIXER_READ_IGAIN\tint *\n"
12912 #: build/C/man2/ioctl_list.2:700
12914 msgid "0x80044D0D\tSOUND_MIXER_READ_OGAIN\tint *\n"
12918 #: build/C/man2/ioctl_list.2:701
12920 msgid "0x80044D0E\tSOUND_MIXER_READ_LINE1\tint *\n"
12924 #: build/C/man2/ioctl_list.2:702
12926 msgid "0x80044D0F\tSOUND_MIXER_READ_LINE2\tint *\n"
12930 #: build/C/man2/ioctl_list.2:703
12932 msgid "0x80044D10\tSOUND_MIXER_READ_LINE3\tint *\n"
12936 #: build/C/man2/ioctl_list.2:704
12938 msgid "0x80044D1C\tSOUND_MIXER_READ_MUTE\tint *\n"
12942 #: build/C/man2/ioctl_list.2:705
12944 msgid "0x80044D1D\tSOUND_MIXER_READ_ENHANCE\tint *\n"
12948 #: build/C/man2/ioctl_list.2:706
12950 msgid "0x80044D1E\tSOUND_MIXER_READ_LOUD\tint *\n"
12954 #: build/C/man2/ioctl_list.2:707
12956 msgid "0x80044DFF\tSOUND_MIXER_READ_RECSRC\tint *\n"
12960 #: build/C/man2/ioctl_list.2:708
12962 msgid "0x80044DFE\tSOUND_MIXER_READ_DEVMASK\tint *\n"
12966 #: build/C/man2/ioctl_list.2:709
12968 msgid "0x80044DFD\tSOUND_MIXER_READ_RECMASK\tint *\n"
12972 #: build/C/man2/ioctl_list.2:710
12974 msgid "0x80044DFB\tSOUND_MIXER_READ_STEREODEVS\tint *\n"
12978 #: build/C/man2/ioctl_list.2:711
12980 msgid "0x80044DFC\tSOUND_MIXER_READ_CAPS\tint *\n"
12984 #: build/C/man2/ioctl_list.2:715
12986 msgid "0xC0044D00\tSOUND_MIXER_WRITE_VOLUME\tint *\t// I-O\n"
12990 #: build/C/man2/ioctl_list.2:716
12992 msgid "0xC0044D01\tSOUND_MIXER_WRITE_BASS\tint *\t// I-O\n"
12996 #: build/C/man2/ioctl_list.2:717
12998 msgid "0xC0044D02\tSOUND_MIXER_WRITE_TREBLE\tint *\t// I-O\n"
13002 #: build/C/man2/ioctl_list.2:718
13004 msgid "0xC0044D03\tSOUND_MIXER_WRITE_SYNTH\tint *\t// I-O\n"
13008 #: build/C/man2/ioctl_list.2:719
13010 msgid "0xC0044D04\tSOUND_MIXER_WRITE_PCM\tint *\t// I-O\n"
13014 #: build/C/man2/ioctl_list.2:720
13016 msgid "0xC0044D05\tSOUND_MIXER_WRITE_SPEAKER\tint *\t// I-O\n"
13020 #: build/C/man2/ioctl_list.2:721
13022 msgid "0xC0044D06\tSOUND_MIXER_WRITE_LINE\tint *\t// I-O\n"
13026 #: build/C/man2/ioctl_list.2:722
13028 msgid "0xC0044D07\tSOUND_MIXER_WRITE_MIC\tint *\t// I-O\n"
13032 #: build/C/man2/ioctl_list.2:723
13034 msgid "0xC0044D08\tSOUND_MIXER_WRITE_CD\tint *\t// I-O\n"
13038 #: build/C/man2/ioctl_list.2:724
13040 msgid "0xC0044D09\tSOUND_MIXER_WRITE_IMIX\tint *\t// I-O\n"
13044 #: build/C/man2/ioctl_list.2:725
13046 msgid "0xC0044D0A\tSOUND_MIXER_WRITE_ALTPCM\tint *\t// I-O\n"
13050 #: build/C/man2/ioctl_list.2:726
13052 msgid "0xC0044D0B\tSOUND_MIXER_WRITE_RECLEV\tint *\t// I-O\n"
13056 #: build/C/man2/ioctl_list.2:727
13058 msgid "0xC0044D0C\tSOUND_MIXER_WRITE_IGAIN\tint *\t// I-O\n"
13062 #: build/C/man2/ioctl_list.2:728
13064 msgid "0xC0044D0D\tSOUND_MIXER_WRITE_OGAIN\tint *\t// I-O\n"
13068 #: build/C/man2/ioctl_list.2:729
13070 msgid "0xC0044D0E\tSOUND_MIXER_WRITE_LINE1\tint *\t// I-O\n"
13074 #: build/C/man2/ioctl_list.2:730
13076 msgid "0xC0044D0F\tSOUND_MIXER_WRITE_LINE2\tint *\t// I-O\n"
13080 #: build/C/man2/ioctl_list.2:731
13082 msgid "0xC0044D10\tSOUND_MIXER_WRITE_LINE3\tint *\t// I-O\n"
13086 #: build/C/man2/ioctl_list.2:732
13088 msgid "0xC0044D1C\tSOUND_MIXER_WRITE_MUTE\tint *\t// I-O\n"
13092 #: build/C/man2/ioctl_list.2:733
13094 msgid "0xC0044D1D\tSOUND_MIXER_WRITE_ENHANCE\tint *\t// I-O\n"
13098 #: build/C/man2/ioctl_list.2:734
13100 msgid "0xC0044D1E\tSOUND_MIXER_WRITE_LOUD\tint *\t// I-O\n"
13104 #: build/C/man2/ioctl_list.2:735
13106 msgid "0xC0044DFF\tSOUND_MIXER_WRITE_RECSRC\tint *\t// I-O\n"
13109 #. type: Plain text
13110 #: build/C/man2/ioctl_list.2:739
13111 msgid "// E<lt>include/linux/umsdos_fs.hE<gt>"
13115 #: build/C/man2/ioctl_list.2:741
13117 msgid "0x000004D2\tUMSDOS_READDIR_DOS\tstruct umsdos_ioctl *\t// I-O\n"
13121 #: build/C/man2/ioctl_list.2:742
13123 msgid "0x000004D3\tUMSDOS_UNLINK_DOS\tconst struct umsdos_ioctl *\n"
13127 #: build/C/man2/ioctl_list.2:743
13129 msgid "0x000004D4\tUMSDOS_RMDIR_DOS\tconst struct umsdos_ioctl *\n"
13133 #: build/C/man2/ioctl_list.2:744
13135 msgid "0x000004D5\tUMSDOS_STAT_DOS\tstruct umsdos_ioctl *\t// I-O\n"
13139 #: build/C/man2/ioctl_list.2:745
13141 msgid "0x000004D6\tUMSDOS_CREAT_EMD\tconst struct umsdos_ioctl *\n"
13145 #: build/C/man2/ioctl_list.2:746
13147 msgid "0x000004D7\tUMSDOS_UNLINK_EMD\tconst struct umsdos_ioctl *\n"
13151 #: build/C/man2/ioctl_list.2:747
13153 msgid "0x000004D8\tUMSDOS_READDIR_EMD\tstruct umsdos_ioctl *\t// I-O\n"
13157 #: build/C/man2/ioctl_list.2:748
13159 msgid "0x000004D9\tUMSDOS_GETVERSION\tstruct umsdos_ioctl *\n"
13163 #: build/C/man2/ioctl_list.2:749
13165 msgid "0x000004DA\tUMSDOS_INIT_EMD\tvoid\n"
13169 #: build/C/man2/ioctl_list.2:750
13171 msgid "0x000004DB\tUMSDOS_DOS_SETUP\tconst struct umsdos_ioctl *\n"
13175 #: build/C/man2/ioctl_list.2:751
13177 msgid "0x000004DC\tUMSDOS_RENAME_DOS\tconst struct umsdos_ioctl *\n"
13180 #. type: Plain text
13181 #: build/C/man2/ioctl_list.2:755
13182 msgid "// E<lt>include/linux/vt.hE<gt>"
13186 #: build/C/man2/ioctl_list.2:757
13188 msgid "0x00005600\tVT_OPENQRY\tint *\n"
13192 #: build/C/man2/ioctl_list.2:758
13194 msgid "0x00005601\tVT_GETMODE\tstruct vt_mode *\n"
13198 #: build/C/man2/ioctl_list.2:759
13200 msgid "0x00005602\tVT_SETMODE\tconst struct vt_mode *\n"
13204 #: build/C/man2/ioctl_list.2:760
13206 msgid "0x00005603\tVT_GETSTATE\tstruct vt_stat *\n"
13210 #: build/C/man2/ioctl_list.2:761
13212 msgid "0x00005604\tVT_SENDSIG\tvoid\n"
13216 #: build/C/man2/ioctl_list.2:762
13218 msgid "0x00005605\tVT_RELDISP\tint\n"
13222 #: build/C/man2/ioctl_list.2:763
13224 msgid "0x00005606\tVT_ACTIVATE\tint\n"
13228 #: build/C/man2/ioctl_list.2:764
13230 msgid "0x00005607\tVT_WAITACTIVE\tint\n"
13234 #: build/C/man2/ioctl_list.2:765
13236 msgid "0x00005608\tVT_DISALLOCATE\tint\n"
13240 #: build/C/man2/ioctl_list.2:766
13242 msgid "0x00005609\tVT_RESIZE\tconst struct vt_sizes *\n"
13246 #: build/C/man2/ioctl_list.2:767
13248 msgid "0x0000560A\tVT_RESIZEX\tconst struct vt_consize *\n"
13251 #. type: Plain text
13252 #: build/C/man2/ioctl_list.2:774
13254 "// More arguments. Some ioctl's take a pointer to a structure which "
13255 "contains additional pointers. These are documented here in alphabetical "
13259 #. type: Plain text
13260 #: build/C/man2/ioctl_list.2:782
13262 "B<CDROMREADAUDIO> takes an input pointer I<const struct cdrom_read_audio\\ "
13263 "*>. The I<buf> field points to an output buffer of length I<nframes\\ * "
13264 "CD_FRAMESIZE_RAW>."
13267 #. type: Plain text
13268 #: build/C/man2/ioctl_list.2:798
13270 "B<CDROMREADCOOKED>, B<CDROMREADMODE1>, B<CDROMREADMODE2>, and "
13271 "B<CDROMREADRAW> take an input pointer I<const struct cdrom_msf\\ *>. They "
13272 "use the same pointer as an output pointer to I<char []>. The length varies "
13273 "by request. For B<CDROMREADMODE1>, most drivers use CD_FRAMESIZE, but the "
13274 "Optics Storage driver uses OPT_BLOCKSIZE instead (both have the numerical "
13278 #. type: Plain text
13279 #: build/C/man2/ioctl_list.2:804
13282 " CDROMREADCOOKED char [CD_FRAMESIZE]\n"
13283 " CDROMREADMODE1 char [CD_FRAMESIZE or OPT_BLOCKSIZE]\n"
13284 " CDROMREADMODE2 char [CD_FRAMESIZE_RAW0]\n"
13285 " CDROMREADRAW char [CD_FRAMESIZE_RAW]\n"
13288 #. type: Plain text
13289 #: build/C/man2/ioctl_list.2:818
13291 "B<EQL_ENSLAVE>, B<EQL_EMANCIPATE>, B<EQL_GETSLAVECFG>, B<EQL_SETSLAVECFG>, "
13292 "B<EQL_GETMASTERCFG>, and B<EQL_SETMASTERCFG> take a I<struct ifreq\\ *>. "
13293 "The I<ifr_data> field is a pointer to another structure as follows:"
13296 #. type: Plain text
13297 #: build/C/man2/ioctl_list.2:826
13300 " EQL_ENSLAVE const struct slaving_request *\n"
13301 " EQL_EMANCIPATE const struct slaving_request *\n"
13302 " EQL_GETSLAVECFG struct slave_config * // I-O\n"
13303 " EQL_SETSLAVECFG const struct slave_config *\n"
13304 " EQL_GETMASTERCFG struct master_config *\n"
13305 " EQL_SETMASTERCFG const struct master_config *\n"
13308 #. type: Plain text
13309 #: build/C/man2/ioctl_list.2:843
13311 "B<FDRAWCMD> takes a I<struct floppy raw_cmd\\ *>. If I<flags & "
13312 "FD_RAW_WRITE> is nonzero, then I<data> points to an input buffer of length "
13313 "I<length>. If I<flags & FD_RAW_READ> is nonzero, then I<data> points to an "
13314 "output buffer of length I<length>."
13317 #. type: Plain text
13318 #: build/C/man2/ioctl_list.2:859
13320 "B<GIO_FONTX> and B<PIO_FONTX> take a I<struct console_font_desc\\ *> or a "
13321 "I<const struct console_font_desc\\ *>, respectively. I<chardata> points to "
13322 "a buffer of I<char [charcount]>. This is an output buffer for B<GIO_FONTX> "
13323 "and an input buffer for B<PIO_FONTX>."
13326 #. type: Plain text
13327 #: build/C/man2/ioctl_list.2:875
13329 "B<GIO_UNIMAP> and B<PIO_UNIMAP> take a I<struct unimapdesc\\ *> or a I<const "
13330 "struct unimapdesc\\ *>, respectively. I<entries> points to a buffer of "
13331 "I<struct unipair [entry_ct]>. This is an output buffer for B<GIO_UNIMAP> "
13332 "and an input buffer for B<PIO_UNIMAP>."
13335 #. type: Plain text
13336 #: build/C/man2/ioctl_list.2:879
13338 "KDADDIO, KDDELIO, KDDISABIO, and KDENABIO enable or disable access to I/O "
13339 "ports. They are essentially alternate interfaces to 'ioperm'."
13342 #. type: Plain text
13343 #: build/C/man2/ioctl_list.2:885
13345 "B<KDMAPDISP> and B<KDUNMAPDISP> enable or disable memory mappings or I/O "
13346 "port access. They are not implemented in the kernel."
13349 #. type: Plain text
13350 #: build/C/man2/ioctl_list.2:893
13352 "B<SCSI_IOCTL_PROBE_HOST> takes an input pointer I<const int\\ *>, which is a "
13353 "length. It uses the same pointer as an output pointer to a I<char []> "
13354 "buffer of this length."
13357 #. type: Plain text
13358 #: build/C/man2/ioctl_list.2:899
13360 "B<SIOCADDRT> and B<SIOCDELRT> take an input pointer whose type depends on "
13364 #. type: Plain text
13365 #: build/C/man2/ioctl_list.2:904
13368 " Most protocols const struct rtentry *\n"
13369 " AX.25 const struct ax25_route *\n"
13370 " NET/ROM const struct nr_route_struct *\n"
13373 #. type: Plain text
13374 #: build/C/man2/ioctl_list.2:915
13376 "B<SIOCGIFCONF> takes a I<struct ifconf\\ *>. The I<ifc_buf> field points to "
13377 "a buffer of length I<ifc_len> bytes, into which the kernel writes a list of "
13378 "type I<struct ifreq []>."
13381 #. type: Plain text
13382 #: build/C/man2/ioctl_list.2:918
13383 msgid "B<SIOCSIFHWADDR> takes an input pointer whose type depends on the protocol:"
13386 #. type: Plain text
13387 #: build/C/man2/ioctl_list.2:922
13390 " Most protocols const struct ifreq *\n"
13391 " AX.25 const char [AX25_ADDR_LEN]\n"
13394 #. type: Plain text
13395 #: build/C/man2/ioctl_list.2:937
13397 "B<TIOCLINUX> takes a I<const char\\ *>. It uses this to distinguish several "
13398 "independent subcases. In the table below, I<N + foo> means I<foo> after an "
13399 "N-byte pad. I<struct selection> is implicitly defined in "
13400 "I<drivers/char/selection.c>"
13403 #. type: Plain text
13404 #: build/C/man2/ioctl_list.2:946
13407 " TIOCLINUX-2 1 + const struct selection *\n"
13408 " TIOCLINUX-3 void\n"
13409 " TIOCLINUX-4 void\n"
13410 " TIOCLINUX-5 4 + const struct { long [8]; } *\n"
13411 " TIOCLINUX-6 char *\n"
13412 " TIOCLINUX-7 char *\n"
13413 " TIOCLINUX-10 1 + const char *\n"
13416 #. type: Plain text
13417 #: build/C/man2/ioctl_list.2:949
13418 msgid "// Duplicate ioctls"
13421 #. type: Plain text
13422 #: build/C/man2/ioctl_list.2:954
13424 "This list does not include ioctls in the range B<SIOCDEVPRIVATE> and "
13425 "B<SIOCPROTOPRIVATE>."
13429 #: build/C/man2/ioctl_list.2:956
13431 msgid "0x00000001\tFDSETPRM\tFIBMAP\n"
13435 #: build/C/man2/ioctl_list.2:957
13437 msgid "0x00000002\tFDDEFPRM\tFIGETBSZ\n"
13441 #: build/C/man2/ioctl_list.2:958
13443 msgid "0x00005382\tCDROMAUDIOBUFSIZ\tSCSI_IOCTL_GET_IDLUN\n"
13447 #: build/C/man2/ioctl_list.2:959
13449 msgid "0x00005402\tSNDCTL_TMR_START\tTCSETS\n"
13453 #: build/C/man2/ioctl_list.2:960
13455 msgid "0x00005403\tSNDCTL_TMR_STOP\tTCSETSW\n"
13459 #: build/C/man2/ioctl_list.2:961
13461 msgid "0x00005404\tSNDCTL_TMR_CONTINUE\tTCSETSF\n"
13464 #. type: Plain text
13465 #: build/C/man2/ioctl_list.2:965
13466 msgid "B<ioctl>(2)"
13470 #: build/C/man2/ioperm.2:34
13475 #. type: Plain text
13476 #: build/C/man2/ioperm.2:37
13477 msgid "ioperm - set port input/output permissions"
13480 #. type: Plain text
13481 #: build/C/man2/ioperm.2:40
13482 msgid "B<#include E<lt>sys/io.hE<gt>> /* for glibc */"
13485 #. type: Plain text
13486 #: build/C/man2/ioperm.2:42
13488 "B<int ioperm(unsigned long >I<from>B<, unsigned long >I<num>B<, int "
13492 #. type: Plain text
13493 #: build/C/man2/ioperm.2:56
13495 "B<ioperm>() sets the port access permission bits for the calling thread for "
13496 "I<num> bits starting from port address I<from>. If I<turn_on> is nonzero, "
13497 "then permission for the specified bits is enabled; otherwise it is "
13498 "disabled. If I<turn_on> is nonzero, the calling thread must be privileged "
13499 "(B<CAP_SYS_RAWIO>)."
13502 #. type: Plain text
13503 #: build/C/man2/ioperm.2:65
13505 "Before Linux 2.6.8, only the first 0x3ff I/O ports could be specified in "
13506 "this manner. For more ports, the B<iopl>(2) system call had to be used "
13507 "(with a I<level> argument of 3). Since Linux 2.6.8, 65,536 I/O ports can be "
13511 #. type: Plain text
13512 #: build/C/man2/ioperm.2:75
13514 "Permissions are not inherited by the child created by B<fork>(2); following "
13515 "a B<fork>(2) the child must turn on those permissions that it needs. "
13516 "Permissions are preserved across B<execve>(2); this is useful for giving "
13517 "port access permissions to unprivileged programs."
13520 #. type: Plain text
13521 #: build/C/man2/ioperm.2:79
13523 "This call is mostly for the i386 architecture. On many other architectures "
13524 "it does not exist or will always return an error."
13527 #. type: Plain text
13528 #: build/C/man2/ioperm.2:91
13529 msgid "Invalid values for I<from> or I<num>."
13532 #. type: Plain text
13533 #: build/C/man2/ioperm.2:94
13534 msgid "(on PowerPC) This call is not supported."
13537 #. Could not allocate I/O bitmap.
13538 #. type: Plain text
13539 #: build/C/man2/ioperm.2:98
13540 msgid "Out of memory."
13543 #. type: Plain text
13544 #: build/C/man2/ioperm.2:101
13545 msgid "The calling thread has insufficient privilege."
13548 #. type: Plain text
13549 #: build/C/man2/ioperm.2:105
13551 "B<ioperm>() is Linux-specific and should not be used in programs intended "
13555 #. type: Plain text
13556 #: build/C/man2/ioperm.2:109
13558 "The I</proc/ioports> file shows the I/O ports that are currently allocated "
13562 #. type: Plain text
13563 #: build/C/man2/ioperm.2:117
13565 "Glibc has an B<ioperm>() prototype both in I<E<lt>sys/io.hE<gt>> and in "
13566 "I<E<lt>sys/perm.hE<gt>>. Avoid the latter, it is available on i386 only."
13569 #. type: Plain text
13570 #: build/C/man2/ioperm.2:121
13571 msgid "B<iopl>(2), B<outb>(2), B<capabilities>(7)"
13575 #: build/C/man3/lockf.3:28
13581 #: build/C/man3/lockf.3:28
13586 #. type: Plain text
13587 #: build/C/man3/lockf.3:31
13588 msgid "lockf - apply, test or remove a POSIX lock on an open file"
13591 #. type: Plain text
13592 #: build/C/man3/lockf.3:35
13593 msgid "B<int lockf(int >I<fd>B<, int >I<cmd>B<, off_t >I<len>B<);>"
13596 #. type: Plain text
13597 #: build/C/man3/lockf.3:42
13598 msgid "B<lockf>():"
13601 #. type: Plain text
13602 #: build/C/man3/lockf.3:46
13604 "_BSD_SOURCE || _SVID_SOURCE || _XOPEN_SOURCE\\ E<gt>=\\ 500 || "
13605 "_XOPEN_SOURCE\\ &&\\ _XOPEN_SOURCE_EXTENDED"
13608 #. type: Plain text
13609 #: build/C/man3/lockf.3:69
13611 "Apply, test or remove a POSIX lock on a section of an open file. The file "
13612 "is specified by I<fd>, a file descriptor open for writing, the action by "
13613 "I<cmd>, and the section consists of byte positions I<pos>..I<pos>+I<len>-1 "
13614 "if I<len> is positive, and I<pos>-I<len>..I<pos>-1 if I<len> is negative, "
13615 "where I<pos> is the current file position, and if I<len> is zero, the "
13616 "section extends from the current file position to infinity, encompassing the "
13617 "present and future end-of-file positions. In all cases, the section may "
13618 "extend past current end-of-file."
13621 #. type: Plain text
13622 #: build/C/man3/lockf.3:84
13624 "On Linux, B<lockf>() is just an interface on top of B<fcntl>(2) locking. "
13625 "Many other systems implement B<lockf>() in this way, but note that "
13626 "POSIX.1-2001 leaves the relationship between B<lockf>() and B<fcntl>(2) "
13627 "locks unspecified. A portable application should probably avoid mixing "
13628 "calls to these interfaces."
13631 #. type: Plain text
13632 #: build/C/man3/lockf.3:86
13633 msgid "Valid operations are given below:"
13637 #: build/C/man3/lockf.3:86
13642 #. type: Plain text
13643 #: build/C/man3/lockf.3:96
13645 "Set an exclusive lock on the specified section of the file. If (part of) "
13646 "this section is already locked, the call blocks until the previous lock is "
13647 "released. If this section overlaps an earlier locked section, both are "
13648 "merged. File locks are released as soon as the process holding the locks "
13649 "closes some file descriptor for the file. A child process does not inherit "
13654 #: build/C/man3/lockf.3:96
13659 #. type: Plain text
13660 #: build/C/man3/lockf.3:102
13662 "Same as B<F_LOCK> but the call never blocks and returns an error instead if "
13663 "the file is already locked."
13667 #: build/C/man3/lockf.3:102
13672 #. type: Plain text
13673 #: build/C/man3/lockf.3:106
13675 "Unlock the indicated section of the file. This may cause a locked section "
13676 "to be split into two locked sections."
13680 #: build/C/man3/lockf.3:106
13685 #. type: Plain text
13686 #: build/C/man3/lockf.3:116
13688 "Test the lock: return 0 if the specified section is unlocked or locked by "
13689 "this process; return -1, set I<errno> to B<EAGAIN> (B<EACCES> on some other "
13690 "systems), if another process holds a lock."
13693 #. type: Plain text
13694 #: build/C/man3/lockf.3:130
13696 "The file is locked and B<F_TLOCK> or B<F_TEST> was specified, or the "
13697 "operation is prohibited because the file has been memory-mapped by another "
13701 #. type: Plain text
13702 #: build/C/man3/lockf.3:142
13704 "I<fd> is not an open file descriptor; or I<cmd> is B<F_LOCK> or B<F_TLOCK> "
13705 "and I<fd> is not a writable file descriptor."
13708 #. type: Plain text
13709 #: build/C/man3/lockf.3:147
13710 msgid "The command was B<F_LOCK> and this lock operation would cause a deadlock."
13713 #. type: Plain text
13714 #: build/C/man3/lockf.3:151
13715 msgid "An invalid operation was specified in I<cmd>."
13718 #. type: Plain text
13719 #: build/C/man3/lockf.3:154
13720 msgid "Too many segment locks open, lock table is full."
13723 #. type: Plain text
13724 #: build/C/man3/lockf.3:159
13725 msgid "The B<lockf>() function is thread-safe."
13728 #. type: Plain text
13729 #: build/C/man3/lockf.3:161
13730 msgid "SVr4, POSIX.1-2001."
13733 #. type: Plain text
13734 #: build/C/man3/lockf.3:164
13735 msgid "B<fcntl>(2), B<flock>(2)"
13738 #. type: Plain text
13739 #: build/C/man3/lockf.3:176
13741 "I<locks.txt> and I<mandatory-locking.txt> in the Linux kernel source "
13742 "directory I<Documentation/filesystems> (on older kernels, these files are "
13743 "directly under the I<Documentation> directory, and I<mandatory-locking.txt> "
13744 "is called I<mandatory.txt>)"
13748 #: build/C/man2/mincore.2:34
13754 #: build/C/man2/mincore.2:34
13759 #. type: Plain text
13760 #: build/C/man2/mincore.2:37
13761 msgid "mincore - determine whether pages are resident in memory"
13764 #. type: Plain text
13765 #: build/C/man2/mincore.2:41
13766 msgid "B<#include E<lt>sys/mman.hE<gt>>"
13769 #. type: Plain text
13770 #: build/C/man2/mincore.2:43
13772 "B<int mincore(void *>I<addr>B<, size_t >I<length>B<, unsigned char "
13776 #. type: Plain text
13777 #: build/C/man2/mincore.2:51
13778 msgid "B<mincore>(): _BSD_SOURCE || _SVID_SOURCE"
13781 #. type: Plain text
13782 #: build/C/man2/mincore.2:62
13784 "B<mincore>() returns a vector that indicates whether pages of the calling "
13785 "process's virtual memory are resident in core (RAM), and so will not cause a "
13786 "disk access (page fault) if referenced. The kernel returns residency "
13787 "information about the pages starting at the address I<addr>, and continuing "
13788 "for I<length> bytes."
13791 #. type: Plain text
13792 #: build/C/man2/mincore.2:76
13794 "The I<addr> argument must be a multiple of the system page size. The "
13795 "I<length> argument need not be a multiple of the page size, but since "
13796 "residency information is returned for whole pages, I<length> is effectively "
13797 "rounded up to the next multiple of the page size. One may obtain the page "
13798 "size (B<PAGE_SIZE>) using I<sysconf(_SC_PAGESIZE)>."
13801 #. type: Plain text
13802 #: build/C/man2/mincore.2:94
13804 "The I<vec> argument must point to an array containing at least "
13805 "I<(length+PAGE_SIZE-1) / PAGE_SIZE> bytes. On return, the least significant "
13806 "bit of each byte will be set if the corresponding page is currently resident "
13807 "in memory, and be clear otherwise. (The settings of the other bits in each "
13808 "byte are undefined; these bits are reserved for possible later use.) Of "
13809 "course the information returned in I<vec> is only a snapshot: pages that are "
13810 "not locked in memory can come and go at any moment, and the contents of "
13811 "I<vec> may already be stale by the time this call returns."
13814 #. type: Plain text
13815 #: build/C/man2/mincore.2:101
13817 "On success, B<mincore>() returns zero. On error, -1 is returned, and "
13818 "I<errno> is set appropriately."
13821 #. type: Plain text
13822 #: build/C/man2/mincore.2:104
13823 msgid "B<EAGAIN> kernel is temporarily out of resources."
13826 #. type: Plain text
13827 #: build/C/man2/mincore.2:108
13828 msgid "I<vec> points to an invalid address."
13831 #. type: Plain text
13832 #: build/C/man2/mincore.2:112
13833 msgid "I<addr> is not a multiple of the page size."
13836 #. type: Plain text
13837 #: build/C/man2/mincore.2:124
13839 "I<length> is greater than (I<TASK_SIZE> - I<addr>). (This could occur if a "
13840 "negative value is specified for I<length>, since that value will be "
13841 "interpreted as a large unsigned integer.) In Linux 2.6.11 and earlier, the "
13842 "error B<EINVAL> was returned for this condition."
13845 #. type: Plain text
13846 #: build/C/man2/mincore.2:132
13847 msgid "I<addr> to I<addr> + I<length> contained unmapped memory."
13850 #. type: Plain text
13851 #: build/C/man2/mincore.2:134
13852 msgid "Available since Linux 2.3.99pre1 and glibc 2.2."
13855 #. It is on at least NetBSD, FreeBSD, OpenBSD, Solaris 8,
13856 #. AIX 5.1, SunOS 4.1
13860 #. function first appeared in 4.4BSD.
13861 #. type: Plain text
13862 #: build/C/man2/mincore.2:144
13864 "B<mincore>() is not specified in POSIX.1-2001, and it is not available on "
13865 "all UNIX implementations."
13868 #. Linux (up to now, 2.6.5),
13870 #. does not return correct information for MAP_PRIVATE mappings:
13871 #. for a MAP_PRIVATE file mapping,
13873 #. returns the residency of the file pages, rather than any
13874 #. modified process-private pages that have been copied on write;
13875 #. for a MAP_PRIVATE mapping of
13878 #. always reports pages as nonresident;
13879 #. and for a MAP_PRIVATE, MAP_ANONYMOUS mapping,
13881 #. always fails with the error
13883 #. type: Plain text
13884 #: build/C/man2/mincore.2:166
13886 "Before kernel 2.6.21, B<mincore>() did not return correct information for "
13887 "B<MAP_PRIVATE> mappings, or for nonlinear mappings (established using "
13888 "B<remap_file_pages>(2))."
13891 #. type: Plain text
13892 #: build/C/man2/mincore.2:169
13893 msgid "B<mlock>(2), B<mmap>(2)"
13897 #: build/C/man2/mkdir.2:11
13902 #. type: Plain text
13903 #: build/C/man2/mkdir.2:14
13904 msgid "mkdir, mkdirat - create a directory"
13907 #. .B #include <unistd.h>
13908 #. type: Plain text
13909 #: build/C/man2/mkdir.2:19
13912 "B<#include E<lt>sys/stat.hE<gt>>\n"
13913 "B<#include E<lt>sys/types.hE<gt>>\n"
13916 #. type: Plain text
13917 #: build/C/man2/mkdir.2:21
13919 msgid "B<int mkdir(const char *>I<pathname>B<, mode_t >I<mode>B<);>\n"
13922 #. type: Plain text
13923 #: build/C/man2/mkdir.2:24
13926 "B<#include E<lt>fcntl.hE<gt> >/* Definition of AT_* constants */\n"
13927 "B<#include E<lt>sys/stat.hE<gt>>\n"
13930 #. type: Plain text
13931 #: build/C/man2/mkdir.2:26
13934 "B<int mkdirat(int >I<dirfd>B<, const char *>I<pathname>B<, mode_t "
13938 #. type: Plain text
13939 #: build/C/man2/mkdir.2:34
13940 msgid "B<mkdirat>():"
13943 #. type: Plain text
13944 #: build/C/man2/mkdir.2:51
13945 msgid "B<mkdir>() attempts to create a directory named I<pathname>."
13948 #. type: Plain text
13949 #: build/C/man2/mkdir.2:61
13951 "The argument I<mode> specifies the permissions to use. It is modified by "
13952 "the process's I<umask> in the usual way: the permissions of the created "
13953 "directory are (I<mode> & ~I<umask> & 0777). Other mode bits of the created "
13954 "directory depend on the operating system. For Linux, see below."
13957 #. type: Plain text
13958 #: build/C/man2/mkdir.2:71
13960 "The newly created directory will be owned by the effective user ID of the "
13961 "process. If the directory containing the file has the set-group-ID bit set, "
13962 "or if the filesystem is mounted with BSD group semantics (I<mount -o "
13963 "bsdgroups> or, synonymously I<mount -o grpid>), the new directory will "
13964 "inherit the group ownership from its parent; otherwise it will be owned by "
13965 "the effective group ID of the process."
13968 #. type: Plain text
13969 #: build/C/man2/mkdir.2:76
13971 "If the parent directory has the set-group-ID bit set, then so will the newly "
13972 "created directory."
13976 #: build/C/man2/mkdir.2:76
13981 #. type: Plain text
13982 #: build/C/man2/mkdir.2:82
13984 "The B<mkdirat>() system call operates in exactly the same way as "
13985 "B<mkdir>(), except for the differences described here."
13988 #. type: Plain text
13989 #: build/C/man2/mkdir.2:92
13991 "If the pathname given in I<pathname> is relative, then it is interpreted "
13992 "relative to the directory referred to by the file descriptor I<dirfd> "
13993 "(rather than relative to the current working directory of the calling "
13994 "process, as is done by B<mkdir>() for a relative pathname)."
13997 #. type: Plain text
13998 #: build/C/man2/mkdir.2:104
14000 "If I<pathname> is relative and I<dirfd> is the special value B<AT_FDCWD>, "
14001 "then I<pathname> is interpreted relative to the current working directory of "
14002 "the calling process (like B<mkdir>())."
14005 #. type: Plain text
14006 #: build/C/man2/mkdir.2:115
14007 msgid "See B<openat>(2) for an explanation of the need for B<mkdirat>()."
14010 #. type: Plain text
14011 #: build/C/man2/mkdir.2:122
14013 "B<mkdir>() and B<mkdirat>() return zero on success, or -1 if an error "
14014 "occurred (in which case, I<errno> is set appropriately)."
14017 #. type: Plain text
14018 #: build/C/man2/mkdir.2:131
14020 "The parent directory does not allow write permission to the process, or one "
14021 "of the directories in I<pathname> did not allow search permission. (See "
14022 "also B<path_resolution>(7).)"
14026 #: build/C/man2/mkdir.2:131
14031 #. type: Plain text
14032 #: build/C/man2/mkdir.2:135
14034 "The user's quota of disk blocks or inodes on the filesystem has been "
14039 #: build/C/man2/mkdir.2:135
14044 #. type: Plain text
14045 #: build/C/man2/mkdir.2:142
14047 "I<pathname> already exists (not necessarily as a directory). This includes "
14048 "the case where I<pathname> is a symbolic link, dangling or not."
14052 #: build/C/man2/mkdir.2:149
14057 #. type: Plain text
14058 #: build/C/man2/mkdir.2:153
14059 msgid "The number of links to the parent directory would exceed B<LINK_MAX>."
14062 #. type: Plain text
14063 #: build/C/man2/mkdir.2:156
14064 msgid "I<pathname> was too long."
14067 #. type: Plain text
14068 #: build/C/man2/mkdir.2:161
14070 "A directory component in I<pathname> does not exist or is a dangling "
14075 #: build/C/man2/mkdir.2:164 build/C/man2/mkdir.2:169
14080 #. type: Plain text
14081 #: build/C/man2/mkdir.2:169
14082 msgid "The device containing I<pathname> has no room for the new directory."
14085 #. type: Plain text
14086 #: build/C/man2/mkdir.2:173
14088 "The new directory cannot be created because the user's disk quota is "
14092 #. type: Plain text
14093 #: build/C/man2/mkdir.2:183
14095 "The filesystem containing I<pathname> does not support the creation of "
14099 #. type: Plain text
14100 #: build/C/man2/mkdir.2:187
14101 msgid "I<pathname> refers to a file on a read-only filesystem."
14104 #. type: Plain text
14105 #: build/C/man2/mkdir.2:190
14106 msgid "The following additional errors can occur for B<mkdirat>():"
14109 #. type: Plain text
14110 #: build/C/man2/mkdir.2:204
14112 "B<mkdirat>() was added to Linux in kernel 2.6.16; library support was added "
14113 "to glibc in version 2.4."
14116 #. SVr4 documents additional EIO, EMULTIHOP
14117 #. type: Plain text
14118 #: build/C/man2/mkdir.2:208
14119 msgid "B<mkdir>(): SVr4, BSD, POSIX.1-2001, POSIX.1-2008."
14122 #. type: Plain text
14123 #: build/C/man2/mkdir.2:211
14124 msgid "B<mkdirat>(): POSIX.1-2008."
14127 #. type: Plain text
14128 #: build/C/man2/mkdir.2:219
14130 "Under Linux, apart from the permission bits, only the B<S_ISVTX> mode bit is "
14131 "honored. That is, under Linux the created directory actually gets mode "
14132 "(I<mode> & ~I<umask> & 01777). See also B<stat>(2)."
14135 #. type: Plain text
14136 #: build/C/man2/mkdir.2:223
14138 "There are many infelicities in the protocol underlying NFS. Some of these "
14139 "affect B<mkdir>()."
14142 #. type: Plain text
14143 #: build/C/man2/mkdir.2:236
14145 "On older kernels where B<mkdirat>() is unavailable, the glibc wrapper "
14146 "function falls back to the use of B<mkdir>(). When I<pathname> is a "
14147 "relative pathname, glibc constructs a pathname based on the symbolic link in "
14148 "I</proc/self/fd> that corresponds to the I<dirfd> argument."
14151 #. type: Plain text
14152 #: build/C/man2/mkdir.2:247
14154 "B<mkdir>(1), B<chmod>(2), B<chown>(2), B<mknod>(2), B<mount>(2), "
14155 "B<rmdir>(2), B<stat>(2), B<umask>(2), B<unlink>(2), B<path_resolution>(7)"
14159 #: build/C/man2/nice.2:31
14165 #: build/C/man2/nice.2:31
14170 #. type: Plain text
14171 #: build/C/man2/nice.2:34
14172 msgid "nice - change process priority"
14175 #. type: Plain text
14176 #: build/C/man2/nice.2:38
14177 msgid "B<int nice(int >I<inc>B<);>"
14180 #. type: Plain text
14181 #: build/C/man2/nice.2:46
14182 msgid "B<nice>(): _BSD_SOURCE || _SVID_SOURCE || _XOPEN_SOURCE"
14185 #. type: Plain text
14186 #: build/C/man2/nice.2:56
14188 "B<nice>() adds I<inc> to the nice value for the calling process. (A higher "
14189 "nice value means a low priority.) Only the super\\%user may specify a "
14190 "negative increment, or priority increase. The range for nice values is "
14191 "described in B<getpriority>(2)."
14194 #. type: Plain text
14195 #: build/C/man2/nice.2:61
14197 "On success, the new nice value is returned (but see NOTES below). On error, "
14198 "-1 is returned, and I<errno> is set appropriately."
14201 #. type: Plain text
14202 #: build/C/man2/nice.2:75
14204 "The calling process attempted to increase its priority by supplying a "
14205 "negative I<inc> but has insufficient privileges. Under Linux, the "
14206 "B<CAP_SYS_NICE> capability is required. (But see the discussion of the "
14207 "B<RLIMIT_NICE> resource limit in B<setrlimit>(2).)"
14210 #. type: Plain text
14211 #: build/C/man2/nice.2:82
14213 "SVr4, 4.3BSD, POSIX.1-2001. However, the Linux and (g)libc (earlier than "
14214 "glibc 2.2.4) return value is nonstandard, see below. SVr4 documents an "
14215 "additional B<EINVAL> error code."
14218 #. type: Plain text
14219 #: build/C/man2/nice.2:92
14221 "SUSv2 and POSIX.1-2001 specify that B<nice>() should return the new nice "
14222 "value. However, the Linux syscall and the B<nice>() library function "
14223 "provided in older versions of (g)libc (earlier than glibc 2.2.4) return 0 on "
14224 "success. The new nice value can be found using B<getpriority>(2)."
14227 #. type: Plain text
14228 #: build/C/man2/nice.2:105
14230 "Since glibc 2.2.4, B<nice>() is implemented as a library function that "
14231 "calls B<getpriority>(2) to obtain the new nice value to be returned to the "
14232 "caller. With this implementation, a successful call can legitimately return "
14233 "-1. To reliably detect an error, set I<errno> to 0 before the call, and "
14234 "check its value when B<nice>() returns -1."
14237 #. type: Plain text
14238 #: build/C/man2/nice.2:113
14240 "B<nice>(1), B<renice>(1), B<fork>(2), B<getpriority>(2), B<setpriority>(2), "
14241 "B<capabilities>(7), B<sched>(7)"
14245 #: build/C/man2/pread.2:25
14250 #. type: Plain text
14251 #: build/C/man2/pread.2:28
14252 msgid "pread, pwrite - read from or write to a file descriptor at a given offset"
14255 #. type: Plain text
14256 #: build/C/man2/pread.2:33
14258 "B<ssize_t pread(int >I<fd>B<, void *>I<buf>B<, size_t >I<count>B<, off_t "
14262 #. type: Plain text
14263 #: build/C/man2/pread.2:36
14265 "B<ssize_t pwrite(int >I<fd>B<, const void *>I<buf>B<, size_t >I<count>B<, "
14266 "off_t >I<offset>B<);>"
14269 #. type: Plain text
14270 #: build/C/man2/pread.2:46
14271 msgid "B<pread>(), B<pwrite>():"
14274 #. type: Plain text
14275 #: build/C/man2/pread.2:48
14276 msgid "_XOPEN_SOURCE\\ E<gt>=\\ 500"
14279 #. type: Plain text
14280 #: build/C/man2/pread.2:64
14282 "B<pread>() reads up to I<count> bytes from file descriptor I<fd> at offset "
14283 "I<offset> (from the start of the file) into the buffer starting at I<buf>. "
14284 "The file offset is not changed."
14287 #. type: Plain text
14288 #: build/C/man2/pread.2:75
14290 "B<pwrite>() writes up to I<count> bytes from the buffer starting at I<buf> "
14291 "to the file descriptor I<fd> at offset I<offset>. The file offset is not "
14295 #. type: Plain text
14296 #: build/C/man2/pread.2:79
14297 msgid "The file referenced by I<fd> must be capable of seeking."
14300 #. type: Plain text
14301 #: build/C/man2/pread.2:89
14303 "On success, the number of bytes read or written is returned (zero indicates "
14304 "that nothing was written, in the case of B<pwrite>(), or end of file, in the "
14305 "case of B<pread>()), or -1 on error, in which case I<errno> is set to "
14306 "indicate the error."
14309 #. type: Plain text
14310 #: build/C/man2/pread.2:104
14312 "B<pread>() can fail and set I<errno> to any error specified for B<read>(2) "
14313 "or B<lseek>(2). B<pwrite>() can fail and set I<errno> to any error "
14314 "specified for B<write>(2) or B<lseek>(2)."
14317 #. type: Plain text
14318 #: build/C/man2/pread.2:115
14320 "The B<pread>() and B<pwrite>() system calls were added to Linux in version "
14321 "2.1.60; the entries in the i386 system call table were added in 2.1.69. C "
14322 "library support (including emulation using B<lseek>(2) on older kernels "
14323 "without the system calls) was added in glibc 2.1."
14326 #. type: Plain text
14327 #: build/C/man2/pread.2:125
14329 "The B<pread>() and B<pwrite>() system calls are especially useful in "
14330 "multithreaded applications. They allow multiple threads to perform I/O on "
14331 "the same file descriptor without being affected by changes to the file "
14332 "offset by other threads."
14335 #. type: Plain text
14336 #: build/C/man2/pread.2:141
14338 "On Linux, the underlying system calls were renamed in kernel 2.6: B<pread>() "
14339 "became B<pread64>(), and B<pwrite>() became B<pwrite64>(). The system call "
14340 "numbers remained the same. The glibc B<pread>() and B<pwrite>() wrapper "
14341 "functions transparently deal with the change."
14344 #. type: Plain text
14345 #: build/C/man2/pread.2:146 build/C/man2/truncate.2:253
14347 "On some 32-bit architectures, the calling signature for these system calls "
14348 "differ, for the reasons described in B<syscall>(2)."
14351 #. FIXME . https://bugzilla.kernel.org/show_bug.cgi?id=43178
14352 #. type: Plain text
14353 #: build/C/man2/pread.2:158
14355 "POSIX requires that opening a file with the B<O_APPEND> flag should have no "
14356 "effect on the location at which B<pwrite>() writes data. However, on "
14357 "Linux, if a file is opened with B<O_APPEND>, B<pwrite>() appends data to "
14358 "the end of the file, regardless of the value of I<offset>."
14361 #. type: Plain text
14362 #: build/C/man2/pread.2:163
14363 msgid "B<lseek>(2), B<read>(2), B<readv>(2), B<write>(2)"
14367 #: build/C/man2/set_thread_area.2:8
14369 msgid "SET_THREAD_AREA"
14372 #. type: Plain text
14373 #: build/C/man2/set_thread_area.2:11
14374 msgid "set_thread_area - set a thread local storage (TLS) area"
14377 #. type: Plain text
14378 #: build/C/man2/set_thread_area.2:17
14379 msgid "B<int set_thread_area(struct user_desc *>I<u_info>B<);>"
14382 #. type: Plain text
14383 #: build/C/man2/set_thread_area.2:33
14385 "B<set_thread_area>() sets an entry in the current thread's thread-local "
14386 "storage (TLS) array. The TLS array entry set by B<set_thread_area>() "
14387 "corresponds to the value of I<u_info-E<gt>entry_number> passed in by the "
14388 "user. If this value is in bounds, B<set_thread_area>() copies the TLS "
14389 "descriptor pointed to by I<u_info> into the thread's TLS array."
14392 #. type: Plain text
14393 #: build/C/man2/set_thread_area.2:44
14395 "When B<set_thread_area>() is passed an I<entry_number> of -1, it uses a "
14396 "free TLS entry. If B<set_thread_area>() finds a free TLS entry, the value "
14397 "of I<u_info-E<gt>entry_number> is set upon return to show which entry was "
14401 #. type: Plain text
14402 #: build/C/man2/set_thread_area.2:49
14404 "B<set_thread_area>() returns 0 on success, and -1 on failure, with I<errno> "
14405 "set appropriately."
14409 #: build/C/man2/set_thread_area.2:56
14414 #. type: Plain text
14415 #: build/C/man2/set_thread_area.2:59
14416 msgid "A free TLS entry could not be located."
14419 #. type: Plain text
14420 #: build/C/man2/set_thread_area.2:63
14421 msgid "A version of B<set_thread_area>() first appeared in Linux 2.5.29."
14424 #. type: Plain text
14425 #: build/C/man2/set_thread_area.2:67
14427 "B<set_thread_area>() is Linux-specific and should not be used in programs "
14428 "that are intended to be portable."
14431 #. type: Plain text
14432 #: build/C/man2/set_thread_area.2:72
14434 "Glibc does not provide a wrapper for this system call, since it is generally "
14435 "intended only for use by threading libraries. In the unlikely event that "
14436 "you want to call it directly, use B<syscall>(2)."
14439 #. type: Plain text
14440 #: build/C/man2/set_thread_area.2:74
14441 msgid "B<get_thread_area>(2)"
14445 #: build/C/man2/setup.2:34
14451 #: build/C/man2/setup.2:34
14456 #. type: Plain text
14457 #: build/C/man2/setup.2:37
14458 msgid "setup - setup devices and filesystems, mount root filesystem"
14461 #. type: Plain text
14462 #: build/C/man2/setup.2:41
14463 msgid "B<int setup(void);>"
14466 #. type: Plain text
14467 #: build/C/man2/setup.2:47
14469 "B<setup>() is called once from within I<linux/init/main.c>. It calls "
14470 "initialization functions for devices and filesystems configured into the "
14471 "kernel and then mounts the root filesystem."
14474 #. type: Plain text
14475 #: build/C/man2/setup.2:53
14477 "No user process may call B<setup>(). Any user process, even a process with "
14478 "superuser permission, will receive B<EPERM>."
14481 #. type: Plain text
14482 #: build/C/man2/setup.2:56
14483 msgid "B<setup>() always returns -1 for a user process."
14486 #. type: Plain text
14487 #: build/C/man2/setup.2:62
14488 msgid "Since Linux 2.1.121, no such function exists anymore."
14491 #. type: Plain text
14492 #: build/C/man2/setup.2:65
14494 "This function is Linux-specific, and should not be used in programs intended "
14495 "to be portable, or indeed in any programs at all."
14498 #. type: Plain text
14499 #: build/C/man2/setup.2:72
14501 "The calling sequence varied: at some times B<setup>() has had a single "
14502 "argument I<void\\ *BIOS> and at other times a single argument I<int magic>."
14506 #: build/C/man5/shells.5:28
14511 #. type: Plain text
14512 #: build/C/man5/shells.5:31
14513 msgid "shells - pathnames of valid login shells"
14516 #. type: Plain text
14517 #: build/C/man5/shells.5:37
14519 "I</etc/shells> is a text file which contains the full pathnames of valid "
14520 "login shells. This file is consulted by B<chsh>(1) and available to be "
14521 "queried by other programs."
14524 #. type: Plain text
14525 #: build/C/man5/shells.5:43
14527 "Be aware that there are programs which consult this file to find out if a "
14528 "user is a normal user; for example, FTP daemons traditionally disallow "
14529 "access to users with shells not included in this file."
14532 #. type: Plain text
14533 #: build/C/man5/shells.5:45
14534 msgid "I</etc/shells>"
14537 #. type: Plain text
14538 #: build/C/man5/shells.5:48
14539 msgid "I</etc/shells> may contain the following paths:"
14542 #. type: Plain text
14543 #: build/C/man5/shells.5:51
14547 #. type: Plain text
14548 #: build/C/man5/shells.5:53
14549 msgid "I</bin/bash>"
14552 #. type: Plain text
14553 #: build/C/man5/shells.5:55
14554 msgid "I</bin/csh>"
14557 #. type: Plain text
14558 #: build/C/man5/shells.5:59
14559 msgid "B<chsh>(1), B<getusershell>(3)"
14563 #: build/C/man3/sleep.3:26
14569 #: build/C/man3/sleep.3:26
14574 #. type: Plain text
14575 #: build/C/man3/sleep.3:29
14576 msgid "sleep - sleep for the specified number of seconds"
14579 #. type: Plain text
14580 #: build/C/man3/sleep.3:34
14582 msgid "B<unsigned int sleep(unsigned int >I<seconds>B<);>\n"
14585 #. type: Plain text
14586 #: build/C/man3/sleep.3:40
14588 "B<sleep>() makes the calling thread sleep until I<seconds> seconds have "
14589 "elapsed or a signal arrives which is not ignored."
14592 #. type: Plain text
14593 #: build/C/man3/sleep.3:44
14595 "Zero if the requested time has elapsed, or the number of seconds left to "
14596 "sleep, if the call was interrupted by a signal handler."
14599 #. type: Plain text
14600 #: build/C/man3/sleep.3:55
14602 "B<sleep>() may be implemented using B<SIGALRM>; mixing calls to B<alarm>(2) "
14603 "and B<sleep>() is a bad idea."
14606 #. type: Plain text
14607 #: build/C/man3/sleep.3:61
14609 "Using B<longjmp>(3) from a signal handler or modifying the handling of "
14610 "B<SIGALRM> while sleeping will cause undefined results."
14613 #. type: Plain text
14614 #: build/C/man3/sleep.3:66
14615 msgid "B<alarm>(2), B<nanosleep>(2), B<signal>(2), B<signal>(7)"
14619 #: build/C/man3/swab.3:31
14625 #: build/C/man3/swab.3:31
14630 #. type: Plain text
14631 #: build/C/man3/swab.3:34
14632 msgid "swab - swap adjacent bytes"
14635 #. type: Plain text
14636 #: build/C/man3/swab.3:38
14639 "B<#define _XOPEN_SOURCE> /* See feature_test_macros(7) */\n"
14640 "B<#include E<lt>unistd.hE<gt>>\n"
14643 #. type: Plain text
14644 #: build/C/man3/swab.3:40
14646 msgid "B<void swab(const void *>I<from>B<, void *>I<to>B<, ssize_t >I<n>B<);>\n"
14649 #. type: Plain text
14650 #: build/C/man3/swab.3:55
14652 "The B<swab>() function copies I<n> bytes from the array pointed to by "
14653 "I<from> to the array pointed to by I<to>, exchanging adjacent even and odd "
14654 "bytes. This function is used to exchange data between machines that have "
14655 "different low/high byte ordering."
14658 #. type: Plain text
14659 #: build/C/man3/swab.3:68
14661 "This function does nothing when I<n> is negative. When I<n> is positive and "
14662 "odd, it handles I<n-1> bytes as above, and does something unspecified with "
14663 "the last byte. (In other words, I<n> should be even.)"
14666 #. type: Plain text
14667 #: build/C/man3/swab.3:72
14668 msgid "The B<swab>() function returns no value."
14671 #. type: Plain text
14672 #: build/C/man3/swab.3:77
14673 msgid "The B<swab>() function is thread-safe."
14676 #. type: Plain text
14677 #: build/C/man3/swab.3:81
14678 msgid "B<bstring>(3)"
14682 #: build/C/man2/swapon.2:42
14687 #. type: Plain text
14688 #: build/C/man2/swapon.2:45
14689 msgid "swapon, swapoff - start/stop swapping to file/device"
14692 #. type: Plain text
14693 #: build/C/man2/swapon.2:49
14694 msgid "B<#include E<lt>sys/swap.hE<gt>>"
14697 #. type: Plain text
14698 #: build/C/man2/swapon.2:51
14699 msgid "B<int swapon(const char *>I<path>B<, int >I<swapflags>B<);>"
14702 #. type: Plain text
14703 #: build/C/man2/swapon.2:53
14704 msgid "B<int swapoff(const char *>I<path>B<);>"
14707 #. type: Plain text
14708 #: build/C/man2/swapon.2:60
14710 "B<swapon>() sets the swap area to the file or block device specified by "
14711 "I<path>. B<swapoff>() stops swapping to the file or block device specified "
14715 #. type: Plain text
14716 #: build/C/man2/swapon.2:70
14718 "If the B<SWAP_FLAG_PREFER> flag is specified in the B<swapon>() "
14719 "I<swapflags> argument, the new swap area will have a higher priority than "
14720 "default. The priority is encoded within I<swapflags> as:"
14723 #. type: Plain text
14724 #: build/C/man2/swapon.2:73
14725 msgid "I<(prio E<lt>E<lt> SWAP_FLAG_PRIO_SHIFT) & SWAP_FLAG_PRIO_MASK>"
14728 #. type: Plain text
14729 #: build/C/man2/swapon.2:85
14731 "If the B<SWAP_FLAG_DISCARD> flag is specified in the B<swapon>() "
14732 "I<swapflags> argument, freed swap pages will be discarded before they are "
14733 "reused, if the swap device supports the discard or trim operation. (This "
14734 "may improve performance on some Solid State Devices, but often it does not.) "
14738 #. type: Plain text
14739 #: build/C/man2/swapon.2:89
14741 "These functions may be used only by a privileged process (one having the "
14742 "B<CAP_SYS_ADMIN> capability)."
14746 #: build/C/man2/swapon.2:89
14751 #. type: Plain text
14752 #: build/C/man2/swapon.2:94
14754 "Each swap area has a priority, either high or low. The default priority is "
14755 "low. Within the low-priority areas, newer areas are even lower priority "
14756 "than older areas."
14759 #. type: Plain text
14760 #: build/C/man2/swapon.2:100
14762 "All priorities set with I<swapflags> are high-priority, higher than "
14763 "default. They may have any nonnegative value chosen by the caller. Higher "
14764 "numbers mean higher priority."
14767 #. type: Plain text
14768 #: build/C/man2/swapon.2:108
14770 "Swap pages are allocated from areas in priority order, highest priority "
14771 "first. For areas with different priorities, a higher-priority area is "
14772 "exhausted before using a lower-priority area. If two or more areas have the "
14773 "same priority, and it is the highest priority available, pages are allocated "
14774 "on a round-robin basis between them."
14777 #. type: Plain text
14778 #: build/C/man2/swapon.2:111
14780 "As of Linux 1.3.6, the kernel usually follows these rules, but there are "
14784 #. type: Plain text
14785 #: build/C/man2/swapon.2:124
14787 "(for B<swapon>()) The specified I<path> is already being used as a swap "
14791 #. type: Plain text
14792 #: build/C/man2/swapon.2:129
14794 "The file I<path> exists, but refers neither to a regular file nor to a block "
14798 #. type: Plain text
14799 #: build/C/man2/swapon.2:134
14801 "(B<swapon>()) The indicated path does not contain a valid swap signature or "
14802 "resides on an in-memory filesystem such as tmpfs."
14806 #: build/C/man2/swapon.2:134
14808 msgid "B<EINVAL> (since Linux 3.4)"
14811 #. type: Plain text
14812 #: build/C/man2/swapon.2:139
14813 msgid "(B<swapon>()) An invalid flag value was specified in I<flags>."
14816 #. type: Plain text
14817 #: build/C/man2/swapon.2:144
14818 msgid "(B<swapoff>()) I<path> is not currently a swap area."
14821 #. type: Plain text
14822 #: build/C/man2/swapon.2:152
14823 msgid "The file I<path> does not exist."
14826 #. type: Plain text
14827 #: build/C/man2/swapon.2:155
14828 msgid "The system has insufficient memory to start swapping."
14831 #. type: Plain text
14832 #: build/C/man2/swapon.2:162
14834 "The caller does not have the B<CAP_SYS_ADMIN> capability. Alternatively, "
14835 "the maximum number of swap files are already in use; see NOTES below."
14838 #. type: Plain text
14839 #: build/C/man2/swapon.2:168
14841 "These functions are Linux-specific and should not be used in programs "
14842 "intended to be portable. The second I<swapflags> argument was introduced in "
14846 #. type: Plain text
14847 #: build/C/man2/swapon.2:171
14848 msgid "The partition or path must be prepared with B<mkswap>(8)."
14851 #. type: Plain text
14852 #: build/C/man2/swapon.2:191
14854 "There is an upper limit on the number of swap files that may be used, "
14855 "defined by the kernel constant B<MAX_SWAPFILES>. Before kernel 2.4.10, "
14856 "B<MAX_SWAPFILES> has the value 8; since kernel 2.4.10, it has the value 32. "
14857 "Since kernel 2.6.18, the limit is decreased by 2 (thus: 30) if the kernel "
14858 "is built with the B<CONFIG_MIGRATION> option (which reserves two swap table "
14859 "entries for the page migration features of B<mbind>(2) and "
14860 "B<migrate_pages>(2)). Since kernel 2.6.32, the limit is further decreased "
14861 "by 1 if the kernel is built with the B<CONFIG_MEMORY_FAILURE> option."
14864 #. To be precise: 2.6.35.5
14865 #. type: Plain text
14866 #: build/C/man2/swapon.2:202
14868 "Discard of swap pages was introduced in kernel 2.6.29, then made conditional "
14869 "on the B<SWAP_FLAG_DISCARD> flag in kernel 2.6.36, which still discards the "
14870 "entire swap area when B<swapon>() is called, even if that flag bit is not "
14874 #. type: Plain text
14875 #: build/C/man2/swapon.2:206
14876 msgid "B<mkswap>(8), B<swapoff>(8), B<swapon>(8)"
14880 #: build/C/man2/syscall.2:42
14885 #. type: Plain text
14886 #: build/C/man2/syscall.2:45
14887 msgid "syscall - indirect system call"
14890 #. type: Plain text
14891 #: build/C/man2/syscall.2:50
14894 "B<#define _GNU_SOURCE> /* See feature_test_macros(7) */\n"
14895 "B<#include E<lt>unistd.hE<gt>>\n"
14896 "B<#include E<lt>sys/syscall.hE<gt> >/* For SYS_xxx definitions */\n"
14899 #. type: Plain text
14900 #: build/C/man2/syscall.2:52
14902 msgid "B<long syscall(long >I<number>B<, ...);>\n"
14905 #. type: Plain text
14906 #: build/C/man2/syscall.2:64
14908 "B<syscall>() is a small library function that invokes the system call whose "
14909 "assembly language interface has the specified I<number> with the specified "
14910 "arguments. Employing B<syscall>() is useful, for example, when invoking a "
14911 "system call that has no wrapper function in the C library."
14914 #. type: Plain text
14915 #: build/C/man2/syscall.2:71
14917 "B<syscall>() saves CPU registers before making the system call, restores "
14918 "the registers upon return from the system call, and stores any error code "
14919 "returned by the system call in B<errno>(3) if an error occurs."
14922 #. type: Plain text
14923 #: build/C/man2/syscall.2:74
14925 "Symbolic constants for system call numbers can be found in the header file "
14926 "I<E<lt>sys/syscall.hE<gt>>."
14929 #. type: Plain text
14930 #: build/C/man2/syscall.2:80
14932 "The return value is defined by the system call being invoked. In general, a "
14933 "0 return value indicates success. A -1 return value indicates an error, and "
14934 "an error code is stored in I<errno>."
14937 #. type: Plain text
14938 #: build/C/man2/syscall.2:84
14939 msgid "B<syscall>() first appeared in 4BSD."
14943 #: build/C/man2/syscall.2:84
14945 msgid "Architecture-specific requirements"
14948 #. type: Plain text
14949 #: build/C/man2/syscall.2:95
14951 "Each architecture ABI has its own requirements on how system call arguments "
14952 "are passed to the kernel. For system calls that have a glibc wrapper (e.g., "
14953 "most system calls), glibc handles the details of copying arguments to the "
14954 "right registers in a manner suitable for the architecture. However, when "
14955 "using B<syscall>() to make a system call, the caller might need to handle "
14956 "architecture-dependent details; this requirement is most commonly "
14957 "encountered on certain 32-bit architectures."
14960 #. type: Plain text
14961 #: build/C/man2/syscall.2:106
14963 "For example, on the ARM architecture Embedded ABI (EABI), a 64-bit value "
14964 "(e.g., I<long long>) must be aligned to an even register pair. Thus, using "
14965 "B<syscall>() instead of the wrapper provided by glibc, the B<readahead>() "
14966 "system call would be invoked as follows on the ARM architecture with the "
14970 #. type: Plain text
14971 #: build/C/man2/syscall.2:113
14974 "syscall(SYS_readahead, fd, 0,\n"
14975 " (unsigned int) (offset E<gt>E<gt> 32),\n"
14976 " (unsigned int) (offset & 0xFFFFFFFF),\n"
14980 #. type: Plain text
14981 #: build/C/man2/syscall.2:127
14983 "Since the offset argument is 64 bits, and the first argument (I<fd>) is "
14984 "passed in I<r0>, the caller must manually split and align the 64-bit value "
14985 "so that it is passed in the I<r2>/I<r3> register pair. That means inserting "
14986 "a dummy value into I<r1> (the second argument of 0)."
14989 #. Mike Frysinger: this issue ends up forcing MIPS
14990 #. O32 to take 7 arguments to syscall()
14991 #. type: Plain text
14992 #: build/C/man2/syscall.2:132
14994 "Similar issues can occur on MIPS with the O32 ABI, on PowerPC with the "
14995 "32-bit ABI, and on Xtensa."
14998 #. type: Plain text
14999 #: build/C/man2/syscall.2:143
15001 "The affected system calls are B<fadvise64_64>(2), B<ftruncate64>(2), "
15002 "B<posix_fadvise>(2), B<pread64>(2), B<pwrite64>(2), B<readahead>(2), "
15003 "B<sync_file_range>(2), and B<truncate64>(2)."
15007 #: build/C/man2/syscall.2:143
15009 msgid "Architecture calling conventions"
15012 #. type: Plain text
15013 #: build/C/man2/syscall.2:147
15015 "Every architecture has its own way of invoking and passing arguments to the "
15016 "kernel. The details for various architectures are listed in the two tables "
15020 #. type: Plain text
15021 #: build/C/man2/syscall.2:154
15023 "The first table lists the instruction used to transition to kernel mode, "
15024 "(which might not be the fastest or best way to transition to the kernel, so "
15025 "you might have to refer to B<vdso>(7)), the register used to indicate the "
15026 "system call number, and the register used to return the system call result."
15030 #: build/C/man2/syscall.2:159
15032 msgid "arch/ABI\tinstruction\tsyscall #\tretval\tNotes\n"
15036 #: build/C/man2/syscall.2:161
15038 msgid "arm/OABI\tswi NR\t-\ta1\tNR is syscall #\n"
15042 #: build/C/man2/syscall.2:162
15044 msgid "arm/EABI\tswi 0x0\tr7\tr0\n"
15048 #: build/C/man2/syscall.2:163
15050 msgid "arm64\tsvc #0\tx8\tx0\n"
15054 #: build/C/man2/syscall.2:164
15056 msgid "blackfin\texcpt 0x0\tP0\tR0\n"
15060 #: build/C/man2/syscall.2:165
15062 msgid "i386\tint $0x80\teax\teax\n"
15066 #: build/C/man2/syscall.2:166
15068 msgid "ia64\tbreak 0x100000\tr15\tr8\tSee below\n"
15072 #: build/C/man2/syscall.2:167
15074 msgid "mips\tsyscall\tv0\tv0\tSee below\n"
15078 #: build/C/man2/syscall.2:168
15080 msgid "parisc\tble 0x100(%sr2, %r0)\tr20\tr28\n"
15084 #: build/C/man2/syscall.2:169
15086 msgid "s390\tsvc 0\tr1\tr2\tSee below\n"
15090 #: build/C/man2/syscall.2:170
15092 msgid "s390x\tsvc 0\tr1\tr2\tSee below\n"
15096 #: build/C/man2/syscall.2:171
15098 msgid "sparc/32\tt 0x10\tg1\to0\n"
15102 #: build/C/man2/syscall.2:172
15104 msgid "sparc/64\tt 0x6d\tg1\to0\n"
15108 #: build/C/man2/syscall.2:173
15110 msgid "x86_64\tsyscall\trax\trax\n"
15113 #. type: Plain text
15114 #: build/C/man2/syscall.2:178
15116 "For s390 and s390x, NR (the system call number) may be passed directly with "
15117 "\"svc NR\" if it is less than 256."
15120 #. type: Plain text
15121 #: build/C/man2/syscall.2:186
15123 "On a few architectures, a register is used to indicate simple boolean "
15124 "failure of the system call: ia64 uses I<r10> for this purpose, and mips uses "
15128 #. type: Plain text
15129 #: build/C/man2/syscall.2:192
15130 msgid "The second table shows the registers used to pass the system call arguments."
15134 #: build/C/man2/syscall.2:197
15136 msgid "arch/ABI\targ1\targ2\targ3\targ4\targ5\targ6\targ7\tNotes\n"
15140 #: build/C/man2/syscall.2:199
15142 msgid "arm/OABI\ta1\ta2\ta3\ta4\tv1\tv2\tv3\n"
15146 #: build/C/man2/syscall.2:200
15148 msgid "arm/EABI\tr0\tr1\tr2\tr3\tr4\tr5\tr6\n"
15152 #: build/C/man2/syscall.2:201
15154 msgid "arm64\tx0\tx1\tx2\tx3\tx4\tx5\t-\n"
15158 #: build/C/man2/syscall.2:202
15160 msgid "blackfin\tR0\tR1\tR2\tR3\tR4\tR5\t-\n"
15164 #: build/C/man2/syscall.2:203
15166 msgid "i386\tebx\tecx\tedx\tesi\tedi\tebp\t-\n"
15170 #: build/C/man2/syscall.2:204
15172 msgid "ia64\tout0\tout1\tout2\tout3\tout4\tout5\t-\n"
15176 #: build/C/man2/syscall.2:205
15178 msgid "mips/o32\ta0\ta1\ta2\ta3\t-\t-\t-\tSee below\n"
15182 #: build/C/man2/syscall.2:206
15184 msgid "mips/n32,64\ta0\ta1\ta2\ta3\ta4\ta5\t-\n"
15188 #: build/C/man2/syscall.2:207
15190 msgid "parisc\tr26\tr25\tr24\tr23\tr22\tr21\t-\n"
15194 #: build/C/man2/syscall.2:208
15196 msgid "s390\tr2\tr3\tr4\tr5\tr6\tr7\t-\n"
15200 #: build/C/man2/syscall.2:209
15202 msgid "s390x\tr2\tr3\tr4\tr5\tr6\tr7\t-\n"
15206 #: build/C/man2/syscall.2:210
15208 msgid "sparc/32\to0\to1\to2\to3\to4\to5\t-\n"
15212 #: build/C/man2/syscall.2:211
15214 msgid "sparc/64\to0\to1\to2\to3\to4\to5\t-\n"
15218 #: build/C/man2/syscall.2:212
15220 msgid "x86_64\trdi\trsi\trdx\tr10\tr8\tr9\t-\n"
15223 #. type: Plain text
15224 #: build/C/man2/syscall.2:217
15226 "The mips/o32 system call convention passes arguments 5 through 8 on the user "
15230 #. type: Plain text
15231 #: build/C/man2/syscall.2:224
15233 "Note that these tables don't cover the entire calling convention\\(emsome "
15234 "architectures may indiscriminately clobber other registers not listed here."
15237 #. type: Plain text
15238 #: build/C/man2/syscall.2:231
15241 "#define _GNU_SOURCE\n"
15242 "#include E<lt>unistd.hE<gt>\n"
15243 "#include E<lt>sys/syscall.hE<gt>\n"
15244 "#include E<lt>sys/types.hE<gt>\n"
15245 "#include E<lt>signal.hE<gt>\n"
15248 #. type: Plain text
15249 #: build/C/man2/syscall.2:236
15253 "main(int argc, char *argv[])\n"
15258 #. type: Plain text
15259 #: build/C/man2/syscall.2:240
15262 " tid = syscall(SYS_gettid);\n"
15263 " tid = syscall(SYS_tgkill, getpid(), tid, SIGHUP);\n"
15267 #. type: Plain text
15268 #: build/C/man2/syscall.2:247
15269 msgid "B<_syscall>(2), B<intro>(2), B<syscalls>(2), B<errno>(3), B<vdso>(7)"
15273 #: build/C/man2/syscalls.2:31
15278 #. type: Plain text
15279 #: build/C/man2/syscalls.2:34
15280 msgid "syscalls - Linux system calls"
15283 #. type: Plain text
15284 #: build/C/man2/syscalls.2:36
15285 msgid "Linux system calls."
15288 #. type: Plain text
15289 #: build/C/man2/syscalls.2:39
15291 "The system call is the fundamental interface between an application and the "
15296 #: build/C/man2/syscalls.2:39
15298 msgid "System calls and library wrapper functions"
15301 #. type: Plain text
15302 #: build/C/man2/syscalls.2:49
15304 "System calls are generally not invoked directly, but rather via wrapper "
15305 "functions in glibc (or perhaps some other library). For details of direct "
15306 "invocation of a system call, see B<intro>(2). Often, but not always, the "
15307 "name of the wrapper function is the same as the name of the system call that "
15308 "it invokes. For example, glibc contains a function B<truncate>() which "
15309 "invokes the underlying \"truncate\" system call."
15312 #. type: Plain text
15313 #: build/C/man2/syscalls.2:67
15315 "Often the glibc wrapper function is quite thin, doing little work other than "
15316 "copying arguments to the right registers before invoking the system call, "
15317 "and then setting I<errno> appropriately after the system call has returned. "
15318 "(These are the same steps that are performed by B<syscall>(2), which can be "
15319 "used to invoke system calls for which no wrapper function is provided.) "
15320 "Note: system calls indicate a failure by returning a negative error number "
15321 "to the caller; when this happens, the wrapper function negates the returned "
15322 "error number (to make it positive), copies it to I<errno>, and returns -1 to "
15323 "the caller of the wrapper."
15326 #. type: Plain text
15327 #: build/C/man2/syscalls.2:79
15329 "Sometimes, however, the wrapper function does some extra work before "
15330 "invoking the system call. For example, nowadays there are (for reasons "
15331 "described below) two related system calls, B<truncate>(2) and "
15332 "B<truncate64>(2), and the glibc B<truncate>() wrapper function checks which "
15333 "of those system calls are provided by the kernel and determines which should "
15338 #: build/C/man2/syscalls.2:79
15340 msgid "System call list"
15343 #. type: Plain text
15344 #: build/C/man2/syscalls.2:87
15346 "Below is a list of the Linux system calls. In the list, the I<Kernel> "
15347 "column indicates the kernel version for those system calls that were new in "
15348 "Linux 2.2, or have appeared since that kernel version. Note the following "
15352 #. type: Plain text
15353 #: build/C/man2/syscalls.2:90
15355 "Where no kernel version is indicated, the system call appeared in kernel 1.0 "
15359 #. type: Plain text
15360 #: build/C/man2/syscalls.2:96
15362 "Where a system call is marked \"1.2\" this means the system call probably "
15363 "appeared in a 1.1.x kernel version, and first appeared in a stable kernel "
15364 "with 1.2. (Development of the 1.2 kernel was initiated from a branch of "
15365 "kernel 1.0.6 via the 1.1.x unstable kernel series.)"
15368 #. Was kernel 2.0 started from a branch of 1.2.10?
15369 #. At least from the timestamps of the tarballs of
15370 #. of 1.2.10 and 1.3.0, that's how it looks, but in
15371 #. fact the diff doesn't seem very clear, the
15372 #. 1.3.0 .tar.bz is much bigger (2.0 MB) than the
15373 #. 1.2.10 .tar.bz2 (1.8 MB), and AEB points out the
15374 #. timestamps of some files in 1.3.0 seem to be older
15375 #. than those in 1.2.10. All of this suggests
15376 #. that there might not have been a clean branch point.
15377 #. type: Plain text
15378 #: build/C/man2/syscalls.2:112
15380 "Where a system call is marked \"2.0\" this means the system call probably "
15381 "appeared in a 1.3.x kernel version, and first appeared in a stable kernel "
15382 "with 2.0. (Development of the 2.0 kernel was initiated from a branch of "
15383 "kernel 1.2.x, somewhere around 1.2.10, via the 1.3.x unstable kernel "
15387 #. type: Plain text
15388 #: build/C/man2/syscalls.2:118
15390 "Where a system call is marked \"2.2\" this means the system call probably "
15391 "appeared in a 2.1.x kernel version, and first appeared in a stable kernel "
15392 "with 2.2.0. (Development of the 2.2 kernel was initiated from a branch of "
15393 "kernel 2.0.21 via the 2.1.x unstable kernel series.)"
15396 #. type: Plain text
15397 #: build/C/man2/syscalls.2:124
15399 "Where a system call is marked \"2.4\" this means the system call probably "
15400 "appeared in a 2.3.x kernel version, and first appeared in a stable kernel "
15401 "with 2.4.0. (Development of the 2.4 kernel was initiated from a branch of "
15402 "kernel 2.2.8 via the 2.3.x unstable kernel series.)"
15405 #. type: Plain text
15406 #: build/C/man2/syscalls.2:130
15408 "Where a system call is marked \"2.6\" this means the system call probably "
15409 "appeared in a 2.5.x kernel version, and first appeared in a stable kernel "
15410 "with 2.6.0. (Development of kernel 2.6 was initiated from a branch of "
15411 "kernel 2.4.15 via the 2.5.x unstable kernel series.)"
15414 #. type: Plain text
15415 #: build/C/man2/syscalls.2:137
15417 "Starting with kernel 2.6.0, the development model changed, and new system "
15418 "calls may appear in each 2.6.x release. In this case, the exact version "
15419 "number where the system call appeared is shown. This convention continues "
15420 "with the 3.x kernel series, which followed on from kernel 2.6.39."
15423 #. type: Plain text
15424 #: build/C/man2/syscalls.2:145
15426 "In some cases, a system call was added to a stable kernel series after it "
15427 "branched from the previous stable kernel series, and then backported into "
15428 "the earlier stable kernel series. For example some system calls that "
15429 "appeared in 2.6.x were also backported into a 2.4.x release after 2.4.15. "
15430 "When this is so, the version where the system call appeared in both of the "
15431 "major kernel series is listed."
15435 #. Looking at scripts/checksyscalls.sh in the kernel source is
15436 #. instructive about x86 specifics.
15437 #. type: Plain text
15438 #: build/C/man2/syscalls.2:152
15440 "The list of system calls that are available as at kernel 3.15 (or in a few "
15441 "cases only on older kernels) is as follows:"
15445 #: build/C/man2/syscalls.2:157
15447 msgid "B<System call>\tB<Kernel>\tB<Notes>\n"
15451 #: build/C/man2/syscalls.2:159
15453 msgid "B<_llseek>(2)\t1.2\n"
15457 #: build/C/man2/syscalls.2:160
15459 msgid "B<_newselect>(2)\t2.0\n"
15463 #: build/C/man2/syscalls.2:161
15465 msgid "B<_sysctl>(2)\t2.0\n"
15469 #: build/C/man2/syscalls.2:162
15471 msgid "B<accept>(2)\t2.0\tSee notes on B<socketcall>(2)\n"
15475 #: build/C/man2/syscalls.2:163
15477 msgid "B<accept4>(2)\t2.6.28\n"
15481 #: build/C/man2/syscalls.2:164
15483 msgid "B<access>(2)\t1.0\n"
15487 #: build/C/man2/syscalls.2:165
15489 msgid "B<acct>(2)\t1.0\n"
15493 #: build/C/man2/syscalls.2:166
15495 msgid "B<add_key>(2)\t2.6.11\n"
15499 #: build/C/man2/syscalls.2:167
15501 msgid "B<adjtimex>(2)\t1.0\n"
15505 #: build/C/man2/syscalls.2:168
15507 msgid "B<alarm>(2)\t1.0\n"
15511 #: build/C/man2/syscalls.2:169
15513 msgid "B<alloc_hugepages>(2)\t2.5.36\tRemoved in 2.5.44\n"
15517 #: build/C/man2/syscalls.2:170
15519 msgid "B<bdflush>(2)\t1.2\tT{\n"
15523 #: build/C/man2/syscalls.2:171
15525 msgid "Deprecated (does nothing)\n"
15529 #: build/C/man2/syscalls.2:172 build/C/man2/syscalls.2:185 build/C/man2/syscalls.2:320 build/C/man2/syscalls.2:393 build/C/man2/syscalls.2:409 build/C/man2/syscalls.2:422
15535 #: build/C/man2/syscalls.2:173
15537 msgid "since 2.6\n"
15541 #: build/C/man2/syscalls.2:174 build/C/man2/syscalls.2:187 build/C/man2/syscalls.2:322 build/C/man2/syscalls.2:395 build/C/man2/syscalls.2:411 build/C/man2/syscalls.2:424 build/C/man2/syscalls.2:601
15547 #: build/C/man2/syscalls.2:175
15549 msgid "B<bind>(2)\t2.0\tSee notes on B<socketcall>(2)\n"
15553 #: build/C/man2/syscalls.2:176
15555 msgid "B<bpf>(2)\t3.18\n"
15559 #: build/C/man2/syscalls.2:177
15561 msgid "B<brk>(2)\t1.0\n"
15565 #: build/C/man2/syscalls.2:178
15567 msgid "B<cacheflush>(2)\t1.2\tNot on x86\n"
15571 #: build/C/man2/syscalls.2:179
15573 msgid "B<capget>(2)\t2.2\n"
15577 #: build/C/man2/syscalls.2:180
15579 msgid "B<capset>(2)\t2.2\n"
15583 #: build/C/man2/syscalls.2:181
15585 msgid "B<chdir>(2)\t1.0\n"
15589 #: build/C/man2/syscalls.2:182
15591 msgid "B<chmod>(2)\t1.0\n"
15595 #: build/C/man2/syscalls.2:183
15597 msgid "B<chown>(2)\t2.2\tT{\n"
15601 #: build/C/man2/syscalls.2:184 build/C/man2/syscalls.2:319
15603 msgid "See B<chown>(2) for\n"
15607 #: build/C/man2/syscalls.2:186 build/C/man2/syscalls.2:321
15609 msgid "version details\n"
15613 #: build/C/man2/syscalls.2:188
15615 msgid "B<chown32>(2)\t2.4\n"
15619 #: build/C/man2/syscalls.2:189
15621 msgid "B<chroot>(2)\t1.0\n"
15625 #: build/C/man2/syscalls.2:190
15627 msgid "B<clock_adjtime>(2)\t2.6.39\n"
15631 #: build/C/man2/syscalls.2:191
15633 msgid "B<clock_getres>(2)\t2.6\n"
15637 #: build/C/man2/syscalls.2:192
15639 msgid "B<clock_gettime>(2)\t2.6\n"
15643 #: build/C/man2/syscalls.2:193
15645 msgid "B<clock_nanosleep>(2)\t2.6\n"
15649 #: build/C/man2/syscalls.2:194
15651 msgid "B<clock_settime>(2)\t2.6\n"
15655 #: build/C/man2/syscalls.2:195
15657 msgid "B<clone>(2)\t1.0\n"
15661 #: build/C/man2/syscalls.2:196
15663 msgid "B<close>(2)\t1.0\n"
15667 #: build/C/man2/syscalls.2:197
15669 msgid "B<connect>(2)\t2.0\tSee notes on B<socketcall>(2)\n"
15673 #: build/C/man2/syscalls.2:198
15675 msgid "B<creat>(2)\t1.0\n"
15679 #: build/C/man2/syscalls.2:199
15681 msgid "B<create_module>(2)\t1.0\tRemoved in 2.6\n"
15685 #: build/C/man2/syscalls.2:200
15687 msgid "B<delete_module>(2)\t1.0\n"
15691 #: build/C/man2/syscalls.2:201
15693 msgid "B<dup>(2)\t1.0\n"
15697 #: build/C/man2/syscalls.2:202
15699 msgid "B<dup2>(2)\t1.0\n"
15703 #: build/C/man2/syscalls.2:203
15705 msgid "B<dup3>(2)\t2.6.27\n"
15709 #: build/C/man2/syscalls.2:204
15711 msgid "B<epoll_create>(2)\t2.6\n"
15715 #: build/C/man2/syscalls.2:205
15717 msgid "B<epoll_create1>(2)\t2.6.27\n"
15721 #: build/C/man2/syscalls.2:206
15723 msgid "B<epoll_ctl>(2)\t2.6\n"
15727 #: build/C/man2/syscalls.2:207
15729 msgid "B<epoll_pwait>(2)\t2.6.19\n"
15733 #: build/C/man2/syscalls.2:208
15735 msgid "B<epoll_wait>(2)\t2.6\n"
15739 #: build/C/man2/syscalls.2:209
15741 msgid "B<eventfd>(2)\t2.6.22\n"
15745 #: build/C/man2/syscalls.2:210
15747 msgid "B<eventfd2>(2)\t2.6.27\n"
15751 #: build/C/man2/syscalls.2:211
15753 msgid "B<execve>(2)\t1.0\n"
15757 #: build/C/man2/syscalls.2:212
15759 msgid "B<execveat>(2)\t3.19\n"
15763 #: build/C/man2/syscalls.2:213
15765 msgid "B<exit>(2)\t1.0\n"
15769 #: build/C/man2/syscalls.2:214
15771 msgid "B<exit_group>(2)\t2.6\n"
15775 #: build/C/man2/syscalls.2:215
15777 msgid "B<faccessat>(2)\t2.6.16\n"
15781 #: build/C/man2/syscalls.2:216
15783 msgid "B<fadvise64>(2)\t2.6\n"
15786 #. Implements \fBposix_fadvise\fP(2)
15788 #: build/C/man2/syscalls.2:218
15790 msgid "B<fadvise64_64>(2)\t2.6\n"
15794 #: build/C/man2/syscalls.2:219
15796 msgid "B<fallocate>(2)\t2.6.23\n"
15800 #: build/C/man2/syscalls.2:220
15802 msgid "B<fanotify_init>(2)\t2.6.37\n"
15806 #: build/C/man2/syscalls.2:221
15808 msgid "B<fanotify_mark>(2)\t2.6.37\n"
15811 #. The fanotify calls were added in Linux 2.6.36,
15812 #. but disabled while the API was finalized.
15814 #: build/C/man2/syscalls.2:224
15816 msgid "B<fchdir>(2)\t1.0\n"
15820 #: build/C/man2/syscalls.2:225
15822 msgid "B<fchmod>(2)\t1.0\n"
15826 #: build/C/man2/syscalls.2:226
15828 msgid "B<fchmodat>(2)\t2.6.16\n"
15832 #: build/C/man2/syscalls.2:227
15834 msgid "B<fchown>(2)\t1.0\n"
15838 #: build/C/man2/syscalls.2:228
15840 msgid "B<fchown32>(2)\t2.4\n"
15844 #: build/C/man2/syscalls.2:229
15846 msgid "B<fchownat>(2)\t2.6.16\n"
15850 #: build/C/man2/syscalls.2:230
15852 msgid "B<fcntl>(2)\t1.0\n"
15856 #: build/C/man2/syscalls.2:231
15858 msgid "B<fcntl64>(2)\t2.4\n"
15862 #: build/C/man2/syscalls.2:232
15864 msgid "B<fdatasync>(2)\t2.0\n"
15868 #: build/C/man2/syscalls.2:233
15870 msgid "B<fgetxattr>(2)\t2.6; 2.4.18\n"
15874 #: build/C/man2/syscalls.2:234
15876 msgid "B<finit_module>(2)\t3.8\n"
15880 #: build/C/man2/syscalls.2:235
15882 msgid "B<flistxattr>(2)\t2.6; 2.4.18\n"
15886 #: build/C/man2/syscalls.2:236
15888 msgid "B<flock>(2)\t2.0\n"
15892 #: build/C/man2/syscalls.2:237
15894 msgid "B<fork>(2)\t1.0\n"
15898 #: build/C/man2/syscalls.2:238
15900 msgid "B<free_hugepages>(2)\t2.5.36\tRemoved in 2.5.44\n"
15904 #: build/C/man2/syscalls.2:239
15906 msgid "B<fremovexattr>(2)\t2.6; 2.4.18\n"
15910 #: build/C/man2/syscalls.2:240
15912 msgid "B<fsetxattr>(2)\t2.6; 2.4.18\n"
15916 #: build/C/man2/syscalls.2:241
15918 msgid "B<fstat>(2)\t1.0\n"
15922 #: build/C/man2/syscalls.2:242
15924 msgid "B<fstat64>(2)\t2.4\n"
15928 #: build/C/man2/syscalls.2:243
15930 msgid "B<fstatat64>(2)\t2.6.16\n"
15934 #: build/C/man2/syscalls.2:244
15936 msgid "B<fstatfs>(2)\t1.0\n"
15940 #: build/C/man2/syscalls.2:245
15942 msgid "B<fstatfs64>(2)\t2.6\n"
15946 #: build/C/man2/syscalls.2:246
15948 msgid "B<fsync>(2)\t1.0\n"
15952 #: build/C/man2/syscalls.2:247
15954 msgid "B<ftruncate>(2)\t1.0\n"
15958 #: build/C/man2/syscalls.2:248
15960 msgid "B<ftruncate64>(2)\t2.4\n"
15964 #: build/C/man2/syscalls.2:249
15966 msgid "B<futex>(2)\t2.6\n"
15970 #: build/C/man2/syscalls.2:250
15972 msgid "B<futimesat>(2)\t2.6.16\n"
15976 #: build/C/man2/syscalls.2:251
15978 msgid "B<get_kernel_syms>(2)\t1.0\tRemoved in 2.6\n"
15982 #: build/C/man2/syscalls.2:252
15984 msgid "B<get_mempolicy>(2)\t2.6.6\n"
15988 #: build/C/man2/syscalls.2:253
15990 msgid "B<get_robust_list>(2)\t2.6.17\n"
15994 #: build/C/man2/syscalls.2:254
15996 msgid "B<get_thread_area>(2)\t2.6\n"
16000 #: build/C/man2/syscalls.2:255
16002 msgid "B<getcpu>(2)\t2.6.19\n"
16006 #: build/C/man2/syscalls.2:256
16008 msgid "B<getcwd>(2)\t2.2\n"
16012 #: build/C/man2/syscalls.2:257
16014 msgid "B<getdents>(2)\t2.0\n"
16018 #: build/C/man2/syscalls.2:258
16020 msgid "B<getdents64>(2)\t2.4\n"
16024 #: build/C/man2/syscalls.2:259
16026 msgid "B<getegid>(2)\t1.0\n"
16030 #: build/C/man2/syscalls.2:260
16032 msgid "B<getegid32>(2)\t2.4\n"
16036 #: build/C/man2/syscalls.2:261
16038 msgid "B<geteuid>(2)\t1.0\n"
16042 #: build/C/man2/syscalls.2:262
16044 msgid "B<geteuid32>(2)\t2.4\n"
16048 #: build/C/man2/syscalls.2:263
16050 msgid "B<getgid>(2)\t1.0\n"
16054 #: build/C/man2/syscalls.2:264
16056 msgid "B<getgid32>(2)\t2.4\n"
16060 #: build/C/man2/syscalls.2:265
16062 msgid "B<getgroups>(2)\t1.0\n"
16066 #: build/C/man2/syscalls.2:266
16068 msgid "B<getgroups32>(2)\t2.4\n"
16072 #: build/C/man2/syscalls.2:267
16074 msgid "B<getitimer>(2)\t1.0\n"
16078 #: build/C/man2/syscalls.2:268
16080 msgid "B<getpeername>(2)\t2.0\tSee notes on B<socketcall>(2)\n"
16084 #: build/C/man2/syscalls.2:269
16086 msgid "B<getpagesize>(2)\t2.0\tNot on x86\n"
16090 #: build/C/man2/syscalls.2:270
16092 msgid "B<getpgid>(2)\t1.0\n"
16096 #: build/C/man2/syscalls.2:271
16098 msgid "B<getpgrp>(2)\t1.0\n"
16102 #: build/C/man2/syscalls.2:272
16104 msgid "B<getpid>(2)\t1.0\n"
16108 #: build/C/man2/syscalls.2:273
16110 msgid "B<getppid>(2)\t1.0\n"
16114 #: build/C/man2/syscalls.2:274
16116 msgid "B<getpriority>(2)\t1.0\n"
16120 #: build/C/man2/syscalls.2:275
16122 msgid "B<getrandom>(2)\t3.17\n"
16126 #: build/C/man2/syscalls.2:276
16128 msgid "B<getresgid>(2)\t2.2\n"
16132 #: build/C/man2/syscalls.2:277
16134 msgid "B<getresgid32>(2)\t2.4\n"
16138 #: build/C/man2/syscalls.2:278
16140 msgid "B<getresuid>(2)\t2.2\n"
16144 #: build/C/man2/syscalls.2:279
16146 msgid "B<getresuid32>(2)\t2.4\n"
16150 #: build/C/man2/syscalls.2:280
16152 msgid "B<getrlimit>(2)\t1.0\n"
16156 #: build/C/man2/syscalls.2:281
16158 msgid "B<getrusage>(2)\t1.0\n"
16162 #: build/C/man2/syscalls.2:282
16164 msgid "B<getsid>(2)\t2.0\n"
16168 #: build/C/man2/syscalls.2:283
16170 msgid "B<getsockname>(2)\t2.0\tSee notes on B<socketcall>(2)\n"
16174 #: build/C/man2/syscalls.2:284
16176 msgid "B<getsockopt>(2)\t2.0\tSee notes on B<socketcall>(2)\n"
16180 #: build/C/man2/syscalls.2:285
16182 msgid "B<gettid>(2)\t2.4.11\n"
16186 #: build/C/man2/syscalls.2:286
16188 msgid "B<gettimeofday>(2)\t1.0\n"
16192 #: build/C/man2/syscalls.2:287
16194 msgid "B<getuid>(2)\t1.0\n"
16198 #: build/C/man2/syscalls.2:288
16200 msgid "B<getuid32>(2)\t2.4\n"
16203 #. \fBgetunwind\fP(2) 2.4.8 ia64; DEPRECATED
16205 #: build/C/man2/syscalls.2:290
16207 msgid "B<getxattr>(2)\t2.6; 2.4.18\n"
16211 #: build/C/man2/syscalls.2:291
16213 msgid "B<init_module>(2)\t1.0\n"
16217 #: build/C/man2/syscalls.2:292
16219 msgid "B<inotify_add_watch>(2)\t2.6.13\n"
16223 #: build/C/man2/syscalls.2:293
16225 msgid "B<inotify_init>(2)\t2.6.13\n"
16229 #: build/C/man2/syscalls.2:294
16231 msgid "B<inotify_init1>(2)\t2.6.27\n"
16235 #: build/C/man2/syscalls.2:295
16237 msgid "B<inotify_rm_watch>(2)\t2.6.13\n"
16241 #: build/C/man2/syscalls.2:296
16243 msgid "B<io_cancel>(2)\t2.6\n"
16247 #: build/C/man2/syscalls.2:297
16249 msgid "B<io_destroy>(2)\t2.6\n"
16253 #: build/C/man2/syscalls.2:298
16255 msgid "B<io_getevents>(2)\t2.6\n"
16259 #: build/C/man2/syscalls.2:299
16261 msgid "B<io_setup>(2)\t2.6\n"
16265 #: build/C/man2/syscalls.2:300
16267 msgid "B<io_submit>(2)\t2.6\n"
16271 #: build/C/man2/syscalls.2:301
16273 msgid "B<ioctl>(2)\t1.0\n"
16277 #: build/C/man2/syscalls.2:302
16279 msgid "B<ioperm>(2)\t1.0\n"
16283 #: build/C/man2/syscalls.2:303
16285 msgid "B<iopl>(2)\t1.0\n"
16289 #: build/C/man2/syscalls.2:304
16291 msgid "B<ioprio_get>(2)\t2.6.13\n"
16295 #: build/C/man2/syscalls.2:305
16297 msgid "B<ioprio_set>(2)\t2.6.13\n"
16301 #: build/C/man2/syscalls.2:306
16303 msgid "B<ipc>(2)\t1.0\n"
16306 #. Implements System V IPC calls
16308 #: build/C/man2/syscalls.2:308
16310 msgid "B<kcmp>(2)\t3.5\n"
16314 #: build/C/man2/syscalls.2:309
16316 msgid "B<kern_features>(2)\t3.7\tSparc64\n"
16319 #. FIXME . document kern_features():
16320 #. commit 517ffce4e1a03aea979fe3a18a3dd1761a24fafb
16322 #: build/C/man2/syscalls.2:312
16324 msgid "B<kexec_file_load>(2)\t3.17\n"
16328 #: build/C/man2/syscalls.2:313
16330 msgid "B<kexec_load>(2)\t2.6.13\n"
16333 #. The entry in the syscall table was reserved starting in 2.6.7
16334 #. Was named sys_kexec_load() from 2.6.7 to 2.6.16
16336 #: build/C/man2/syscalls.2:316
16338 msgid "B<keyctl>(2)\t2.6.11\n"
16342 #: build/C/man2/syscalls.2:317
16344 msgid "B<kill>(2)\t1.0\n"
16348 #: build/C/man2/syscalls.2:318
16350 msgid "B<lchown>(2)\t1.0\tT{\n"
16354 #: build/C/man2/syscalls.2:323
16356 msgid "B<lchown32>(2)\t2.4\n"
16360 #: build/C/man2/syscalls.2:324
16362 msgid "B<lgetxattr>(2)\t2.6; 2.4.18\n"
16366 #: build/C/man2/syscalls.2:325
16368 msgid "B<link>(2)\t1.0\n"
16372 #: build/C/man2/syscalls.2:326
16374 msgid "B<linkat>(2)\t2.6.16\n"
16378 #: build/C/man2/syscalls.2:327
16380 msgid "B<listen>(2)\t2.0\tSee notes on B<socketcall>(2)\n"
16384 #: build/C/man2/syscalls.2:328
16386 msgid "B<listxattr>(2)\t2.6; 2.4.18\n"
16390 #: build/C/man2/syscalls.2:329
16392 msgid "B<llistxattr>(2)\t2.6; 2.4.18\n"
16396 #: build/C/man2/syscalls.2:330
16398 msgid "B<lookup_dcookie>(2)\t2.6\n"
16402 #: build/C/man2/syscalls.2:331
16404 msgid "B<lremovexattr>(2)\t2.6; 2.4.18\n"
16408 #: build/C/man2/syscalls.2:332
16410 msgid "B<lseek>(2)\t1.0\n"
16414 #: build/C/man2/syscalls.2:333
16416 msgid "B<lsetxattr>(2)\t2.6; 2.4.18\n"
16420 #: build/C/man2/syscalls.2:334
16422 msgid "B<lstat>(2)\t1.0\n"
16426 #: build/C/man2/syscalls.2:335
16428 msgid "B<lstat64>(2)\t2.4\n"
16432 #: build/C/man2/syscalls.2:336
16434 msgid "B<madvise>(2)\t2.4\n"
16438 #: build/C/man2/syscalls.2:337
16440 msgid "B<mbind>(2)\t2.6.6\n"
16443 #. \fBmemory_ordering\fP(2) ??? Sparc64
16445 #: build/C/man2/syscalls.2:339
16447 msgid "B<memfd_create>(2)\t3.17\n"
16451 #: build/C/man2/syscalls.2:340
16453 msgid "B<migrate_pages>(2)\t2.6.16\n"
16457 #: build/C/man2/syscalls.2:341
16459 msgid "B<mincore>(2)\t2.4\n"
16463 #: build/C/man2/syscalls.2:342
16465 msgid "B<mkdir>(2)\t1.0\n"
16469 #: build/C/man2/syscalls.2:343
16471 msgid "B<mkdirat>(2)\t2.6.16\n"
16475 #: build/C/man2/syscalls.2:344
16477 msgid "B<mknod>(2)\t1.0\n"
16481 #: build/C/man2/syscalls.2:345
16483 msgid "B<mknodat>(2)\t2.6.16\n"
16487 #: build/C/man2/syscalls.2:346
16489 msgid "B<mlock>(2)\t2.0\n"
16493 #: build/C/man2/syscalls.2:347
16495 msgid "B<mlockall>(2)\t2.0\n"
16499 #: build/C/man2/syscalls.2:348
16501 msgid "B<mmap>(2)\t1.0\n"
16505 #: build/C/man2/syscalls.2:349
16507 msgid "B<mmap2>(2)\t2.4\n"
16511 #: build/C/man2/syscalls.2:350
16513 msgid "B<modify_ldt>(2)\t1.0\n"
16517 #: build/C/man2/syscalls.2:351
16519 msgid "B<mount>(2)\t1.0\n"
16523 #: build/C/man2/syscalls.2:352
16525 msgid "B<move_pages>(2)\t2.6.18\n"
16529 #: build/C/man2/syscalls.2:353
16531 msgid "B<mprotect>(2)\t1.0\n"
16535 #: build/C/man2/syscalls.2:354
16537 msgid "B<mq_getsetattr>(2)\t2.6.6\n"
16540 #. Implements \fBmq_getattr\fP(3) and \fBmq_setattr\fP(3)
16542 #: build/C/man2/syscalls.2:356
16544 msgid "B<mq_notify>(2)\t2.6.6\n"
16548 #: build/C/man2/syscalls.2:357
16550 msgid "B<mq_open>(2)\t2.6.6\n"
16554 #: build/C/man2/syscalls.2:358
16556 msgid "B<mq_timedreceive>(2)\t2.6.6\n"
16560 #: build/C/man2/syscalls.2:359
16562 msgid "B<mq_timedsend>(2)\t2.6.6\n"
16566 #: build/C/man2/syscalls.2:360
16568 msgid "B<mq_unlink>(2)\t2.6.6\n"
16572 #: build/C/man2/syscalls.2:361
16574 msgid "B<mremap>(2)\t2.0\n"
16578 #: build/C/man2/syscalls.2:362
16580 msgid "B<msgctl>(2)\t2.0\tSee notes on B<ipc>(2)\n"
16584 #: build/C/man2/syscalls.2:363
16586 msgid "B<msgget>(2)\t2.0\tSee notes on B<ipc>(2)\n"
16590 #: build/C/man2/syscalls.2:364
16592 msgid "B<msgrcv>(2)\t2.0\tSee notes on B<ipc>(2)\n"
16596 #: build/C/man2/syscalls.2:365
16598 msgid "B<msgsnd>(2)\t2.0\tSee notes on B<ipc>(2)\n"
16602 #: build/C/man2/syscalls.2:366
16604 msgid "B<msync>(2)\t2.0\n"
16607 #. \fBmultiplexer\fP(2) ?? __NR_multiplexer reserved on
16608 #. PowerPC, but unimplemented?
16610 #: build/C/man2/syscalls.2:369
16612 msgid "B<munlock>(2)\t2.0\n"
16616 #: build/C/man2/syscalls.2:370
16618 msgid "B<munlockall>(2)\t2.0\n"
16622 #: build/C/man2/syscalls.2:371
16624 msgid "B<munmap>(2)\t1.0\n"
16628 #: build/C/man2/syscalls.2:372
16630 msgid "B<name_to_handle_at>(2)\t2.6.39\n"
16634 #: build/C/man2/syscalls.2:373
16636 msgid "B<nanosleep>(2)\t2.0\n"
16640 #: build/C/man2/syscalls.2:374
16642 msgid "B<nfsservctl>(2)\t2.2\tRemoved in 3.1\n"
16646 #: build/C/man2/syscalls.2:375
16648 msgid "B<nice>(2)\t1.0\n"
16652 #: build/C/man2/syscalls.2:376
16654 msgid "B<oldfstat>(2)\t1.0\n"
16658 #: build/C/man2/syscalls.2:377
16660 msgid "B<oldlstat>(2)\t1.0\n"
16664 #: build/C/man2/syscalls.2:378
16666 msgid "B<oldolduname>(2)\t1.0\n"
16670 #: build/C/man2/syscalls.2:379
16672 msgid "B<oldstat>(2)\t1.0\n"
16676 #: build/C/man2/syscalls.2:380
16678 msgid "B<olduname>(2)\t1.0\n"
16682 #: build/C/man2/syscalls.2:381
16684 msgid "B<open>(2)\t1.0\n"
16688 #: build/C/man2/syscalls.2:382
16690 msgid "B<open_by_handle_at>(2)\t2.6.39\n"
16694 #: build/C/man2/syscalls.2:383
16696 msgid "B<openat>(2)\t2.6.16\n"
16700 #: build/C/man2/syscalls.2:384
16702 msgid "B<pause>(2)\t1.0\n"
16706 #: build/C/man2/syscalls.2:385
16708 msgid "B<pciconfig_iobase>(2)\t2.2.15; 2.4\tNot on x86\n"
16711 #. Alpha, PowerPC, ARM; not x86
16713 #: build/C/man2/syscalls.2:387
16715 msgid "B<pciconfig_read>(2)\t2.0.26; 2.2\tNot on x86\n"
16718 #. , PowerPC, ARM; not x86
16720 #: build/C/man2/syscalls.2:389
16722 msgid "B<pciconfig_write>(2)\t2.0.26; 2.2\tNot on x86\n"
16725 #. , PowerPC, ARM; not x86
16727 #: build/C/man2/syscalls.2:391
16729 msgid "B<perf_event_open>(2)\t2.6.31\tT{\n"
16733 #: build/C/man2/syscalls.2:392
16735 msgid "Was perf_counter_open() in\n"
16739 #: build/C/man2/syscalls.2:394
16741 msgid "2.6.31; renamed in 2.6.32\n"
16745 #: build/C/man2/syscalls.2:396
16747 msgid "B<personality>(2)\t1.2\n"
16751 #: build/C/man2/syscalls.2:397
16753 msgid "B<perfctr>(2)\t2.2\tSparc; removed in 2.6.34\n"
16756 #. commit c7d5a0050773e98d1094eaa9f2a1a793fafac300 removed perfctr()
16758 #: build/C/man2/syscalls.2:399
16760 msgid "B<perfmonctl>(2)\t2.4\tia64\n"
16764 #: build/C/man2/syscalls.2:400
16766 msgid "B<pipe>(2)\t1.0\n"
16770 #: build/C/man2/syscalls.2:401
16772 msgid "B<pipe2>(2)\t2.6.27\n"
16776 #: build/C/man2/syscalls.2:402
16778 msgid "B<pivot_root>(2)\t2.4\n"
16782 #: build/C/man2/syscalls.2:403
16784 msgid "B<poll>(2)\t2.0.36; 2.2\n"
16788 #: build/C/man2/syscalls.2:404
16790 msgid "B<ppc_rtas>(2)\t2.6.2\tPowerPC only\n"
16794 #: build/C/man2/syscalls.2:405
16796 msgid "B<ppoll>(2)\t2.6.16\n"
16800 #: build/C/man2/syscalls.2:406
16802 msgid "B<prctl>(2)\t2.2\n"
16806 #: build/C/man2/syscalls.2:407
16808 msgid "B<pread64>(2)\t\tT{\n"
16812 #: build/C/man2/syscalls.2:408
16814 msgid "Added as \"pread\" in 2.2;\n"
16818 #: build/C/man2/syscalls.2:410
16820 msgid "renamed \"pread64\" in 2.6\n"
16824 #: build/C/man2/syscalls.2:412
16826 msgid "B<preadv>(2)\t2.6.30\n"
16830 #: build/C/man2/syscalls.2:413
16832 msgid "B<prlimit>(2)\t2.6.36\n"
16836 #: build/C/man2/syscalls.2:414
16838 msgid "B<prlimit64>(2)\t2.6.36\n"
16842 #: build/C/man2/syscalls.2:415
16844 msgid "B<process_vm_readv>(2)\t3.2\n"
16848 #: build/C/man2/syscalls.2:416
16850 msgid "B<process_vm_writev>(2)\t3.2\n"
16854 #: build/C/man2/syscalls.2:417
16856 msgid "B<pselect6>(2)\t2.6.16\n"
16859 #. Implements \fBpselect\fP(2)
16861 #: build/C/man2/syscalls.2:419
16863 msgid "B<ptrace>(2)\t1.0\n"
16867 #: build/C/man2/syscalls.2:420
16869 msgid "B<pwrite64>(2)\t\tT{\n"
16873 #: build/C/man2/syscalls.2:421
16875 msgid "Added as \"pwrite\" in 2.2;\n"
16879 #: build/C/man2/syscalls.2:423
16881 msgid "renamed \"pwrite64\" in 2.6\n"
16885 #: build/C/man2/syscalls.2:425
16887 msgid "B<pwritev>(2)\t2.6.30\n"
16891 #: build/C/man2/syscalls.2:426
16893 msgid "B<query_module>(2)\t2.2\tRemoved in 2.6\n"
16897 #: build/C/man2/syscalls.2:427
16899 msgid "B<quotactl>(2)\t1.0\n"
16903 #: build/C/man2/syscalls.2:428
16905 msgid "B<read>(2)\t1.0\n"
16909 #: build/C/man2/syscalls.2:429
16911 msgid "B<readahead>(2)\t2.4.13\n"
16915 #: build/C/man2/syscalls.2:430
16917 msgid "B<readdir>(2)\t1.0\n"
16920 #. Supersedes \fBgetdents\fP(2)
16922 #: build/C/man2/syscalls.2:432
16924 msgid "B<readlink>(2)\t1.0\n"
16928 #: build/C/man2/syscalls.2:433
16930 msgid "B<readlinkat>(2)\t2.6.16\n"
16934 #: build/C/man2/syscalls.2:434
16936 msgid "B<readv>(2)\t2.0\n"
16940 #: build/C/man2/syscalls.2:435
16942 msgid "B<reboot>(2)\t1.0\n"
16946 #: build/C/man2/syscalls.2:436
16948 msgid "B<recv>(2)\t2.0\tSee notes on B<socketcall>(2)\n"
16952 #: build/C/man2/syscalls.2:437
16954 msgid "B<recvfrom>(2)\t2.0\tSee notes on B<socketcall>(2)\n"
16958 #: build/C/man2/syscalls.2:438
16960 msgid "B<recvmsg>(2)\t2.0\tSee notes on B<socketcall>(2)\n"
16964 #: build/C/man2/syscalls.2:439
16966 msgid "B<recvmmsg>(2)\t2.6.33\n"
16970 #: build/C/man2/syscalls.2:440
16972 msgid "B<remap_file_pages>(2)\t2.6\tDeprecated since 3.16\n"
16976 #: build/C/man2/syscalls.2:441
16978 msgid "B<removexattr>(2)\t2.6; 2.4.18\n"
16982 #: build/C/man2/syscalls.2:442
16984 msgid "B<rename>(2)\t1.0\n"
16988 #: build/C/man2/syscalls.2:443
16990 msgid "B<renameat>(2)\t2.6.16\n"
16994 #: build/C/man2/syscalls.2:444
16996 msgid "B<renameat2>(2)\t3.15\n"
17000 #: build/C/man2/syscalls.2:445
17002 msgid "B<request_key>(2)\t2.6.11\n"
17006 #: build/C/man2/syscalls.2:446
17008 msgid "B<restart_syscall>(2)\t2.6\n"
17012 #: build/C/man2/syscalls.2:447
17014 msgid "B<rmdir>(2)\t1.0\n"
17018 #: build/C/man2/syscalls.2:448
17020 msgid "B<rt_sigaction>(2)\t2.2\n"
17024 #: build/C/man2/syscalls.2:449
17026 msgid "B<rt_sigpending>(2)\t2.2\n"
17030 #: build/C/man2/syscalls.2:450
17032 msgid "B<rt_sigprocmask>(2)\t2.2\n"
17036 #: build/C/man2/syscalls.2:451
17038 msgid "B<rt_sigqueueinfo>(2)\t2.2\n"
17042 #: build/C/man2/syscalls.2:452
17044 msgid "B<rt_sigreturn>(2)\t2.2\n"
17048 #: build/C/man2/syscalls.2:453
17050 msgid "B<rt_sigsuspend>(2)\t2.2\n"
17054 #: build/C/man2/syscalls.2:454
17056 msgid "B<rt_sigtimedwait>(2)\t2.2\n"
17060 #: build/C/man2/syscalls.2:455
17062 msgid "B<rt_tgsigqueueinfo>(2)\t2.6.31\n"
17066 #: build/C/man2/syscalls.2:456
17068 msgid "B<s390_runtime_instr>(2)\t3.7\ts390 only\n"
17072 #: build/C/man2/syscalls.2:457
17074 msgid "B<s390_pci_mmio_read>(2)\t3.19\ts390 only\n"
17078 #: build/C/man2/syscalls.2:458
17080 msgid "B<s390_pci_mmio_write>(2)\t3.19\ts390 only\n"
17084 #: build/C/man2/syscalls.2:459
17086 msgid "B<sched_get_priority_max>(2)\t2.0\n"
17090 #: build/C/man2/syscalls.2:460
17092 msgid "B<sched_get_priority_min>(2)\t2.0\n"
17096 #: build/C/man2/syscalls.2:461
17098 msgid "B<sched_getaffinity>(2)\t2.6\n"
17102 #: build/C/man2/syscalls.2:462
17104 msgid "B<sched_getattr>(2)\t3.14\n"
17108 #: build/C/man2/syscalls.2:463
17110 msgid "B<sched_getparam>(2)\t2.0\n"
17114 #: build/C/man2/syscalls.2:464
17116 msgid "B<sched_getscheduler>(2)\t2.0\n"
17120 #: build/C/man2/syscalls.2:465
17122 msgid "B<sched_rr_get_interval>(2)\t2.0\n"
17126 #: build/C/man2/syscalls.2:466
17128 msgid "B<sched_setaffinity>(2)\t2.6\n"
17132 #: build/C/man2/syscalls.2:467
17134 msgid "B<sched_setattr>(2)\t3.14\n"
17138 #: build/C/man2/syscalls.2:468
17140 msgid "B<sched_setparam>(2)\t2.0\n"
17144 #: build/C/man2/syscalls.2:469
17146 msgid "B<sched_setscheduler>(2)\t2.0\n"
17150 #: build/C/man2/syscalls.2:470
17152 msgid "B<sched_yield>(2)\t2.0\n"
17156 #: build/C/man2/syscalls.2:471
17158 msgid "B<seccomp>(2)\t3.17\n"
17162 #: build/C/man2/syscalls.2:472
17164 msgid "B<select>(2)\t1.0\n"
17168 #: build/C/man2/syscalls.2:473
17170 msgid "B<semctl>(2)\t2.0\tSee notes on B<ipc>(2)\n"
17174 #: build/C/man2/syscalls.2:474
17176 msgid "B<semget>(2)\t2.0\tSee notes on B<ipc>(2)\n"
17180 #: build/C/man2/syscalls.2:475
17182 msgid "B<semop>(2)\t2.0\tSee notes on B<ipc>(2)\n"
17186 #: build/C/man2/syscalls.2:476
17188 msgid "B<semtimedop>(2)\t2.6; 2.4.22\n"
17192 #: build/C/man2/syscalls.2:477
17194 msgid "B<send>(2)\t2.0\tSee notes on B<socketcall>(2)\n"
17198 #: build/C/man2/syscalls.2:478
17200 msgid "B<sendfile>(2)\t2.2\n"
17204 #: build/C/man2/syscalls.2:479
17206 msgid "B<sendfile64>(2)\t2.6; 2.4.19\n"
17210 #: build/C/man2/syscalls.2:480
17212 msgid "B<sendmmsg>(2)\t3.0\n"
17216 #: build/C/man2/syscalls.2:481
17218 msgid "B<sendmsg>(2)\t2.0\tSee notes on B<socketcall>(2)\n"
17222 #: build/C/man2/syscalls.2:482
17224 msgid "B<sendto>(2)\t2.0\tSee notes on B<socketcall>(2)\n"
17228 #: build/C/man2/syscalls.2:483
17230 msgid "B<set_mempolicy>(2)\t2.6.6\n"
17234 #: build/C/man2/syscalls.2:484
17236 msgid "B<set_robust_list>(2)\t2.6.17\n"
17240 #: build/C/man2/syscalls.2:485
17242 msgid "B<set_thread_area>(2)\t2.6\n"
17246 #: build/C/man2/syscalls.2:486
17248 msgid "B<set_tid_address>(2)\t2.6\n"
17251 #. See http://lkml.org/lkml/2005/8/1/83
17252 #. "[PATCH] remove sys_set_zone_reclaim()"
17254 #: build/C/man2/syscalls.2:489
17256 msgid "B<setdomainname>(2)\t1.0\n"
17260 #: build/C/man2/syscalls.2:490
17262 msgid "B<setfsgid>(2)\t1.2\n"
17266 #: build/C/man2/syscalls.2:491
17268 msgid "B<setfsgid32>(2)\t2.4\n"
17272 #: build/C/man2/syscalls.2:492
17274 msgid "B<setfsuid>(2)\t1.2\n"
17278 #: build/C/man2/syscalls.2:493
17280 msgid "B<setfsuid32>(2)\t2.4\n"
17284 #: build/C/man2/syscalls.2:494
17286 msgid "B<setgid>(2)\t1.0\n"
17290 #: build/C/man2/syscalls.2:495
17292 msgid "B<setgid32>(2)\t2.4\n"
17296 #: build/C/man2/syscalls.2:496
17298 msgid "B<setgroups>(2)\t1.0\n"
17302 #: build/C/man2/syscalls.2:497
17304 msgid "B<setgroups32>(2)\t2.4\n"
17308 #: build/C/man2/syscalls.2:498
17310 msgid "B<sethostname>(2)\t1.0\n"
17314 #: build/C/man2/syscalls.2:499
17316 msgid "B<setitimer>(2)\t1.0\n"
17320 #: build/C/man2/syscalls.2:500
17322 msgid "B<setns>(2)\t3.0\n"
17326 #: build/C/man2/syscalls.2:501
17328 msgid "B<setpgid>(2)\t1.0\n"
17332 #: build/C/man2/syscalls.2:502
17334 msgid "B<setpriority>(2)\t1.0\n"
17338 #: build/C/man2/syscalls.2:503
17340 msgid "B<setregid>(2)\t1.0\n"
17344 #: build/C/man2/syscalls.2:504
17346 msgid "B<setregid32>(2)\t2.4\n"
17350 #: build/C/man2/syscalls.2:505
17352 msgid "B<setresgid>(2)\t2.2\n"
17356 #: build/C/man2/syscalls.2:506
17358 msgid "B<setresgid32>(2)\t2.4\n"
17362 #: build/C/man2/syscalls.2:507
17364 msgid "B<setresuid>(2)\t2.2\n"
17368 #: build/C/man2/syscalls.2:508
17370 msgid "B<setresuid32>(2)\t2.4\n"
17374 #: build/C/man2/syscalls.2:509
17376 msgid "B<setreuid>(2)\t1.0\n"
17380 #: build/C/man2/syscalls.2:510
17382 msgid "B<setreuid32>(2)\t2.4\n"
17386 #: build/C/man2/syscalls.2:511
17388 msgid "B<setrlimit>(2)\t1.0\n"
17392 #: build/C/man2/syscalls.2:512
17394 msgid "B<setsid>(2)\t1.0\n"
17398 #: build/C/man2/syscalls.2:513
17400 msgid "B<setsockopt>(2)\t2.0\tSee notes on B<socketcall>(2)\n"
17404 #: build/C/man2/syscalls.2:514
17406 msgid "B<settimeofday>(2)\t1.0\n"
17410 #: build/C/man2/syscalls.2:515
17412 msgid "B<setuid>(2)\t1.0\n"
17416 #: build/C/man2/syscalls.2:516
17418 msgid "B<setuid32>(2)\t2.4\n"
17422 #: build/C/man2/syscalls.2:517
17424 msgid "B<setup>(2)\t1.0\tRemoved in 2.2\n"
17428 #: build/C/man2/syscalls.2:518
17430 msgid "B<setxattr>(2)\t2.6; 2.4.18\n"
17434 #: build/C/man2/syscalls.2:519
17436 msgid "B<sgetmask>(2)\t1.0\n"
17440 #: build/C/man2/syscalls.2:520
17442 msgid "B<shmat>(2)\t2.0\tSee notes on B<ipc>(2)\n"
17446 #: build/C/man2/syscalls.2:521
17448 msgid "B<shmctl>(2)\t2.0\tSee notes on B<ipc>(2)\n"
17452 #: build/C/man2/syscalls.2:522
17454 msgid "B<shmdt>(2)\t2.0\tSee notes on B<ipc>(2)\n"
17458 #: build/C/man2/syscalls.2:523
17460 msgid "B<shmget>(2)\t2.0\tSee notes on B<ipc>(2)\n"
17464 #: build/C/man2/syscalls.2:524
17466 msgid "B<shutdown>(2)\t2.0\tSee notes on B<socketcall>(2)\n"
17470 #: build/C/man2/syscalls.2:525
17472 msgid "B<sigaction>(2)\t1.0\n"
17476 #: build/C/man2/syscalls.2:526
17478 msgid "B<sigaltstack>(2)\t2.2\n"
17482 #: build/C/man2/syscalls.2:527
17484 msgid "B<signal>(2)\t1.0\n"
17488 #: build/C/man2/syscalls.2:528
17490 msgid "B<signalfd>(2)\t2.6.22\n"
17494 #: build/C/man2/syscalls.2:529
17496 msgid "B<signalfd4>(2)\t2.6.27\n"
17500 #: build/C/man2/syscalls.2:530
17502 msgid "B<sigpending>(2)\t1.0\n"
17506 #: build/C/man2/syscalls.2:531
17508 msgid "B<sigprocmask>(2)\t1.0\n"
17512 #: build/C/man2/syscalls.2:532
17514 msgid "B<sigreturn>(2)\t1.0\n"
17518 #: build/C/man2/syscalls.2:533
17520 msgid "B<sigsuspend>(2)\t1.0\n"
17524 #: build/C/man2/syscalls.2:534
17526 msgid "B<socket>(2)\t2.0\tSee notes on B<socketcall>(2)\n"
17530 #: build/C/man2/syscalls.2:535
17532 msgid "B<socketcall>(2)\t1.0\n"
17535 #. Implements BSD socket calls
17537 #: build/C/man2/syscalls.2:537
17539 msgid "B<socketpair>(2)\t2.0\tSee notes on B<socketcall>(2)\n"
17543 #: build/C/man2/syscalls.2:538
17545 msgid "B<splice>(2)\t2.6.17\n"
17549 #: build/C/man2/syscalls.2:539
17551 msgid "B<spu_create>(2)\t2.6.16\tPowerPC only\n"
17555 #: build/C/man2/syscalls.2:540
17557 msgid "B<spu_run>(2)\t2.6.16\tPowerPC only\n"
17561 #: build/C/man2/syscalls.2:541
17563 msgid "B<ssetmask>(2)\t1.0\n"
17567 #: build/C/man2/syscalls.2:542
17569 msgid "B<stat>(2)\t1.0\n"
17573 #: build/C/man2/syscalls.2:543
17575 msgid "B<stat64>(2)\t2.4\n"
17579 #: build/C/man2/syscalls.2:544
17581 msgid "B<statfs>(2)\t1.0\n"
17585 #: build/C/man2/syscalls.2:545
17587 msgid "B<statfs64>(2)\t2.6\n"
17591 #: build/C/man2/syscalls.2:546
17593 msgid "B<stime>(2)\t1.0\n"
17597 #: build/C/man2/syscalls.2:547
17599 msgid "B<subpage_prot>(2)\t2.6.25\tPowerPC only\n"
17603 #: build/C/man2/syscalls.2:548
17605 msgid "B<swapoff>(2)\t1.0\n"
17609 #: build/C/man2/syscalls.2:549
17611 msgid "B<swapon>(2)\t1.0\n"
17615 #: build/C/man2/syscalls.2:550
17617 msgid "B<symlink>(2)\t1.0\n"
17621 #: build/C/man2/syscalls.2:551
17623 msgid "B<symlinkat>(2)\t2.6.16\n"
17627 #: build/C/man2/syscalls.2:552
17629 msgid "B<sync>(2)\t1.0\n"
17633 #: build/C/man2/syscalls.2:553
17635 msgid "B<sync_file_range>(2)\t2.6.17\n"
17639 #: build/C/man2/syscalls.2:554
17641 msgid "B<sync_file_range2>(2)\t2.6.22\n"
17644 #. PowerPC, ARM, tile
17645 #. First appeared on ARM, as arm_sync_file_range(), but later renamed
17646 #. \fBsys_debug_setcontext\fP(2) ??? PowerPC if CONFIG_PPC32
17648 #: build/C/man2/syscalls.2:558
17650 msgid "B<syncfs>(2)\t2.6.39\n"
17654 #: build/C/man2/syscalls.2:559
17656 msgid "B<sysfs>(2)\t1.2\n"
17660 #: build/C/man2/syscalls.2:560
17662 msgid "B<sysinfo>(2)\t1.0\n"
17666 #: build/C/man2/syscalls.2:561
17668 msgid "B<syslog>(2)\t1.0\n"
17671 #. glibc interface is \fBklogctl\fP(3)
17673 #: build/C/man2/syscalls.2:563
17675 msgid "B<tee>(2)\t2.6.17\n"
17679 #: build/C/man2/syscalls.2:564
17681 msgid "B<tgkill>(2)\t2.6\n"
17685 #: build/C/man2/syscalls.2:565
17687 msgid "B<time>(2)\t1.0\n"
17691 #: build/C/man2/syscalls.2:566
17693 msgid "B<timer_create>(2)\t2.6\n"
17697 #: build/C/man2/syscalls.2:567
17699 msgid "B<timer_delete>(2)\t2.6\n"
17703 #: build/C/man2/syscalls.2:568
17705 msgid "B<timer_getoverrun>(2)\t2.6\n"
17709 #: build/C/man2/syscalls.2:569
17711 msgid "B<timer_gettime>(2)\t2.6\n"
17715 #: build/C/man2/syscalls.2:570
17717 msgid "B<timer_settime>(2)\t2.6\n"
17721 #: build/C/man2/syscalls.2:571
17723 msgid "B<timerfd_create>(2)\t2.6.25\n"
17727 #: build/C/man2/syscalls.2:572
17729 msgid "B<timerfd_gettime>(2)\t2.6.25\n"
17733 #: build/C/man2/syscalls.2:573
17735 msgid "B<timerfd_settime>(2)\t2.6.25\n"
17739 #: build/C/man2/syscalls.2:574
17741 msgid "B<times>(2)\t1.0\n"
17745 #: build/C/man2/syscalls.2:575
17747 msgid "B<tkill>(2)\t2.6; 2.4.22\n"
17751 #: build/C/man2/syscalls.2:576
17753 msgid "B<truncate>(2)\t1.0\n"
17757 #: build/C/man2/syscalls.2:577
17759 msgid "B<truncate64>(2)\t2.4\n"
17763 #: build/C/man2/syscalls.2:578
17765 msgid "B<ugetrlimit>(2)\t2.4\n"
17769 #: build/C/man2/syscalls.2:579
17771 msgid "B<umask>(2)\t1.0\n"
17775 #: build/C/man2/syscalls.2:580
17777 msgid "B<umount>(2)\t1.0\n"
17780 #. sys_oldumount() -- __NR_umount
17782 #: build/C/man2/syscalls.2:582
17784 msgid "B<umount2>(2)\t2.2\n"
17787 #. sys_umount() -- __NR_umount2
17789 #: build/C/man2/syscalls.2:584
17791 msgid "B<uname>(2)\t1.0\n"
17795 #: build/C/man2/syscalls.2:585
17797 msgid "B<unlink>(2)\t1.0\n"
17801 #: build/C/man2/syscalls.2:586
17803 msgid "B<unlinkat>(2)\t2.6.16\n"
17807 #: build/C/man2/syscalls.2:587
17809 msgid "B<unshare>(2)\t2.6.16\n"
17813 #: build/C/man2/syscalls.2:588
17815 msgid "B<uselib>(2)\t1.0\n"
17819 #: build/C/man2/syscalls.2:589
17821 msgid "B<ustat>(2)\t1.0\n"
17825 #: build/C/man2/syscalls.2:590
17827 msgid "B<utime>(2)\t1.0\n"
17831 #: build/C/man2/syscalls.2:591
17833 msgid "B<utimensat>(2)\t2.6.22\n"
17837 #: build/C/man2/syscalls.2:592
17839 msgid "B<utimes>(2)\t2.2\n"
17843 #: build/C/man2/syscalls.2:593
17845 msgid "B<utrap_install>(2)\t2.2\tSparc only\n"
17848 #. FIXME . document utrap_install()
17849 #. There's a man page for Solaris 5.11
17851 #: build/C/man2/syscalls.2:596
17853 msgid "B<vfork>(2)\t2.2\n"
17857 #: build/C/man2/syscalls.2:597
17859 msgid "B<vhangup>(2)\t1.0\n"
17863 #: build/C/man2/syscalls.2:598
17865 msgid "B<vm86old>(2)\t1.0\tT{\n"
17869 #: build/C/man2/syscalls.2:599
17871 msgid "Was \"vm86\"; renamed in\n"
17875 #: build/C/man2/syscalls.2:600
17877 msgid "2.0.28/2.2\n"
17881 #: build/C/man2/syscalls.2:602
17883 msgid "B<vm86>(2)\t2.0.28; 2.2\n"
17887 #: build/C/man2/syscalls.2:603
17889 msgid "B<vmsplice>(2)\t2.6.17\n"
17893 #: build/C/man2/syscalls.2:604
17895 msgid "B<wait4>(2)\t1.0\n"
17899 #: build/C/man2/syscalls.2:605
17901 msgid "B<waitid>(2)\t2.6.10\n"
17905 #: build/C/man2/syscalls.2:606
17907 msgid "B<waitpid>(2)\t1.0\n"
17911 #: build/C/man2/syscalls.2:607
17913 msgid "B<write>(2)\t1.0\n"
17917 #: build/C/man2/syscalls.2:608
17919 msgid "B<writev>(2)\t2.0\n"
17922 #. type: Plain text
17923 #: build/C/man2/syscalls.2:617
17925 "On many platforms, including x86-32, socket calls are all multiplexed (via "
17926 "glibc wrapper functions) through B<socketcall>(2) and similarly System\\ V "
17927 "IPC calls are multiplexed through B<ipc>(2)."
17930 #. __NR_afs_syscall is 53 on Linux 2.6.22/i386
17931 #. __NR_break is 17 on Linux 2.6.22/i386
17932 #. __NR_ftime is 35 on Linux 2.6.22/i386
17933 #. __NR_getpmsg is 188 on Linux 2.6.22/i386
17934 #. __NR_gtty is 32 on Linux 2.6.22/i386
17935 #. __NR_idle is 112 on Linux 2.6.22/i386
17936 #. __NR_lock is 53 on Linux 2.6.22/i386
17937 #. __NR_madvise1 is 219 on Linux 2.6.22/i386
17938 #. __NR_mpx is 66 on Linux 2.6.22/i386
17939 #. Slot has been reused
17940 #. __NR_prof is 44 on Linux 2.6.22/i386
17941 #. __NR_profil is 98 on Linux 2.6.22/i386
17942 #. __NR_putpmsg is 189 on Linux 2.6.22/i386
17943 #. __NR_security is 223 on Linux 2.4/i386
17944 #. __NR_security is 223 on Linux 2.4/i386; absent on 2.6/i386, present
17945 #. on a couple of 2.6 architectures
17946 #. __NR_stty is 31 on Linux 2.6.22/i386
17947 #. The security call is for future use.
17948 #. __NR_tuxcall is 184 on x86_64, also on PPC and alpha
17949 #. __NR_ulimit is 58 on Linux 2.6.22/i386
17950 #. __NR_vserver is 273 on Linux 2.6.22/i386
17951 #. type: Plain text
17952 #: build/C/man2/syscalls.2:662
17954 "Although slots are reserved for them in the system call table, the following "
17955 "system calls are not implemented in the standard kernel: B<afs_syscall>(2), "
17956 "B<break>(2), B<ftime>(2), B<getpmsg>(2), B<gtty>(2), B<idle>(2), B<lock>(2), "
17957 "B<madvise1>(2), B<mpx>(2), B<phys>(2), B<prof>(2), B<profil>(2), "
17958 "B<putpmsg>(2), B<security>(2), B<stty>(2), B<tuxcall>(2), B<ulimit>(2), and "
17959 "B<vserver>(2) (see also B<unimplemented>(2)). However, B<ftime>(3), "
17960 "B<profil>(3), and B<ulimit>(3) exist as library routines. The slot for "
17961 "B<phys>(2) is in use since kernel 2.1.116 for B<umount>(2); B<phys>(2) "
17962 "will never be implemented. The B<getpmsg>(2) and B<putpmsg>(2) calls are "
17963 "for kernels patched to support STREAMS, and may never be in the standard "
17967 #. type: Plain text
17968 #: build/C/man2/syscalls.2:667
17970 "There was briefly B<set_zone_reclaim>(2), added in Linux 2.6.13, and removed "
17971 "in 2.6.16; this system call was never available to user space."
17974 #. type: Plain text
17975 #: build/C/man2/syscalls.2:684
17977 "Roughly speaking, the code belonging to the system call with number __NR_xxx "
17978 "defined in I</usr/include/asm/unistd.h> can be found in the Linux kernel "
17979 "source in the routine I<sys_xxx>(). (The dispatch table for i386 can be "
17980 "found in I</usr/src/linux/arch/i386/kernel/entry.S>.) There are many "
17981 "exceptions, however, mostly because older system calls were superseded by "
17982 "newer ones, and this has been treated somewhat unsystematically. On "
17983 "platforms with proprietary operating-system emulation, such as parisc, "
17984 "sparc, sparc64, and alpha, there are many additional system calls; mips64 "
17985 "also contains a full set of 32-bit system calls."
17988 #. type: Plain text
17989 #: build/C/man2/syscalls.2:703
17991 "Over time, changes to the interfaces of some system calls have been "
17992 "necessary. One reason for such changes was the need to increase the size of "
17993 "structures or scalar values passed to the system call. Because of these "
17994 "changes, there are now various groups of related system calls (e.g., "
17995 "B<truncate>(2) and B<truncate64>(2)) which perform similar tasks, but "
17996 "which vary in details such as the size of their arguments. (As noted "
17997 "earlier, applications are generally unaware of this: the glibc wrapper "
17998 "functions do some work to ensure that the right system call is invoked, and "
17999 "that ABI compatibility is preserved for old binaries.) Examples of systems "
18000 "calls that exist in multiple versions are the following:"
18003 #. e.g., on 2.6.22/i386: __NR_oldstat 18, __NR_stat 106, __NR_stat64 195
18004 #. The stat system calls deal with three different data structures,
18005 #. defined in include/asm-i386/stat.h: __old_kernel_stat, stat, stat64
18006 #. type: Plain text
18007 #: build/C/man2/syscalls.2:724
18009 "By now there are three different versions of B<stat>(2): I<sys_stat>() "
18010 "(slot I<__NR_oldstat>), I<sys_newstat>() (slot I<__NR_stat>), and "
18011 "I<sys_stat64>() (slot I<__NR_stat64>), with the last being the most "
18012 "current. A similar story applies for B<lstat>(2) and B<fstat>(2)."
18015 #. type: Plain text
18016 #: build/C/man2/syscalls.2:735
18018 "Similarly, the defines I<__NR_oldolduname>, I<__NR_olduname>, and "
18019 "I<__NR_uname> refer to the routines I<sys_olduname>(), I<sys_uname>() and "
18020 "I<sys_newuname>()."
18023 #. type: Plain text
18024 #: build/C/man2/syscalls.2:742
18026 "In Linux 2.0, a new version of B<vm86>(2) appeared, with the old and the "
18027 "new kernel routines being named I<sys_vm86old>() and I<sys_vm86>()."
18030 #. type: Plain text
18031 #: build/C/man2/syscalls.2:753
18033 "In Linux 2.4, a new version of B<getrlimit>(2) appeared, with the old and "
18034 "the new kernel routines being named I<sys_old_getrlimit>() (slot "
18035 "I<__NR_getrlimit>) and I<sys_getrlimit>() (slot I<__NR_ugetrlimit>)."
18038 #. 64-bit off_t changes: ftruncate64, *stat64,
18039 #. fcntl64 (because of the flock structure), getdents64, *statfs64
18040 #. type: Plain text
18041 #: build/C/man2/syscalls.2:765
18043 "Linux 2.4 increased the size of user and group IDs from 16 to 32 bits. To "
18044 "support this change, a range of system calls were added (e.g., "
18045 "B<chown32>(2), B<getuid32>(2), B<getgroups32>(2), B<setresuid32>(2)), "
18046 "superseding earlier calls of the same name without the \"32\" suffix."
18049 #. type: Plain text
18050 #: build/C/man2/syscalls.2:782
18052 "Linux 2.4 added support for applications on 32-bit architectures to access "
18053 "large files (i.e., files for which the sizes and file offsets can't be "
18054 "represented in 32 bits.) To support this change, replacements were required "
18055 "for system calls that deal with file offsets and sizes. Thus the following "
18056 "system calls were added: B<fcntl64>(2), B<ftruncate64>(2), B<getdents64>(2), "
18057 "B<stat64>(2), B<statfs64>(2), and their analogs that work with file "
18058 "descriptors or symbolic links. These system calls supersede the older "
18059 "system calls which, except in the case of the \"stat\" calls, have the same "
18060 "name without the \"64\" suffix."
18063 #. type: Plain text
18064 #: build/C/man2/syscalls.2:786
18066 "On newer platforms that only have 64-bit file access and 32-bit uids (e.g., "
18067 "alpha, ia64, s390x) there are no *64 or *32 calls. Where the *64 and *32 "
18068 "calls exist, the other versions are obsolete."
18071 #. type: Plain text
18072 #: build/C/man2/syscalls.2:794
18074 "The I<rt_sig*> calls were added in kernel 2.2 to support the addition of "
18075 "real-time signals (see B<signal>(7)). These system calls supersede the "
18076 "older system calls of the same name without the \"rt_\" prefix."
18079 #. (used by libc 6)
18081 #. Two system call numbers,
18082 #. .IR __NR__llseek
18084 #. .IR __NR__sysctl
18085 #. have an additional underscore absent in
18086 #. .IR sys_llseek ()
18088 #. .IR sys_sysctl ().
18090 #. In kernel 2.1.81,
18094 #. were swapped; that is,
18096 #. was added with the semantics that were then current for
18098 #. and the semantics of the latter call were changed to what
18100 #. type: Plain text
18101 #: build/C/man2/syscalls.2:844
18103 "The B<select>(2) and B<mmap>(2) system calls use five or more arguments, "
18104 "which caused problems in the way argument passing on the i386 used to be set "
18105 "up. Thus, while other architectures have I<sys_select>() and I<sys_mmap>() "
18106 "corresponding to I<__NR_select> and I<__NR_mmap>, on i386 one finds "
18107 "I<old_select>() and I<old_mmap>() (routines that use a pointer to a "
18108 "argument block) instead. These days passing five arguments is not a problem "
18109 "any more, and there is a I<__NR__newselect> that corresponds directly to "
18110 "I<sys_select>() and similarly I<__NR_mmap2>."
18113 #. type: Plain text
18114 #: build/C/man2/syscalls.2:851
18116 "B<intro>(2), B<syscall>(2), B<unimplemented>(2), B<errno>(3), B<libc>(7), "
18121 #: build/C/man3/sysconf.3:27
18126 #. type: Plain text
18127 #: build/C/man3/sysconf.3:30
18128 msgid "sysconf - get configuration information at run time"
18131 #. type: Plain text
18132 #: build/C/man3/sysconf.3:35
18134 msgid "B<long sysconf(int >I<name>B<);>\n"
18137 #. type: Plain text
18138 #: build/C/man3/sysconf.3:40
18140 "POSIX allows an application to test at compile or run time whether certain "
18141 "options are supported, or what the value is of certain configurable "
18142 "constants or limits."
18145 #. type: Plain text
18146 #: build/C/man3/sysconf.3:46
18148 "At compile time this is done by including I<E<lt>unistd.hE<gt>> and/or "
18149 "I<E<lt>limits.hE<gt>> and testing the value of certain macros."
18152 #. type: Plain text
18153 #: build/C/man3/sysconf.3:56
18155 "At run time, one can ask for numerical values using the present function "
18156 "B<sysconf>(). One can ask for numerical values that may depend on the "
18157 "filesystem a file is in using the calls B<fpathconf>(3) and "
18158 "B<pathconf>(3). One can ask for string values using B<confstr>(3)."
18161 #. except that sysconf(_SC_OPEN_MAX) may change answer after a call
18162 #. to setrlimit( ) which changes the RLIMIT_NOFILE soft limit
18163 #. type: Plain text
18164 #: build/C/man3/sysconf.3:61
18166 "The values obtained from these functions are system configuration "
18167 "constants. They do not change during the lifetime of a process."
18170 #. and 999 to indicate support for options no longer present in the latest
18172 #. type: Plain text
18173 #: build/C/man3/sysconf.3:84
18175 "For options, typically, there is a constant B<_POSIX_FOO> that may be "
18176 "defined in I<E<lt>unistd.hE<gt>>. If it is undefined, one should ask at run "
18177 "time. If it is defined to -1, then the option is not supported. If it is "
18178 "defined to 0, then relevant functions and headers exist, but one has to ask "
18179 "at run time what degree of support is available. If it is defined to a "
18180 "value other than -1 or 0, then the option is supported. Usually the value "
18181 "(such as 200112L) indicates the year and month of the POSIX revision "
18182 "describing the option. Glibc uses the value 1 to indicate support as long "
18183 "as the POSIX revision has not been published yet. The B<sysconf>() "
18184 "argument will be B<_SC_FOO>. For a list of options, see B<posixoptions>(7)."
18187 #. type: Plain text
18188 #: build/C/man3/sysconf.3:104
18190 "For variables or limits, typically, there is a constant B<_FOO>, maybe "
18191 "defined in I<E<lt>limits.hE<gt>>, or B<_POSIX_FOO>, maybe defined in "
18192 "I<E<lt>unistd.hE<gt>>. The constant will not be defined if the limit is "
18193 "unspecified. If the constant is defined, it gives a guaranteed value, and a "
18194 "greater value might actually be supported. If an application wants to take "
18195 "advantage of values which may change between systems, a call to B<sysconf>() "
18196 "can be made. The B<sysconf>() argument will be B<_SC_FOO>."
18200 #: build/C/man3/sysconf.3:104
18202 msgid "POSIX.1 variables"
18205 #. type: Plain text
18206 #: build/C/man3/sysconf.3:109
18208 "We give the name of the variable, the name of the B<sysconf>() argument "
18209 "used to inquire about its value, and a short description."
18212 #. [for the moment: only the things that are unconditionally present]
18214 #. .BR AIO_LISTIO_MAX " - " _SC_AIO_LISTIO_MAX
18215 #. (if _POSIX_ASYNCHRONOUS_IO)
18216 #. Maximum number of I/O operations in a single list I/O call.
18217 #. Must not be less than _POSIX_AIO_LISTIO_MAX.
18219 #. .BR AIO_MAX " - " _SC_AIO_MAX
18220 #. (if _POSIX_ASYNCHRONOUS_IO)
18221 #. Maximum number of outstanding asynchronous I/O operations.
18222 #. Must not be less than _POSIX_AIO_MAX.
18224 #. .BR AIO_PRIO_DELTA_MAX " - " _SC_AIO_PRIO_DELTA_MAX
18225 #. (if _POSIX_ASYNCHRONOUS_IO)
18226 #. The maximum amount by which a process can decrease its
18227 #. asynchronous I/O priority level from its own scheduling priority.
18228 #. Must be nonnegative.
18229 #. type: Plain text
18230 #: build/C/man3/sysconf.3:128
18231 msgid "First, the POSIX.1 compatible values."
18235 #: build/C/man3/sysconf.3:128
18237 msgid "B<ARG_MAX> - B<_SC_ARG_MAX>"
18240 #. type: Plain text
18241 #: build/C/man3/sysconf.3:136
18243 "The maximum length of the arguments to the B<exec>(3) family of functions. "
18244 "Must not be less than B<_POSIX_ARG_MAX> (4096)."
18248 #: build/C/man3/sysconf.3:136
18250 msgid "B<CHILD_MAX> - B<_SC_CHILD_MAX>"
18253 #. type: Plain text
18254 #: build/C/man3/sysconf.3:142
18256 "The maximum number of simultaneous processes per user ID. Must not be less "
18257 "than B<_POSIX_CHILD_MAX> (25)."
18261 #: build/C/man3/sysconf.3:142
18263 msgid "B<HOST_NAME_MAX> - B<_SC_HOST_NAME_MAX>"
18266 #. type: Plain text
18267 #: build/C/man3/sysconf.3:150
18269 "Maximum length of a hostname, not including the terminating null byte, as "
18270 "returned by B<gethostname>(2). Must not be less than "
18271 "B<_POSIX_HOST_NAME_MAX> (255)."
18275 #: build/C/man3/sysconf.3:150
18277 msgid "B<LOGIN_NAME_MAX> - B<_SC_LOGIN_NAME_MAX>"
18280 #. type: Plain text
18281 #: build/C/man3/sysconf.3:156
18283 "Maximum length of a login name, including the terminating null byte. Must "
18284 "not be less than B<_POSIX_LOGIN_NAME_MAX> (9)."
18288 #: build/C/man3/sysconf.3:156
18290 msgid "B<NGROUPS_MAX> - B<_SC_NGROUPS_MAX>"
18293 #. type: Plain text
18294 #: build/C/man3/sysconf.3:159
18295 msgid "Maximum number of supplementary group IDs."
18299 #: build/C/man3/sysconf.3:159
18301 msgid "clock ticks - B<_SC_CLK_TCK>"
18304 #. type: Plain text
18305 #: build/C/man3/sysconf.3:168
18307 "The number of clock ticks per second. The corresponding variable is "
18308 "obsolete. It was of course called B<CLK_TCK>. (Note: the macro "
18309 "B<CLOCKS_PER_SEC> does not give information: it must equal 1000000.)"
18313 #: build/C/man3/sysconf.3:168
18315 msgid "B<OPEN_MAX> - B<_SC_OPEN_MAX>"
18318 #. type: Plain text
18319 #: build/C/man3/sysconf.3:174
18321 "The maximum number of files that a process can have open at any time. Must "
18322 "not be less than B<_POSIX_OPEN_MAX> (20)."
18326 #: build/C/man3/sysconf.3:174
18328 msgid "B<PAGESIZE> - B<_SC_PAGESIZE>"
18331 #. type: Plain text
18332 #: build/C/man3/sysconf.3:179
18334 "Size of a page in bytes. Must not be less than 1. (Some systems use "
18335 "PAGE_SIZE instead.)"
18339 #: build/C/man3/sysconf.3:179 build/C/man3/sysconf.3:266
18341 msgid "B<RE_DUP_MAX> - B<_SC_RE_DUP_MAX>"
18344 #. type: Plain text
18345 #: build/C/man3/sysconf.3:188
18347 "The number of repeated occurrences of a BRE permitted by B<regexec>(3) and "
18348 "B<regcomp>(3). Must not be less than B<_POSIX2_RE_DUP_MAX> (255)."
18352 #: build/C/man3/sysconf.3:188
18354 msgid "B<STREAM_MAX> - B<_SC_STREAM_MAX>"
18357 #. type: Plain text
18358 #: build/C/man3/sysconf.3:197
18360 "The maximum number of streams that a process can have open at any time. If "
18361 "defined, it has the same value as the standard C macro B<FOPEN_MAX>. Must "
18362 "not be less than B<_POSIX_STREAM_MAX> (8)."
18366 #: build/C/man3/sysconf.3:197
18368 msgid "B<SYMLOOP_MAX> - B<_SC_SYMLOOP_MAX>"
18371 #. type: Plain text
18372 #: build/C/man3/sysconf.3:205
18374 "The maximum number of symbolic links seen in a pathname before resolution "
18375 "returns B<ELOOP>. Must not be less than B<_POSIX_SYMLOOP_MAX> (8)."
18379 #: build/C/man3/sysconf.3:205
18381 msgid "B<TTY_NAME_MAX> - B<_SC_TTY_NAME_MAX>"
18384 #. type: Plain text
18385 #: build/C/man3/sysconf.3:212
18387 "The maximum length of terminal device name, including the terminating null "
18388 "byte. Must not be less than B<_POSIX_TTY_NAME_MAX> (9)."
18392 #: build/C/man3/sysconf.3:212
18394 msgid "B<TZNAME_MAX> - B<_SC_TZNAME_MAX>"
18397 #. type: Plain text
18398 #: build/C/man3/sysconf.3:218
18400 "The maximum number of bytes in a timezone name. Must not be less than "
18401 "B<_POSIX_TZNAME_MAX> (6)."
18405 #: build/C/man3/sysconf.3:218
18407 msgid "B<_POSIX_VERSION> - B<_SC_VERSION>"
18410 #. type: Plain text
18411 #: build/C/man3/sysconf.3:226
18413 "indicates the year and month the POSIX.1 standard was approved in the format "
18414 "B<YYYYMML>; the value B<199009L> indicates the Sept. 1990 revision."
18418 #: build/C/man3/sysconf.3:226
18420 msgid "POSIX.2 variables"
18423 #. type: Plain text
18424 #: build/C/man3/sysconf.3:228
18425 msgid "Next, the POSIX.2 values, giving limits for utilities."
18429 #: build/C/man3/sysconf.3:228
18431 msgid "B<BC_BASE_MAX> - B<_SC_BC_BASE_MAX>"
18434 #. type: Plain text
18435 #: build/C/man3/sysconf.3:235
18436 msgid "indicates the maximum I<obase> value accepted by the B<bc>(1) utility."
18440 #: build/C/man3/sysconf.3:235
18442 msgid "B<BC_DIM_MAX> - B<_SC_BC_DIM_MAX>"
18445 #. type: Plain text
18446 #: build/C/man3/sysconf.3:239
18447 msgid "indicates the maximum value of elements permitted in an array by B<bc>(1)."
18451 #: build/C/man3/sysconf.3:239
18453 msgid "B<BC_SCALE_MAX> - B<_SC_BC_SCALE_MAX>"
18456 #. type: Plain text
18457 #: build/C/man3/sysconf.3:245
18458 msgid "indicates the maximum I<scale> value allowed by B<bc>(1)."
18462 #: build/C/man3/sysconf.3:245
18464 msgid "B<BC_STRING_MAX> - B<_SC_BC_STRING_MAX>"
18467 #. type: Plain text
18468 #: build/C/man3/sysconf.3:249
18469 msgid "indicates the maximum length of a string accepted by B<bc>(1)."
18473 #: build/C/man3/sysconf.3:249
18475 msgid "B<COLL_WEIGHTS_MAX> - B<_SC_COLL_WEIGHTS_MAX>"
18478 #. type: Plain text
18479 #: build/C/man3/sysconf.3:255
18481 "indicates the maximum numbers of weights that can be assigned to an entry of "
18482 "the B<LC_COLLATE order> keyword in the locale definition file,"
18486 #: build/C/man3/sysconf.3:255
18488 msgid "B<EXPR_NEST_MAX> - B<_SC_EXPR_NEST_MAX>"
18491 #. type: Plain text
18492 #: build/C/man3/sysconf.3:260
18494 "is the maximum number of expressions which can be nested within parentheses "
18499 #: build/C/man3/sysconf.3:260
18501 msgid "B<LINE_MAX> - B<_SC_LINE_MAX>"
18504 #. type: Plain text
18505 #: build/C/man3/sysconf.3:266
18507 "The maximum length of a utility's input line, either from standard input or "
18508 "from a file. This includes space for a trailing newline."
18511 #. type: Plain text
18512 #: build/C/man3/sysconf.3:272
18514 "The maximum number of repeated occurrences of a regular expression when the "
18515 "interval notation B<\\e{m,n\\e}> is used."
18519 #: build/C/man3/sysconf.3:272
18521 msgid "B<POSIX2_VERSION> - B<_SC_2_VERSION>"
18524 #. type: Plain text
18525 #: build/C/man3/sysconf.3:276
18526 msgid "indicates the version of the POSIX.2 standard in the format of YYYYMML."
18530 #: build/C/man3/sysconf.3:276
18532 msgid "B<POSIX2_C_DEV> - B<_SC_2_C_DEV>"
18535 #. type: Plain text
18536 #: build/C/man3/sysconf.3:280
18538 "indicates whether the POSIX.2 C language development facilities are "
18543 #: build/C/man3/sysconf.3:280
18545 msgid "B<POSIX2_FORT_DEV> - B<_SC_2_FORT_DEV>"
18548 #. type: Plain text
18549 #: build/C/man3/sysconf.3:284
18550 msgid "indicates whether the POSIX.2 FORTRAN development utilities are supported."
18554 #: build/C/man3/sysconf.3:284
18556 msgid "B<POSIX2_FORT_RUN> - B<_SC_2_FORT_RUN>"
18559 #. type: Plain text
18560 #: build/C/man3/sysconf.3:287
18561 msgid "indicates whether the POSIX.2 FORTRAN run-time utilities are supported."
18565 #: build/C/man3/sysconf.3:287
18567 msgid "B<_POSIX2_LOCALEDEF> - B<_SC_2_LOCALEDEF>"
18570 #. type: Plain text
18571 #: build/C/man3/sysconf.3:292
18573 "indicates whether the POSIX.2 creation of locates via B<localedef>(1) is "
18578 #: build/C/man3/sysconf.3:292
18580 msgid "B<POSIX2_SW_DEV> - B<_SC_2_SW_DEV>"
18583 #. type: Plain text
18584 #: build/C/man3/sysconf.3:296
18586 "indicates whether the POSIX.2 software development utilities option is "
18590 #. type: Plain text
18591 #: build/C/man3/sysconf.3:298
18592 msgid "These values also exist, but may not be standard."
18596 #: build/C/man3/sysconf.3:298
18598 msgid " - B<_SC_PHYS_PAGES>"
18601 #. type: Plain text
18602 #: build/C/man3/sysconf.3:305
18604 "The number of pages of physical memory. Note that it is possible for the "
18605 "product of this value and the value of B<_SC_PAGESIZE> to overflow."
18609 #: build/C/man3/sysconf.3:305
18611 msgid " - B<_SC_AVPHYS_PAGES>"
18614 #. type: Plain text
18615 #: build/C/man3/sysconf.3:308
18616 msgid "The number of currently available pages of physical memory."
18620 #: build/C/man3/sysconf.3:308
18622 msgid " - B<_SC_NPROCESSORS_CONF>"
18625 #. type: Plain text
18626 #: build/C/man3/sysconf.3:311
18627 msgid "The number of processors configured."
18631 #: build/C/man3/sysconf.3:311
18633 msgid " - B<_SC_NPROCESSORS_ONLN>"
18636 #. type: Plain text
18637 #: build/C/man3/sysconf.3:314
18638 msgid "The number of processors currently online (available)."
18641 #. type: Plain text
18642 #: build/C/man3/sysconf.3:327
18644 "If I<name> is invalid, -1 is returned, and I<errno> is set to B<EINVAL>. "
18645 "Otherwise, the value returned is the value of the system resource and "
18646 "I<errno> is not changed. In the case of options, a positive value is "
18647 "returned if a queried option is available, and -1 if it is not. In the case "
18648 "of limits, -1 means that there is no definite limit."
18651 #. type: Plain text
18652 #: build/C/man3/sysconf.3:335
18654 "It is difficult to use B<ARG_MAX> because it is not specified how much of "
18655 "the argument space for B<exec>(3) is consumed by the user's environment "
18659 #. type: Plain text
18660 #: build/C/man3/sysconf.3:347
18662 "B<bc>(1), B<expr>(1), B<getconf>(1), B<locale>(1), B<confstr>(3), "
18663 "B<fpathconf>(3), B<pathconf>(3), B<posixoptions>(7)"
18667 #: build/C/man2/sysctl.2:30
18673 #: build/C/man2/sysctl.2:30
18678 #. type: Plain text
18679 #: build/C/man2/sysctl.2:33
18680 msgid "sysctl - read/write system parameters"
18683 #. type: Plain text
18684 #: build/C/man2/sysctl.2:38
18686 msgid "B<#include E<lt>linux/sysctl.hE<gt>>\n"
18689 #. type: Plain text
18690 #: build/C/man2/sysctl.2:40
18692 msgid "B<int _sysctl(struct __sysctl_args *>I<args>B<);>\n"
18695 #. type: Plain text
18696 #: build/C/man2/sysctl.2:47
18697 msgid "B<Do not use this system call!> See NOTES."
18700 #. type: Plain text
18701 #: build/C/man2/sysctl.2:54
18703 "The B<_sysctl>() call reads and/or writes kernel parameters. For example, "
18704 "the hostname, or the maximum number of open files. The argument has the "
18708 #. type: Plain text
18709 #: build/C/man2/sysctl.2:66
18712 "struct __sysctl_args {\n"
18713 " int *name; /* integer vector describing variable */\n"
18714 " int nlen; /* length of this vector */\n"
18715 " void *oldval; /* 0 or address where to store old value */\n"
18716 " size_t *oldlenp; /* available room for old value,\n"
18717 " overwritten by actual size of old value */\n"
18718 " void *newval; /* 0 or address of new value */\n"
18719 " size_t newlen; /* size of new value */\n"
18723 #. type: Plain text
18724 #: build/C/man2/sysctl.2:74
18726 "This call does a search in a tree structure, possibly resembling a directory "
18727 "tree under I</proc/sys>, and if the requested item is found calls some "
18728 "appropriate routine to read or modify the value."
18731 #. type: Plain text
18732 #: build/C/man2/sysctl.2:81
18734 "Upon successful completion, B<_sysctl>() returns 0. Otherwise, a value of "
18735 "-1 is returned and I<errno> is set to indicate the error."
18738 #. type: Plain text
18739 #: build/C/man2/sysctl.2:88
18741 "The invocation asked for the previous value by setting I<oldval> non-NULL, "
18742 "but allowed zero room in I<oldlenp>."
18745 #. type: Plain text
18746 #: build/C/man2/sysctl.2:92
18747 msgid "I<name> was not found."
18751 #: build/C/man2/sysctl.2:92
18753 msgid "B<EACCES>, B<EPERM>"
18756 #. type: Plain text
18757 #: build/C/man2/sysctl.2:100
18759 "No search permission for one of the encountered \"directories\", or no read "
18760 "permission where I<oldval> was nonzero, or no write permission where "
18761 "I<newval> was nonzero."
18764 #. type: Plain text
18765 #: build/C/man2/sysctl.2:114
18767 "This call is Linux-specific, and should not be used in programs intended to "
18768 "be portable. A B<sysctl>() call has been present in Linux since version "
18769 "1.3.57. It originated in 4.4BSD. Only Linux has the I</proc/sys> mirror, "
18770 "and the object naming schemes differ between Linux and 4.4BSD, but the "
18771 "declaration of the B<sysctl>() function is the same in both."
18774 #. See http://lwn.net/Articles/247243/
18775 #. Though comments in suggest that it is needed by old glibc binaries,
18776 #. so maybe it's not going away.
18777 #. type: Plain text
18778 #: build/C/man2/sysctl.2:131
18780 "Glibc does not provide a wrapper for this system call; call it using "
18781 "B<syscall>(2). Or rather... I<don't> call it: use of this system call has "
18782 "long been discouraged, and it is so unloved that B<it is likely to disappear "
18783 "in a future kernel version>. Since Linux 2.6.24, uses of this system call "
18784 "result in warnings in the kernel log. Remove it from your programs now; use "
18785 "the I</proc/sys> interface instead."
18788 #. type: Plain text
18789 #: build/C/man2/sysctl.2:135
18791 "This system call is available only if the kernel was configured with the "
18792 "B<CONFIG_SYSCTL_SYSCALL> option."
18795 #. type: Plain text
18796 #: build/C/man2/sysctl.2:138
18798 "The object names vary between kernel versions, making this system call "
18799 "worthless for applications."
18802 #. type: Plain text
18803 #: build/C/man2/sysctl.2:140
18804 msgid "Not all available objects are properly documented."
18807 #. type: Plain text
18808 #: build/C/man2/sysctl.2:143
18810 "It is not yet possible to change operating system by writing to "
18811 "I</proc/sys/kernel/ostype>."
18814 #. type: Plain text
18815 #: build/C/man2/sysctl.2:152
18818 "#define _GNU_SOURCE\n"
18819 "#include E<lt>unistd.hE<gt>\n"
18820 "#include E<lt>sys/syscall.hE<gt>\n"
18821 "#include E<lt>string.hE<gt>\n"
18822 "#include E<lt>stdio.hE<gt>\n"
18823 "#include E<lt>stdlib.hE<gt>\n"
18824 "#include E<lt>linux/sysctl.hE<gt>\n"
18827 #. type: Plain text
18828 #: build/C/man2/sysctl.2:154
18830 msgid "int _sysctl(struct __sysctl_args *args );\n"
18833 #. type: Plain text
18834 #: build/C/man2/sysctl.2:156
18836 msgid "#define OSNAMESZ 100\n"
18839 #. type: Plain text
18840 #: build/C/man2/sysctl.2:164
18846 " struct __sysctl_args args;\n"
18847 " char osname[OSNAMESZ];\n"
18848 " size_t osnamelth;\n"
18849 " int name[] = { CTL_KERN, KERN_OSTYPE };\n"
18852 #. type: Plain text
18853 #: build/C/man2/sysctl.2:170
18856 " memset(&args, 0, sizeof(struct __sysctl_args));\n"
18857 " args.name = name;\n"
18858 " args.nlen = sizeof(name)/sizeof(name[0]);\n"
18859 " args.oldval = osname;\n"
18860 " args.oldlenp = &osnamelth;\n"
18863 #. type: Plain text
18864 #: build/C/man2/sysctl.2:172
18866 msgid " osnamelth = sizeof(osname);\n"
18869 #. type: Plain text
18870 #: build/C/man2/sysctl.2:180
18873 " if (syscall(SYS__sysctl, &args) == -1) {\n"
18874 " perror(\"_sysctl\");\n"
18875 " exit(EXIT_FAILURE);\n"
18877 " printf(\"This machine is running %*s\\en\", osnamelth, osname);\n"
18878 " exit(EXIT_SUCCESS);\n"
18882 #. type: Plain text
18883 #: build/C/man2/sysctl.2:183 build/C/man2/sysinfo.2:92
18888 #: build/C/man2/sysinfo.2:14
18893 #. type: Plain text
18894 #: build/C/man2/sysinfo.2:17
18895 msgid "sysinfo - returns information on overall system statistics"
18898 #. type: Plain text
18899 #: build/C/man2/sysinfo.2:21
18900 msgid "B<int sysinfo(struct sysinfo *>I<info>B<);>"
18903 #. type: Plain text
18904 #: build/C/man2/sysinfo.2:25
18906 "Until Linux 2.3.16, B<sysinfo>() used to return information in the "
18907 "following structure:"
18910 #. type: Plain text
18911 #: build/C/man2/sysinfo.2:40
18914 "struct sysinfo {\n"
18915 " long uptime; /* Seconds since boot */\n"
18916 " unsigned long loads[3]; /* 1, 5, and 15 minute load averages */\n"
18917 " unsigned long totalram; /* Total usable main memory size */\n"
18918 " unsigned long freeram; /* Available memory size */\n"
18919 " unsigned long sharedram; /* Amount of shared memory */\n"
18920 " unsigned long bufferram; /* Memory used by buffers */\n"
18921 " unsigned long totalswap; /* Total swap space size */\n"
18922 " unsigned long freeswap; /* swap space still available */\n"
18923 " unsigned short procs; /* Number of current processes */\n"
18924 " char _f[22]; /* Pads structure to 64 bytes */\n"
18928 #. type: Plain text
18929 #: build/C/man2/sysinfo.2:44
18930 msgid "and the sizes were given in bytes."
18933 #. type: Plain text
18934 #: build/C/man2/sysinfo.2:47
18935 msgid "Since Linux 2.3.23 (i386), 2.3.48 (all architectures) the structure is:"
18938 #. type: Plain text
18939 #: build/C/man2/sysinfo.2:65
18942 "struct sysinfo {\n"
18943 " long uptime; /* Seconds since boot */\n"
18944 " unsigned long loads[3]; /* 1, 5, and 15 minute load averages */\n"
18945 " unsigned long totalram; /* Total usable main memory size */\n"
18946 " unsigned long freeram; /* Available memory size */\n"
18947 " unsigned long sharedram; /* Amount of shared memory */\n"
18948 " unsigned long bufferram; /* Memory used by buffers */\n"
18949 " unsigned long totalswap; /* Total swap space size */\n"
18950 " unsigned long freeswap; /* swap space still available */\n"
18951 " unsigned short procs; /* Number of current processes */\n"
18952 " unsigned long totalhigh; /* Total high memory size */\n"
18953 " unsigned long freehigh; /* Available high memory size */\n"
18954 " unsigned int mem_unit; /* Memory unit size in bytes */\n"
18955 " char _f[20-2*sizeof(long)-sizeof(int)]; /* Padding to 64 bytes */\n"
18959 #. type: Plain text
18960 #: build/C/man2/sysinfo.2:69
18961 msgid "and the sizes are given as multiples of I<mem_unit> bytes."
18964 #. type: Plain text
18965 #: build/C/man2/sysinfo.2:74
18967 "B<sysinfo>() provides a simple way of getting overall system statistics. "
18968 "This is more portable than reading I</dev/kmem>."
18971 #. type: Plain text
18972 #: build/C/man2/sysinfo.2:83
18973 msgid "pointer to I<struct\\ sysinfo> is invalid"
18976 #. type: Plain text
18977 #: build/C/man2/sysinfo.2:87
18978 msgid "The Linux kernel has a B<sysinfo>() system call since 0.98.pl6."
18982 #: build/C/man3/tcgetpgrp.3:25
18988 #: build/C/man3/tcgetpgrp.3:25
18993 #. type: Plain text
18994 #: build/C/man3/tcgetpgrp.3:28
18995 msgid "tcgetpgrp, tcsetpgrp - get and set terminal foreground process group"
18998 #. type: Plain text
18999 #: build/C/man3/tcgetpgrp.3:32
19000 msgid "B<pid_t tcgetpgrp(int >I<fd>B<);>"
19003 #. type: Plain text
19004 #: build/C/man3/tcgetpgrp.3:34
19005 msgid "B<int tcsetpgrp(int >I<fd>B<, pid_t >I<pgrp>B<);>"
19008 #. The process itself may be a background process.
19009 #. type: Plain text
19010 #: build/C/man3/tcgetpgrp.3:42
19012 "The function B<tcgetpgrp>() returns the process group ID of the foreground "
19013 "process group on the terminal associated to I<fd>, which must be the "
19014 "controlling terminal of the calling process."
19017 #. type: Plain text
19018 #: build/C/man3/tcgetpgrp.3:55
19020 "The function B<tcsetpgrp>() makes the process group with process group ID "
19021 "I<pgrp> the foreground process group on the terminal associated to I<fd>, "
19022 "which must be the controlling terminal of the calling process, and still be "
19023 "associated with its session. Moreover, I<pgrp> must be a (nonempty) process "
19024 "group belonging to the same session as the calling process."
19027 #. type: Plain text
19028 #: build/C/man3/tcgetpgrp.3:64
19030 "If B<tcsetpgrp>() is called by a member of a background process group in "
19031 "its session, and the calling process is not blocking or ignoring B<SIGTTOU>, "
19032 "a B<SIGTTOU> signal is sent to all members of this background process group."
19035 #. type: Plain text
19036 #: build/C/man3/tcgetpgrp.3:79
19038 "When I<fd> refers to the controlling terminal of the calling process, the "
19039 "function B<tcgetpgrp>() will return the foreground process group ID of that "
19040 "terminal if there is one, and some value larger than 1 that is not presently "
19041 "a process group ID otherwise. When I<fd> does not refer to the controlling "
19042 "terminal of the calling process, -1 is returned, and I<errno> is set "
19046 #. type: Plain text
19047 #: build/C/man3/tcgetpgrp.3:86
19049 "When successful, B<tcsetpgrp>() returns 0. Otherwise, it returns -1, and "
19050 "I<errno> is set appropriately."
19053 #. type: Plain text
19054 #: build/C/man3/tcgetpgrp.3:95
19055 msgid "I<pgrp> has an unsupported value."
19058 #. type: Plain text
19059 #: build/C/man3/tcgetpgrp.3:104
19061 "The calling process does not have a controlling terminal, or it has one but "
19062 "it is not described by I<fd>, or, for B<tcsetpgrp>(), this controlling "
19063 "terminal is no longer associated with the session of the calling process."
19066 #. type: Plain text
19067 #: build/C/man3/tcgetpgrp.3:109
19069 "I<pgrp> has a supported value, but is not the process group ID of a process "
19070 "in the same session as the calling process."
19073 #. type: Plain text
19074 #: build/C/man3/tcgetpgrp.3:116
19075 msgid "The B<tcgetpgrp>() and B<tcsetpgrp>() functions are thread-safe."
19078 #. type: Plain text
19079 #: build/C/man3/tcgetpgrp.3:124
19081 "These functions are implemented via the B<TIOCGPGRP> and B<TIOCSPGRP> "
19086 #: build/C/man3/tcgetpgrp.3:124 build/C/man2/vfork.2:234
19091 #. type: Plain text
19092 #: build/C/man3/tcgetpgrp.3:127
19093 msgid "The ioctls appeared in 4.2BSD. The functions are POSIX inventions."
19096 #. type: Plain text
19097 #: build/C/man3/tcgetpgrp.3:131
19098 msgid "B<setpgid>(2), B<setsid>(2), B<credentials>(7)"
19102 #: build/C/man2/truncate.2:43
19107 #. type: Plain text
19108 #: build/C/man2/truncate.2:46
19109 msgid "truncate, ftruncate - truncate a file to a specified length"
19112 #. type: Plain text
19113 #: build/C/man2/truncate.2:52
19114 msgid "B<int truncate(const char *>I<path>B<, off_t >I<length>B<);>"
19117 #. type: Plain text
19118 #: build/C/man2/truncate.2:54
19119 msgid "B<int ftruncate(int >I<fd>B<, off_t >I<length>B<);>"
19122 #. type: Plain text
19123 #: build/C/man2/truncate.2:63
19124 msgid "B<truncate>():"
19127 #. type: Plain text
19128 #: build/C/man2/truncate.2:71
19129 msgid "B<ftruncate>():"
19132 #. type: Plain text
19133 #: build/C/man2/truncate.2:76
19134 msgid "|| /* Since glibc 2.3.5: */ _POSIX_C_SOURCE\\ E<gt>=\\ 200112L"
19137 #. type: Plain text
19138 #: build/C/man2/truncate.2:91
19140 "The B<truncate>() and B<ftruncate>() functions cause the regular file "
19141 "named by I<path> or referenced by I<fd> to be truncated to a size of "
19142 "precisely I<length> bytes."
19145 #. type: Plain text
19146 #: build/C/man2/truncate.2:95
19148 "If the file previously was larger than this size, the extra data is lost. "
19149 "If the file previously was shorter, it is extended, and the extended part "
19150 "reads as null bytes (\\(aq\\e0\\(aq)."
19153 #. type: Plain text
19154 #: build/C/man2/truncate.2:97
19155 msgid "The file offset is not changed."
19158 #. type: Plain text
19159 #: build/C/man2/truncate.2:104
19161 "If the size changed, then the st_ctime and st_mtime fields (respectively, "
19162 "time of last status change and time of last modification; see B<stat>(2)) "
19163 "for the file are updated, and the set-user-ID and set-group-ID permission "
19164 "bits may be cleared."
19167 #. type: Plain text
19168 #: build/C/man2/truncate.2:110
19170 "With B<ftruncate>(), the file must be open for writing; with B<truncate>(), "
19171 "the file must be writable."
19174 #. type: Plain text
19175 #: build/C/man2/truncate.2:118
19176 msgid "For B<truncate>():"
19179 #. type: Plain text
19180 #: build/C/man2/truncate.2:124
19182 "Search permission is denied for a component of the path prefix, or the named "
19183 "file is not writable by the user. (See also B<path_resolution>(7).)"
19186 #. type: Plain text
19187 #: build/C/man2/truncate.2:129
19188 msgid "The argument I<path> points outside the process's allocated address space."
19192 #: build/C/man2/truncate.2:129
19197 #. type: Plain text
19198 #: build/C/man2/truncate.2:134
19199 msgid "The argument I<length> is larger than the maximum file size. (XSI)"
19202 #. type: Plain text
19203 #: build/C/man2/truncate.2:141
19205 "While blocked waiting to complete, the call was interrupted by a signal "
19206 "handler; see B<fcntl>(2) and B<signal>(7)."
19209 #. type: Plain text
19210 #: build/C/man2/truncate.2:146
19211 msgid "The argument I<length> is negative or larger than the maximum file size."
19214 #. type: Plain text
19215 #: build/C/man2/truncate.2:149
19216 msgid "An I/O error occurred updating the inode."
19219 #. type: Plain text
19220 #: build/C/man2/truncate.2:152
19221 msgid "The named file is a directory."
19224 #. type: Plain text
19225 #: build/C/man2/truncate.2:155
19226 msgid "Too many symbolic links were encountered in translating the pathname."
19229 #. type: Plain text
19230 #: build/C/man2/truncate.2:159
19232 "A component of a pathname exceeded 255 characters, or an entire pathname "
19233 "exceeded 1023 characters."
19236 #. type: Plain text
19237 #: build/C/man2/truncate.2:162
19238 msgid "The named file does not exist."
19241 #. This happens for at least MSDOS and VFAT filesystems
19242 #. on kernel 2.6.13
19243 #. type: Plain text
19244 #: build/C/man2/truncate.2:171
19246 "The underlying filesystem does not support extending a file beyond its "
19250 #. type: Plain text
19251 #: build/C/man2/truncate.2:175
19252 msgid "The operation was prevented by a file seal; see B<fcntl>(2)."
19255 #. type: Plain text
19256 #: build/C/man2/truncate.2:181
19257 msgid "The file is a pure procedure (shared text) file that is being executed."
19260 #. type: Plain text
19261 #: build/C/man2/truncate.2:188
19263 "For B<ftruncate>() the same errors apply, but instead of things that can be "
19264 "wrong with I<path>, we now have things that can be wrong with the file "
19265 "descriptor, I<fd>:"
19269 #: build/C/man2/truncate.2:192
19271 msgid "B<EBADF> or B<EINVAL>"
19274 #. type: Plain text
19275 #: build/C/man2/truncate.2:196
19276 msgid "I<fd> is not open for writing."
19279 #. type: Plain text
19280 #: build/C/man2/truncate.2:200
19281 msgid "I<fd> does not reference a regular file."
19284 #. POSIX.1-1996 has
19285 #. .BR ftruncate ().
19286 #. POSIX.1-2001 also has
19287 #. .BR truncate (),
19288 #. as an XSI extension.
19290 #. SVr4 documents additional
19292 #. error conditions EMFILE, EMULTIHP, ENFILE, ENOLINK. SVr4 documents for
19293 #. .BR ftruncate ()
19294 #. an additional EAGAIN error condition.
19295 #. type: Plain text
19296 #: build/C/man2/truncate.2:213
19297 msgid "4.4BSD, SVr4, POSIX.1-2001 (these calls first appeared in 4.2BSD)."
19300 #. At the very least: OSF/1, Solaris 7, and FreeBSD conform, mtk, Jan 2002
19301 #. type: Plain text
19302 #: build/C/man2/truncate.2:234
19304 "The details in DESCRIPTION are for XSI-compliant systems. For "
19305 "non-XSI-compliant systems, the POSIX standard allows two behaviors for "
19306 "B<ftruncate>() when I<length> exceeds the file length (note that "
19307 "B<truncate>() is not specified at all in such an environment): either "
19308 "returning an error, or extending the file. Like most UNIX implementations, "
19309 "Linux follows the XSI requirement when dealing with native filesystems. "
19310 "However, some nonnative filesystems do not permit B<truncate>() and "
19311 "B<ftruncate>() to be used to extend a file beyond its current length: a "
19312 "notable example on Linux is VFAT."
19315 #. type: Plain text
19316 #: build/C/man2/truncate.2:248
19318 "The original Linux B<truncate>() and B<ftruncate>() system calls were not "
19319 "designed to handle large file offsets. Consequently, Linux 2.4 added "
19320 "B<truncate64>() and B<ftruncate64>() system calls that handle large "
19321 "files. However, these details can be ignored by applications using glibc, "
19322 "whose wrapper functions transparently employ the more recent system calls "
19323 "where they are available."
19326 #. http://sourceware.org/bugzilla/show_bug.cgi?id=12037
19327 #. type: Plain text
19328 #: build/C/man2/truncate.2:261
19330 "A header file bug in glibc 2.12 meant that the minimum value of "
19331 "B<_POSIX_C_SOURCE> required to expose the declaration of B<ftruncate>() was "
19332 "200809L instead of 200112L. This has been fixed in later glibc versions."
19335 #. type: Plain text
19336 #: build/C/man2/truncate.2:265
19337 msgid "B<open>(2), B<stat>(2), B<path_resolution>(7)"
19341 #: build/C/man3/ualarm.3:24
19347 #: build/C/man3/ualarm.3:24
19352 #. type: Plain text
19353 #: build/C/man3/ualarm.3:27
19354 msgid "ualarm - schedule signal after given number of microseconds"
19357 #. type: Plain text
19358 #: build/C/man3/ualarm.3:32
19360 msgid "B<useconds_t ualarm(useconds_t >I<usecs>B<, useconds_t >I<interval>B<);>\n"
19363 #. type: Plain text
19364 #: build/C/man3/ualarm.3:40
19365 msgid "B<ualarm>():"
19368 #. type: Plain text
19369 #: build/C/man3/ualarm.3:69
19371 "The B<ualarm>() function causes the signal B<SIGALRM> to be sent to the "
19372 "invoking process after (not less than) I<usecs> microseconds. The delay "
19373 "may be lengthened slightly by any system activity or by the time spent "
19374 "processing the call or by the granularity of system timers."
19377 #. type: Plain text
19378 #: build/C/man3/ualarm.3:73
19379 msgid "Unless caught or ignored, the B<SIGALRM> signal will terminate the process."
19382 #. type: Plain text
19383 #: build/C/man3/ualarm.3:81
19385 "If the I<interval> argument is nonzero, further B<SIGALRM> signals will be "
19386 "sent every I<interval> microseconds after the first."
19389 #. type: Plain text
19390 #: build/C/man3/ualarm.3:84
19392 "This function returns the number of microseconds remaining for any alarm "
19393 "that was previously set, or 0 if no alarm was pending."
19396 #. type: Plain text
19397 #: build/C/man3/ualarm.3:88
19398 msgid "Interrupted by a signal."
19401 #. type: Plain text
19402 #: build/C/man3/ualarm.3:92
19404 "I<usecs> or I<interval> is not smaller than 1000000. (On systems where that "
19405 "is considered an error.)"
19408 #. type: Plain text
19409 #: build/C/man3/ualarm.3:97
19410 msgid "The B<ualarm>() function is thread-safe."
19413 #. type: Plain text
19414 #: build/C/man3/ualarm.3:105
19416 "4.3BSD, POSIX.1-2001. POSIX.1-2001 marks B<ualarm>() as obsolete. "
19417 "POSIX.1-2008 removes the specification of B<ualarm>(). 4.3BSD, SUSv2, and "
19418 "POSIX do not define any errors."
19421 #. This case is not documented in HP-US, Solar, FreeBSD, NetBSD, or OpenBSD!
19422 #. type: Plain text
19423 #: build/C/man3/ualarm.3:112
19425 "POSIX.1-2001 does not specify what happens if the I<usecs> argument is 0. "
19426 "On Linux (and probably most other systems), the effect is to cancel any "
19430 #. type: Plain text
19431 #: build/C/man3/ualarm.3:125
19433 "The type I<useconds_t> is an unsigned integer type capable of holding "
19434 "integers in the range [0,1000000]. On the original BSD implementation, and "
19435 "in glibc before version 2.1, the arguments to B<ualarm>() were instead "
19436 "typed as I<unsigned int>. Programs will be more portable if they never "
19437 "mention I<useconds_t> explicitly."
19440 #. type: Plain text
19441 #: build/C/man3/ualarm.3:139
19443 "The interaction of this function with other timer functions such as "
19444 "B<alarm>(2), B<sleep>(3), B<nanosleep>(2), B<setitimer>(2), "
19445 "B<timer_create>(2), B<timer_delete>(2), B<timer_getoverrun>(2), "
19446 "B<timer_gettime>(2), B<timer_settime>(2), B<usleep>(3) is unspecified."
19449 #. type: Plain text
19450 #: build/C/man3/ualarm.3:147
19452 "This function is obsolete. Use B<setitimer>(2) or POSIX interval timers "
19453 "(B<timer_create>(2), etc.) instead."
19456 #. type: Plain text
19457 #: build/C/man3/ualarm.3:155
19459 "B<alarm>(2), B<getitimer>(2), B<nanosleep>(2), B<select>(2), "
19460 "B<setitimer>(2), B<usleep>(3), B<time>(7)"
19464 #: build/C/man2/umask.2:34
19470 #: build/C/man2/umask.2:34
19475 #. type: Plain text
19476 #: build/C/man2/umask.2:37
19477 msgid "umask - set file mode creation mask"
19480 #. type: Plain text
19481 #: build/C/man2/umask.2:43
19482 msgid "B<mode_t umask(mode_t >I<mask>B<);>"
19485 #. type: Plain text
19486 #: build/C/man2/umask.2:50
19488 "B<umask>() sets the calling process's file mode creation mask (umask) to "
19489 "I<mask> & 0777 (i.e., only the file permission bits of I<mask> are used), "
19490 "and returns the previous value of the mask."
19493 #. e.g., mkfifo(), creat(), mknod(), sem_open(), mq_open(), shm_open()
19494 #. but NOT the System V IPC *get() calls
19495 #. type: Plain text
19496 #: build/C/man2/umask.2:65
19498 "The umask is used by B<open>(2), B<mkdir>(2), and other system calls that "
19499 "create files to modify the permissions placed on newly created files or "
19500 "directories. Specifically, permissions in the umask are turned off from the "
19501 "I<mode> argument to B<open>(2) and B<mkdir>(2)."
19504 #. type: Plain text
19505 #: build/C/man2/umask.2:70
19507 "The constants that should be used to specify I<mask> are described under "
19511 #. type: Plain text
19512 #: build/C/man2/umask.2:79
19514 "The typical default value for the process umask is I<S_IWGRP\\ |\\ S_IWOTH> "
19515 "(octal 022). In the usual case where the I<mode> argument to B<open>(2) is "
19519 #. type: Plain text
19520 #: build/C/man2/umask.2:82
19522 msgid " S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH | S_IWOTH\n"
19525 #. type: Plain text
19526 #: build/C/man2/umask.2:86
19528 "(octal 0666) when creating a new file, the permissions on the resulting file "
19532 #. type: Plain text
19533 #: build/C/man2/umask.2:89
19535 msgid " S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH\n"
19538 #. type: Plain text
19539 #: build/C/man2/umask.2:92
19540 msgid "(because 0666 & ~022 = 0644; i.e., rw-r--r--)."
19543 #. type: Plain text
19544 #: build/C/man2/umask.2:95
19546 "This system call always succeeds and the previous value of the mask is "
19550 #. type: Plain text
19551 #: build/C/man2/umask.2:103
19553 "A child process created via B<fork>(2) inherits its parent's umask. The "
19554 "umask is left unchanged by B<execve>(2)."
19557 #. type: Plain text
19558 #: build/C/man2/umask.2:118
19560 "The umask setting also affects the permissions assigned to POSIX IPC objects "
19561 "(B<mq_open>(3), B<sem_open>(3), B<shm_open>(3)), FIFOs (B<mkfifo>(3)), and "
19562 "UNIX domain sockets (B<unix>(7)) created by the process. The umask does "
19563 "not affect the permissions assigned to System\\ V IPC objects created by the "
19564 "process (using B<msgget>(2), B<semget>(2), B<shmget>(2))."
19567 #. type: Plain text
19568 #: build/C/man2/umask.2:124
19569 msgid "B<chmod>(2), B<mkdir>(2), B<open>(2), B<stat>(2), B<acl>(5)"
19573 #: build/C/man2/uname.2:27
19578 #. type: Plain text
19579 #: build/C/man2/uname.2:30
19580 msgid "uname - get name and information about current kernel"
19583 #. type: Plain text
19584 #: build/C/man2/uname.2:32
19585 msgid "B<#include E<lt>sys/utsname.hE<gt>>"
19588 #. type: Plain text
19589 #: build/C/man2/uname.2:34
19590 msgid "B<int uname(struct utsname *>I<buf>B<);>"
19593 #. type: Plain text
19594 #: build/C/man2/uname.2:42
19596 "B<uname>() returns system information in the structure pointed to by "
19597 "I<buf>. The I<utsname> struct is defined in I<E<lt>sys/utsname.hE<gt>>:"
19600 #. type: Plain text
19601 #: build/C/man2/uname.2:56
19604 "struct utsname {\n"
19605 " char sysname[]; /* Operating system name (e.g., \"Linux\") */\n"
19606 " char nodename[]; /* Name within \"some implementation-defined\n"
19608 " char release[]; /* Operating system release (e.g., \"2.6.28\") */\n"
19609 " char version[]; /* Operating system version */\n"
19610 " char machine[]; /* Hardware identifier */\n"
19611 "#ifdef _GNU_SOURCE\n"
19612 " char domainname[]; /* NIS or YP domain name */\n"
19617 #. type: Plain text
19618 #: build/C/man2/uname.2:63
19620 "The length of the arrays in a I<struct utsname> is unspecified (see NOTES); "
19621 "the fields are terminated by a null byte (\\(aq\\e0\\(aq)."
19624 #. type: Plain text
19625 #: build/C/man2/uname.2:73
19626 msgid "I<buf> is not valid."
19629 #. type: Plain text
19630 #: build/C/man2/uname.2:78
19631 msgid "SVr4, POSIX.1-2001. There is no B<uname>() call in 4.3BSD."
19634 #. type: Plain text
19635 #: build/C/man2/uname.2:82
19636 msgid "The I<domainname> member (the NIS or YP domain name) is a GNU extension."
19639 #. type: Plain text
19640 #: build/C/man2/uname.2:98
19642 "This is a system call, and the operating system presumably knows its name, "
19643 "release and version. It also knows what hardware it runs on. So, four of "
19644 "the fields of the struct are meaningful. On the other hand, the field "
19645 "I<nodename> is meaningless: it gives the name of the present machine in some "
19646 "undefined network, but typically machines are in more than one network and "
19647 "have several names. Moreover, the kernel has no way of knowing about such "
19648 "things, so it has to be told what to answer here. The same holds for the "
19649 "additional I<domainname> field."
19652 #. type: Plain text
19653 #: build/C/man2/uname.2:116
19655 "To this end, Linux uses the system calls B<sethostname>(2) and "
19656 "B<setdomainname>(2). Note that there is no standard that says that the "
19657 "hostname set by B<sethostname>(2) is the same string as the I<nodename> "
19658 "field of the struct returned by B<uname>() (indeed, some systems allow a "
19659 "256-byte hostname and an 8-byte nodename), but this is true on Linux. The "
19660 "same holds for B<setdomainname>(2) and the I<domainname> field."
19663 #. type: Plain text
19664 #: build/C/man2/uname.2:131
19666 "The length of the fields in the struct varies. Some operating systems or "
19667 "libraries use a hardcoded 9 or 33 or 65 or 257. Other systems use "
19668 "B<SYS_NMLN> or B<_SYS_NMLN> or B<UTSLEN> or B<_UTSNAME_LENGTH>. Clearly, it "
19669 "is a bad idea to use any of these constants; just use sizeof(...). Often "
19670 "257 is chosen in order to have room for an internet hostname."
19673 #. type: Plain text
19674 #: build/C/man2/uname.2:138
19676 "Part of the utsname information is also accessible via "
19677 "I</proc/sys/kernel/>{I<ostype>, I<hostname>, I<osrelease>, I<version>, "
19681 #. That was back before Linux 1.0
19682 #. That was also back before Linux 1.0
19683 #. type: Plain text
19684 #: build/C/man2/uname.2:167
19686 "Over time, increases in the size of the I<utsname> structure have led to "
19687 "three successive versions of B<uname>(): I<sys_olduname>() (slot "
19688 "I<__NR_oldolduname>), I<sys_uname>() (slot I<__NR_olduname>), and "
19689 "I<sys_newuname>() (slot I<__NR_uname)>. The first one used length 9 for "
19690 "all fields; the second used 65; the third also uses 65 but adds the "
19691 "I<domainname> field. The glibc B<uname>() wrapper function hides these "
19692 "details from applications, invoking the most recent version of the system "
19693 "call provided by the kernel."
19696 #. type: Plain text
19697 #: build/C/man2/uname.2:172
19698 msgid "B<uname>(1), B<getdomainname>(2), B<gethostname>(2), B<namespaces>(7)"
19702 #: build/C/man2/uselib.2:31
19708 #: build/C/man2/uselib.2:31
19713 #. type: Plain text
19714 #: build/C/man2/uselib.2:34
19715 msgid "uselib - load shared library"
19718 #. type: Plain text
19719 #: build/C/man2/uselib.2:38
19720 msgid "B<int uselib(const char *>I<library>B<);>"
19723 #. type: Plain text
19724 #: build/C/man2/uselib.2:48
19726 "The system call B<uselib>() serves to load a shared library to be used by "
19727 "the calling process. It is given a pathname. The address where to load is "
19728 "found in the library itself. The library can have any recognized binary "
19732 #. type: Plain text
19733 #: build/C/man2/uselib.2:59
19735 "In addition to all of the error codes returned by B<open>(2) and "
19736 "B<mmap>(2), the following may also be returned:"
19739 #. type: Plain text
19740 #: build/C/man2/uselib.2:67
19742 "The library specified by I<library> does not have read or execute "
19743 "permission, or the caller does not have search permission for one of the "
19744 "directories in the path prefix. (See also B<path_resolution>(7).)"
19747 #. type: Plain text
19748 #: build/C/man2/uselib.2:76
19750 "The file specified by I<library> is not an executable of a known type; for "
19751 "example, it does not have the correct magic numbers."
19754 #. type: Plain text
19755 #: build/C/man2/uselib.2:80
19757 "B<uselib>() is Linux-specific, and should not be used in programs intended "
19761 #. type: Plain text
19762 #: build/C/man2/uselib.2:85
19764 "B<uselib>() was used by early libc startup code to load the shared "
19765 "libraries with names found in an array of names in the binary."
19768 #. libc 4.3.1f - changelog 1993-03-02
19769 #. libc 4.3.4 - changelog 1993-04-21
19770 #. type: Plain text
19771 #: build/C/man2/uselib.2:95
19773 "Since libc 4.3.2, startup code tries to prefix these names with "
19774 "\"/usr/lib\", \"/lib\" and \"\" before giving up. In libc 4.3.4 and later "
19775 "these names are looked for in the directories found in B<LD_LIBRARY_PATH>, "
19776 "and if not found there, prefixes \"/usr/lib\", \"/lib\" and \"/\" are tried."
19779 #. type: Plain text
19780 #: build/C/man2/uselib.2:100
19782 "From libc 4.4.4 on only the library \"/lib/ld.so\" is loaded, so that this "
19783 "dynamic library can load the remaining libraries needed (again using this "
19784 "call). This is also the state of affairs in libc5."
19787 #. type: Plain text
19788 #: build/C/man2/uselib.2:102
19789 msgid "glibc2 does not use this call."
19792 #. type: Plain text
19793 #: build/C/man2/uselib.2:112
19795 "B<ar>(1), B<gcc>(1), B<ld>(1), B<ldd>(1), B<mmap>(2), B<open>(2), "
19796 "B<dlopen>(3), B<capabilities>(7), B<ld.so>(8)"
19800 #: build/C/man3/usleep.3:33
19806 #: build/C/man3/usleep.3:33
19811 #. type: Plain text
19812 #: build/C/man3/usleep.3:36
19813 msgid "usleep - suspend execution for microsecond intervals"
19816 #. type: Plain text
19817 #: build/C/man3/usleep.3:41
19819 msgid "B<int usleep(useconds_t >I<usec>B<);>\n"
19822 #. type: Plain text
19823 #: build/C/man3/usleep.3:49
19824 msgid "B<usleep>():"
19827 #. type: Plain text
19828 #: build/C/man3/usleep.3:75
19830 "The B<usleep>() function suspends execution of the calling thread for (at "
19831 "least) I<usec> microseconds. The sleep may be lengthened slightly by any "
19832 "system activity or by the time spent processing the call or by the "
19833 "granularity of system timers."
19836 #. type: Plain text
19837 #: build/C/man3/usleep.3:82
19839 "The B<usleep>() function returns 0 on success. On error, -1 is returned, "
19840 "with I<errno> set to indicate the cause of the error."
19843 #. type: Plain text
19844 #: build/C/man3/usleep.3:87
19845 msgid "Interrupted by a signal; see B<signal>(7)."
19848 #. type: Plain text
19849 #: build/C/man3/usleep.3:91
19851 "I<usec> is not smaller than 1000000. (On systems where that is considered "
19855 #. type: Plain text
19856 #: build/C/man3/usleep.3:96
19857 msgid "The B<usleep>() function is thread-safe."
19860 #. type: Plain text
19861 #: build/C/man3/usleep.3:103
19863 "4.3BSD, POSIX.1-2001. POSIX.1-2001 declares this function obsolete; use "
19864 "B<nanosleep>(2) instead. POSIX.1-2008 removes the specification of "
19868 #. type: Plain text
19869 #: build/C/man3/usleep.3:110
19871 "On the original BSD implementation, and in glibc before version 2.2.2, the "
19872 "return type of this function is I<void>. The POSIX version returns I<int>, "
19873 "and this is also the prototype used since glibc 2.2.2."
19876 #. type: Plain text
19877 #: build/C/man3/usleep.3:114
19878 msgid "Only the B<EINVAL> error return is documented by SUSv2 and POSIX.1-2001."
19881 #. type: Plain text
19882 #: build/C/man3/usleep.3:122
19884 "The type I<useconds_t> is an unsigned integer type capable of holding "
19885 "integers in the range [0,1000000]. Programs will be more portable if they "
19886 "never mention this type explicitly. Use"
19889 #. type: Plain text
19890 #: build/C/man3/usleep.3:130
19893 "#include E<lt>unistd.hE<gt>\n"
19895 " unsigned int usecs;\n"
19897 " usleep(usecs);\n"
19900 #. type: Plain text
19901 #: build/C/man3/usleep.3:147
19903 "The interaction of this function with the B<SIGALRM> signal, and with other "
19904 "timer functions such as B<alarm>(2), B<sleep>(3), B<nanosleep>(2), "
19905 "B<setitimer>(2), B<timer_create>(2), B<timer_delete>(2), "
19906 "B<timer_getoverrun>(2), B<timer_gettime>(2), B<timer_settime>(2), "
19907 "B<ualarm>(3) is unspecified."
19910 #. type: Plain text
19911 #: build/C/man3/usleep.3:156
19913 "B<alarm>(2), B<getitimer>(2), B<nanosleep>(2), B<select>(2), "
19914 "B<setitimer>(2), B<sleep>(3), B<ualarm>(3), B<time>(7)"
19918 #: build/C/man2/vfork.2:28
19924 #: build/C/man2/vfork.2:28
19929 #. type: Plain text
19930 #: build/C/man2/vfork.2:31
19931 msgid "vfork - create a child process and block parent"
19934 #. type: Plain text
19935 #: build/C/man2/vfork.2:37
19936 msgid "B<pid_t vfork(void);>"
19939 #. type: Plain text
19940 #: build/C/man2/vfork.2:44
19941 msgid "B<vfork>():"
19945 #: build/C/man2/vfork.2:63
19947 msgid "Standard description"
19950 #. type: Plain text
19951 #: build/C/man2/vfork.2:82
19953 "(From POSIX.1) The B<vfork>() function has the same effect as B<fork>(2), "
19954 "except that the behavior is undefined if the process created by B<vfork>() "
19955 "either modifies any data other than a variable of type I<pid_t> used to "
19956 "store the return value from B<vfork>(), or returns from the function in "
19957 "which B<vfork>() was called, or calls any other function before "
19958 "successfully calling B<_exit>(2) or one of the B<exec>(3) family of "
19963 #: build/C/man2/vfork.2:82
19965 msgid "Linux description"
19968 #. type: Plain text
19969 #: build/C/man2/vfork.2:89
19971 "B<vfork>(), just like B<fork>(2), creates a child process of the calling "
19972 "process. For details and return value and errors, see B<fork>(2)."
19975 #. type: Plain text
19976 #: build/C/man2/vfork.2:98
19978 "B<vfork>() is a special case of B<clone>(2). It is used to create new "
19979 "processes without copying the page tables of the parent process. It may be "
19980 "useful in performance-sensitive applications where a child is created which "
19981 "then immediately issues an B<execve>(2)."
19984 #. type: Plain text
19985 #: build/C/man2/vfork.2:115
19987 "B<vfork>() differs from B<fork>(2) in that the calling thread is suspended "
19988 "until the child terminates (either normally, by calling B<_exit>(2), or "
19989 "abnormally, after delivery of a fatal signal), or it makes a call to "
19990 "B<execve>(2). Until that point, the child shares all memory with its "
19991 "parent, including the stack. The child must not return from the current "
19992 "function or call B<exit>(3), but may call B<_exit>(2)."
19995 #. type: Plain text
19996 #: build/C/man2/vfork.2:126
19998 "As with B<fork>(2), the child process created by B<vfork>() inherits copies "
19999 "of various of the caller's process attributes (e.g., file descriptors, "
20000 "signal dispositions, and current working directory); the B<vfork>() call "
20001 "differs only in the treatment of the virtual address space, as described "
20005 #. type: Plain text
20006 #: build/C/man2/vfork.2:132
20008 "Signals sent to the parent arrive after the child releases the parent's "
20009 "memory (i.e., after the child terminates or calls B<execve>(2))."
20013 #: build/C/man2/vfork.2:132
20015 msgid "Historic description"
20018 #. type: Plain text
20019 #: build/C/man2/vfork.2:159
20021 "Under Linux, B<fork>(2) is implemented using copy-on-write pages, so the "
20022 "only penalty incurred by B<fork>(2) is the time and memory required to "
20023 "duplicate the parent's page tables, and to create a unique task structure "
20024 "for the child. However, in the bad old days a B<fork>(2) would require "
20025 "making a complete copy of the caller's data space, often needlessly, since "
20026 "usually immediately afterward an B<exec>(3) is done. Thus, for greater "
20027 "efficiency, BSD introduced the B<vfork>() system call, which did not fully "
20028 "copy the address space of the parent process, but borrowed the parent's "
20029 "memory and thread of control until a call to B<execve>(2) or an exit "
20030 "occurred. The parent process was suspended while the child was using its "
20031 "resources. The use of B<vfork>() was tricky: for example, not modifying "
20032 "data in the parent process depended on knowing which variables were held in "
20036 #. type: Plain text
20037 #: build/C/man2/vfork.2:163
20039 "4.3BSD; POSIX.1-2001 (but marked OBSOLETE). POSIX.1-2008 removes the "
20040 "specification of B<vfork>()."
20043 #. In AIXv3.1 vfork is equivalent to fork.
20044 #. type: Plain text
20045 #: build/C/man2/vfork.2:174
20047 "The requirements put on B<vfork>() by the standards are weaker than those "
20048 "put on B<fork>(2), so an implementation where the two are synonymous is "
20049 "compliant. In particular, the programmer cannot rely on the parent "
20050 "remaining blocked until the child either terminates or calls B<execve>(2), "
20051 "and cannot rely on any specific behavior with respect to shared memory."
20054 #. type: Plain text
20055 #: build/C/man2/vfork.2:193
20057 "Some consider the semantics of B<vfork>() to be an architectural blemish, "
20058 "and the 4.2BSD man page stated: \"This system call will be eliminated when "
20059 "proper system sharing mechanisms are implemented. Users should not depend "
20060 "on the memory sharing semantics of B<vfork>() as it will, in that case, be "
20061 "made synonymous to B<fork>(2).\" However, even though modern memory "
20062 "management hardware has decreased the performance difference between "
20063 "B<fork>(2) and B<vfork>(), there are various reasons why Linux and other "
20064 "systems have retained B<vfork>():"
20067 #. type: Plain text
20068 #: build/C/man2/vfork.2:197
20070 "Some performance-critical applications require the small performance "
20071 "advantage conferred by B<vfork>()."
20074 #. http://stackoverflow.com/questions/4259629/what-is-the-difference-between-fork-and-vfork
20075 #. http://developers.sun.com/solaris/articles/subprocess/subprocess.html
20076 #. http://mailman.uclinux.org/pipermail/uclinux-dev/2009-April/000684.html
20077 #. type: Plain text
20078 #: build/C/man2/vfork.2:213
20080 "B<vfork>() can be implemented on systems that lack a memory-management unit "
20081 "(MMU), but B<fork>(2) can't be implemented on such systems. (POSIX.1-2008 "
20082 "removed B<vfork>() from the standard; the POSIX rationale for the "
20083 "B<posix_spawn>(3) function notes that that function, which provides "
20084 "functionality equivalent to B<fork>(2)+B<exec>(3), is designed to be "
20085 "implementable on systems that lack an MMU.)"
20089 #: build/C/man2/vfork.2:213
20091 msgid "Linux notes"
20094 #. type: Plain text
20095 #: build/C/man2/vfork.2:224
20097 "Fork handlers established using B<pthread_atfork>(3) are not called when a "
20098 "multithreaded program employing the NPTL threading library calls "
20099 "B<vfork>(). Fork handlers are called in this case in a program using the "
20100 "LinuxThreads threading library. (See B<pthreads>(7) for a description of "
20101 "Linux threading libraries.)"
20104 #. type: Plain text
20105 #: build/C/man2/vfork.2:232
20107 "A call to B<vfork>() is equivalent to calling B<clone>(2) with I<flags> "
20111 #. type: Plain text
20112 #: build/C/man2/vfork.2:234
20114 msgid " CLONE_VM | CLONE_VFORK | SIGCHLD\n"
20117 #. In the release notes for 4.2BSD Sam Leffler wrote: `vfork: Is still
20118 #. present, but definitely on its way out'.
20119 #. type: Plain text
20120 #: build/C/man2/vfork.2:252
20122 "The B<vfork>() system call appeared in 3.0BSD. In 4.4BSD it was made "
20123 "synonymous to B<fork>(2) but NetBSD introduced it again, cf. E<.UR "
20124 "http://www.netbsd.org\\:/Documentation\\:/kernel\\:/vfork.html> E<.UE .> In "
20125 "Linux, it has been equivalent to B<fork>(2) until 2.2.0-pre6 or so. Since "
20126 "2.2.0-pre9 (on i386, somewhat later on other architectures) it is an "
20127 "independent system call. Support was added in glibc 2.0.112."
20131 #. As far as I can tell, the following is not true in 2.6.19:
20132 #. Currently (Linux 2.3.25),
20136 #. and requires a kernel patch.
20137 #. type: Plain text
20138 #: build/C/man2/vfork.2:273
20140 "Details of the signal handling are obscure and differ between systems. The "
20141 "BSD man page states: \"To avoid a possible deadlock situation, processes "
20142 "that are children in the middle of a B<vfork>() are never sent B<SIGTTOU> "
20143 "or B<SIGTTIN> signals; rather, output or I<ioctl>s are allowed and input "
20144 "attempts result in an end-of-file indication.\""
20147 #. type: Plain text
20148 #: build/C/man2/vfork.2:279
20149 msgid "B<clone>(2), B<execve>(2), B<fork>(2), B<unshare>(2), B<wait>(2)"
20153 #: build/C/man2/vhangup.2:28
20159 #: build/C/man2/vhangup.2:28
20164 #. type: Plain text
20165 #: build/C/man2/vhangup.2:31
20166 msgid "vhangup - virtually hangup the current terminal"
20169 #. type: Plain text
20170 #: build/C/man2/vhangup.2:35
20171 msgid "B<int vhangup(void);>"
20174 #. type: Plain text
20175 #: build/C/man2/vhangup.2:44
20176 msgid "B<vhangup>(): _BSD_SOURCE || (_XOPEN_SOURCE && _XOPEN_SOURCE\\ E<lt>\\ 500)"
20179 #. type: Plain text
20180 #: build/C/man2/vhangup.2:50
20182 "B<vhangup>() simulates a hangup on the current terminal. This call "
20183 "arranges for other users to have a ``clean'' terminal at login time."
20186 #. type: Plain text
20187 #: build/C/man2/vhangup.2:63
20189 "The calling process has insufficient privilege to call B<vhangup>(); the "
20190 "B<CAP_SYS_TTY_CONFIG> capability is required."
20193 #. type: Plain text
20194 #: build/C/man2/vhangup.2:66
20196 "This call is Linux-specific, and should not be used in programs intended to "
20200 #. type: Plain text
20201 #: build/C/man2/vhangup.2:69
20202 msgid "B<capabilities>(7), B<init>(1)"
20206 #: build/C/man2/execveat.2:26
20211 #. type: Plain text
20212 #: build/C/man2/execveat.2:29
20213 msgid "execveat - execute program relative to a directory file descriptor"
20216 #. type: Plain text
20217 #: build/C/man2/execveat.2:33
20218 msgid "B<int execveat(int >I<dirfd>B<, const char *>I<pathname>B<,>"
20221 #. type: Plain text
20222 #: build/C/man2/execveat.2:35
20223 msgid "B< char *const >I<argv>B<[], char *const >I<envp>B<[],>"
20226 #. type: Plain text
20227 #: build/C/man2/execveat.2:37
20228 msgid "B< int >I<flags>B<);>"
20231 #. commit 51f39a1f0cea1cacf8c787f652f26dfee9611874
20232 #. type: Plain text
20233 #: build/C/man2/execveat.2:48
20235 "The B<execveat>() system call executes the program referred to by the "
20236 "combination of I<dirfd> and I<pathname>. It operates in exactly the same "
20237 "way as B<execve>(2), except for the differences described in this manual "
20241 #. type: Plain text
20242 #: build/C/man2/execveat.2:58
20244 "If the pathname given in I<pathname> is relative, then it is interpreted "
20245 "relative to the directory referred to by the file descriptor I<dirfd> "
20246 "(rather than relative to the current working directory of the calling "
20247 "process, as is done by B<execve>(2) for a relative pathname)."
20250 #. type: Plain text
20251 #: build/C/man2/execveat.2:70
20253 "If I<pathname> is relative and I<dirfd> is the special value B<AT_FDCWD>, "
20254 "then I<pathname> is interpreted relative to the current working directory of "
20255 "the calling process (like B<execve>(2))."
20258 #. type: Plain text
20259 #: build/C/man2/execveat.2:86
20261 "If I<pathname> is an empty string and the B<AT_EMPTY_PATH> flag is "
20262 "specified, then the file descriptor I<dirfd> specifies the file to be "
20263 "executed (i.e., I<dirfd> refers to an executable file, rather than a "
20267 #. type: Plain text
20268 #: build/C/man2/execveat.2:90
20270 "The I<flags> argument is a bit mask that can include zero or more of the "
20275 #: build/C/man2/execveat.2:90
20277 msgid "B<AT_EMPTY_PATH>"
20280 #. type: Plain text
20281 #: build/C/man2/execveat.2:100
20283 "If I<pathname> is an empty string, operate on the file referred to by "
20284 "I<dirfd> (which may have been obtained using the B<open>(2) B<O_PATH> "
20288 #. type: Plain text
20289 #: build/C/man2/execveat.2:108
20291 "If the file identified by I<dirfd> and a non-NULL I<pathname> is a symbolic "
20292 "link, then the call fails with the error B<ELOOP>."
20295 #. type: Plain text
20296 #: build/C/man2/execveat.2:115
20298 "On success, B<execveat>() does not return. On error, -1 is returned, and "
20299 "I<errno> is set appropriately."
20302 #. type: Plain text
20303 #: build/C/man2/execveat.2:122
20305 "The same errors that occur for B<execve>(2) can also occur for "
20306 "B<execveat>(). The following additional errors can occur for B<execveat>():"
20309 #. type: Plain text
20310 #: build/C/man2/execveat.2:140
20312 "I<flags> includes B<AT_SYMLINK_NOFOLLOW> and the file identified by I<dirfd> "
20313 "and a non-NULL I<pathname> is a symbolic link."
20316 #. type: Plain text
20317 #: build/C/man2/execveat.2:154
20319 "The program identified by I<dirfd> and I<pathname> requires the use of an "
20320 "interpreter program (such as a script starting with \"#!\"), but the file "
20321 "descriptor I<dirfd> was opened with the B<O_CLOEXEC> flag, with the result "
20322 "that the program file is inaccessible to the launched interpreter. See "
20326 #. FIXME . check for glibc support in a future release
20327 #. type: Plain text
20328 #: build/C/man2/execveat.2:165
20330 "B<execveat>() was added to Linux in kernel 3.19. GNU C library support is "
20334 #. type: Plain text
20335 #: build/C/man2/execveat.2:169
20336 msgid "The B<execveat>() system call is Linux-specific."
20339 #. type: Plain text
20340 #: build/C/man2/execveat.2:179
20342 "In addition to the reasons explained in B<openat>(2), the B<execveat>() "
20343 "system call is also needed to allow B<fexecve>(3) to be implemented on "
20344 "systems that do not have the I</proc> filesystem mounted."
20347 #. type: Plain text
20348 #: build/C/man2/execveat.2:202
20350 "When asked to execute a script file, the I<argv[0]> that is passed to the "
20351 "script interpreter is a string of the form I</dev/fd/N> or I</dev/fd/N/P>, "
20352 "where I<N> is the number of the file descriptor passed via the I<dirfd> "
20353 "argument. A string of the first form occurs when B<AT_EMPTY_PATH> is "
20354 "employed. A string of the second form occurs when the script is specified "
20355 "via both I<dirfd> and I<pathname>; in this case, I<P> is the value given in "
20359 #. type: Plain text
20360 #: build/C/man2/execveat.2:210
20362 "For the same reasons described in B<fexecve>(3), the natural idiom when "
20363 "using B<execveat>(2) is to set the close-on-exec flag on I<dirfd>. (But "
20367 #. type: Plain text
20368 #: build/C/man2/execveat.2:215
20370 "The B<ENOENT> error described above means that it is not possible to set the "
20371 "close-on-exec flag on the file descriptor given to a call of the form:"
20374 #. type: Plain text
20375 #: build/C/man2/execveat.2:217
20377 msgid " execveat(fd, \"\", argv, envp, AT_EMPTY_PATH);\n"
20380 #. For an example, see Michael Kerrisk's 2015-01-10 reply in this LKML
20381 #. thread (http://thread.gmane.org/gmane.linux.kernel/1836105/focus=20229):
20383 #. Subject: [PATCHv10 man-pages 5/5] execveat.2: initial man page.\" for execveat(2
20384 #. Date: Mon, 24 Nov 2014 11:53:59 +0000
20385 #. type: Plain text
20386 #: build/C/man2/execveat.2:229
20388 "However, the inability to set the close-on-exec flag means that a file "
20389 "descriptor referring to the script leaks through to the script itself. As "
20390 "well as wasting a file descriptor, this leakage can lead to file-descriptor "
20391 "exhaustion in scenarios where scripts recursively employ B<execveat>()."
20394 #. type: Plain text
20395 #: build/C/man2/execveat.2:233
20396 msgid "B<execve>(2), B<openat>(2), B<fexecve>(3)"