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: 2013-09-28 04:06+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:31 build/C/man2/chown.2:38 build/C/man2/chroot.2:33 build/C/man2/close.2:35 build/C/man2/dup.2:36 build/C/man7/environ.7:34 build/C/man2/execve.2:37 build/C/man2/exit_group.2:25 build/C/man2/fcntl.2:61 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:10 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:37 build/C/man2/syscall.2:40 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
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:31 build/C/man2/chown.2:38 build/C/man2/chroot.2:33 build/C/man2/close.2:35 build/C/man3/confstr.3:31 build/C/man3/crypt.3:36 build/C/man3/daemon.3:36 build/C/man3/des_crypt.3:14 build/C/man2/dup.2:36 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:61 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:10 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:37 build/C/man2/syscall.2:40 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
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:32 build/C/man2/chown.2:39 build/C/man2/chroot.2:34 build/C/man2/close.2:36 build/C/man3/confstr.3:32 build/C/man3/crypt.3:37 build/C/man3/daemon.3:37 build/C/man3/des_crypt.3:15 build/C/man2/dup.2:37 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:62 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:11 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:38 build/C/man2/syscall.2:41 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
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:34 build/C/man2/chown.2:41 build/C/man2/chroot.2:36 build/C/man2/close.2:38 build/C/man3/confstr.3:34 build/C/man3/crypt.3:39 build/C/man3/daemon.3:39 build/C/man3/des_crypt.3:18 build/C/man2/dup.2:39 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:64 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:13 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:40 build/C/man2/syscall.2:43 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
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:52 build/C/man2/alarm.2:39 build/C/man2/brk.2:64 build/C/man2/chdir.2:59 build/C/man2/chmod.2:58 build/C/man2/chown.2:67 build/C/man2/chroot.2:63 build/C/man2/close.2:44 build/C/man3/confstr.3:48 build/C/man3/crypt.3:56 build/C/man3/daemon.3:51 build/C/man3/des_crypt.3:34 build/C/man2/dup.2:52 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:71 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:48 build/C/man2/ioctl_list.2:33 build/C/man2/ioperm.2:45 build/C/man3/lockf.3:48 build/C/man2/mincore.2:51 build/C/man2/mkdir.2:21 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:50 build/C/man2/syscall.2:51 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
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:156 build/C/man2/alarm.2:59 build/C/man2/brk.2:114 build/C/man2/chdir.2:125 build/C/man2/chmod.2:219 build/C/man2/chown.2:181 build/C/man2/chroot.2:134 build/C/man2/close.2:84 build/C/man3/confstr.3:127 build/C/man3/crypt.3:172 build/C/man3/daemon.3:91 build/C/man3/des_crypt.3:134 build/C/man2/dup.2:170 build/C/man3/encrypt.3:137 build/C/man3/euidaccess.3:73 build/C/man3/exec.3:199 build/C/man2/execve.2:450 build/C/man2/exit_group.2:43 build/C/man2/fcntl.2:1146 build/C/man3/fexecve.3:94 build/C/man2/flock.2:138 build/C/man2/fork.2:206 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:69 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:117 build/C/man2/ioperm.2:104 build/C/man3/lockf.3:154 build/C/man2/mincore.2:134 build/C/man2/mkdir.2:118 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:72 build/C/man2/swapon.2:151 build/C/man3/sysconf.3:324 build/C/man2/sysctl.2:100 build/C/man2/sysinfo.2:83 build/C/man3/tcgetpgrp.3:109 build/C/man2/truncate.2:195 build/C/man3/ualarm.3:92 build/C/man2/umask.2:95 build/C/man2/uname.2:73 build/C/man2/uselib.2:76 build/C/man3/usleep.3:91 build/C/man2/vfork.2:159 build/C/man2/vhangup.2:63
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:158 build/C/man2/alarm.2:61 build/C/man2/brk.2:122 build/C/man2/chdir.2:127 build/C/man2/chown.2:192 build/C/man2/chroot.2:139 build/C/man2/close.2:87 build/C/man3/crypt.3:177 build/C/man3/daemon.3:97 build/C/man2/dup.2:180 build/C/man3/encrypt.3:148 build/C/man3/euidaccess.3:79 build/C/man3/exec.3:205 build/C/man2/execve.2:458 build/C/man2/exit_group.2:45 build/C/man2/fcntl.2:1196 build/C/man3/fexecve.3:98 build/C/man2/flock.2:147 build/C/man2/fork.2:208 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:77 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:132 build/C/man2/ioperm.2:108 build/C/man2/mkdir.2:121 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:157 build/C/man2/syscall.2:78 build/C/man2/syscalls.2:656 build/C/man2/sysctl.2:114 build/C/man3/tcgetpgrp.3:111 build/C/man2/truncate.2:208 build/C/man3/ualarm.3:100 build/C/man2/umask.2:97 build/C/man2/uname.2:82 build/C/man2/uselib.2:80 build/C/man3/usleep.3:109 build/C/man2/vfork.2:174
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:288 build/C/man3/confstr.3:129 build/C/man3/encrypt.3:150 build/C/man2/execve.2:544 build/C/man2/fork.2:239 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:202 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:251 build/C/man2/alarm.2:79 build/C/man2/brk.2:164 build/C/man2/chdir.2:136 build/C/man2/chmod.2:221 build/C/man2/chown.2:336 build/C/man2/chroot.2:151 build/C/man2/close.2:125 build/C/man3/confstr.3:146 build/C/man3/crypt.3:238 build/C/man3/daemon.3:105 build/C/man3/des_crypt.3:137 build/C/man2/dup.2:207 build/C/man3/encrypt.3:174 build/C/man7/environ.7:241 build/C/man3/euidaccess.3:94 build/C/man3/exec.3:241 build/C/man2/execve.2:639 build/C/man2/exit_group.2:49 build/C/man2/fcntl.2:1297 build/C/man3/fexecve.3:106 build/C/man2/flock.2:201 build/C/man2/fork.2:244 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:90 build/C/man3/gethostid.3:124 build/C/man2/gethostname.2:176 build/C/man3/getlogin.3:209 build/C/man3/getopt.3:514 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:140 build/C/man2/ioctl_list.2:963 build/C/man2/ioperm.2:121 build/C/man3/lockf.3:156 build/C/man2/mincore.2:166 build/C/man2/mkdir.2:133 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:74 build/C/man2/swapon.2:191 build/C/man2/syscall.2:219 build/C/man2/syscalls.2:833 build/C/man3/sysconf.3:335 build/C/man2/sysctl.2:181 build/C/man2/sysinfo.2:94 build/C/man3/tcgetpgrp.3:120 build/C/man2/truncate.2:256 build/C/man3/ualarm.3:142 build/C/man2/umask.2:118 build/C/man2/uname.2:167 build/C/man2/uselib.2:102 build/C/man3/usleep.3:142 build/C/man2/vfork.2:273 build/C/man2/vhangup.2:66
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:262 build/C/man2/alarm.2:88 build/C/man2/brk.2:169 build/C/man2/chdir.2:140 build/C/man2/chmod.2:228 build/C/man2/chown.2:342 build/C/man2/chroot.2:154 build/C/man2/close.2:132 build/C/man3/confstr.3:150 build/C/man3/crypt.3:244 build/C/man3/daemon.3:108 build/C/man3/des_crypt.3:141 build/C/man2/dup.2:211 build/C/man3/encrypt.3:179 build/C/man7/environ.7:255 build/C/man3/euidaccess.3:105 build/C/man3/exec.3:248 build/C/man2/execve.2:650 build/C/man2/exit_group.2:51 build/C/man2/fcntl.2:1318 build/C/man3/fexecve.3:108 build/C/man2/flock.2:215 build/C/man2/fork.2:255 build/C/man3/fpathconf.3:185 build/C/man2/fsync.2:171 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:95 build/C/man3/gethostid.3:127 build/C/man2/gethostname.2:180 build/C/man3/getlogin.3:213 build/C/man3/getopt.3:516 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:148 build/C/man2/ioctl_list.2:965 build/C/man2/ioperm.2:125 build/C/man3/lockf.3:171 build/C/man2/mincore.2:169 build/C/man2/mkdir.2:145 build/C/man2/nice.2:112 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:76 build/C/man2/swapon.2:195 build/C/man2/syscall.2:223 build/C/man2/syscalls.2:837 build/C/man3/sysconf.3:343 build/C/man2/sysctl.2:183 build/C/man2/sysinfo.2:96 build/C/man3/tcgetpgrp.3:124 build/C/man2/truncate.2:260 build/C/man3/ualarm.3:150 build/C/man2/umask.2:124 build/C/man2/uname.2:171 build/C/man2/uselib.2:112 build/C/man3/usleep.3:151 build/C/man2/vfork.2:279 build/C/man2/vhangup.2:69
307 #: build/C/man2/_syscall.2:195 build/C/man2/access.2:269 build/C/man2/alarm.2:95 build/C/man2/brk.2:176 build/C/man2/chdir.2:147 build/C/man2/chmod.2:235 build/C/man2/chown.2:349 build/C/man2/chroot.2:161 build/C/man2/close.2:139 build/C/man3/confstr.3:157 build/C/man3/crypt.3:251 build/C/man3/daemon.3:115 build/C/man3/des_crypt.3:148 build/C/man2/dup.2:218 build/C/man3/encrypt.3:186 build/C/man7/environ.7:262 build/C/man3/euidaccess.3:112 build/C/man3/exec.3:255 build/C/man2/execve.2:657 build/C/man2/exit_group.2:58 build/C/man2/fcntl.2:1325 build/C/man3/fexecve.3:115 build/C/man2/flock.2:222 build/C/man2/fork.2:262 build/C/man3/fpathconf.3:192 build/C/man2/fsync.2:178 build/C/man3/get_nprocs_conf.3:95 build/C/man2/get_thread_area.2:65 build/C/man3/getcwd.3:263 build/C/man2/getdomainname.2:138 build/C/man3/getdtablesize.3:102 build/C/man3/gethostid.3:134 build/C/man2/gethostname.2:187 build/C/man3/getlogin.3:220 build/C/man3/getopt.3:523 build/C/man2/getpagesize.2:118 build/C/man2/gettid.2:97 build/C/man3/getumask.3:72 build/C/man3/getusershell.3:112 build/C/man2/idle.2:71 build/C/man2/ioctl.2:155 build/C/man2/ioctl_list.2:972 build/C/man2/ioperm.2:132 build/C/man3/lockf.3:178 build/C/man2/mincore.2:176 build/C/man2/mkdir.2:152 build/C/man2/nice.2:119 build/C/man2/pread.2:170 build/C/man2/set_thread_area.2:81 build/C/man2/setup.2:79 build/C/man5/shells.5:66 build/C/man3/sleep.3:73 build/C/man3/swab.3:83 build/C/man2/swapon.2:202 build/C/man2/syscall.2:230 build/C/man2/syscalls.2:844 build/C/man3/sysconf.3:350 build/C/man2/sysctl.2:190 build/C/man2/sysinfo.2:103 build/C/man3/tcgetpgrp.3:131 build/C/man2/truncate.2:267 build/C/man3/ualarm.3:157 build/C/man2/umask.2:131 build/C/man2/uname.2:178 build/C/man2/uselib.2:119 build/C/man3/usleep.3:158 build/C/man2/vfork.2:286 build/C/man2/vhangup.2:76
309 "This page is part of release 3.54 of the Linux I<man-pages> project. A "
310 "description of the project, and information about reporting bugs, can be "
311 "found at \\%http://www.kernel.org/doc/man-pages/."
315 #: build/C/man2/access.2:43
321 #: build/C/man2/access.2:43
327 #: build/C/man2/access.2:46
328 msgid "access - check real user's permissions for a file"
332 #: build/C/man2/access.2:49 build/C/man2/alarm.2:36 build/C/man2/close.2:41 build/C/man3/confstr.3:37 build/C/man3/crypt.3:44 build/C/man2/dup.2:42 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
334 msgid "B<#include E<lt>unistd.hE<gt>>\n"
338 #: build/C/man2/access.2:51
340 msgid "B<int access(const char *>I<pathname>B<, int >I<mode>B<);>\n"
344 #: build/C/man2/access.2:59
346 "B<access>() checks whether the calling process can access the file "
347 "I<pathname>. If I<pathname> is a symbolic link, it is dereferenced."
350 #. F_OK is defined as 0 on every system that I know of.
352 #: build/C/man2/access.2:73
354 "The I<mode> specifies the accessibility check(s) to be performed, and is "
355 "either the value B<F_OK>, or a mask consisting of the bitwise OR of one or "
356 "more of B<R_OK>, B<W_OK>, and B<X_OK>. B<F_OK> tests for the existence of "
357 "the file. B<R_OK>, B<W_OK>, and B<X_OK> test whether the file exists and "
358 "grants read, write, and execute permissions, respectively."
362 #: build/C/man2/access.2:82
364 "The check is done using the calling process's I<real> UID and GID, rather "
365 "than the effective IDs as is done when actually attempting an operation "
366 "(e.g., B<open>(2)) on the file. This allows set-user-ID programs to easily "
367 "determine the invoking user's authority."
371 #: build/C/man2/access.2:88
373 "If the calling process is privileged (i.e., its real UID is zero), then an "
374 "B<X_OK> check is successful for a regular file if execute permission is "
375 "enabled for any of the file owner, group, or other."
379 #: build/C/man2/access.2:88 build/C/man2/alarm.2:54 build/C/man2/brk.2:93 build/C/man2/chdir.2:70 build/C/man2/chmod.2:153 build/C/man2/chown.2:119 build/C/man2/chroot.2:90 build/C/man2/close.2:64 build/C/man3/confstr.3:94 build/C/man3/crypt.3:120 build/C/man3/daemon.3:73 build/C/man3/des_crypt.3:106 build/C/man2/dup.2:120 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:1051 build/C/man3/fexecve.3:67 build/C/man2/flock.2:111 build/C/man2/fork.2:173 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:83 build/C/man2/ioctl_list.2:107 build/C/man2/ioperm.2:82 build/C/man3/lockf.3:116 build/C/man2/mincore.2:94 build/C/man2/mkdir.2:48 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:108 build/C/man2/syscall.2:72 build/C/man3/sysconf.3:311 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
385 #: build/C/man2/access.2:104
387 "On success (all requested permissions granted, or I<mode> is B<F_OK> and the "
388 "file exists), zero is returned. On error (at least one bit in I<mode> asked "
389 "for a permission that is denied, or I<mode> is B<F_OK> and the file does not "
390 "exist, or some other error occurred), -1 is returned, and I<errno> is set "
395 #: build/C/man2/access.2:104 build/C/man2/chdir.2:75 build/C/man2/chmod.2:158 build/C/man2/chown.2:124 build/C/man2/chroot.2:95 build/C/man2/close.2:70 build/C/man3/confstr.3:121 build/C/man3/crypt.3:123 build/C/man2/dup.2:126 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:1084 build/C/man3/fexecve.3:74 build/C/man2/flock.2:116 build/C/man2/fork.2:180 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:92 build/C/man2/ioperm.2:87 build/C/man3/lockf.3:121 build/C/man2/mincore.2:101 build/C/man2/mkdir.2:53 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:113 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
401 #: build/C/man2/access.2:107
402 msgid "B<access>() shall fail if:"
406 #: build/C/man2/access.2:107 build/C/man2/chdir.2:81 build/C/man2/chdir.2:117 build/C/man2/chmod.2:163 build/C/man2/chown.2:129 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:54 build/C/man2/truncate.2:118 build/C/man2/uselib.2:59
412 #: build/C/man2/access.2:114
414 "The requested access would be denied to the file, or search permission is "
415 "denied for one of the directories in the path prefix of I<pathname>. (See "
416 "also B<path_resolution>(7).)"
420 #: build/C/man2/access.2:114 build/C/man2/chdir.2:94 build/C/man2/chmod.2:175 build/C/man2/chown.2:138 build/C/man2/chroot.2:112 build/C/man2/execve.2:403 build/C/man2/mkdir.2:76 build/C/man2/truncate.2:151
426 #: build/C/man2/access.2:118 build/C/man2/mkdir.2:80
427 msgid "Too many symbolic links were encountered in resolving I<pathname>."
431 #: build/C/man2/access.2:118 build/C/man2/chdir.2:98 build/C/man2/chmod.2:179 build/C/man2/chown.2:142 build/C/man2/chroot.2:116 build/C/man2/execve.2:411 build/C/man2/gethostname.2:109 build/C/man2/mkdir.2:84 build/C/man2/truncate.2:154
433 msgid "B<ENAMETOOLONG>"
437 #: build/C/man2/access.2:122
438 msgid "I<pathname> is too long."
442 #: build/C/man2/access.2:122 build/C/man2/chdir.2:102 build/C/man2/chmod.2:183 build/C/man2/chown.2:146 build/C/man2/chown.2:172 build/C/man2/chroot.2:120 build/C/man2/execve.2:418 build/C/man3/getcwd.3:198 build/C/man3/getlogin.3:122 build/C/man2/mkdir.2:87 build/C/man2/swapon.2:136 build/C/man2/truncate.2:158
448 #: build/C/man2/access.2:127
449 msgid "A component of I<pathname> does not exist or is a dangling symbolic link."
453 #: build/C/man2/access.2:127 build/C/man2/chdir.2:108 build/C/man2/chmod.2:189 build/C/man2/chown.2:152 build/C/man2/chroot.2:126 build/C/man2/execve.2:432 build/C/man2/mkdir.2:104 build/C/man2/sysctl.2:88 build/C/man2/truncate.2:161
459 #: build/C/man2/access.2:132 build/C/man2/mkdir.2:109
460 msgid "A component used as a directory in I<pathname> is not, in fact, a directory."
464 #: build/C/man2/access.2:132 build/C/man2/chmod.2:198 build/C/man2/chmod.2:216 build/C/man2/chown.2:159 build/C/man2/chown.2:178 build/C/man2/mkdir.2:114 build/C/man2/truncate.2:170
470 #: build/C/man2/access.2:135
471 msgid "Write permission was requested for a file on a read-only filesystem."
475 #: build/C/man2/access.2:138
476 msgid "B<access>() may fail if:"
480 #: build/C/man2/access.2:138 build/C/man2/chdir.2:87 build/C/man2/chmod.2:168 build/C/man2/chown.2:134 build/C/man2/chroot.2:105 build/C/man2/execve.2:386 build/C/man2/fcntl.2:1106 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:97 build/C/man2/mincore.2:104 build/C/man2/mkdir.2:73 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
486 #: build/C/man2/access.2:142 build/C/man2/mkdir.2:76
487 msgid "I<pathname> points outside your accessible address space."
491 #: build/C/man2/access.2:142 build/C/man3/confstr.3:122 build/C/man2/dup.2:151 build/C/man2/execve.2:390 build/C/man2/fcntl.2:1122 build/C/man3/fexecve.3:78 build/C/man2/flock.2:126 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:101 build/C/man2/ioperm.2:88 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:121 build/C/man3/tcgetpgrp.3:91 build/C/man2/truncate.2:140 build/C/man2/truncate.2:191 build/C/man3/ualarm.3:88 build/C/man3/usleep.3:87
497 #: build/C/man2/access.2:146
498 msgid "I<mode> was incorrectly specified."
502 #: build/C/man2/access.2:146 build/C/man2/chdir.2:91 build/C/man2/chmod.2:172 build/C/man2/chmod.2:210 build/C/man2/chown.2:169 build/C/man2/chroot.2:109 build/C/man2/close.2:81 build/C/man2/execve.2:394 build/C/man2/fsync.2:118 build/C/man2/ioperm.2:94 build/C/man2/truncate.2:145
508 #: build/C/man2/access.2:149 build/C/man2/chdir.2:94 build/C/man2/chmod.2:175 build/C/man2/chroot.2:112 build/C/man2/close.2:84 build/C/man2/execve.2:397
509 msgid "An I/O error occurred."
513 #: build/C/man2/access.2:149 build/C/man2/chdir.2:105 build/C/man2/chmod.2:186 build/C/man2/chown.2:149 build/C/man2/chroot.2:123 build/C/man2/execve.2:429 build/C/man2/fork.2:196 build/C/man3/getlogin.3:125 build/C/man2/ioperm.2:97 build/C/man2/mincore.2:112 build/C/man2/mincore.2:124 build/C/man2/mkdir.2:92 build/C/man2/swapon.2:141
519 #: build/C/man2/access.2:152 build/C/man2/chdir.2:108 build/C/man2/chmod.2:189 build/C/man2/chown.2:152 build/C/man2/chroot.2:126 build/C/man2/execve.2:432 build/C/man2/mkdir.2:95
520 msgid "Insufficient kernel memory was available."
524 #: build/C/man2/access.2:152 build/C/man2/execve.2:447 build/C/man2/truncate.2:173
530 #: build/C/man2/access.2:156
531 msgid "Write access was requested to an executable which is being executed."
535 #: build/C/man2/access.2:158 build/C/man2/close.2:87 build/C/man2/fork.2:208 build/C/man3/swab.3:74 build/C/man2/umask.2:97
536 msgid "SVr4, 4.3BSD, POSIX.1-2001."
540 #: build/C/man2/access.2:173
542 "B<Warning>: Using B<access>() to check if a user is authorized to, for "
543 "example, open a file before actually doing so using B<open>(2) creates a "
544 "security hole, because the user might exploit the short time interval "
545 "between checking and opening the file to manipulate it. B<For this reason, "
546 "the use of this system call should be avoided>. (In the example just "
547 "described, a safer alternative would be to temporarily switch the process's "
548 "effective user ID to the real ID and then call B<open>(2).)"
552 #: build/C/man2/access.2:180
554 "B<access>() always dereferences symbolic links. If you need to check the "
555 "permissions on a symbolic link, use B<faccessat>(2) with the flag "
556 "B<AT_SYMLINK_NOFOLLOW>."
560 #: build/C/man2/access.2:187
562 "B<access>() returns an error if any of the access types in I<mode> is "
563 "denied, even if some of the other access types in I<mode> are permitted."
566 #. HPU-UX 11 and Tru64 5.1 do this.
568 #: build/C/man2/access.2:194
570 "If the calling process has appropriate privileges (i.e., is superuser), "
571 "POSIX.1-2001 permits an implementation to indicate success for an B<X_OK> "
572 "check even if none of the execute file permission bits are set. Linux does "
577 #: build/C/man2/access.2:202
579 "A file is accessible only if the permissions on each of the directories in "
580 "the path prefix of I<pathname> grant search (i.e., execute) access. If any "
581 "directory is inaccessible, then the B<access>() call will fail, regardless "
582 "of the permissions on the file itself."
586 #: build/C/man2/access.2:210
588 "Only access bits are checked, not the file type or contents. Therefore, if "
589 "a directory is found to be writable, it probably means that files can be "
590 "created in the directory, and not that the directory can be written as a "
591 "file. Similarly, a DOS file may be found to be \"executable,\" but the "
592 "B<execve>(2) call will still fail."
596 #: build/C/man2/access.2:217
598 "B<access>() may not work correctly on NFSv2 filesystems with UID mapping "
599 "enabled, because UID mapping is done on the server and hidden from the "
600 "client, which checks permissions. (NFS versions 3 and higher perform the "
601 "check on the server.) Similar problems can occur to FUSE mounts."
605 #: build/C/man2/access.2:217 build/C/man7/environ.7:203 build/C/man2/fcntl.2:1239 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:326 build/C/man2/sysctl.2:135 build/C/man2/truncate.2:248 build/C/man2/vfork.2:252
610 #. This behavior appears to have been an implementation accident.
612 #: build/C/man2/access.2:240
614 "In kernel 2.4 (and earlier) there is some strangeness in the handling of "
615 "B<X_OK> tests for superuser. If all categories of execute permission are "
616 "disabled for a nondirectory file, then the only B<access>() test that "
617 "returns -1 is when I<mode> is specified as just B<X_OK>; if B<R_OK> or "
618 "B<W_OK> is also specified in I<mode>, then B<access>() returns 0 for such "
619 "files. Early 2.6 kernels (up to and including 2.6.3) also behaved in the "
620 "same way as kernel 2.4."
624 #: build/C/man2/access.2:251
626 "In kernels before 2.6.20, B<access>() ignored the effect of the "
627 "B<MS_NOEXEC> flag if it was used to B<mount>(2) the underlying filesystem. "
628 "Since kernel 2.6.20, B<access>() honors this flag."
632 #: build/C/man2/access.2:262
634 "B<chmod>(2), B<chown>(2), B<faccessat>(2), B<open>(2), B<setgid>(2), "
635 "B<setuid>(2), B<stat>(2), B<euidaccess>(3), B<credentials>(7), "
636 "B<path_resolution>(7)"
640 #: build/C/man2/alarm.2:30
646 #: build/C/man2/alarm.2:30 build/C/man3/ualarm.3:24
652 #: build/C/man2/alarm.2:33
653 msgid "alarm - set an alarm clock for delivery of a signal"
657 #: build/C/man2/alarm.2:38
659 msgid "B<unsigned int alarm(unsigned int >I<seconds>B<);>\n"
663 #: build/C/man2/alarm.2:46
665 "B<alarm>() arranges for a B<SIGALRM> signal to be delivered to the calling "
666 "process in I<seconds> seconds."
670 #: build/C/man2/alarm.2:50
671 msgid "If I<seconds> is zero, any pending alarm is canceled."
675 #: build/C/man2/alarm.2:54
676 msgid "In any event any previously set B<alarm>() is canceled."
680 #: build/C/man2/alarm.2:59
682 "B<alarm>() returns the number of seconds remaining until any previously "
683 "scheduled alarm was due to be delivered, or zero if there was no previously "
688 #: build/C/man2/alarm.2:61
689 msgid "SVr4, POSIX.1-2001, 4.3BSD."
693 #: build/C/man2/alarm.2:67
695 "B<alarm>() and B<setitimer>(2) share the same timer; calls to one will "
696 "interfere with use of the other."
700 #: build/C/man2/alarm.2:76
702 "B<sleep>(3) may be implemented using B<SIGALRM>; mixing calls to B<alarm>() "
703 "and B<sleep>(3) is a bad idea."
707 #: build/C/man2/alarm.2:79
709 "Scheduling delays can, as ever, cause the execution of the process to be "
710 "delayed by an arbitrary amount of time."
714 #: build/C/man2/alarm.2:88
716 "B<gettimeofday>(2), B<pause>(2), B<select>(2), B<setitimer>(2), "
717 "B<sigaction>(2), B<signal>(2), B<sleep>(3), B<time>(7)"
721 #: build/C/man2/brk.2:29
727 #: build/C/man2/brk.2:29 build/C/man2/chroot.2:33 build/C/man3/getcwd.3:32 build/C/man3/gethostid.3:29
733 #: build/C/man2/brk.2:32
734 msgid "brk, sbrk - change data segment size"
738 #: build/C/man2/brk.2:34 build/C/man2/chdir.2:38 build/C/man2/chown.2:43 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:42 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
739 msgid "B<#include E<lt>unistd.hE<gt>>"
743 #: build/C/man2/brk.2:36
744 msgid "B<int brk(void *>I<addr>B<);>"
748 #: build/C/man2/brk.2:38
749 msgid "B<void *sbrk(intptr_t >I<increment>B<);>"
753 #: build/C/man2/brk.2:42 build/C/man2/chdir.2:46 build/C/man2/chmod.2:44 build/C/man2/chown.2:53 build/C/man2/chroot.2:44 build/C/man3/confstr.3:44 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/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
754 msgid "Feature Test Macro Requirements for glibc (see B<feature_test_macros>(7)):"
758 #: build/C/man2/brk.2:46
759 msgid "B<brk>(), B<sbrk>():"
763 #: 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
765 msgid "Since glibc 2.12:"
769 #: build/C/man2/brk.2:56
772 "_BSD_SOURCE || _SVID_SOURCE ||\n"
773 " (_XOPEN_SOURCE\\ E<gt>=\\ 500 ||\n"
774 " _XOPEN_SOURCE\\ &&\\ _XOPEN_SOURCE_EXTENDED) &&\n"
775 " !(_POSIX_C_SOURCE\\ E<gt>=\\ 200112L || _XOPEN_SOURCE\\ E<gt>=\\ 600)\n"
779 #: build/C/man2/brk.2:61
781 "Before glibc 2.12: _BSD_SOURCE || _SVID_SOURCE || _XOPEN_SOURCE\\ E<gt>=\\ "
782 "500 || _XOPEN_SOURCE\\ &&\\ _XOPEN_SOURCE_EXTENDED"
786 #: build/C/man2/brk.2:76
788 "B<brk>() and B<sbrk>() change the location of the I<program break>, which "
789 "defines the end of the process's data segment (i.e., the program break is "
790 "the first location after the end of the uninitialized data segment). "
791 "Increasing the program break has the effect of allocating memory to the "
792 "process; decreasing the break deallocates memory."
796 #: build/C/man2/brk.2:83
798 "B<brk>() sets the end of the data segment to the value specified by "
799 "I<addr>, when that value is reasonable, the system has enough memory, and "
800 "the process does not exceed its maximum data size (see B<setrlimit>(2))."
804 #: build/C/man2/brk.2:93
806 "B<sbrk>() increments the program's data space by I<increment> bytes. "
807 "Calling B<sbrk>() with an I<increment> of 0 can be used to find the current "
808 "location of the program break."
812 #: build/C/man2/brk.2:102
814 "On success, B<brk>() returns zero. On error, -1 is returned, and I<errno> "
815 "is set to B<ENOMEM>. (But see I<Linux Notes> below.)"
819 #: build/C/man2/brk.2:114
821 "On success, B<sbrk>() returns the previous program break. (If the break "
822 "was increased, then this value is a pointer to the start of the newly "
823 "allocated memory). On error, I<(void\\ *)\\ -1> is returned, and I<errno> "
824 "is set to B<ENOMEM>."
831 #. are not defined in the C Standard and are deliberately excluded from the
832 #. POSIX.1-1990 standard (see paragraphs B.1.1.1.3 and B.8.3.3).
834 #: build/C/man2/brk.2:122
835 msgid "4.3BSD; SUSv1, marked LEGACY in SUSv2, removed in POSIX.1-2001."
839 #: build/C/man2/brk.2:131
841 "Avoid using B<brk>() and B<sbrk>(): the B<malloc>(3) memory allocation "
842 "package is the portable and comfortable way of allocating memory."
846 #. \fIint\fP (e.g., XPGv4, DU 4.0, HP-UX 11, FreeBSD 4.0, OpenBSD 3.2),
847 #. \fIssize_t\fP (OSF1 2.0, Irix 5.3, 6.5),
848 #. \fIptrdiff_t\fP (libc4, libc5, ulibc, glibc 2.0, 2.1),
849 #. \fIintptr_t\fP (e.g., XPGv5, AIX, SunOS 5.8, 5.9, FreeBSD 4.7, NetBSD 1.6,
850 #. Tru64 5.1, glibc2.2).
852 #: build/C/man2/brk.2:141
854 "Various systems use various types for the argument of B<sbrk>(). Common are "
855 "I<int>, I<ssize_t>, I<ptrdiff_t>, I<intptr_t>."
859 #: build/C/man2/brk.2:141 build/C/man2/vfork.2:213
865 #: build/C/man2/brk.2:157
867 "The return value described above for B<brk>() is the behavior provided by "
868 "the glibc wrapper function for the Linux B<brk>() system call. (On most "
869 "other implementations, the return value from B<brk>() is the same; this "
870 "return value was also specified in SUSv2.) However, the actual Linux system "
871 "call returns the new program break on success. On failure, the system call "
872 "returns the current break. The glibc wrapper function does some work (i.e., "
873 "checks whether the new break is less than I<addr>) to provide the 0 and -1 "
874 "return values described above."
878 #: build/C/man2/brk.2:164
880 "On Linux, B<sbrk>() is implemented as a library function that uses the "
881 "B<brk>() system call, and does some internal bookkeeping so that it can "
882 "return the old break value."
886 #: build/C/man2/brk.2:169
887 msgid "B<execve>(2), B<getrlimit>(2), B<end>(3), B<malloc>(3)"
891 #: build/C/man2/chdir.2:33
897 #: build/C/man2/chdir.2:33
903 #: build/C/man2/chdir.2:36
904 msgid "chdir, fchdir - change working directory"
908 #: build/C/man2/chdir.2:40
909 msgid "B<int chdir(const char *>I<path>B<);>"
913 #: build/C/man2/chdir.2:42
914 msgid "B<int fchdir(int >I<fd>B<);>"
918 #: build/C/man2/chdir.2:49
923 #: build/C/man2/chdir.2:54 build/C/man2/chmod.2:53 build/C/man2/chown.2:62 build/C/man3/gethostid.3:50 build/C/man2/truncate.2:66 build/C/man2/truncate.2:74
925 "_BSD_SOURCE || _XOPEN_SOURCE\\ E<gt>=\\ 500 || _XOPEN_SOURCE\\ &&\\ "
926 "_XOPEN_SOURCE_EXTENDED"
930 #: build/C/man2/chdir.2:56 build/C/man2/chmod.2:55 build/C/man2/chown.2:64 build/C/man2/pread.2:50 build/C/man2/truncate.2:68
931 msgid "|| /* Since glibc 2.12: */ _POSIX_C_SOURCE\\ E<gt>=\\ 200809L"
935 #: build/C/man2/chdir.2:64
937 "B<chdir>() changes the current working directory of the calling process to "
938 "the directory specified in I<path>."
942 #: build/C/man2/chdir.2:70
944 "B<fchdir>() is identical to B<chdir>(); the only difference is that the "
945 "directory is given as an open file descriptor."
949 #: build/C/man2/chdir.2:75 build/C/man2/chmod.2:158 build/C/man2/chown.2:124 build/C/man2/chroot.2:95 build/C/man2/flock.2:116 build/C/man2/getdomainname.2:80 build/C/man2/gethostname.2:94 build/C/man2/ioperm.2:87 build/C/man3/lockf.3:121 build/C/man2/swapon.2:113 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
951 "On success, zero is returned. On error, -1 is returned, and I<errno> is set "
956 #: build/C/man2/chdir.2:81
958 "Depending on the filesystem, other errors can be returned. The more general "
959 "errors for B<chdir>() are listed below:"
963 #: build/C/man2/chdir.2:87
965 "Search permission is denied for one of the components of I<path>. (See also "
966 "B<path_resolution>(7).)"
970 #: build/C/man2/chdir.2:91 build/C/man2/chmod.2:172 build/C/man2/chown.2:138 build/C/man2/chroot.2:109
971 msgid "I<path> points outside your accessible address space."
975 #: build/C/man2/chdir.2:98 build/C/man2/chmod.2:179 build/C/man2/chown.2:142 build/C/man2/chroot.2:116
976 msgid "Too many symbolic links were encountered in resolving I<path>."
980 #: build/C/man2/chdir.2:102 build/C/man2/chmod.2:183 build/C/man2/chown.2:146 build/C/man2/chroot.2:120
981 msgid "I<path> is too long."
985 #: build/C/man2/chdir.2:105 build/C/man2/chmod.2:186 build/C/man2/chown.2:149 build/C/man2/chroot.2:123
986 msgid "The file does not exist."
990 #: build/C/man2/chdir.2:113 build/C/man2/chroot.2:131
991 msgid "A component of I<path> is not a directory."
995 #: build/C/man2/chdir.2:117
996 msgid "The general errors for B<fchdir>() are listed below:"
1000 #: build/C/man2/chdir.2:121
1001 msgid "Search permission was denied on the directory open on I<fd>."
1005 #: build/C/man2/chdir.2:121 build/C/man2/chmod.2:205 build/C/man2/chown.2:166 build/C/man2/close.2:71 build/C/man2/dup.2:127 build/C/man2/fcntl.2:1092 build/C/man2/flock.2:117 build/C/man2/fsync.2:114 build/C/man2/ioctl.2:93 build/C/man3/lockf.3:130 build/C/man3/tcgetpgrp.3:87 build/C/man2/truncate.2:183
1011 #: build/C/man2/chdir.2:125 build/C/man3/tcgetpgrp.3:91
1012 msgid "I<fd> is not a valid file descriptor."
1016 #: build/C/man2/chdir.2:127
1017 msgid "SVr4, 4.4BSD, POSIX.1-2001."
1021 #: build/C/man2/chdir.2:130
1023 "The current working directory is the starting point for interpreting "
1024 "relative pathnames (those not starting with \\(aq/\\(aq)."
1028 #: build/C/man2/chdir.2:136
1030 "A child process created via B<fork>(2) inherits its parent's current "
1031 "working directory. The current working directory is left unchanged by "
1036 #: build/C/man2/chdir.2:140
1037 msgid "B<chroot>(2), B<getcwd>(3), B<path_resolution>(7)"
1041 #: build/C/man2/chmod.2:31
1047 #: build/C/man2/chmod.2:31 build/C/man2/gethostname.2:32
1053 #: build/C/man2/chmod.2:34
1054 msgid "chmod, fchmod - change permissions of a file"
1058 #: build/C/man2/chmod.2:36 build/C/man3/getumask.3:37 build/C/man2/umask.2:41
1059 msgid "B<#include E<lt>sys/stat.hE<gt>>"
1063 #: build/C/man2/chmod.2:38
1064 msgid "B<int chmod(const char *>I<path>B<, mode_t >I<mode>B<);>"
1068 #: build/C/man2/chmod.2:40
1069 msgid "B<int fchmod(int >I<fd>B<, mode_t >I<mode>B<);>"
1073 #: build/C/man2/chmod.2:49
1074 msgid "B<fchmod>():"
1078 #: build/C/man2/chmod.2:61
1080 "These system calls change the permissions of a file. They differ only in "
1081 "how the file is specified:"
1085 #: build/C/man2/chmod.2:61 build/C/man2/chmod.2:66 build/C/man2/chown.2:70 build/C/man2/chown.2:75 build/C/man2/chown.2:79 build/C/man2/chown.2:233 build/C/man2/chown.2:238 build/C/man2/chown.2:244 build/C/man2/dup.2:62 build/C/man2/dup.2:68 build/C/man2/dup.2:101 build/C/man2/dup.2:110 build/C/man2/execve.2:124 build/C/man2/execve.2:128 build/C/man2/execve.2:131 build/C/man2/execve.2:134 build/C/man2/execve.2:137 build/C/man2/execve.2:140 build/C/man2/execve.2:143 build/C/man2/execve.2:146 build/C/man2/execve.2:149 build/C/man2/execve.2:152 build/C/man2/execve.2:156 build/C/man2/execve.2:160 build/C/man2/execve.2:169 build/C/man2/execve.2:176 build/C/man2/execve.2:181 build/C/man2/execve.2:188 build/C/man2/execve.2:195 build/C/man2/execve.2:202 build/C/man2/execve.2:209 build/C/man2/execve.2:213 build/C/man2/execve.2:216 build/C/man2/execve.2:224 build/C/man2/execve.2:228 build/C/man2/execve.2:233 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:77 build/C/man2/fork.2:82 build/C/man2/fork.2:94 build/C/man2/fork.2:101 build/C/man2/fork.2:107 build/C/man2/fork.2:114 build/C/man2/fork.2:120 build/C/man2/fork.2:125 build/C/man2/fork.2:133 build/C/man2/fork.2:142 build/C/man2/fork.2:156 build/C/man2/fork.2:165 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:692 build/C/man2/syscalls.2:713 build/C/man2/syscalls.2:724 build/C/man2/syscalls.2:731 build/C/man2/syscalls.2:742 build/C/man2/syscalls.2:754 build/C/man2/syscalls.2:775 build/C/man2/syscalls.2:783 build/C/man2/vfork.2:193 build/C/man2/vfork.2:197
1091 #: build/C/man2/chmod.2:66
1093 "B<chmod>() changes the permissions of the file specified whose pathname is "
1094 "given in I<path>, which is dereferenced if it is a symbolic link."
1098 #: build/C/man2/chmod.2:70
1100 "B<fchmod>() changes the permissions of the file referred to by the open "
1101 "file descriptor I<fd>."
1105 #: build/C/man2/chmod.2:75
1107 "The new file permissions are specified in I<mode>, which is a bit mask "
1108 "created by ORing together zero or more of the following:"
1112 #: build/C/man2/chmod.2:75
1114 msgid "B<S_ISUID> (04000)"
1118 #: build/C/man2/chmod.2:79
1119 msgid "set-user-ID (set process effective user ID on B<execve>(2))"
1123 #: build/C/man2/chmod.2:79
1125 msgid "B<S_ISGID> (02000)"
1129 #: build/C/man2/chmod.2:89
1131 "set-group-ID (set process effective group ID on B<execve>(2); mandatory "
1132 "locking, as described in B<fcntl>(2); take a new file's group from parent "
1133 "directory, as described in B<chown>(2) and B<mkdir>(2))"
1137 #: build/C/man2/chmod.2:89
1139 msgid "B<S_ISVTX> (01000)"
1143 #: build/C/man2/chmod.2:93
1144 msgid "sticky bit (restricted deletion flag, as described in B<unlink>(2))"
1148 #: build/C/man2/chmod.2:93
1150 msgid "B<S_IRUSR> (00400)"
1154 #: build/C/man2/chmod.2:96
1155 msgid "read by owner"
1159 #: build/C/man2/chmod.2:96
1161 msgid "B<S_IWUSR> (00200)"
1165 #: build/C/man2/chmod.2:99
1166 msgid "write by owner"
1170 #: build/C/man2/chmod.2:99
1172 msgid "B<S_IXUSR> (00100)"
1176 #: build/C/man2/chmod.2:103
1178 "execute/search by owner (\"search\" applies for directories, and means that "
1179 "entries within the directory can be accessed)"
1183 #: build/C/man2/chmod.2:103
1185 msgid "B<S_IRGRP> (00040)"
1189 #: build/C/man2/chmod.2:106
1190 msgid "read by group"
1194 #: build/C/man2/chmod.2:106
1196 msgid "B<S_IWGRP> (00020)"
1200 #: build/C/man2/chmod.2:109
1201 msgid "write by group"
1205 #: build/C/man2/chmod.2:109
1207 msgid "B<S_IXGRP> (00010)"
1211 #: build/C/man2/chmod.2:112
1212 msgid "execute/search by group"
1216 #: build/C/man2/chmod.2:112
1218 msgid "B<S_IROTH> (00004)"
1222 #: build/C/man2/chmod.2:115
1223 msgid "read by others"
1227 #: build/C/man2/chmod.2:115
1229 msgid "B<S_IWOTH> (00002)"
1233 #: build/C/man2/chmod.2:118
1234 msgid "write by others"
1238 #: build/C/man2/chmod.2:118
1240 msgid "B<S_IXOTH> (00001)"
1244 #: build/C/man2/chmod.2:121
1245 msgid "execute/search by others"
1249 #: build/C/man2/chmod.2:126
1251 "The effective UID of the calling process must match the owner of the file, "
1252 "or the process must be privileged (Linux: it must have the B<CAP_FOWNER> "
1257 #: build/C/man2/chmod.2:135
1259 "If the calling process is not privileged (Linux: does not have the "
1260 "B<CAP_FSETID> capability), and the group of the file does not match the "
1261 "effective group ID of the process or one of its supplementary group IDs, the "
1262 "B<S_ISGID> bit will be turned off, but this will not cause an error to be "
1267 #: build/C/man2/chmod.2:147
1269 "As a security measure, depending on the filesystem, the set-user-ID and "
1270 "set-group-ID execution bits may be turned off if a file is written. (On "
1271 "Linux this occurs if the writing process does not have the B<CAP_FSETID> "
1272 "capability.) On some filesystems, only the superuser can set the sticky "
1273 "bit, which may have a special meaning. For the sticky bit, and for "
1274 "set-user-ID and set-group-ID bits on directories, see B<stat>(2)."
1278 #: build/C/man2/chmod.2:153
1280 "On NFS filesystems, restricting the permissions will immediately influence "
1281 "already open files, because the access control is done on the server, but "
1282 "open files are maintained by the client. Widening the permissions may be "
1283 "delayed for other clients if attribute caching is enabled on them."
1287 #: build/C/man2/chmod.2:163
1289 "Depending on the filesystem, other errors can be returned. The more general "
1290 "errors for B<chmod>() are listed below:"
1293 #. Also search permission is required on the final component,
1294 #. maybe just to guarantee that it is a directory?
1296 #: build/C/man2/chmod.2:168 build/C/man2/chown.2:134 build/C/man2/chroot.2:105
1298 "Search permission is denied on a component of the path prefix. (See also "
1299 "B<path_resolution>(7).)"
1303 #: build/C/man2/chmod.2:192 build/C/man2/chown.2:155 build/C/man2/truncate.2:164
1304 msgid "A component of the path prefix is not a directory."
1308 #: build/C/man2/chmod.2:192 build/C/man2/chmod.2:213 build/C/man2/chown.2:155 build/C/man2/chown.2:175 build/C/man2/chroot.2:131 build/C/man2/execve.2:437 build/C/man2/execve.2:443 build/C/man2/fcntl.2:1141 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:101 build/C/man2/mkdir.2:109 build/C/man2/nice.2:62 build/C/man2/setup.2:57 build/C/man2/swapon.2:144 build/C/man3/tcgetpgrp.3:104 build/C/man2/truncate.2:164 build/C/man2/vhangup.2:56
1314 #: build/C/man2/chmod.2:198
1316 "The effective UID does not match the owner of the file, and the process is "
1317 "not privileged (Linux: it does not have the B<CAP_FOWNER> capability)."
1321 #: build/C/man2/chmod.2:201 build/C/man2/chown.2:162 build/C/man2/truncate.2:173
1322 msgid "The named file resides on a read-only filesystem."
1326 #: build/C/man2/chmod.2:205
1327 msgid "The general errors for B<fchmod>() are listed below:"
1331 #: build/C/man2/chmod.2:210
1332 msgid "The file descriptor I<fd> is not valid."
1336 #: build/C/man2/chmod.2:213 build/C/man2/chmod.2:216 build/C/man2/chmod.2:219 build/C/man2/chown.2:175 build/C/man2/chown.2:178 build/C/man2/chown.2:181
1341 #: build/C/man2/chmod.2:221 build/C/man2/chown.2:183
1342 msgid "4.4BSD, SVr4, POSIX.1-2001."
1346 #: build/C/man2/chmod.2:228
1348 "B<chown>(2), B<execve>(2), B<fchmodat>(2), B<open>(2), B<stat>(2), "
1349 "B<path_resolution>(7)"
1353 #: build/C/man2/chown.2:38
1359 #: build/C/man2/chown.2:38
1365 #: build/C/man2/chown.2:41
1366 msgid "chown, fchown, lchown - change ownership of a file"
1370 #: build/C/man2/chown.2:45
1371 msgid "B<int chown(const char *>I<path>B<, uid_t >I<owner>B<, gid_t >I<group>B<);>"
1375 #: build/C/man2/chown.2:47
1376 msgid "B<int fchown(int >I<fd>B<, uid_t >I<owner>B<, gid_t >I<group>B<);>"
1380 #: build/C/man2/chown.2:49
1381 msgid "B<int lchown(const char *>I<path>B<, uid_t >I<owner>B<, gid_t >I<group>B<);>"
1385 #: build/C/man2/chown.2:57
1386 msgid "B<fchown>(), B<lchown>():"
1390 #: build/C/man2/chown.2:70
1392 "These system calls change the owner and group of a file. They differ only "
1393 "in how the file is specified:"
1397 #: build/C/man2/chown.2:75
1399 "B<chown>() changes the ownership of the file specified by I<path>, which is "
1400 "dereferenced if it is a symbolic link."
1404 #: build/C/man2/chown.2:79
1406 "B<fchown>() changes the ownership of the file referred to by the open file "
1411 #: build/C/man2/chown.2:84
1412 msgid "B<lchown>() is like B<chown>(), but does not dereference symbolic links."
1416 #: build/C/man2/chown.2:93
1418 "Only a privileged process (Linux: one with the B<CAP_CHOWN> capability) may "
1419 "change the owner of a file. The owner of a file may change the group of the "
1420 "file to any group of which that owner is a member. A privileged process "
1421 "(Linux: with B<CAP_CHOWN>) may change the group arbitrarily."
1425 #: build/C/man2/chown.2:99
1426 msgid "If the I<owner> or I<group> is specified as -1, then that ID is not changed."
1429 #. In Linux 2.0 kernels, superuser was like everyone else
1430 #. In 2.2, up to 2.2.12, these bits were not cleared for superuser.
1431 #. Since 2.2.13, superuser is once more like everyone else.
1433 #: build/C/man2/chown.2:119
1435 "When the owner or group of an executable file are changed by an unprivileged "
1436 "user the B<S_ISUID> and B<S_ISGID> mode bits are cleared. POSIX does not "
1437 "specify whether this also should happen when root does the B<chown>(); the "
1438 "Linux behavior depends on the kernel version. In case of a "
1439 "non-group-executable file (i.e., one for which the B<S_IXGRP> bit is not "
1440 "set) the B<S_ISGID> bit indicates mandatory locking, and is not cleared by a "
1445 #: build/C/man2/chown.2:129
1447 "Depending on the filesystem, other errors can be returned. The more general "
1448 "errors for B<chown>() are listed below."
1452 #: build/C/man2/chown.2:159
1454 "The calling process did not have the required permissions (see above) to "
1455 "change owner and/or group."
1459 #: build/C/man2/chown.2:166
1460 msgid "The general errors for B<fchown>() are listed below:"
1464 #: build/C/man2/chown.2:169
1465 msgid "The descriptor is not valid."
1469 #: build/C/man2/chown.2:172
1470 msgid "A low-level I/O error occurred while modifying the inode."
1474 #. SVr4 documents EINVAL, EINTR, ENOLINK and EMULTIHOP returns, but no
1475 #. ENOMEM. POSIX.1 does not document ENOMEM or ELOOP error conditions.
1477 #. SVr4 documents additional EINVAL, EIO, EINTR, and ENOLINK
1478 #. error conditions.
1480 #: build/C/man2/chown.2:192
1482 "The 4.4BSD version can be used only by the superuser (that is, ordinary "
1483 "users cannot give away files)."
1487 #: build/C/man2/chown.2:211
1489 "The original Linux B<chown>(), B<fchown>(), and B<lchown>() system calls "
1490 "supported only 16-bit user and group IDs. Subsequently, Linux 2.4 added "
1491 "B<chown32>(), B<fchown32>(), and B<lchown32>(), supporting 32-bit IDs. The "
1492 "glibc B<chown>(), B<fchown>(), and B<lchown>() wrapper functions "
1493 "transparently deal with the variations across kernel versions."
1497 #: build/C/man2/chown.2:233
1499 "When a new file is created (by, for example, B<open>(2) or B<mkdir>(2)), "
1500 "its owner is made the same as the filesystem user ID of the creating "
1501 "process. The group of the file depends on a range of factors, including the "
1502 "type of filesystem, the options used to mount the filesystem, and whether or "
1503 "not the set-group-ID permission bit is enabled on the parent directory. If "
1504 "the filesystem supports the I<-o\\ grpid> (or, synonymously I<-o\\ "
1505 "bsdgroups>) and I<-o\\ nogrpid> (or, synonymously I<-o\\ sysvgroups>) "
1506 "B<mount>(8) options, then the rules are as follows:"
1510 #: build/C/man2/chown.2:238
1512 "If the filesystem is mounted with I<-o\\ grpid>, then the group of a new "
1513 "file is made the same as that of the parent directory."
1517 #: build/C/man2/chown.2:244
1519 "If the filesystem is mounted with I<-o\\ nogrpid> and the set-group-ID bit "
1520 "is disabled on the parent directory, then the group of a new file is made "
1521 "the same as the process's filesystem GID."
1525 #: build/C/man2/chown.2:250
1527 "If the filesystem is mounted with I<-o\\ nogrpid> and the set-group-ID bit "
1528 "is enabled on the parent directory, then the group of a new file is made the "
1529 "same as that of the parent directory."
1533 #: build/C/man2/chown.2:260
1535 "As at Linux 2.6.25, the I<-o\\ grpid> and I<-o\\ nogrpid> mount options are "
1536 "supported by ext2, ext3, ext4, and XFS. Filesystems that don't support "
1537 "these mount options follow the I<-o\\ nogrpid> rules."
1541 #: build/C/man2/chown.2:273
1543 "The B<chown>() semantics are deliberately violated on NFS filesystems which "
1544 "have UID mapping enabled. Additionally, the semantics of all system calls "
1545 "which access the file contents are violated, because B<chown>() may cause "
1546 "immediate access revocation on already open files. Client side caching may "
1547 "lead to a delay between the time where ownership have been changed to allow "
1548 "access for a user and the time where the file can actually be accessed by "
1549 "the user on other clients."
1553 #: build/C/man2/chown.2:288
1555 "In versions of Linux prior to 2.1.81 (and distinct from 2.1.46), B<chown>() "
1556 "did not follow symbolic links. Since Linux 2.1.81, B<chown>() does follow "
1557 "symbolic links, and there is a new system call B<lchown>() that does not "
1558 "follow symbolic links. Since Linux 2.1.86, this new call (that has the same "
1559 "semantics as the old B<chown>()) has got the same syscall number, and "
1560 "B<chown>() got the newly introduced number."
1564 #: build/C/man2/chown.2:297
1566 "The following program changes the ownership of the file named in its second "
1567 "command-line argument to the value specified in its first command-line "
1568 "argument. The new owner can be specified either as a numeric user ID, or as "
1569 "a username (which is converted to a user ID by using B<getpwnam>(3) to "
1570 "perform a lookup in the system password file)."
1574 #: build/C/man2/chown.2:303
1577 "#include E<lt>pwd.hE<gt>\n"
1578 "#include E<lt>stdio.hE<gt>\n"
1579 "#include E<lt>stdlib.hE<gt>\n"
1580 "#include E<lt>unistd.hE<gt>\n"
1584 #: build/C/man2/chown.2:310
1588 "main(int argc, char *argv[])\n"
1591 " struct passwd *pwd;\n"
1596 #: build/C/man2/chown.2:315
1599 " if (argc != 3 || argv[1][0] == \\(aq\\e0\\(aq) {\n"
1600 " fprintf(stderr, \"%s E<lt>ownerE<gt> E<lt>fileE<gt>\\en\", "
1602 " exit(EXIT_FAILURE);\n"
1607 #: build/C/man2/chown.2:317
1609 msgid " uid = strtol(argv[1], &endptr, 10); /* Allow a numeric string */\n"
1613 #: build/C/man2/chown.2:324
1616 " if (*endptr != \\(aq\\e0\\(aq) { /* Was not pure numeric string "
1618 " pwd = getpwnam(argv[1]); /* Try getting UID for username */\n"
1619 " if (pwd == NULL) {\n"
1620 " perror(\"getpwnam\");\n"
1621 " exit(EXIT_FAILURE);\n"
1626 #: build/C/man2/chown.2:327
1629 " uid = pwd-E<gt>pw_uid;\n"
1634 #: build/C/man2/chown.2:332
1637 " if (chown(argv[2], uid, -1) == -1) {\n"
1638 " perror(\"chown\");\n"
1639 " exit(EXIT_FAILURE);\n"
1644 #: build/C/man2/chown.2:335 build/C/man2/execve.2:565 build/C/man3/getopt.3:428 build/C/man3/getopt.3:513
1647 " exit(EXIT_SUCCESS);\n"
1652 #: build/C/man2/chown.2:342
1654 "B<chmod>(2), B<fchownat>(2), B<flock>(2), B<path_resolution>(7), "
1659 #: build/C/man2/chroot.2:33
1665 #: build/C/man2/chroot.2:36
1666 msgid "chroot - change root directory"
1670 #: build/C/man2/chroot.2:40
1671 msgid "B<int chroot(const char *>I<path>B<);>"
1675 #: build/C/man2/chroot.2:47
1676 msgid "B<chroot>():"
1680 #: build/C/man2/chroot.2:50
1682 msgid "Since glibc 2.2.2:"
1686 #: build/C/man2/chroot.2:57
1690 " (_XOPEN_SOURCE\\ E<gt>=\\ 500 ||\n"
1691 " _XOPEN_SOURCE\\ &&\\ _XOPEN_SOURCE_EXTENDED) &&\n"
1692 " !(_POSIX_C_SOURCE\\ E<gt>=\\ 200112L || _XOPEN_SOURCE\\ E<gt>=\\ 600)\n"
1696 #: build/C/man2/chroot.2:60
1697 msgid "Before glibc 2.2.2: none"
1701 #: build/C/man2/chroot.2:69
1703 "B<chroot>() changes the root directory of the calling process to that "
1704 "specified in I<path>. This directory will be used for pathnames beginning "
1705 "with I</>. The root directory is inherited by all children of the calling "
1710 #: build/C/man2/chroot.2:74
1712 "Only a privileged process (Linux: one with the B<CAP_SYS_CHROOT> capability) "
1713 "may call B<chroot>()."
1717 #: build/C/man2/chroot.2:77
1719 "This call changes an ingredient in the pathname resolution process and does "
1724 #: build/C/man2/chroot.2:83
1726 "This call does not change the current working directory, so that after the "
1727 "call \\(aqI<.>\\(aq can be outside the tree rooted at \\(aqI</>\\(aq. In "
1728 "particular, the superuser can escape from a \"chroot jail\" by doing:"
1732 #: build/C/man2/chroot.2:86
1734 msgid " mkdir foo; chroot foo; cd ..\n"
1738 #: build/C/man2/chroot.2:90
1740 "This call does not close open file descriptors, and such file descriptors "
1741 "may allow access to files outside the chroot tree."
1745 #: build/C/man2/chroot.2:98
1747 "Depending on the filesystem, other errors can be returned. The more general "
1748 "errors are listed below:"
1752 #: build/C/man2/chroot.2:134
1753 msgid "The caller has insufficient privilege."
1756 #. SVr4 documents additional EINTR, ENOLINK and EMULTIHOP error conditions.
1757 #. X/OPEN does not document EIO, ENOMEM or EFAULT error conditions.
1759 #: build/C/man2/chroot.2:139
1761 "SVr4, 4.4BSD, SUSv2 (marked LEGACY). This function is not part of "
1766 #: build/C/man2/chroot.2:145
1768 "A child process created via B<fork>(2) inherits its parent's root "
1769 "directory. The root directory is left unchanged by B<execve>(2)."
1772 #. FIXME . eventually say something about containers,
1773 #. virtual servers, etc.?
1775 #: build/C/man2/chroot.2:151
1776 msgid "FreeBSD has a stronger B<jail>() system call."
1780 #: build/C/man2/chroot.2:154
1781 msgid "B<chdir>(2), B<path_resolution>(7)"
1785 #: build/C/man2/close.2:35
1791 #: build/C/man2/close.2:35
1797 #: build/C/man2/close.2:38
1798 msgid "close - close a file descriptor"
1802 #: build/C/man2/close.2:43
1804 msgid "B<int close(int >I<fd>B<);>\n"
1808 #: build/C/man2/close.2:53
1810 "B<close>() closes a file descriptor, so that it no longer refers to any "
1811 "file and may be reused. Any record locks (see B<fcntl>(2)) held on the "
1812 "file it was associated with, and owned by the process, are removed "
1813 "(regardless of the file descriptor that was used to obtain the lock)."
1817 #: build/C/man2/close.2:64
1819 "If I<fd> is the last file descriptor referring to the underlying open file "
1820 "description (see B<open>(2)), the resources associated with the open file "
1821 "description are freed; if the descriptor was the last reference to a file "
1822 "which has been removed using B<unlink>(2) the file is deleted."
1826 #: build/C/man2/close.2:70
1828 "B<close>() returns zero on success. On error, -1 is returned, and I<errno> "
1829 "is set appropriately."
1833 #: build/C/man2/close.2:75
1834 msgid "I<fd> isn't a valid open file descriptor."
1838 #: build/C/man2/close.2:75 build/C/man2/dup.2:143 build/C/man2/fcntl.2:1110 build/C/man2/flock.2:121 build/C/man2/truncate.2:133 build/C/man3/ualarm.3:85 build/C/man3/usleep.3:83
1844 #: build/C/man2/close.2:81
1845 msgid "The B<close>() call was interrupted by a signal; see B<signal>(7)."
1849 #: build/C/man2/close.2:101
1851 "Not checking the return value of B<close>() is a common but nevertheless "
1852 "serious programming error. It is quite possible that errors on a previous "
1853 "B<write>(2) operation are first reported at the final B<close>(). Not "
1854 "checking the return value when closing the file may lead to silent loss of "
1855 "data. This can especially be observed with NFS and with disk quota."
1859 #: build/C/man2/close.2:110
1861 "A successful close does not guarantee that the data has been successfully "
1862 "saved to disk, as the kernel defers writes. It is not common for a "
1863 "filesystem to flush the buffers when the stream is closed. If you need to "
1864 "be sure that the data is physically stored use B<fsync>(2). (It will depend "
1865 "on the disk hardware at this point.)"
1868 #. Date: Tue, 4 Sep 2007 13:57:35 +0200
1869 #. From: Fredrik Noring <noring@nocrew.org>
1870 #. One such race involves signals and ERESTARTSYS. If a file descriptor
1871 #. in use by a system call is closed and then reused by e.g. an
1872 #. independent open() in some unrelated thread, before the original system
1873 #. call has restared after ERESTARTSYS, the original system call will
1874 #. later restart with the reused file descriptor. This is most likely a
1875 #. serious programming error.
1877 #: build/C/man2/close.2:125
1879 "It is probably unwise to close file descriptors while they may be in use by "
1880 "system calls in other threads in the same process. Since a file descriptor "
1881 "may be reused, there are some obscure race conditions that may cause "
1882 "unintended side effects."
1886 #: build/C/man2/close.2:132
1888 "B<fcntl>(2), B<fsync>(2), B<open>(2), B<shutdown>(2), B<unlink>(2), "
1893 #: build/C/man3/confstr.3:31
1899 #: build/C/man3/confstr.3:31
1905 #: build/C/man3/confstr.3:31 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
1911 #: build/C/man3/confstr.3:34
1912 msgid "confstr - get configuration dependent string variables"
1916 #: build/C/man3/confstr.3:39
1918 msgid "B<size_t confstr(int >I<name>B<, char *>I<buf>B<, size_t >I<len>B<);>\n"
1922 #: build/C/man3/confstr.3:48
1923 msgid "B<confstr>(): _POSIX_C_SOURCE\\ E<gt>=\\ 2 || _XOPEN_SOURCE"
1927 #: build/C/man3/confstr.3:51
1928 msgid "B<confstr>() gets the value of configuration-dependent string variables."
1932 #: build/C/man3/confstr.3:56
1934 "The I<name> argument is the system variable to be queried. The following "
1935 "variables are supported:"
1939 #: build/C/man3/confstr.3:56
1941 msgid "B<_CS_GNU_LIBC_VERSION> (GNU C library only; since glibc 2.3.2)"
1945 #: build/C/man3/confstr.3:60
1947 "A string which identifies the GNU C library version on this system (e.g, "
1952 #: build/C/man3/confstr.3:60
1954 msgid "B<_CS_GNU_LIBPTHREAD_VERSION> (GNU C library only; since glibc 2.3.2)"
1958 #: build/C/man3/confstr.3:64
1960 "A string which identifies the POSIX implementation supplied by this C "
1961 "library (e.g, \"NPTL 2.3.4\" or \"linuxthreads-0.10\")."
1965 #: build/C/man3/confstr.3:64
1971 #: build/C/man3/confstr.3:70
1973 "A value for the B<PATH> variable which indicates where all the POSIX.2 "
1974 "standard utilities can be found."
1978 #: build/C/man3/confstr.3:86
1980 "If I<buf> is not NULL and I<len> is not zero, B<confstr>() copies the value "
1981 "of the string to I<buf> truncated to I<len - 1> bytes if necessary, with a "
1982 "null byte (\\(aq\\e0\\(aq) as terminator. This can be detected by comparing "
1983 "the return value of B<confstr>() against I<len>."
1987 #: build/C/man3/confstr.3:94
1989 "If I<len> is zero and I<buf> is NULL, B<confstr>() just returns the value "
1994 #: build/C/man3/confstr.3:106
1996 "If I<name> is a valid configuration variable, B<confstr>() returns the "
1997 "number of bytes (including the terminating null byte) that would be "
1998 "required to hold the entire value of that variable. This value may be "
1999 "greater than I<len>, which means that the value in I<buf> is truncated."
2003 #: build/C/man3/confstr.3:121
2005 "If I<name> is a valid configuration variable, but that variable does not "
2006 "have a value, then B<confstr>() returns 0. If I<name> does not correspond "
2007 "to a valid configuration variable, B<confstr>() returns 0, and I<errno> is "
2012 #: build/C/man3/confstr.3:127
2013 msgid "If the value of I<name> is invalid."
2017 #: build/C/man3/confstr.3:129 build/C/man3/fpathconf.3:171 build/C/man2/pread.2:117 build/C/man3/sleep.3:46 build/C/man3/sysconf.3:326 build/C/man3/tcgetpgrp.3:111
2018 msgid "POSIX.1-2001."
2022 #: build/C/man3/confstr.3:132
2024 "The following code fragment determines the path where to find the POSIX.2 "
2029 #: build/C/man3/confstr.3:138
2037 #: build/C/man3/confstr.3:144
2040 "n = confstr(_CS_PATH, NULL, (size_t) 0);\n"
2041 "pathbuf = malloc(n);\n"
2042 "if (pathbuf == NULL)\n"
2044 "confstr(_CS_PATH, pathbuf, n);\n"
2048 #: build/C/man3/confstr.3:150
2049 msgid "B<sh>(1), B<exec>(3), B<system>(3)"
2053 #: build/C/man3/crypt.3:36
2059 #: build/C/man3/crypt.3:36 build/C/man3/getusershell.3:30 build/C/man2/pread.2:25
2065 #: build/C/man3/crypt.3:39
2066 msgid "crypt, crypt_r - password and data encryption"
2070 #: build/C/man3/crypt.3:42
2072 msgid "B<#define _XOPEN_SOURCE> /* See feature_test_macros(7) */\n"
2076 #: build/C/man3/crypt.3:46
2078 msgid "B<char *crypt(const char *>I<key>B<, const char *>I<salt>B<);>\n"
2082 #: build/C/man3/crypt.3:48
2084 msgid "B<#define _GNU_SOURCE> /* See feature_test_macros(7) */\n"
2088 #: build/C/man3/crypt.3:50
2090 msgid "B<#include E<lt>crypt.hE<gt>>\n"
2094 #: build/C/man3/crypt.3:53
2097 "B<char *crypt_r(const char *>I<key>B<, const char *>I<salt>B<,>\n"
2098 "B< struct crypt_data *>I<data>B<);>\n"
2102 #: build/C/man3/crypt.3:56
2103 msgid "Link with I<-lcrypt>."
2107 #: build/C/man3/crypt.3:62
2109 "B<crypt>() is the password encryption function. It is based on the Data "
2110 "Encryption Standard algorithm with variations intended (among other things) "
2111 "to discourage use of hardware implementations of a key search."
2115 #: build/C/man3/crypt.3:65
2116 msgid "I<key> is a user's typed password."
2120 #: build/C/man3/crypt.3:71
2122 "I<salt> is a two-character string chosen from the set "
2123 "[B<a>\\(enB<zA>\\(enB<Z0>\\(enB<9./>]. This string is used to perturb the "
2124 "algorithm in one of 4096 different ways."
2128 #: build/C/man3/crypt.3:82
2130 "By taking the lowest 7 bits of each of the first eight characters of the "
2131 "I<key>, a 56-bit key is obtained. This 56-bit key is used to encrypt "
2132 "repeatedly a constant string (usually a string consisting of all zeros). "
2133 "The returned value points to the encrypted password, a series of 13 "
2134 "printable ASCII characters (the first two characters represent the salt "
2135 "itself). The return value points to static data whose content is "
2136 "overwritten by each call."
2140 #: build/C/man3/crypt.3:84
2141 msgid "Warning: The key space consists of"
2145 #: build/C/man3/crypt.3:99
2147 "equal 7.2e16 possible values. Exhaustive searches of this key space are "
2148 "possible using massively parallel computers. Software, such as B<crack>(1), "
2149 "is available which will search the portion of this key space that is "
2150 "generally used by humans for passwords. Hence, password selection should, "
2151 "at minimum, avoid common words and names. The use of a B<passwd>(1) "
2152 "program that checks for crackable passwords during the selection process is "
2157 #: build/C/man3/crypt.3:108
2159 "The DES algorithm itself has a few quirks which make the use of the "
2160 "B<crypt>() interface a very poor choice for anything other than password "
2161 "authentication. If you are planning on using the B<crypt>() interface for "
2162 "a cryptography project, don't do it: get a good book on encryption and one "
2163 "of the widely available DES libraries."
2167 #: build/C/man3/crypt.3:120
2169 "B<crypt_r>() is a reentrant version of B<crypt>(). The structure pointed "
2170 "to by I<data> is used to store result data and bookkeeping information. "
2171 "Other than allocating it, the only thing that the caller should do with this "
2172 "structure is to set I<data-E<gt>initialized> to zero before the first call "
2177 #: build/C/man3/crypt.3:123
2179 "On success, a pointer to the encrypted password is returned. On error, NULL "
2184 #: build/C/man3/crypt.3:124 build/C/man3/encrypt.3:120 build/C/man3/fexecve.3:86 build/C/man2/fork.2:200
2189 #. This level of detail is not necessary in this man page. . .
2191 #. When encrypting a plain text P using DES with the key K results in the
2192 #. encrypted text C, then the complementary plain text P' being encrypted
2193 #. using the complementary key K' will result in the complementary encrypted
2196 #. Weak keys are keys which stay invariant under the DES key transformation.
2197 #. The four known weak keys 0101010101010101, fefefefefefefefe,
2198 #. 1f1f1f1f0e0e0e0e and e0e0e0e0f1f1f1f1 must be avoided.
2200 #. There are six known half weak key pairs, which keys lead to the same
2201 #. encrypted data. Keys which are part of such key clusters should be
2203 #. Sorry, I could not find out what they are.
2206 #. Heavily redundant data causes trouble with DES encryption, when used in the
2212 #. interface should be used only for its intended purpose of password
2213 #. verification, and should not be used as part of a data encryption tool.
2215 #. The first and last three output bits of the fourth S-box can be
2216 #. represented as function of their input bits. Empiric studies have
2217 #. shown that S-boxes partially compute the same output for similar input.
2218 #. It is suspected that this may contain a back door which could allow the
2219 #. NSA to decrypt DES encrypted data.
2221 #. Making encrypted data computed using crypt() publicly available has
2222 #. to be considered insecure for the given reasons.
2224 #: build/C/man3/crypt.3:163
2226 "The B<crypt>() function was not implemented, probably because of "
2227 "U.S.A. export restrictions."
2231 #: build/C/man3/crypt.3:163 build/C/man3/encrypt.3:124 build/C/man3/getlogin.3:140 build/C/man3/getusershell.3:93
2237 #: build/C/man3/crypt.3:164 build/C/man3/encrypt.3:125 build/C/man3/getlogin.3:141 build/C/man3/getusershell.3:94
2239 msgid "Multithreading (see pthreads(7))"
2243 #: build/C/man3/crypt.3:168
2244 msgid "The B<crypt>() function is not thread-safe."
2248 #: build/C/man3/crypt.3:172
2249 msgid "The B<crypt_r>() function is thread-safe."
2253 #: build/C/man3/crypt.3:177
2254 msgid "B<crypt>(): SVr4, 4.3BSD, POSIX.1-2001. B<crypt_r>() is a GNU extension."
2258 #: build/C/man3/crypt.3:178 build/C/man2/gethostname.2:140
2264 #: build/C/man3/crypt.3:181
2266 "The glibc2 version of this function supports additional encryption "
2271 #: build/C/man3/crypt.3:186
2273 "If I<salt> is a character string starting with the characters \"$I<id>$\" "
2274 "followed by a string terminated by \"$\":"
2278 #: build/C/man3/crypt.3:189
2279 msgid "$I<id>$I<salt>$I<encrypted>"
2283 #: build/C/man3/crypt.3:198
2285 "then instead of using the DES machine, I<id> identifies the encryption "
2286 "method used and this then determines how the rest of the password string is "
2287 "interpreted. The following values of I<id> are supported:"
2291 #: build/C/man3/crypt.3:201
2293 msgid "ID | Method\n"
2297 #: build/C/man3/crypt.3:202 build/C/man2/syscall.2:157 build/C/man2/syscall.2:182
2303 #: build/C/man3/crypt.3:203
2309 #: build/C/man3/crypt.3:204
2311 msgid "2a | Blowfish (not in mainline glibc; added in some\n"
2315 #: build/C/man3/crypt.3:205
2317 msgid " | Linux distributions)\n"
2320 #. openSUSE has Blowfish, but AFAICS, this option is not supported
2321 #. natively by glibc -- mtk, Jul 08
2324 #. glibc doesn't appear to natively support Sun MD5; I don't know
2325 #. if any distros add the support.
2327 #: build/C/man3/crypt.3:212
2329 msgid "5 | SHA-256 (since glibc 2.7)\n"
2333 #: build/C/man3/crypt.3:213
2335 msgid "6 | SHA-512 (since glibc 2.7)\n"
2339 #: build/C/man3/crypt.3:220
2341 "So $5$I<salt>$I<encrypted> is an SHA-256 encoded password and "
2342 "$6$I<salt>$I<encrypted> is an SHA-512 encoded one."
2346 #: build/C/man3/crypt.3:225
2348 "\"I<salt>\" stands for the up to 16 characters following \"$I<id>$\" in the "
2349 "salt. The encrypted part of the password string is the actual computed "
2350 "password. The size of this string is fixed:"
2354 #: build/C/man3/crypt.3:227
2356 msgid "MD5 | 22 characters\n"
2360 #: build/C/man3/crypt.3:228
2362 msgid "SHA-256 | 43 characters\n"
2366 #: build/C/man3/crypt.3:229
2368 msgid "SHA-512 | 86 characters\n"
2372 #: build/C/man3/crypt.3:238
2374 "The characters in \"I<salt>\" and \"I<encrypted>\" are drawn from the set "
2375 "[B<a>\\(enB<zA>\\(enB<Z0>\\(enB<9./>]. In the MD5 and SHA implementations "
2376 "the entire I<key> is significant (instead of only the first 8 bytes in DES)."
2380 #: build/C/man3/crypt.3:244
2381 msgid "B<login>(1), B<passwd>(1), B<encrypt>(3), B<getpass>(3), B<passwd>(5)"
2385 #: build/C/man3/daemon.3:36
2391 #: build/C/man3/daemon.3:36
2397 #: build/C/man3/daemon.3:39
2398 msgid "daemon - run in the background"
2402 #: build/C/man3/daemon.3:43
2403 msgid "B<int daemon(int >I<nochdir>B<, int >I<noclose>B<);>"
2407 #: build/C/man3/daemon.3:51
2408 msgid "B<daemon>(): _BSD_SOURCE || (_XOPEN_SOURCE && _XOPEN_SOURCE\\ E<lt>\\ 500)"
2412 #: build/C/man3/daemon.3:56
2414 "The B<daemon>() function is for programs wishing to detach themselves from "
2415 "the controlling terminal and run in the background as system daemons."
2419 #: build/C/man3/daemon.3:64
2421 "If I<nochdir> is zero, B<daemon>() changes the calling process's current "
2422 "working directory to the root directory (\"/\"); otherwise, the current "
2423 "working directory is left unchanged."
2427 #: build/C/man3/daemon.3:73
2429 "If I<noclose> is zero, B<daemon>() redirects standard input, standard "
2430 "output and standard error to I</dev/null>; otherwise, no changes are made to "
2431 "these file descriptors."
2434 #. not .IR in order not to underline _
2436 #: build/C/man3/daemon.3:91
2438 "(This function forks, and if the B<fork>(2) succeeds, the parent calls "
2439 "B<_exit>(2), so that further errors are seen by the child only.) On success "
2440 "B<daemon>() returns zero. If an error occurs, B<daemon>() returns -1 and "
2441 "sets I<errno> to any of the errors specified for the B<fork>(2) and "
2446 #: build/C/man3/daemon.3:97
2448 "Not in POSIX.1-2001. A similar function appears on the BSDs. The "
2449 "B<daemon>() function first appeared in 4.4BSD."
2453 #: build/C/man3/daemon.3:105
2455 "The glibc implementation can also return -1 when I</dev/null> exists but is "
2456 "not a character device with the expected major and minor numbers. In this "
2457 "case I<errno> need not be set."
2461 #: build/C/man3/daemon.3:108
2462 msgid "B<fork>(2), B<setsid>(2)"
2466 #: build/C/man3/des_crypt.3:14
2472 #: build/C/man3/des_crypt.3:14
2478 #: build/C/man3/des_crypt.3:18
2480 "des_crypt, ecb_crypt, cbc_crypt, des_setparity, DES_FAILED - fast DES "
2485 #. .B #include <des_crypt.h>
2487 #: build/C/man3/des_crypt.3:23
2489 msgid "B<#include E<lt>rpc/des_crypt.hE<gt>>\n"
2493 #: build/C/man3/des_crypt.3:26
2496 "B<int ecb_crypt(char *>I<key>B<, char *>I<data>B<, unsigned "
2498 "B< unsigned >I<mode>B<);>\n"
2502 #: build/C/man3/des_crypt.3:29
2505 "B<int cbc_crypt(char *>I<key>B<, char *>I<data>B<, unsigned "
2507 "B< unsigned >I<mode>B<, char *>I<ivec>B<);>\n"
2511 #: build/C/man3/des_crypt.3:31
2513 msgid "B<void des_setparity(char *>I<key>B<);>\n"
2517 #: build/C/man3/des_crypt.3:33
2519 msgid "B<int DES_FAILED(int >I<status>B<);>\n"
2523 #: build/C/man3/des_crypt.3:63
2525 "B<ecb_crypt>() and B<cbc_crypt>() implement the NBS DES (Data Encryption "
2526 "Standard). These routines are faster and more general purpose than "
2527 "B<crypt>(3). They also are able to utilize DES hardware if it is "
2528 "available. B<ecb_crypt>() encrypts in ECB (Electronic Code Book) mode, "
2529 "which encrypts blocks of data independently. B<cbc_crypt>() encrypts in "
2530 "CBC (Cipher Block Chaining) mode, which chains together successive blocks. "
2531 "CBC mode protects against insertions, deletions and substitutions of "
2532 "blocks. Also, regularities in the clear text will not appear in the cipher "
2537 #: build/C/man3/des_crypt.3:106
2539 "Here is how to use these routines. The first argument, I<key>, is the "
2540 "8-byte encryption key with parity. To set the key's parity, which for DES "
2541 "is in the low bit of each byte, use B<des_setparity>(). The second "
2542 "argument, I<data>, contains the data to be encrypted or decrypted. The "
2543 "third argument, I<datalen>, is the length in bytes of I<data>, which must be "
2544 "a multiple of 8. The fourth argument, I<mode>, is formed by ORing together "
2545 "some things. For the encryption direction OR in either B<DES_ENCRYPT> or "
2546 "B<DES_DECRYPT>. For software versus hardware encryption, OR in either "
2547 "B<DES_HW> or B<DES_SW>. If B<DES_HW> is specified, and there is no "
2548 "hardware, then the encryption is performed in software and the routine "
2549 "returns B<DESERR_NOHWDEVICE>. For B<cbc_crypt>(), the argument I<ivec> is "
2550 "the 8-byte initialization vector for the chaining. It is updated to the "
2551 "next initialization vector upon return."
2555 #: build/C/man3/des_crypt.3:108
2557 msgid "B<DESERR_NONE>"
2561 #: build/C/man3/des_crypt.3:111
2566 #: build/C/man3/des_crypt.3:111
2568 msgid "B<DESERR_NOHWDEVICE>"
2572 #: build/C/man3/des_crypt.3:114
2574 "Encryption succeeded, but done in software instead of the requested "
2579 #: build/C/man3/des_crypt.3:114
2581 msgid "B<DESERR_HWERROR>"
2585 #: build/C/man3/des_crypt.3:117
2586 msgid "An error occurred in the hardware or driver."
2590 #: build/C/man3/des_crypt.3:117
2592 msgid "B<DESERR_BADPARAM>"
2596 #: build/C/man3/des_crypt.3:120
2597 msgid "Bad argument to routine."
2602 #. So far the Sun page
2603 #. Some additions - aeb
2605 #: build/C/man3/des_crypt.3:131
2607 "Given a result status I<stat>, the macro B<DES_FAILED(>I<stat>B<)> is false "
2608 "only for the first two statuses."
2612 #: build/C/man3/des_crypt.3:131 build/C/man2/dup.2:165 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/pread.2:104 build/C/man2/set_thread_area.2:59 build/C/man2/setup.2:60
2618 #: build/C/man3/des_crypt.3:134
2620 "These routines are present in libc 4.6.27 and later, and in glibc 2.1 and "
2625 #: build/C/man3/des_crypt.3:137
2626 msgid "4.3BSD. Not in POSIX.1-2001."
2630 #: build/C/man3/des_crypt.3:141
2631 msgid "B<des>(1), B<crypt>(3), B<xcrypt>(3)"
2635 #: build/C/man2/dup.2:36
2641 #: build/C/man2/dup.2:36
2647 #: build/C/man2/dup.2:39
2648 msgid "dup, dup2, dup3 - duplicate a file descriptor"
2652 #: build/C/man2/dup.2:45
2655 "B<int dup(int >I<oldfd>B<);>\n"
2656 "B<int dup2(int >I<oldfd>B<, int >I<newfd>B<);>\n"
2660 #: build/C/man2/dup.2:49
2663 "B<#define _GNU_SOURCE> /* See feature_test_macros(7) */\n"
2664 "B<#include E<lt>fcntl.hE<gt>> /* Obtain O_* constant "
2666 "B<#include E<lt>unistd.hE<gt>>\n"
2670 #: build/C/man2/dup.2:51
2672 msgid "B<int dup3(int >I<oldfd>B<, int >I<newfd>B<, int >I<flags>B<);>\n"
2676 #: build/C/man2/dup.2:55
2677 msgid "These system calls create a copy of the file descriptor I<oldfd>."
2681 #: build/C/man2/dup.2:58
2682 msgid "B<dup>() uses the lowest-numbered unused descriptor for the new descriptor."
2686 #: build/C/man2/dup.2:62
2688 "B<dup2>() makes I<newfd> be the copy of I<oldfd>, closing I<newfd> first if "
2689 "necessary, but note the following:"
2693 #: build/C/man2/dup.2:68
2695 "If I<oldfd> is not a valid file descriptor, then the call fails, and "
2696 "I<newfd> is not closed."
2700 #: build/C/man2/dup.2:79
2702 "If I<oldfd> is a valid file descriptor, and I<newfd> has the same value as "
2703 "I<oldfd>, then B<dup2>() does nothing, and returns I<newfd>."
2707 #: build/C/man2/dup.2:88
2709 "After a successful return from one of these system calls, the old and new "
2710 "file descriptors may be used interchangeably. They refer to the same open "
2711 "file description (see B<open>(2)) and thus share file offset and file "
2712 "status flags; for example, if the file offset is modified by using "
2713 "B<lseek>(2) on one of the descriptors, the offset is also changed for the "
2718 #: build/C/man2/dup.2:96
2720 "The two descriptors do not share file descriptor flags (the close-on-exec "
2721 "flag). The close-on-exec flag (B<FD_CLOEXEC>; see B<fcntl>(2)) for the "
2722 "duplicate descriptor is off."
2726 #: build/C/man2/dup.2:101
2727 msgid "B<dup3>() is the same as B<dup2>(), except that:"
2731 #: build/C/man2/dup.2:110
2733 "The caller can force the close-on-exec flag to be set for the new file "
2734 "descriptor by specifying B<O_CLOEXEC> in I<flags>. See the description of "
2735 "the same flag in B<open>(2) for reasons why this may be useful."
2738 #. FIXME . To confirm with Al Viro that this was intended, and its rationale
2740 #: build/C/man2/dup.2:120
2741 msgid "If I<oldfd> equals I<newfd>, then B<dup3>() fails with the error B<EINVAL>."
2745 #: build/C/man2/dup.2:126
2747 "On success, these system calls return the new descriptor. On error, -1 is "
2748 "returned, and I<errno> is set appropriately."
2752 #: build/C/man2/dup.2:133
2754 "I<oldfd> isn't an open file descriptor, or I<newfd> is out of the allowed "
2755 "range for file descriptors."
2759 #: build/C/man2/dup.2:133 build/C/man2/swapon.2:114
2765 #: build/C/man2/dup.2:143
2767 "(Linux only) This may be returned by B<dup2>() or B<dup3>() during a race "
2768 "condition with B<open>(2) and B<dup>()."
2772 #: build/C/man2/dup.2:151
2774 "The B<dup2>() or B<dup3>() call was interrupted by a signal; see "
2778 #. FIXME . To confirm with Al Viro that this was intended, and its rationale
2780 #: build/C/man2/dup.2:161
2782 "(B<dup3>()) I<flags> contain an invalid value. Or, I<oldfd> was equal to "
2787 #: build/C/man2/dup.2:161 build/C/man2/execve.2:408 build/C/man2/fcntl.2:1132 build/C/man3/getlogin.3:105
2793 #: build/C/man2/dup.2:165
2795 "The process already has the maximum number of file descriptors open and "
2796 "tried to open a new one."
2800 #: build/C/man2/dup.2:170
2802 "B<dup3>() was added to Linux in version 2.6.27; glibc support is available "
2803 "starting with version 2.9."
2807 #: build/C/man2/dup.2:174
2808 msgid "B<dup>(), B<dup2>(): SVr4, 4.3BSD, POSIX.1-2001."
2811 #. SVr4 documents additional
2812 #. EINTR and ENOLINK error conditions. POSIX.1 adds EINTR.
2813 #. The EBUSY return is Linux-specific.
2815 #: build/C/man2/dup.2:180
2816 msgid "B<dup3>() is Linux-specific."
2820 #: build/C/man2/dup.2:194
2822 "The error returned by B<dup2>() is different from that returned by "
2823 "B<fcntl(>..., B<F_DUPFD>, ...B<)> when I<newfd> is out of range. On some "
2824 "systems B<dup2>() also sometimes returns B<EINVAL> like B<F_DUPFD>."
2828 #: build/C/man2/dup.2:207
2830 "If I<newfd> was open, any errors that would have been reported at "
2831 "B<close>(2) time are lost. A careful programmer will not use B<dup2>() or "
2832 "B<dup3>() without closing I<newfd> first."
2836 #: build/C/man2/dup.2:211
2837 msgid "B<close>(2), B<fcntl>(2), B<open>(2)"
2841 #: build/C/man3/encrypt.3:30
2847 #: build/C/man3/encrypt.3:30
2853 #: build/C/man3/encrypt.3:33
2854 msgid "encrypt, setkey, encrypt_r, setkey_r - encrypt 64-bit messages"
2858 #: build/C/man3/encrypt.3:35 build/C/man3/encrypt.3:41
2859 msgid "B<#define _XOPEN_SOURCE> /* See feature_test_macros(7) */"
2863 #: build/C/man3/encrypt.3:39
2864 msgid "B<void encrypt(char >I<block>B<[64], int >I<edflag>B<);>"
2868 #: build/C/man3/encrypt.3:43
2869 msgid "B<#include E<lt>stdlib.hE<gt>>"
2873 #: build/C/man3/encrypt.3:45
2874 msgid "B<void setkey(const char *>I<key>B<);>"
2878 #: build/C/man3/encrypt.3:47 build/C/man3/getumask.3:33
2879 msgid "B<#define _GNU_SOURCE> /* See feature_test_macros(7) */"
2883 #: build/C/man3/encrypt.3:49
2884 msgid "B<#include E<lt>crypt.hE<gt>>"
2888 #: build/C/man3/encrypt.3:51
2889 msgid "B<void setkey_r(const char *>I<key>B<, struct crypt_data *>I<data>B<);>"
2893 #: build/C/man3/encrypt.3:54
2895 "B<void encrypt_r(char *>I<block>B<, int >I<edflag>B<, struct crypt_data "
2900 #: build/C/man3/encrypt.3:56
2901 msgid "Each of these requires linking with I<-lcrypt>."
2905 #: build/C/man3/encrypt.3:68
2907 "These functions encrypt and decrypt 64-bit messages. The B<setkey>() "
2908 "function sets the key used by B<encrypt>(). The I<key> argument used here "
2909 "is an array of 64 bytes, each of which has numerical value 1 or 0. The "
2910 "bytes key[n] where n=8*i-1 are ignored, so that the effective key length is "
2915 #: build/C/man3/encrypt.3:80
2917 "The B<encrypt>() function modifies the passed buffer, encoding if I<edflag> "
2918 "is 0, and decoding if 1 is being passed. Like the I<key> argument, also "
2919 "I<block> is a bit vector representation of the actual value that is "
2920 "encoded. The result is returned in that same vector."
2924 #: build/C/man3/encrypt.3:90
2926 "These two functions are not reentrant, that is, the key data is kept in "
2927 "static storage. The functions B<setkey_r>() and B<encrypt_r>() are the "
2928 "reentrant versions. They use the following structure to hold the key data:"
2932 #: build/C/man3/encrypt.3:105
2935 "struct crypt_data {\n"
2936 " char keysched[16 * 8];\n"
2937 " char sb0[32768];\n"
2938 " char sb1[32768];\n"
2939 " char sb2[32768];\n"
2940 " char sb3[32768];\n"
2941 " char crypt_3_buf[14];\n"
2942 " char current_salt[2];\n"
2943 " long int current_saltbits;\n"
2945 " int initialized;\n"
2950 #: build/C/man3/encrypt.3:113
2951 msgid "Before calling B<setkey_r>() set I<data-E<gt>initialized> to zero."
2955 #: build/C/man3/encrypt.3:115
2956 msgid "These functions do not return any value."
2960 #: build/C/man3/encrypt.3:120
2962 "Set I<errno> to zero before calling the above functions. On success, it is "
2967 #: build/C/man3/encrypt.3:124
2969 "The function is not provided. (For example because of former USA export "
2974 #: build/C/man3/encrypt.3:131
2975 msgid "The B<encrypt>() and B<setkey>() functions are not thread-safe."
2979 #: build/C/man3/encrypt.3:137
2980 msgid "The B<encrypt_r>() and B<setkey_r>() functions are thread-safe."
2984 #: build/C/man3/encrypt.3:148
2986 "The functions B<encrypt>() and B<setkey>() conform to SVr4, SUSv2, and "
2987 "POSIX.1-2001. The functions B<encrypt_r>() and B<setkey_r>() are GNU "
2992 #: build/C/man3/encrypt.3:150
2993 msgid "In glibc 2.2 these functions use the DES algorithm."
2997 #: build/C/man3/encrypt.3:157
2999 "You need to link with libcrypt to compile this example with glibc. To do "
3000 "useful work the I<key[]> and I<txt[]> arrays must be filled with a useful "
3005 #: build/C/man3/encrypt.3:162
3008 "#define _XOPEN_SOURCE\n"
3009 "#include E<lt>unistd.hE<gt>\n"
3010 "#include E<lt>stdlib.hE<gt>\n"
3014 #: build/C/man3/encrypt.3:168
3020 " char key[64]; /* bit pattern for key */\n"
3021 " char txt[64]; /* bit pattern for messages */\n"
3025 #: build/C/man3/encrypt.3:173
3029 " encrypt(txt, 0); /* encode */\n"
3030 " encrypt(txt, 1); /* decode */\n"
3036 #: build/C/man3/encrypt.3:179
3037 msgid "B<cbc_crypt>(3), B<crypt>(3), B<ecb_crypt>(3),"
3041 #: build/C/man7/environ.7:34
3047 #: build/C/man7/environ.7:34
3053 #: build/C/man7/environ.7:37
3054 msgid "environ - user environment"
3058 #: build/C/man7/environ.7:40
3060 msgid "B<extern char **>I<environ>B<;>\n"
3064 #: build/C/man7/environ.7:57
3066 "The variable I<environ> points to an array of pointers to strings called the "
3067 "\"environment\". The last pointer in this array has the value NULL. (This "
3068 "variable must be declared in the user program, but is declared in the header "
3069 "file I<E<lt>unistd.hE<gt>> in case the header files came from libc4 or "
3070 "libc5, and in case they came from glibc and B<_GNU_SOURCE> was defined.) "
3071 "This array of strings is made available to the process by the B<exec>(3) "
3072 "call that started the process."
3076 #: build/C/man7/environ.7:62
3078 "By convention the strings in I<environ> have the form "
3079 "\"I<name>B<=>I<value>\". Common examples are:"
3083 #: build/C/man7/environ.7:62
3089 #: build/C/man7/environ.7:65
3090 msgid "The name of the logged-in user (used by some BSD-derived programs)."
3094 #: build/C/man7/environ.7:65
3100 #: build/C/man7/environ.7:68
3101 msgid "The name of the logged-in user (used by some System-V derived programs)."
3105 #: build/C/man7/environ.7:68
3111 #: build/C/man7/environ.7:74
3113 "A user's login directory, set by B<login>(1) from the password file "
3118 #: build/C/man7/environ.7:74
3124 #: build/C/man7/environ.7:88
3126 "The name of a locale to use for locale categories when not overridden by "
3127 "B<LC_ALL> or more specific environment variables like B<LC_COLLATE>, "
3128 "B<LC_CTYPE>, B<LC_MESSAGES>, B<LC_MONETARY>, B<LC_NUMERIC>, B<LC_TIME>, cf. "
3133 #: build/C/man7/environ.7:88
3139 #: build/C/man7/environ.7:103
3141 "The sequence of directory prefixes that B<sh>(1) and many other programs "
3142 "apply in searching for a file known by an incomplete pathname. The prefixes "
3143 "are separated by \\(aqB<:>\\(aq. (Similarly one has B<CDPATH> used by some "
3144 "shells to find the target of a change directory command, B<MANPATH> used by "
3145 "B<man>(1) to find manual pages, and so on)"
3149 #: build/C/man7/environ.7:103
3155 #: build/C/man7/environ.7:107
3156 msgid "The current working directory. Set by some shells."
3160 #: build/C/man7/environ.7:107
3166 #: build/C/man7/environ.7:110
3167 msgid "The pathname of the user's login shell."
3171 #: build/C/man7/environ.7:110
3177 #: build/C/man7/environ.7:113
3178 msgid "The terminal type for which output is to be prepared."
3182 #: build/C/man7/environ.7:113
3188 #: build/C/man7/environ.7:116
3189 msgid "The user's preferred utility to display text files."
3193 #: build/C/man7/environ.7:116
3195 msgid "B<EDITOR>/B<VISUAL>"
3200 #. The user's preferred utility to browse URLs. Sequence of colon-separated
3201 #. browser commands. See http://www.catb.org/~esr/BROWSER/ .
3203 #: build/C/man7/environ.7:123
3204 msgid "The user's preferred utility to edit text files."
3208 #: build/C/man7/environ.7:141
3210 "Further names may be placed in the environment by the I<export> command and "
3211 "\"name=value\" in B<sh>(1), or by the I<setenv> command if you use "
3212 "B<csh>(1). Arguments may also be placed in the environment at the point of "
3213 "an B<exec>(3). A C program can manipulate its environment using the "
3214 "functions B<getenv>(3), B<putenv>(3), B<setenv>(3), and B<unsetenv>(3)."
3218 #: build/C/man7/environ.7:145
3220 "Note that the behavior of many programs and library routines is influenced "
3221 "by the presence or value of certain environment variables. A random "
3226 #: build/C/man7/environ.7:151
3228 "The variables B<LANG>, B<LANGUAGE>, B<NLSPATH>, B<LOCPATH>, B<LC_ALL>, "
3229 "B<LC_MESSAGES>, etc. influence locale handling, cf. B<locale>(5)."
3233 #: build/C/man7/environ.7:158
3235 "B<TMPDIR> influences the path prefix of names created by B<tmpnam>(3) and "
3236 "other routines, the temporary directory used by B<sort>(1) and other "
3241 #: build/C/man7/environ.7:162
3243 "B<LD_LIBRARY_PATH>, B<LD_PRELOAD> and other LD_* variables influence the "
3244 "behavior of the dynamic loader/linker."
3248 #: build/C/man7/environ.7:166
3250 "B<POSIXLY_CORRECT> makes certain programs and library routines follow the "
3251 "prescriptions of POSIX."
3255 #: build/C/man7/environ.7:172
3256 msgid "The behavior of B<malloc>(3) is influenced by B<MALLOC_*> variables."
3260 #: build/C/man7/environ.7:178
3262 "The variable B<HOSTALIASES> gives the name of a file containing aliases to "
3263 "be used with B<gethostbyname>(3)."
3267 #: build/C/man7/environ.7:189
3269 "B<TZ> and B<TZDIR> give timezone information used by B<tzset>(3) and "
3270 "through that by functions like B<ctime>(3), B<localtime>(3), B<mktime>(3), "
3271 "B<strftime>(3). See also B<tzselect>(8)."
3275 #: build/C/man7/environ.7:193
3277 "B<TERMCAP> gives information on how to address a given terminal (or gives "
3278 "the name of a file containing such information)."
3282 #: build/C/man7/environ.7:196
3284 "B<COLUMNS> and B<LINES> tell applications about the window size, possibly "
3285 "overriding the actual size."
3289 #: build/C/man7/environ.7:201
3291 "B<PRINTER> or B<LPDEST> may specify the desired printer to use. See "
3296 #: build/C/man7/environ.7:203
3301 #: build/C/man7/environ.7:208
3303 "Clearly there is a security risk here. Many a system command has been "
3304 "tricked into mischief by a user who specified unusual values for B<IFS> or "
3305 "B<LD_LIBRARY_PATH>."
3309 #: build/C/man7/environ.7:241
3311 "There is also the risk of name space pollution. Programs like I<make> and "
3312 "I<autoconf> allow overriding of default utility names from the environment "
3313 "with similarly named variables in all caps. Thus one uses B<CC> to select "
3314 "the desired C compiler (and similarly B<MAKE>, B<AR>, B<AS>, B<FC>, B<LD>, "
3315 "B<LEX>, B<RM>, B<YACC>, etc.). However, in some traditional uses such an "
3316 "environment variable gives options for the program instead of a pathname. "
3317 "Thus, one has B<MORE>, B<LESS>, and B<GZIP>. Such usage is considered "
3318 "mistaken, and to be avoided in new programs. The authors of I<gzip> should "
3319 "consider renaming their option to B<GZIP_OPT>."
3323 #: build/C/man7/environ.7:255
3325 "B<bash>(1), B<csh>(1), B<login>(1), B<sh>(1), B<tcsh>(1), B<execve>(2), "
3326 "B<clearenv>(3), B<exec>(3), B<getenv>(3), B<putenv>(3), B<setenv>(3), "
3327 "B<unsetenv>(3), B<locale>(5)"
3331 #: build/C/man3/euidaccess.3:25
3337 #: build/C/man3/euidaccess.3:25 build/C/man3/getopt.3:41
3343 #: build/C/man3/euidaccess.3:28
3344 msgid "euidaccess, eaccess - check effective user's permissions for a file"
3348 #: build/C/man3/euidaccess.3:32
3351 "B<#define _GNU_SOURCE> /* See feature_test_macros(7) */\n"
3352 "B<#include E<lt>unistd.hE<gt>>\n"
3356 #: build/C/man3/euidaccess.3:35
3359 "B<int euidaccess(const char *>I<pathname>B<, int >I<mode>B<);>\n"
3360 "B<int eaccess(const char *>I<pathname>B<, int >I<mode>B<);>\n"
3364 #: build/C/man3/euidaccess.3:47
3366 "Like B<access>(2), B<euidaccess>() checks permissions and existence of the "
3367 "file identified by its argument I<pathname>. However, whereas B<access>(2), "
3368 "performs checks using the real user and group identifiers of the process, "
3369 "B<euidaccess>() uses the effective identifiers."
3373 #: build/C/man3/euidaccess.3:53
3375 "I<mode> is a mask consisting of one or more of B<R_OK>, B<W_OK>, B<X_OK> and "
3376 "B<F_OK>, with the same meanings as for B<access>(2)."
3380 #: build/C/man3/euidaccess.3:58
3382 "B<eaccess>() is a synonym for B<euidaccess>(), provided for compatibility "
3383 "with some other systems."
3387 #: build/C/man3/euidaccess.3:66
3389 "On success (all requested permissions granted), zero is returned. On error "
3390 "(at least one bit in I<mode> asked for a permission that is denied, or some "
3391 "other error occurred), -1 is returned, and I<errno> is set appropriately."
3395 #: build/C/man3/euidaccess.3:69
3396 msgid "As for B<access>(2)."
3400 #: build/C/man3/euidaccess.3:73
3401 msgid "The B<eaccess>() function was added to glibc in version 2.4."
3404 #. e.g., FreeBSD 6.1.
3406 #: build/C/man3/euidaccess.3:79
3408 "These functions are nonstandard. Some other systems have an B<eaccess>() "
3413 #: build/C/man3/euidaccess.3:86
3415 "I<Warning>: Using this function to check a process's permissions on a file "
3416 "before performing some operation based on that information leads to race "
3417 "conditions: the file permissions may change between the two steps. "
3418 "Generally, it is safer just to attempt the desired operation and handle any "
3419 "permission error that occurs."
3423 #: build/C/man3/euidaccess.3:94
3425 "This function always dereferences symbolic links. If you need to check the "
3426 "permissions on a symbolic link, use B<faccessat>(2) with the flags "
3427 "B<AT_EACCESS> and B<AT_SYMLINK_NOFOLLOW>."
3431 #: build/C/man3/euidaccess.3:105
3433 "B<access>(2), B<chmod>(2), B<chown>(2), B<faccessat>(2), B<open>(2), "
3434 "B<setgid>(2), B<setuid>(2), B<stat>(2), B<credentials>(7), "
3435 "B<path_resolution>(7)"
3439 #: build/C/man3/exec.3:41
3445 #: build/C/man3/exec.3:41
3451 #: build/C/man3/exec.3:44
3452 msgid "execl, execlp, execle, execv, execvp, execvpe - execute a file"
3456 #: build/C/man3/exec.3:48
3457 msgid "B<extern char **environ;>"
3461 #: build/C/man3/exec.3:50
3462 msgid "B<int execl(const char *>I<path>B<, const char *>I<arg>B<, ...);>"
3466 #: build/C/man3/exec.3:52
3467 msgid "B<int execlp(const char *>I<file>B<, const char *>I<arg>B<, ...);>"
3471 #: build/C/man3/exec.3:54
3472 msgid "B<int execle(const char *>I<path>B<, const char *>I<arg>B<,>"
3476 #: build/C/man3/exec.3:56
3477 msgid "B< ..., char * const >I<envp>B<[]);>"
3481 #: build/C/man3/exec.3:58
3482 msgid "B<int execv(const char *>I<path>B<, char *const >I<argv>B<[]);>"
3486 #: build/C/man3/exec.3:60
3487 msgid "B<int execvp(const char *>I<file>B<, char *const >I<argv>B<[]);>"
3491 #: build/C/man3/exec.3:62
3492 msgid "B<int execvpe(const char *>I<file>B<, char *const >I<argv>B<[],>"
3496 #: build/C/man3/exec.3:64 build/C/man2/execve.2:46
3497 msgid "B< char *const >I<envp>B<[]);>"
3501 #: build/C/man3/exec.3:72
3502 msgid "B<execvpe>(): _GNU_SOURCE"
3506 #: build/C/man3/exec.3:82
3508 "The B<exec>() family of functions replaces the current process image with a "
3509 "new process image. The functions described in this manual page are "
3510 "front-ends for B<execve>(2). (See the manual page for B<execve>(2) for "
3511 "further details about the replacement of the current process image.)"
3515 #: build/C/man3/exec.3:85
3517 "The initial argument for these functions is the name of a file that is to be "
3522 #: build/C/man3/exec.3:107
3524 "The I<const char\\ *arg> and subsequent ellipses in the B<execl>(), "
3525 "B<execlp>(), and B<execle>() functions can be thought of as I<arg0>, "
3526 "I<arg1>, \\&..., I<argn>. Together they describe a list of one or more "
3527 "pointers to null-terminated strings that represent the argument list "
3528 "available to the executed program. The first argument, by convention, "
3529 "should point to the filename associated with the file being executed. The "
3530 "list of arguments I<must> be terminated by a NULL pointer, and, since these "
3531 "are variadic functions, this pointer must be cast I<(char\\ *) NULL>."
3535 #: build/C/man3/exec.3:120
3537 "The B<execv>(), B<execvp>(), and B<execvpe>() functions provide an array of "
3538 "pointers to null-terminated strings that represent the argument list "
3539 "available to the new program. The first argument, by convention, should "
3540 "point to the filename associated with the file being executed. The array of "
3541 "pointers I<must> be terminated by a NULL pointer."
3545 #: build/C/man3/exec.3:137
3547 "The B<execle>() and B<execvpe>() functions allow the caller to specify the "
3548 "environment of the executed program via the argument I<envp>. The I<envp> "
3549 "argument is an array of pointers to null-terminated strings and I<must> be "
3550 "terminated by a NULL pointer. The other functions take the environment for "
3551 "the new process image from the external variable I<environ> in the calling "
3556 #: build/C/man3/exec.3:137
3558 msgid "Special semantics for execlp() and execvp()"
3562 #: build/C/man3/exec.3:157
3564 "The B<execlp>(), B<execvp>(), and B<execvpe>() functions duplicate the "
3565 "actions of the shell in searching for an executable file if the specified "
3566 "filename does not contain a slash (/) character. The file is sought in the "
3567 "colon-separated list of directory pathnames specified in the B<PATH> "
3568 "environment variable. If this variable isn't defined, the path list "
3569 "defaults to the current directory followed by the list of directories "
3570 "returned by I<confstr(_CS_PATH)>. (This B<confstr>(3) call typically "
3571 "returns the value \"/bin:/usr/bin\".)"
3575 #: build/C/man3/exec.3:161
3577 "If the specified filename includes a slash character, then B<PATH> is "
3578 "ignored, and the file at the specified pathname is executed."
3582 #: build/C/man3/exec.3:163
3583 msgid "In addition, certain errors are treated specially."
3587 #: build/C/man3/exec.3:174
3589 "If permission is denied for a file (the attempted B<execve>(2) failed with "
3590 "the error B<EACCES>), these functions will continue searching the rest of "
3591 "the search path. If no other file is found, however, they will return with "
3592 "I<errno> set to B<EACCES>."
3596 #: build/C/man3/exec.3:183
3598 "If the header of a file isn't recognized (the attempted B<execve>(2) failed "
3599 "with the error B<ENOEXEC>), these functions will execute the shell "
3600 "(I</bin/sh>) with the path of the file as its first argument. (If this "
3601 "attempt fails, no further searching is done.)"
3605 #: build/C/man3/exec.3:190
3607 "The B<exec>() functions return only if an error has occurred. The return "
3608 "value is -1, and I<errno> is set to indicate the error."
3612 #: build/C/man3/exec.3:195
3614 "All of these functions may fail and set I<errno> for any of the errors "
3615 "specified for B<execve>(2)."
3619 #: build/C/man3/exec.3:199
3620 msgid "The B<execvpe>() function first appeared in glibc 2.11."
3624 #: build/C/man3/exec.3:201
3625 msgid "POSIX.1-2001, POSIX.1-2008."
3629 #: build/C/man3/exec.3:205
3630 msgid "The B<execvpe>() function is a GNU extension."
3634 #: build/C/man3/exec.3:215
3636 "On some other systems, the default path (used when the environment does not "
3637 "contain the variable B<PATH>) has the current working directory listed after "
3638 "I</bin> and I</usr/bin>, as an anti-Trojan-horse measure. Linux uses here "
3639 "the traditional \"current directory first\" default path."
3643 #: build/C/man3/exec.3:229
3645 "The behavior of B<execlp>() and B<execvp>() when errors occur while "
3646 "attempting to execute the file is historic practice, but has not "
3647 "traditionally been documented and is not specified by the POSIX standard. "
3648 "BSD (and possibly other systems) do an automatic sleep and retry if "
3649 "B<ETXTBSY> is encountered. Linux treats it as a hard error and returns "
3654 #: build/C/man3/exec.3:241
3656 "Traditionally, the functions B<execlp>() and B<execvp>() ignored all "
3657 "errors except for the ones described above and B<ENOMEM> and B<E2BIG>, upon "
3658 "which they returned. They now return if any error other than the ones "
3659 "described above occurs."
3663 #: build/C/man3/exec.3:248
3665 "B<sh>(1), B<execve>(2), B<fork>(2), B<ptrace>(2), B<fexecve>(3), "
3670 #: build/C/man2/execve.2:37
3676 #: build/C/man2/execve.2:37
3682 #: build/C/man2/execve.2:40
3683 msgid "execve - execute program"
3687 #: build/C/man2/execve.2:44
3688 msgid "B<int execve(const char *>I<filename>B<, char *const >I<argv>B<[], >"
3692 #: build/C/man2/execve.2:51
3694 "B<execve>() executes the program pointed to by I<filename>. I<filename> "
3695 "must be either a binary executable, or a script starting with a line of the "
3700 #: build/C/man2/execve.2:55 build/C/man2/execve.2:267
3702 msgid "B<#!> I<interpreter >[optional-arg]\n"
3706 #: build/C/man2/execve.2:59
3707 msgid "For details of the latter case, see \"Interpreter scripts\" below."
3711 #: build/C/man2/execve.2:68
3713 "I<argv> is an array of argument strings passed to the new program. By "
3714 "convention, the first of these strings should contain the filename "
3715 "associated with the file being executed. I<envp> is an array of strings, "
3716 "conventionally of the form B<key=value>, which are passed as environment to "
3717 "the new program. Both I<argv> and I<envp> must be terminated by a NULL "
3718 "pointer. The argument vector and environment can be accessed by the called "
3719 "program's main function, when it is defined as:"
3723 #: build/C/man2/execve.2:72
3725 msgid "int main(int argc, char *argv[], char *envp[])\n"
3729 #: build/C/man2/execve.2:79
3731 "B<execve>() does not return on success, and the text, data, bss, and stack "
3732 "of the calling process are overwritten by that of the program loaded."
3736 #: build/C/man2/execve.2:83
3738 "If the current program is being ptraced, a B<SIGTRAP> is sent to it after a "
3739 "successful B<execve>()."
3743 #: build/C/man2/execve.2:98
3745 "If the set-user-ID bit is set on the program file pointed to by I<filename>, "
3746 "and the underlying filesystem is not mounted I<nosuid> (the B<MS_NOSUID> "
3747 "flag for B<mount>(2)), and the calling process is not being ptraced, then "
3748 "the effective user ID of the calling process is changed to that of the owner "
3749 "of the program file. Similarly, when the set-group-ID bit of the program "
3750 "file is set the effective group ID of the calling process is set to the "
3751 "group of the program file."
3755 #: build/C/man2/execve.2:103
3757 "The effective user ID of the process is copied to the saved set-user-ID; "
3758 "similarly, the effective group ID is copied to the saved set-group-ID. This "
3759 "copying takes place after any effective ID changes that occur because of the "
3760 "set-user-ID and set-group-ID permission bits."
3764 #: build/C/man2/execve.2:111
3766 "If the executable is an a.out dynamically linked binary executable "
3767 "containing shared-library stubs, the Linux dynamic linker B<ld.so>(8) is "
3768 "called at the start of execution to bring needed shared libraries into "
3769 "memory and link the executable with them."
3773 #: build/C/man2/execve.2:120
3775 "If the executable is a dynamically linked ELF executable, the interpreter "
3776 "named in the PT_INTERP segment is used to load the needed shared libraries. "
3777 "This interpreter is typically I</lib/ld-linux.so.2> for binaries linked with "
3778 "glibc 2. (For binaries linked with the old Linux libc5, the interpreter was "
3779 "typically I</lib/ld-linux.so.1>.)"
3783 #: build/C/man2/execve.2:124
3785 "All process attributes are preserved during an B<execve>(), except the "
3790 #: build/C/man2/execve.2:128
3792 "The dispositions of any signals that are being caught are reset to the "
3793 "default (B<signal>(7))."
3797 #: build/C/man2/execve.2:131
3798 msgid "Any alternate signal stack is not preserved (B<sigaltstack>(2))."
3802 #: build/C/man2/execve.2:134
3803 msgid "Memory mappings are not preserved (B<mmap>(2))."
3807 #: build/C/man2/execve.2:137
3808 msgid "Attached System V shared memory segments are detached (B<shmat>(2))."
3812 #: build/C/man2/execve.2:140
3813 msgid "POSIX shared memory regions are unmapped (B<shm_open>(3))."
3817 #: build/C/man2/execve.2:143
3818 msgid "Open POSIX message queue descriptors are closed (B<mq_overview>(7))."
3822 #: build/C/man2/execve.2:146
3823 msgid "Any open POSIX named semaphores are closed (B<sem_overview>(7))."
3827 #: build/C/man2/execve.2:149
3828 msgid "POSIX timers are not preserved (B<timer_create>(2))."
3832 #: build/C/man2/execve.2:152
3833 msgid "Any open directory streams are closed (B<opendir>(3))."
3837 #: build/C/man2/execve.2:156
3838 msgid "Memory locks are not preserved (B<mlock>(2), B<mlockall>(2))."
3842 #: build/C/man2/execve.2:160
3843 msgid "Exit handlers are not preserved (B<atexit>(3), B<on_exit>(3))."
3847 #: build/C/man2/execve.2:163
3848 msgid "The floating-point environment is reset to the default (see B<fenv>(3))."
3852 #: build/C/man2/execve.2:169
3854 "The process attributes in the preceding list are all specified in "
3855 "POSIX.1-2001. The following Linux-specific process attributes are also not "
3856 "preserved during an B<execve>():"
3860 #: build/C/man2/execve.2:176
3862 "The B<prctl>(2) B<PR_SET_DUMPABLE> flag is set, unless a set-user-ID or "
3863 "set-group ID program is being executed, in which case it is cleared."
3867 #: build/C/man2/execve.2:181
3868 msgid "The B<prctl>(2) B<PR_SET_KEEPCAPS> flag is cleared."
3872 #: build/C/man2/execve.2:188
3874 "(Since Linux 2.4.36 / 2.6.23) If a set-user-ID or set-group-ID program is "
3875 "being executed, then the parent death signal set by B<prctl>(2) "
3876 "B<PR_SET_PDEATHSIG> flag is cleared."
3880 #: build/C/man2/execve.2:195
3882 "The process name, as set by B<prctl>(2) B<PR_SET_NAME> (and displayed by "
3883 "I<ps\\ -o comm>), is reset to the name of the new executable file."
3887 #: build/C/man2/execve.2:202
3889 "The B<SECBIT_KEEP_CAPS> I<securebits> flag is cleared. See "
3890 "B<capabilities>(7)."
3894 #: build/C/man2/execve.2:207
3895 msgid "The termination signal is reset to B<SIGCHLD> (see B<clone>(2))."
3899 #: build/C/man2/execve.2:209 build/C/man2/fork.2:133
3900 msgid "Note the following further points:"
3904 #: build/C/man2/execve.2:213
3906 "All threads other than the calling thread are destroyed during an "
3907 "B<execve>(). Mutexes, condition variables, and other pthreads objects are "
3912 #: build/C/man2/execve.2:216
3914 "The equivalent of I<setlocale(LC_ALL, \"C\")> is executed at program "
3919 #: build/C/man2/execve.2:224
3921 "POSIX.1-2001 specifies that the dispositions of any signals that are ignored "
3922 "or set to the default are left unchanged. POSIX.1-2001 specifies one "
3923 "exception: if B<SIGCHLD> is being ignored, then an implementation may leave "
3924 "the disposition unchanged or reset it to the default; Linux does the former."
3928 #: build/C/man2/execve.2:228
3930 "Any outstanding asynchronous I/O operations are canceled (B<aio_read>(3), "
3935 #: build/C/man2/execve.2:233
3936 msgid "For the handling of capabilities during B<execve>(), see B<capabilities>(7)."
3939 #. On Linux it appears that these file descriptors are
3940 #. always open after an execve(), and it looks like
3941 #. Solaris 8 and FreeBSD 6.1 are the same. -- mtk, 30 Apr 2007
3943 #: build/C/man2/execve.2:260
3945 "By default, file descriptors remain open across an B<execve>(). File "
3946 "descriptors that are marked close-on-exec are closed; see the description of "
3947 "B<FD_CLOEXEC> in B<fcntl>(2). (If a file descriptor is closed, this will "
3948 "cause the release of all record locks obtained on the underlying file by "
3949 "this process. See B<fcntl>(2) for details.) POSIX.1-2001 says that if "
3950 "file descriptors 0, 1, and 2 would otherwise be closed after a successful "
3951 "B<execve>(), and the process would gain privilege because the set-user_ID or "
3952 "set-group_ID permission bit was set on the executed file, then the system "
3953 "may open an unspecified file for each of these file descriptors. As a "
3954 "general principle, no portable program, whether privileged or not, can "
3955 "assume that these three file descriptors will remain closed across an "
3960 #: build/C/man2/execve.2:260
3962 msgid "Interpreter scripts"
3966 #: build/C/man2/execve.2:263
3968 "An interpreter script is a text file that has execute permission enabled and "
3969 "whose first line is of the form:"
3973 #: build/C/man2/execve.2:281
3975 "The I<interpreter> must be a valid pathname for an executable which is not "
3976 "itself a script. If the I<filename> argument of B<execve>() specifies an "
3977 "interpreter script, then I<interpreter> will be invoked with the following "
3982 #: build/C/man2/execve.2:285
3984 msgid "I<interpreter> [optional-arg] I<filename> arg...\n"
3988 #: build/C/man2/execve.2:294
3990 "where I<arg...> is the series of words pointed to by the I<argv> argument of "
3995 #: build/C/man2/execve.2:299
3997 "For portable use, I<optional-arg> should either be absent, or be specified "
3998 "as a single word (i.e., it should not contain white space); see NOTES below."
4002 #: build/C/man2/execve.2:299
4004 msgid "Limits on size of arguments and environment"
4008 #: build/C/man2/execve.2:312
4010 "Most UNIX implementations impose some limit on the total size of the "
4011 "command-line argument (I<argv>) and environment (I<envp>) strings that may "
4012 "be passed to a new program. POSIX.1 allows an implementation to advertise "
4013 "this limit using the B<ARG_MAX> constant (either defined in "
4014 "I<E<lt>limits.hE<gt>> or available at run time using the call "
4015 "I<sysconf(_SC_ARG_MAX)>)."
4019 #: build/C/man2/execve.2:319
4021 "On Linux prior to kernel 2.6.23, the memory used to store the environment "
4022 "and argument strings was limited to 32 pages (defined by the kernel constant "
4023 "B<MAX_ARG_PAGES>). On architectures with a 4-kB page size, this yields a "
4024 "maximum size of 128 kB."
4027 #. For some background on the changes to ARG_MAX in kernels 2.6.23 and
4029 #. http://sourceware.org/bugzilla/show_bug.cgi?id=5786
4030 #. http://bugzilla.kernel.org/show_bug.cgi?id=10095
4031 #. http://thread.gmane.org/gmane.linux.kernel/646709/focus=648101,
4032 #. checked into 2.6.25 as commit a64e715fc74b1a7dcc5944f848acc38b2c4d4ee2.
4033 #. Ollie: That doesn't include the lists of pointers, though,
4034 #. so the actual usage is a bit higher (1 pointer per argument).
4036 #: build/C/man2/execve.2:355
4038 "On kernel 2.6.23 and later, most architectures support a size limit derived "
4039 "from the soft B<RLIMIT_STACK> resource limit (see B<getrlimit>(2)) that is "
4040 "in force at the time of the B<execve>() call. (Architectures with no "
4041 "memory management unit are excepted: they maintain the limit that was in "
4042 "effect before kernel 2.6.23.) This change allows programs to have a much "
4043 "larger argument and/or environment list. For these architectures, the total "
4044 "size is limited to 1/4 of the allowed stack size. (Imposing the 1/4-limit "
4045 "ensures that the new program always has some stack space.) Since Linux "
4046 "2.6.25, the kernel places a floor of 32 pages on this size limit, so that, "
4047 "even when B<RLIMIT_STACK> is set very low, applications are guaranteed to "
4048 "have at least as much argument and environment space as was provided by "
4049 "Linux 2.6.23 and earlier. (This guarantee was not provided in Linux 2.6.23 "
4050 "and 2.6.24.) Additionally, the limit per string is 32 pages (the kernel "
4051 "constant B<MAX_ARG_STRLEN>), and the maximum number of strings is "
4056 #: build/C/man2/execve.2:361
4058 "On success, B<execve>() does not return, on error -1 is returned, and "
4059 "I<errno> is set appropriately."
4063 #: build/C/man2/execve.2:362
4069 #: build/C/man2/execve.2:369
4071 "The total number of bytes in the environment (I<envp>) and argument list "
4072 "(I<argv>) is too large."
4076 #: build/C/man2/execve.2:376
4078 "Search permission is denied on a component of the path prefix of I<filename> "
4079 "or the name of a script interpreter. (See also B<path_resolution>(7).)"
4083 #: build/C/man2/execve.2:379
4084 msgid "The file or a script interpreter is not a regular file."
4088 #: build/C/man2/execve.2:382
4089 msgid "Execute permission is denied for the file or a script or ELF interpreter."
4093 #: build/C/man2/execve.2:386
4094 msgid "The filesystem is mounted I<noexec>."
4098 #: build/C/man2/execve.2:390
4099 msgid "I<filename> points outside your accessible address space."
4103 #: build/C/man2/execve.2:394
4105 "An ELF executable had more than one PT_INTERP segment (i.e., tried to name "
4106 "more than one interpreter)."
4110 #: build/C/man2/execve.2:397 build/C/man2/truncate.2:148
4116 #: build/C/man2/execve.2:400
4117 msgid "An ELF interpreter was a directory."
4121 #: build/C/man2/execve.2:400
4127 #: build/C/man2/execve.2:403
4128 msgid "An ELF interpreter was not in a recognized format."
4132 #: build/C/man2/execve.2:408
4134 "Too many symbolic links were encountered in resolving I<filename> or the "
4135 "name of a script or ELF interpreter."
4139 #: build/C/man2/execve.2:411
4140 msgid "The process has the maximum number of files open."
4144 #: build/C/man2/execve.2:415
4145 msgid "I<filename> is too long."
4149 #: build/C/man2/execve.2:415 build/C/man3/getlogin.3:108 build/C/man2/swapon.2:133 build/C/man2/uselib.2:67
4155 #: build/C/man2/execve.2:418 build/C/man2/swapon.2:136 build/C/man2/uselib.2:70
4156 msgid "The system limit on the total number of open files has been reached."
4160 #: build/C/man2/execve.2:424
4162 "The file I<filename> or a script or ELF interpreter does not exist, or a "
4163 "shared library needed for file or interpreter cannot be found."
4167 #: build/C/man2/execve.2:424 build/C/man2/uselib.2:70
4173 #: build/C/man2/execve.2:429
4175 "An executable is not in a recognized format, is for the wrong architecture, "
4176 "or has some other format error that means it cannot be executed."
4180 #: build/C/man2/execve.2:437
4182 "A component of the path prefix of I<filename> or a script or ELF interpreter "
4183 "is not a directory."
4187 #: build/C/man2/execve.2:443
4189 "The filesystem is mounted I<nosuid>, the user is not the superuser, and the "
4190 "file has the set-user-ID or set-group-ID bit set."
4194 #: build/C/man2/execve.2:447
4196 "The process is being traced, the user is not the superuser and the file has "
4197 "the set-user-ID or set-group-ID bit set."
4201 #: build/C/man2/execve.2:450
4202 msgid "Executable was open for writing by one or more processes."
4205 #. SVr4 documents additional error
4206 #. conditions EAGAIN, EINTR, ELIBACC, ENOLINK, EMULTIHOP; POSIX does not
4207 #. document ETXTBSY, EPERM, EFAULT, ELOOP, EIO, ENFILE, EMFILE, EINVAL,
4208 #. EISDIR or ELIBBAD error conditions.
4210 #: build/C/man2/execve.2:458
4212 "SVr4, 4.3BSD, POSIX.1-2001. POSIX.1-2001 does not document the #! behavior "
4213 "but is otherwise compatible."
4217 #: build/C/man2/execve.2:461
4218 msgid "Set-user-ID and set-group-ID processes can not be B<ptrace>(2)d."
4222 #: build/C/man2/execve.2:463
4223 msgid "Linux ignores the set-user-ID and set-group-ID bits on scripts."
4227 #: build/C/man2/execve.2:474
4229 "The result of mounting a filesystem I<nosuid> varies across Linux kernel "
4230 "versions: some will refuse execution of set-user-ID and set-group-ID "
4231 "executables when this would give the user powers she did not have already "
4232 "(and return B<EPERM>), some will just ignore the set-user-ID and "
4233 "set-group-ID bits and B<exec>() successfully."
4237 #: build/C/man2/execve.2:477
4239 "A maximum line length of 127 characters is allowed for the first line in a "
4240 "#! executable shell script."
4244 #. e.g., FreeBSD before 6.0, but not FreeBSD 6.0 onward
4246 #: build/C/man2/execve.2:496
4248 "The semantics of the I<optional-arg> argument of an interpreter script vary "
4249 "across implementations. On Linux, the entire string following the "
4250 "I<interpreter> name is passed as a single argument to the interpreter, and "
4251 "this string can include white space. However, behavior differs on some "
4252 "other systems. Some systems use the first white space to terminate "
4253 "I<optional-arg>. On some systems, an interpreter script can have multiple "
4254 "arguments, and white spaces in I<optional-arg> are used to delimit the "
4258 #. e.g., EFAULT on Solaris 8 and FreeBSD 6.1; but
4259 #. HP-UX 11 is like Linux -- mtk, Apr 2007
4260 #. Bug filed 30 Apr 2007: http://bugzilla.kernel.org/show_bug.cgi?id=8408
4261 #. Bug rejected (because fix would constitute an ABI change).
4263 #: build/C/man2/execve.2:513
4265 "On Linux, either I<argv> or I<envp> can be specified as NULL, which has the "
4266 "same effect as specifying these arguments as a pointer to a list containing "
4267 "a single NULL pointer. B<Do not take advantage of this misfeature!> It is "
4268 "nonstandard and nonportable: on most other UNIX systems doing this will "
4269 "result in an error (B<EFAULT>)."
4274 #. Some Linux versions have failed to check permissions on ELF
4275 #. interpreters. This is a security hole, because it allows users to
4276 #. open any file, such as a rewinding tape device, for reading. Some
4277 #. Linux versions have also had other security holes in
4279 #. that could be exploited for denial of service by a suitably crafted
4280 #. ELF binary. There are no known problems with 2.0.34 or 2.2.15.
4282 #: build/C/man2/execve.2:533
4284 "POSIX.1-2001 says that values returned by B<sysconf>(3) should be invariant "
4285 "over the lifetime of a process. However, since Linux 2.6.23, if the "
4286 "B<RLIMIT_STACK> resource limit changes, then the value reported by "
4287 "B<_SC_ARG_MAX> will also change, to reflect the fact that the limit on space "
4288 "for holding command-line arguments and environment variables has changed."
4292 #: build/C/man2/execve.2:533
4298 #: build/C/man2/execve.2:544
4300 "With UNIX V6 the argument list of an B<exec>() call was ended by 0, while "
4301 "the argument list of I<main> was ended by -1. Thus, this argument list was "
4302 "not directly usable in a further B<exec>() call. Since UNIX V7 both are "
4307 #: build/C/man2/execve.2:547
4309 "The following program is designed to be execed by the second program below. "
4310 "It just echoes its command-line one per line."
4314 #: build/C/man2/execve.2:551
4316 msgid "/* myecho.c */\n"
4320 #: build/C/man2/execve.2:554
4323 "#include E<lt>stdio.hE<gt>\n"
4324 "#include E<lt>stdlib.hE<gt>\n"
4328 #: build/C/man2/execve.2:559
4332 "main(int argc, char *argv[])\n"
4338 #: build/C/man2/execve.2:562
4341 " for (j = 0; j E<lt> argc; j++)\n"
4342 " printf(\"argv[%d]: %s\\en\", j, argv[j]);\n"
4346 #: build/C/man2/execve.2:570
4348 "This program can be used to exec the program named in its command-line "
4353 #: build/C/man2/execve.2:574
4355 msgid "/* execve.c */\n"
4359 #: build/C/man2/execve.2:578
4362 "#include E<lt>stdio.hE<gt>\n"
4363 "#include E<lt>stdlib.hE<gt>\n"
4364 "#include E<lt>unistd.hE<gt>\n"
4368 #: build/C/man2/execve.2:584
4372 "main(int argc, char *argv[])\n"
4374 " char *newargv[] = { NULL, \"hello\", \"world\", NULL };\n"
4375 " char *newenviron[] = { NULL };\n"
4379 #: build/C/man2/execve.2:589
4382 " if (argc != 2) {\n"
4383 "\tfprintf(stderr, \"Usage: %s E<lt>file-to-execE<gt>\\en\", argv[0]);\n"
4384 "\texit(EXIT_FAILURE);\n"
4389 #: build/C/man2/execve.2:591
4391 msgid " newargv[0] = argv[1];\n"
4395 #: build/C/man2/execve.2:596
4398 " execve(argv[1], newargv, newenviron);\n"
4399 " perror(\"execve\"); /* execve() only returns on error */\n"
4400 " exit(EXIT_FAILURE);\n"
4405 #: build/C/man2/execve.2:600
4406 msgid "We can use the second program to exec the first as follows:"
4410 #: build/C/man2/execve.2:609
4413 "$B< cc myecho.c -o myecho>\n"
4414 "$B< cc execve.c -o execve>\n"
4415 "$B< ./execve ./myecho>\n"
4416 "argv[0]: ./myecho\n"
4422 #: build/C/man2/execve.2:617
4424 "We can also use these programs to demonstrate the use of a script "
4425 "interpreter. To do this we create a script whose \"interpreter\" is our "
4426 "I<myecho> program:"
4430 #: build/C/man2/execve.2:624
4433 "$B< cat E<gt> script.sh>\n"
4434 "B<#! ./myecho script-arg>\n"
4436 "$B< chmod +x script.sh>\n"
4440 #: build/C/man2/execve.2:628
4441 msgid "We can then use our program to exec the script:"
4445 #: build/C/man2/execve.2:637
4448 "$B< ./execve ./script.sh>\n"
4449 "argv[0]: ./myecho\n"
4450 "argv[1]: script-arg\n"
4451 "argv[2]: ./script.sh\n"
4457 #: build/C/man2/execve.2:650
4459 "B<chmod>(2), B<fork>(2), B<ptrace>(2), B<execl>(3), B<fexecve>(3), "
4460 "B<getopt>(3), B<credentials>(7), B<environ>(7), B<path_resolution>(7), "
4465 #: build/C/man2/exit_group.2:25
4471 #: build/C/man2/exit_group.2:25
4477 #: build/C/man2/exit_group.2:28
4478 msgid "exit_group - exit all threads in a process"
4482 #: build/C/man2/exit_group.2:31
4484 msgid "B<#include E<lt>linux/unistd.hE<gt>>\n"
4488 #: build/C/man2/exit_group.2:33
4490 msgid "B<void exit_group(int >I<status>B<);>\n"
4494 #: build/C/man2/exit_group.2:39
4496 "This system call is equivalent to B<exit>(2) except that it terminates not "
4497 "only the calling thread, but all threads in the calling process's thread "
4502 #: build/C/man2/exit_group.2:41
4503 msgid "This system call does not return."
4507 #: build/C/man2/exit_group.2:43
4508 msgid "This call is present since Linux 2.5.35."
4512 #: build/C/man2/exit_group.2:45
4513 msgid "This call is Linux-specific."
4517 #: build/C/man2/exit_group.2:49
4519 "Since glibc 2.3, this is the system call invoked when the B<exit>(2) "
4520 "wrapper function is called."
4524 #: build/C/man2/exit_group.2:51
4529 #: build/C/man2/fcntl.2:61
4535 #: build/C/man2/fcntl.2:61
4541 #: build/C/man2/fcntl.2:64
4542 msgid "fcntl - manipulate file descriptor"
4546 #: build/C/man2/fcntl.2:68
4549 "B<#include E<lt>unistd.hE<gt>>\n"
4550 "B<#include E<lt>fcntl.hE<gt>>\n"
4554 #: build/C/man2/fcntl.2:70
4556 msgid "B<int fcntl(int >I<fd>B<, int >I<cmd>B<, ... /* >I<arg>B< */ );>\n"
4560 #: build/C/man2/fcntl.2:77
4562 "B<fcntl>() performs one of the operations described below on the open file "
4563 "descriptor I<fd>. The operation is determined by I<cmd>."
4567 #: build/C/man2/fcntl.2:91
4569 "B<fcntl>() can take an optional third argument. Whether or not this "
4570 "argument is required is determined by I<cmd>. The required argument type is "
4571 "indicated in parentheses after each I<cmd> name (in most cases, the required "
4572 "type is I<int>, and we identify the argument using the name I<arg>), or "
4573 "I<void> is specified if the argument is not required."
4577 #: build/C/man2/fcntl.2:91
4579 msgid "Duplicating a file descriptor"
4583 #: build/C/man2/fcntl.2:92
4585 msgid "B<F_DUPFD> (I<int>)"
4589 #: build/C/man2/fcntl.2:102
4591 "Find the lowest numbered available file descriptor greater than or equal to "
4592 "I<arg> and make it be a copy of I<fd>. This is different from B<dup2>(2), "
4593 "which uses exactly the descriptor specified."
4597 #: build/C/man2/fcntl.2:104
4598 msgid "On success, the new descriptor is returned."
4602 #: build/C/man2/fcntl.2:108
4603 msgid "See B<dup>(2) for further details."
4607 #: build/C/man2/fcntl.2:108
4609 msgid "B<F_DUPFD_CLOEXEC> (I<int>; since Linux 2.6.24)"
4613 #: build/C/man2/fcntl.2:125
4615 "As for B<F_DUPFD>, but additionally set the close-on-exec flag for the "
4616 "duplicate descriptor. Specifying this flag permits a program to avoid an "
4617 "additional B<fcntl>() B<F_SETFD> operation to set the B<FD_CLOEXEC> flag. "
4618 "For an explanation of why this flag is useful, see the description of "
4619 "B<O_CLOEXEC> in B<open>(2)."
4623 #: build/C/man2/fcntl.2:125
4625 msgid "File descriptor flags"
4629 #: build/C/man2/fcntl.2:136
4631 "The following commands manipulate the flags associated with a file "
4632 "descriptor. Currently, only one such flag is defined: B<FD_CLOEXEC>, the "
4633 "close-on-exec flag. If the B<FD_CLOEXEC> bit is 0, the file descriptor will "
4634 "remain open across an B<execve>(2), otherwise it will be closed."
4638 #: build/C/man2/fcntl.2:136
4640 msgid "B<F_GETFD> (I<void>)"
4644 #: build/C/man2/fcntl.2:141
4645 msgid "Read the file descriptor flags; I<arg> is ignored."
4649 #: build/C/man2/fcntl.2:141
4651 msgid "B<F_SETFD> (I<int>)"
4655 #: build/C/man2/fcntl.2:145
4656 msgid "Set the file descriptor flags to the value specified by I<arg>."
4660 #: build/C/man2/fcntl.2:145
4662 msgid "File status flags"
4668 #: build/C/man2/fcntl.2:160
4670 "Each open file description has certain associated status flags, initialized "
4671 "by B<open>(2) and possibly modified by B<fcntl>(). Duplicated file "
4672 "descriptors (made with B<dup>(2), B<fcntl>(F_DUPFD), B<fork>(2), etc.) refer "
4673 "to the same open file description, and thus share the same file status "
4678 #: build/C/man2/fcntl.2:163
4679 msgid "The file status flags and their semantics are described in B<open>(2)."
4683 #: build/C/man2/fcntl.2:163
4685 msgid "B<F_GETFL> (I<void>)"
4689 #: build/C/man2/fcntl.2:168
4690 msgid "Get the file access mode and the file status flags; I<arg> is ignored."
4694 #: build/C/man2/fcntl.2:168
4696 msgid "B<F_SETFL> (I<int>)"
4699 #. FIXME . According to POSIX.1-2001, O_SYNC should also be modifiable
4700 #. via fcntl(2), but currently Linux does not permit this
4701 #. See http://bugzilla.kernel.org/show_bug.cgi?id=5994
4703 #: build/C/man2/fcntl.2:191
4705 "Set the file status flags to the value specified by I<arg>. File access "
4706 "mode (B<O_RDONLY>, B<O_WRONLY>, B<O_RDWR>) and file creation flags (i.e., "
4707 "B<O_CREAT>, B<O_EXCL>, B<O_NOCTTY>, B<O_TRUNC>) in I<arg> are ignored. On "
4708 "Linux this command can change only the B<O_APPEND>, B<O_ASYNC>, B<O_DIRECT>, "
4709 "B<O_NOATIME>, and B<O_NONBLOCK> flags."
4713 #: build/C/man2/fcntl.2:191
4715 msgid "Advisory locking"
4719 #: build/C/man2/fcntl.2:199
4721 "B<F_GETLK>, B<F_SETLK> and B<F_SETLKW> are used to acquire, release, and "
4722 "test for the existence of record locks (also known as file-segment or "
4723 "file-region locks). The third argument, I<lock>, is a pointer to a "
4724 "structure that has at least the following fields (in unspecified order)."
4728 #: build/C/man2/fcntl.2:214
4733 " short l_type; /* Type of lock: F_RDLCK,\n"
4734 " F_WRLCK, F_UNLCK */\n"
4735 " short l_whence; /* How to interpret l_start:\n"
4736 " SEEK_SET, SEEK_CUR, SEEK_END */\n"
4737 " off_t l_start; /* Starting offset for lock */\n"
4738 " off_t l_len; /* Number of bytes to lock */\n"
4739 " pid_t l_pid; /* PID of process blocking our lock\n"
4740 " (F_GETLK only) */\n"
4746 #: build/C/man2/fcntl.2:222
4748 "The I<l_whence>, I<l_start>, and I<l_len> fields of this structure specify "
4749 "the range of bytes we wish to lock. Bytes past the end of the file may be "
4750 "locked, but not bytes before the start of the file."
4754 #: build/C/man2/fcntl.2:242
4756 "I<l_start> is the starting offset for the lock, and is interpreted relative "
4757 "to either: the start of the file (if I<l_whence> is B<SEEK_SET>); the "
4758 "current file offset (if I<l_whence> is B<SEEK_CUR>); or the end of the file "
4759 "(if I<l_whence> is B<SEEK_END>). In the final two cases, I<l_start> can be "
4760 "a negative number provided the offset does not lie before the start of the "
4765 #: build/C/man2/fcntl.2:257
4767 "I<l_len> specifies the number of bytes to be locked. If I<l_len> is "
4768 "positive, then the range to be locked covers bytes I<l_start> up to and "
4769 "including I<l_start>+I<l_len>-1. Specifying 0 for I<l_len> has the special "
4770 "meaning: lock all bytes starting at the location specified by I<l_whence> "
4771 "and I<l_start> through to the end of file, no matter how large the file "
4776 #: build/C/man2/fcntl.2:270
4778 "POSIX.1-2001 allows (but does not require) an implementation to support a "
4779 "negative I<l_len> value; if I<l_len> is negative, the interval described by "
4780 "I<lock> covers bytes I<l_start>+I<l_len> up to and including I<l_start>-1. "
4781 "This is supported by Linux since kernel versions 2.4.21 and 2.5.49."
4785 #: build/C/man2/fcntl.2:289
4787 "The I<l_type> field can be used to place a read (B<F_RDLCK>) or a write "
4788 "(B<F_WRLCK>) lock on a file. Any number of processes may hold a read lock "
4789 "(shared lock) on a file region, but only one process may hold a write lock "
4790 "(exclusive lock). An exclusive lock excludes all other locks, both shared "
4791 "and exclusive. A single process can hold only one type of lock on a file "
4792 "region; if a new lock is applied to an already-locked region, then the "
4793 "existing lock is converted to the new lock type. (Such conversions may "
4794 "involve splitting, shrinking, or coalescing with an existing lock if the "
4795 "byte range specified by the new lock does not precisely coincide with the "
4796 "range of the existing lock.)"
4800 #: build/C/man2/fcntl.2:289
4802 msgid "B<F_SETLK> (I<struct flock *>)"
4806 #: build/C/man2/fcntl.2:312
4808 "Acquire a lock (when I<l_type> is B<F_RDLCK> or B<F_WRLCK>) or release a "
4809 "lock (when I<l_type> is B<F_UNLCK>) on the bytes specified by the "
4810 "I<l_whence>, I<l_start>, and I<l_len> fields of I<lock>. If a conflicting "
4811 "lock is held by another process, this call returns -1 and sets I<errno> to "
4812 "B<EACCES> or B<EAGAIN>."
4816 #: build/C/man2/fcntl.2:312
4818 msgid "B<F_SETLKW> (I<struct flock *>)"
4822 #: build/C/man2/fcntl.2:326
4824 "As for B<F_SETLK>, but if a conflicting lock is held on the file, then wait "
4825 "for that lock to be released. If a signal is caught while waiting, then the "
4826 "call is interrupted and (after the signal handler has returned) returns "
4827 "immediately (with return value -1 and I<errno> set to B<EINTR>; see "
4832 #: build/C/man2/fcntl.2:326
4834 msgid "B<F_GETLK> (I<struct flock *>)"
4838 #: build/C/man2/fcntl.2:350
4840 "On input to this call, I<lock> describes a lock we would like to place on "
4841 "the file. If the lock could be placed, B<fcntl>() does not actually place "
4842 "it, but returns B<F_UNLCK> in the I<l_type> field of I<lock> and leaves the "
4843 "other fields of the structure unchanged. If one or more incompatible locks "
4844 "would prevent this lock being placed, then B<fcntl>() returns details about "
4845 "one of these locks in the I<l_type>, I<l_whence>, I<l_start>, and I<l_len> "
4846 "fields of I<lock> and sets I<l_pid> to be the PID of the process holding "
4851 #: build/C/man2/fcntl.2:358
4853 "In order to place a read lock, I<fd> must be open for reading. In order to "
4854 "place a write lock, I<fd> must be open for writing. To place both types of "
4855 "lock, open a file read-write."
4858 #. (Additional file descriptors referring to the same file
4859 #. may have been obtained by calls to
4860 #. .BR open "(2), " dup "(2), " dup2 "(2), or " fcntl ().)
4862 #: build/C/man2/fcntl.2:375
4864 "As well as being removed by an explicit B<F_UNLCK>, record locks are "
4865 "automatically released when the process terminates or if it closes I<any> "
4866 "file descriptor referring to a file on which locks are held. This is bad: "
4867 "it means that a process can lose the locks on a file like I</etc/passwd> or "
4868 "I</etc/mtab> when for some reason a library function decides to open, read "
4873 #: build/C/man2/fcntl.2:380
4875 "Record locks are not inherited by a child created via B<fork>(2), but are "
4876 "preserved across an B<execve>(2)."
4880 #: build/C/man2/fcntl.2:389
4882 "Because of the buffering performed by the B<stdio>(3) library, the use of "
4883 "record locking with routines in that package should be avoided; use "
4884 "B<read>(2) and B<write>(2) instead."
4888 #: build/C/man2/fcntl.2:389
4890 msgid "Mandatory locking"
4894 #: build/C/man2/fcntl.2:393
4896 "(Non-POSIX.) The above record locks may be either advisory or mandatory, "
4897 "and are advisory by default."
4901 #: build/C/man2/fcntl.2:396
4903 "Advisory locks are not enforced and are useful only between cooperating "
4908 #: build/C/man2/fcntl.2:415
4910 "Mandatory locks are enforced for all processes. If a process tries to "
4911 "perform an incompatible access (e.g., B<read>(2) or B<write>(2)) on a file "
4912 "region that has an incompatible mandatory lock, then the result depends upon "
4913 "whether the B<O_NONBLOCK> flag is enabled for its open file description. If "
4914 "the B<O_NONBLOCK> flag is not enabled, then system call is blocked until the "
4915 "lock is removed or converted to a mode that is compatible with the access. "
4916 "If the B<O_NONBLOCK> flag is enabled, then the system call fails with the "
4921 #: build/C/man2/fcntl.2:432
4923 "To make use of mandatory locks, mandatory locking must be enabled both on "
4924 "the filesystem that contains the file to be locked, and on the file itself. "
4925 "Mandatory locking is enabled on a filesystem using the \"-o mand\" option to "
4926 "B<mount>(8), or the B<MS_MANDLOCK> flag for B<mount>(2). Mandatory locking "
4927 "is enabled on a file by disabling group execute permission on the file and "
4928 "enabling the set-group-ID permission bit (see B<chmod>(1) and B<chmod>(2))."
4932 #: build/C/man2/fcntl.2:435
4934 "The Linux implementation of mandatory locking is unreliable. See BUGS "
4939 #: build/C/man2/fcntl.2:435
4941 msgid "Managing signals"
4945 #: build/C/man2/fcntl.2:444
4947 "B<F_GETOWN>, B<F_SETOWN>, B<F_GETOWN_EX>, B<F_SETOWN_EX>, B<F_GETSIG> and "
4948 "B<F_SETSIG> are used to manage I/O availability signals:"
4952 #: build/C/man2/fcntl.2:444
4954 msgid "B<F_GETOWN> (I<void>)"
4958 #: build/C/man2/fcntl.2:457
4960 "Return (as the function result) the process ID or process group currently "
4961 "receiving B<SIGIO> and B<SIGURG> signals for events on file descriptor "
4962 "I<fd>. Process IDs are returned as positive values; process group IDs are "
4963 "returned as negative values (but see BUGS below). I<arg> is ignored."
4967 #: build/C/man2/fcntl.2:457
4969 msgid "B<F_SETOWN> (I<int>)"
4973 #: build/C/man2/fcntl.2:474
4975 "Set the process ID or process group ID that will receive B<SIGIO> and "
4976 "B<SIGURG> signals for events on file descriptor I<fd> to the ID given in "
4977 "I<arg>. A process ID is specified as a positive value; a process group ID "
4978 "is specified as a negative value. Most commonly, the calling process "
4979 "specifies itself as the owner (that is, I<arg> is specified as "
4985 #: build/C/man2/fcntl.2:491
4987 "If you set the B<O_ASYNC> status flag on a file descriptor by using the "
4988 "B<F_SETFL> command of B<fcntl>(), a B<SIGIO> signal is sent whenever input "
4989 "or output becomes possible on that file descriptor. B<F_SETSIG> can be used "
4990 "to obtain delivery of a signal other than B<SIGIO>. If this permission "
4991 "check fails, then the signal is silently discarded."
4995 #: build/C/man2/fcntl.2:499
4997 "Sending a signal to the owner process (group) specified by B<F_SETOWN> is "
4998 "subject to the same permissions checks as are described for B<kill>(2), "
4999 "where the sending process is the one that employs B<F_SETOWN> (but see BUGS "
5003 #. The following appears to be rubbish. It doesn't seem to
5004 #. be true according to the kernel source, and I can write
5005 #. a program that gets a terminal-generated SIGIO even though
5006 #. it is not the foreground process group of the terminal.
5009 #. If the file descriptor
5011 #. refers to a terminal device, then SIGIO
5012 #. signals are sent to the foreground process group of the terminal.
5014 #: build/C/man2/fcntl.2:523
5016 "If the file descriptor I<fd> refers to a socket, B<F_SETOWN> also selects "
5017 "the recipient of B<SIGURG> signals that are delivered when out-of-band data "
5018 "arrives on that socket. (B<SIGURG> is sent in any situation where "
5019 "B<select>(2) would report the socket as having an \"exceptional "
5024 #: build/C/man2/fcntl.2:526
5025 msgid "The following was true in 2.6.x kernels up to and including kernel 2.6.11:"
5028 #. The relevant place in the (2.6) kernel source is the
5029 #. 'switch' in fs/fcntl.c::send_sigio_to_task() -- MTK, Apr 2005
5030 #. send_sigurg()/send_sigurg_to_task() bypasses
5031 #. kill_fasync()/send_sigio()/send_sigio_to_task()
5032 #. to directly call send_group_sig_info()
5033 #. -- MTK, Apr 2005 (kernel 2.6.11)
5035 #: build/C/man2/fcntl.2:566
5037 "If a nonzero value is given to B<F_SETSIG> in a multithreaded process "
5038 "running with a threading library that supports thread groups (e.g., NPTL), "
5039 "then a positive value given to B<F_SETOWN> has a different meaning: instead "
5040 "of being a process ID identifying a whole process, it is a thread ID "
5041 "identifying a specific thread within a process. Consequently, it may be "
5042 "necessary to pass B<F_SETOWN> the result of B<gettid>(2) instead of "
5043 "B<getpid>(2) to get sensible results when B<F_SETSIG> is used. (In current "
5044 "Linux threading implementations, a main thread's thread ID is the same as "
5045 "its process ID. This means that a single-threaded program can equally use "
5046 "B<gettid>(2) or B<getpid>(2) in this scenario.) Note, however, that the "
5047 "statements in this paragraph do not apply to the B<SIGURG> signal generated "
5048 "for out-of-band data on a socket: this signal is always sent to either a "
5049 "process or a process group, depending on the value given to B<F_SETOWN>."
5053 #: build/C/man2/fcntl.2:577
5055 "The above behavior was accidentally dropped in Linux 2.6.12, and won't be "
5056 "restored. From Linux 2.6.32 onward, use B<F_SETOWN_EX> to target B<SIGIO> "
5057 "and B<SIGURG> signals at a particular thread."
5061 #: build/C/man2/fcntl.2:577
5063 msgid "B<F_GETOWN_EX> (struct f_owner_ex *) (since Linux 2.6.32)"
5067 #: build/C/man2/fcntl.2:586
5069 "Return the current file descriptor owner settings as defined by a previous "
5070 "B<F_SETOWN_EX> operation. The information is returned in the structure "
5071 "pointed to by I<arg>, which has the following form:"
5075 #: build/C/man2/fcntl.2:593
5078 "struct f_owner_ex {\n"
5085 #: build/C/man2/fcntl.2:610
5087 "The I<type> field will have one of the values B<F_OWNER_TID>, "
5088 "B<F_OWNER_PID>, or B<F_OWNER_PGRP>. The I<pid> field is a positive integer "
5089 "representing a thread ID, process ID, or process group ID. See "
5090 "B<F_SETOWN_EX> for more details."
5094 #: build/C/man2/fcntl.2:610
5096 msgid "B<F_SETOWN_EX> (struct f_owner_ex *) (since Linux 2.6.32)"
5100 #: build/C/man2/fcntl.2:626
5102 "This operation performs a similar task to B<F_SETOWN>. It allows the caller "
5103 "to direct I/O availability signals to a specific thread, process, or process "
5104 "group. The caller specifies the target of signals via I<arg>, which is a "
5105 "pointer to a I<f_owner_ex> structure. The I<type> field has one of the "
5106 "following values, which define how I<pid> is interpreted:"
5110 #: build/C/man2/fcntl.2:627
5112 msgid "B<F_OWNER_TID>"
5116 #: build/C/man2/fcntl.2:636
5118 "Send the signal to the thread whose thread ID (the value returned by a call "
5119 "to B<clone>(2) or B<gettid>(2)) is specified in I<pid>."
5123 #: build/C/man2/fcntl.2:636
5125 msgid "B<F_OWNER_PID>"
5129 #: build/C/man2/fcntl.2:641
5130 msgid "Send the signal to the process whose ID is specified in I<pid>."
5134 #: build/C/man2/fcntl.2:641
5136 msgid "B<F_OWNER_PGRP>"
5140 #: build/C/man2/fcntl.2:649
5142 "Send the signal to the process group whose ID is specified in I<pid>. (Note "
5143 "that, unlike with B<F_SETOWN>, a process group ID is specified as a positive "
5148 #: build/C/man2/fcntl.2:650
5150 msgid "B<F_GETSIG> (I<void>)"
5154 #: build/C/man2/fcntl.2:665
5156 "Return (as the function result) the signal sent when input or output "
5157 "becomes possible. A value of zero means B<SIGIO> is sent. Any other value "
5158 "(including B<SIGIO>) is the signal sent instead, and in this case "
5159 "additional info is available to the signal handler if installed with "
5160 "B<SA_SIGINFO>. I<arg> is ignored."
5164 #: build/C/man2/fcntl.2:665
5166 msgid "B<F_SETSIG> (I<int>)"
5170 #. The following was true only up until 2.6.11:
5172 #. Additionally, passing a nonzero value to
5174 #. changes the signal recipient from a whole process to a specific thread
5175 #. within a process.
5176 #. See the description of
5178 #. for more details.
5180 #: build/C/man2/fcntl.2:688
5182 "Set the signal sent when input or output becomes possible to the value given "
5183 "in I<arg>. A value of zero means to send the default B<SIGIO> signal. Any "
5184 "other value (including B<SIGIO>) is the signal to send instead, and in this "
5185 "case additional info is available to the signal handler if installed with "
5190 #: build/C/man2/fcntl.2:716
5192 "By using B<F_SETSIG> with a nonzero value, and setting B<SA_SIGINFO> for the "
5193 "signal handler (see B<sigaction>(2)), extra information about I/O events is "
5194 "passed to the handler in a I<siginfo_t> structure. If the I<si_code> field "
5195 "indicates the source is B<SI_SIGIO>, the I<si_fd> field gives the file "
5196 "descriptor associated with the event. Otherwise, there is no indication "
5197 "which file descriptors are pending, and you should use the usual mechanisms "
5198 "(B<select>(2), B<poll>(2), B<read>(2) with B<O_NONBLOCK> set etc.) to "
5199 "determine which file descriptors are available for I/O."
5203 #: build/C/man2/fcntl.2:725
5205 "By selecting a real time signal (value E<gt>= B<SIGRTMIN>), multiple I/O "
5206 "events may be queued using the same signal numbers. (Queuing is dependent "
5207 "on available memory). Extra information is available if B<SA_SIGINFO> is "
5208 "set for the signal handler, as above."
5211 #. See fs/fcntl.c::send_sigio_to_task() (2.4/2.6) sources -- MTK, Apr 05
5213 #: build/C/man2/fcntl.2:738
5215 "Note that Linux imposes a limit on the number of real-time signals that may "
5216 "be queued to a process (see B<getrlimit>(2) and B<signal>(7)) and if this "
5217 "limit is reached, then the kernel reverts to delivering B<SIGIO>, and this "
5218 "signal is delivered to the entire process rather than to a specific thread."
5222 #: build/C/man2/fcntl.2:745
5224 "Using these mechanisms, a program can implement fully asynchronous I/O "
5225 "without using B<select>(2) or B<poll>(2) most of the time."
5229 #: build/C/man2/fcntl.2:761
5231 "The use of B<O_ASYNC>, B<F_GETOWN>, B<F_SETOWN> is specific to BSD and "
5232 "Linux. B<F_GETOWN_EX>, B<F_SETOWN_EX>, B<F_GETSIG>, and B<F_SETSIG> are "
5233 "Linux-specific. POSIX has asynchronous I/O and the I<aio_sigevent> "
5234 "structure to achieve similar things; these are also available in Linux as "
5235 "part of the GNU C Library (Glibc)."
5239 #: build/C/man2/fcntl.2:761
5245 #: build/C/man2/fcntl.2:776
5247 "B<F_SETLEASE> and B<F_GETLEASE> (Linux 2.4 onward) are used (respectively) "
5248 "to establish a new lease, and retrieve the current lease, on the open file "
5249 "description referred to by the file descriptor I<fd>. A file lease provides "
5250 "a mechanism whereby the process holding the lease (the \"lease holder\") is "
5251 "notified (via delivery of a signal) when a process (the \"lease breaker\") "
5252 "tries to B<open>(2) or B<truncate>(2) the file referred to by that file "
5257 #: build/C/man2/fcntl.2:776
5259 msgid "B<F_SETLEASE> (I<int>)"
5263 #: build/C/man2/fcntl.2:781
5265 "Set or remove a file lease according to which of the following values is "
5266 "specified in the integer I<arg>:"
5270 #: build/C/man2/fcntl.2:782
5275 #. The following became true in kernel 2.6.10:
5276 #. See the man-pages-2.09 Changelog for further info.
5278 #: build/C/man2/fcntl.2:791
5280 "Take out a read lease. This will cause the calling process to be notified "
5281 "when the file is opened for writing or is truncated. A read lease can be "
5282 "placed only on a file descriptor that is opened read-only."
5286 #: build/C/man2/fcntl.2:791
5292 #: build/C/man2/fcntl.2:798
5294 "Take out a write lease. This will cause the caller to be notified when the "
5295 "file is opened for reading or writing or is truncated. A write lease may be "
5296 "placed on a file only if there are no other open file descriptors for the "
5301 #: build/C/man2/fcntl.2:798
5307 #: build/C/man2/fcntl.2:801
5308 msgid "Remove our lease from the file."
5312 #: build/C/man2/fcntl.2:815
5314 "Leases are associated with an open file description (see B<open>(2)). This "
5315 "means that duplicate file descriptors (created by, for example, B<fork>(2) "
5316 "or B<dup>(2)) refer to the same lease, and this lease may be modified or "
5317 "released using any of these descriptors. Furthermore, the lease is released "
5318 "by either an explicit B<F_UNLCK> operation on any of these duplicate "
5319 "descriptors, or when all such descriptors have been closed."
5323 #: build/C/man2/fcntl.2:822
5325 "Leases may be taken out only on regular files. An unprivileged process may "
5326 "take out a lease only on a file whose UID (owner) matches the filesystem UID "
5327 "of the process. A process with the B<CAP_LEASE> capability may take out "
5328 "leases on arbitrary files."
5332 #: build/C/man2/fcntl.2:822
5334 msgid "B<F_GETLEASE> (I<void>)"
5338 #: build/C/man2/fcntl.2:831
5340 "Indicates what type of lease is associated with the file descriptor I<fd> by "
5341 "returning either B<F_RDLCK>, B<F_WRLCK>, or B<F_UNLCK>, indicating, "
5342 "respectively, a read lease , a write lease, or no lease. I<arg> is ignored."
5346 #: build/C/man2/fcntl.2:862
5348 "When a process (the \"lease breaker\") performs an B<open>(2) or "
5349 "B<truncate>(2) that conflicts with a lease established via B<F_SETLEASE>, "
5350 "the system call is blocked by the kernel and the kernel notifies the lease "
5351 "holder by sending it a signal (B<SIGIO> by default). The lease holder "
5352 "should respond to receipt of this signal by doing whatever cleanup is "
5353 "required in preparation for the file to be accessed by another process "
5354 "(e.g., flushing cached buffers) and then either remove or downgrade its "
5355 "lease. A lease is removed by performing an B<F_SETLEASE> command specifying "
5356 "I<arg> as B<F_UNLCK>. If the lease holder currently holds a write lease on "
5357 "the file, and the lease breaker is opening the file for reading, then it is "
5358 "sufficient for the lease holder to downgrade the lease to a read lease. "
5359 "This is done by performing an B<F_SETLEASE> command specifying I<arg> as "
5364 #: build/C/man2/fcntl.2:867
5366 "If the lease holder fails to downgrade or remove the lease within the number "
5367 "of seconds specified in I</proc/sys/fs/lease-break-time> then the kernel "
5368 "forcibly removes or downgrades the lease holder's lease."
5372 #: build/C/man2/fcntl.2:877
5374 "Once a lease break has been initiated, B<F_GETLEASE> returns the target "
5375 "lease type (either B<F_RDLCK> or B<F_UNLCK>, depending on what would be "
5376 "compatible with the lease breaker) until the lease holder voluntarily "
5377 "downgrades or removes the lease or the kernel forcibly does so after the "
5378 "lease break timer expires."
5382 #: build/C/man2/fcntl.2:881
5384 "Once the lease has been voluntarily or forcibly removed or downgraded, and "
5385 "assuming the lease breaker has not unblocked its system call, the kernel "
5386 "permits the lease breaker's system call to proceed."
5390 #: build/C/man2/fcntl.2:902
5392 "If the lease breaker's blocked B<open>(2) or B<truncate>(2) is interrupted "
5393 "by a signal handler, then the system call fails with the error B<EINTR>, but "
5394 "the other steps still occur as described above. If the lease breaker is "
5395 "killed by a signal while blocked in B<open>(2) or B<truncate>(2), then the "
5396 "other steps still occur as described above. If the lease breaker specifies "
5397 "the B<O_NONBLOCK> flag when calling B<open>(2), then the call immediately "
5398 "fails with the error B<EWOULDBLOCK>, but the other steps still occur as "
5403 #: build/C/man2/fcntl.2:923
5405 "The default signal used to notify the lease holder is B<SIGIO>, but this can "
5406 "be changed using the B<F_SETSIG> command to B<fcntl>(). If a B<F_SETSIG> "
5407 "command is performed (even one specifying B<SIGIO>), and the signal handler "
5408 "is established using B<SA_SIGINFO>, then the handler will receive a "
5409 "I<siginfo_t> structure as its second argument, and the I<si_fd> field of "
5410 "this argument will hold the descriptor of the leased file that has been "
5411 "accessed by another process. (This is useful if the caller holds leases "
5412 "against multiple files)."
5416 #: build/C/man2/fcntl.2:923
5418 msgid "File and directory change notification (dnotify)"
5422 #: build/C/man2/fcntl.2:924
5424 msgid "B<F_NOTIFY> (I<int>)"
5428 #: build/C/man2/fcntl.2:934
5430 "(Linux 2.4 onward) Provide notification when the directory referred to by "
5431 "I<fd> or any of the files that it contains is changed. The events to be "
5432 "notified are specified in I<arg>, which is a bit mask specified by ORing "
5433 "together zero or more of the following bits:"
5437 #: build/C/man2/fcntl.2:937
5439 msgid "B<DN_ACCESS>"
5443 #: build/C/man2/fcntl.2:940
5444 msgid "A file was accessed (read, pread, readv)"
5448 #: build/C/man2/fcntl.2:940
5450 msgid "B<DN_MODIFY>"
5454 #: build/C/man2/fcntl.2:943
5455 msgid "A file was modified (write, pwrite, writev, truncate, ftruncate)."
5459 #: build/C/man2/fcntl.2:943
5461 msgid "B<DN_CREATE>"
5465 #: build/C/man2/fcntl.2:946
5466 msgid "A file was created (open, creat, mknod, mkdir, link, symlink, rename)."
5470 #: build/C/man2/fcntl.2:946
5472 msgid "B<DN_DELETE>"
5476 #: build/C/man2/fcntl.2:949
5477 msgid "A file was unlinked (unlink, rename to another directory, rmdir)."
5481 #: build/C/man2/fcntl.2:949
5483 msgid "B<DN_RENAME>"
5487 #: build/C/man2/fcntl.2:952
5488 msgid "A file was renamed within this directory (rename)."
5492 #: build/C/man2/fcntl.2:952
5494 msgid "B<DN_ATTRIB>"
5498 #: build/C/man2/fcntl.2:955
5499 msgid "The attributes of a file were changed (chown, chmod, utime[s])."
5503 #: build/C/man2/fcntl.2:963
5505 "(In order to obtain these definitions, the B<_GNU_SOURCE> feature test macro "
5506 "must be defined before including I<any> header files.)"
5510 #: build/C/man2/fcntl.2:971
5512 "Directory notifications are normally \"one-shot\", and the application must "
5513 "reregister to receive further notifications. Alternatively, if "
5514 "B<DN_MULTISHOT> is included in I<arg>, then notification will remain in "
5515 "effect until explicitly removed."
5518 #. The following does seem a poor API-design choice...
5520 #: build/C/man2/fcntl.2:983
5522 "A series of B<F_NOTIFY> requests is cumulative, with the events in I<arg> "
5523 "being added to the set already monitored. To disable notification of all "
5524 "events, make an B<F_NOTIFY> call specifying I<arg> as 0."
5528 #: build/C/man2/fcntl.2:1001
5530 "Notification occurs via delivery of a signal. The default signal is "
5531 "B<SIGIO>, but this can be changed using the B<F_SETSIG> command to "
5532 "B<fcntl>(). In the latter case, the signal handler receives a I<siginfo_t> "
5533 "structure as its second argument (if the handler was established using "
5534 "B<SA_SIGINFO>) and the I<si_fd> field of this structure contains the file "
5535 "descriptor which generated the notification (useful when establishing "
5536 "notification on multiple directories)."
5540 #: build/C/man2/fcntl.2:1006
5542 "Especially when using B<DN_MULTISHOT>, a real time signal should be used for "
5543 "notification, so that multiple notifications can be queued."
5547 #: build/C/man2/fcntl.2:1015
5549 "B<NOTE:> New applications should use the I<inotify> interface (available "
5550 "since kernel 2.6.13), which provides a much superior interface for obtaining "
5551 "notifications of filesystem events. See B<inotify>(7)."
5555 #: build/C/man2/fcntl.2:1015
5557 msgid "Changing the capacity of a pipe"
5561 #: build/C/man2/fcntl.2:1016
5563 msgid "B<F_SETPIPE_SZ> (I<int>; since Linux 2.6.35)"
5567 #: build/C/man2/fcntl.2:1047
5569 "Change the capacity of the pipe referred to by I<fd> to be at least I<arg> "
5570 "bytes. An unprivileged process can adjust the pipe capacity to any value "
5571 "between the system page size and the limit defined in "
5572 "I</proc/sys/fs/pipe-max-size> (see B<proc>(5)). Attempts to set the pipe "
5573 "capacity below the page size are silently rounded up to the page size. "
5574 "Attempts by an unprivileged process to set the pipe capacity above the limit "
5575 "in I</proc/sys/fs/pipe-max-size> yield the error B<EPERM>; a privileged "
5576 "process (B<CAP_SYS_RESOURCE>) can override the limit. When allocating the "
5577 "buffer for the pipe, the kernel may use a capacity larger than I<arg>, if "
5578 "that is convenient for the implementation. The B<F_GETPIPE_SZ> operation "
5579 "returns the actual size used. Attempting to set the pipe capacity smaller "
5580 "than the amount of buffer space currently used to store data produces the "
5585 #: build/C/man2/fcntl.2:1047
5587 msgid "B<F_GETPIPE_SZ> (I<void>; since Linux 2.6.35)"
5591 #: build/C/man2/fcntl.2:1051
5593 "Return (as the function result) the capacity of the pipe referred to by "
5598 #: build/C/man2/fcntl.2:1053
5599 msgid "For a successful call, the return value depends on the operation:"
5603 #: build/C/man2/fcntl.2:1053
5609 #: build/C/man2/fcntl.2:1056
5610 msgid "The new descriptor."
5614 #: build/C/man2/fcntl.2:1056
5620 #: build/C/man2/fcntl.2:1059
5621 msgid "Value of file descriptor flags."
5625 #: build/C/man2/fcntl.2:1059
5631 #: build/C/man2/fcntl.2:1062
5632 msgid "Value of file status flags."
5636 #: build/C/man2/fcntl.2:1062
5638 msgid "B<F_GETLEASE>"
5642 #: build/C/man2/fcntl.2:1065
5643 msgid "Type of lease held on file descriptor."
5647 #: build/C/man2/fcntl.2:1065
5653 #: build/C/man2/fcntl.2:1068
5654 msgid "Value of descriptor owner."
5658 #: build/C/man2/fcntl.2:1068
5664 #: build/C/man2/fcntl.2:1074
5666 "Value of signal sent when read or write becomes possible, or zero for "
5667 "traditional B<SIGIO> behavior."
5671 #: build/C/man2/fcntl.2:1074
5673 msgid "B<F_GETPIPE_SZ>"
5677 #: build/C/man2/fcntl.2:1077
5678 msgid "The pipe capacity."
5682 #: build/C/man2/fcntl.2:1077
5684 msgid "All other commands"
5688 #: build/C/man2/fcntl.2:1080
5693 #: build/C/man2/fcntl.2:1084
5694 msgid "On error, -1 is returned, and I<errno> is set appropriately."
5698 #: build/C/man2/fcntl.2:1085 build/C/man3/lockf.3:122
5700 msgid "B<EACCES> or B<EAGAIN>"
5704 #: build/C/man2/fcntl.2:1088
5705 msgid "Operation is prohibited by locks held by other processes."
5709 #: build/C/man2/fcntl.2:1088 build/C/man2/fork.2:181 build/C/man2/fork.2:186
5715 #: build/C/man2/fcntl.2:1092
5717 "The operation is prohibited because the file has been memory-mapped by "
5722 #: build/C/man2/fcntl.2:1101
5724 "I<fd> is not an open file descriptor, or the command was B<F_SETLK> or "
5725 "B<F_SETLKW> and the file descriptor open mode doesn't match with the type of "
5730 #: build/C/man2/fcntl.2:1101 build/C/man3/lockf.3:142
5736 #: build/C/man2/fcntl.2:1106
5738 "It was detected that the specified B<F_SETLKW> command would cause a "
5743 #: build/C/man2/fcntl.2:1110
5744 msgid "I<lock> is outside your accessible address space."
5748 #: build/C/man2/fcntl.2:1122
5750 "For B<F_SETLKW>, the command was interrupted by a signal; see B<signal>(7). "
5751 "For B<F_GETLK> and B<F_SETLK>, the command was interrupted by a signal "
5752 "before the lock was checked or acquired. Most likely when locking a remote "
5753 "file (e.g., locking over NFS), but can sometimes happen locally."
5757 #: build/C/man2/fcntl.2:1132
5759 "For B<F_DUPFD>, I<arg> is negative or is greater than the maximum allowable "
5760 "value. For B<F_SETSIG>, I<arg> is not an allowable signal number."
5764 #: build/C/man2/fcntl.2:1137
5766 "For B<F_DUPFD>, the process already has the maximum number of file "
5771 #: build/C/man2/fcntl.2:1137 build/C/man2/flock.2:130 build/C/man3/lockf.3:151
5777 #: build/C/man2/fcntl.2:1141
5779 "Too many segment locks open, lock table is full, or a remote locking "
5780 "protocol failed (e.g., locking over NFS)."
5784 #: build/C/man2/fcntl.2:1146
5786 "Attempted to clear the B<O_APPEND> flag on a file that has the append-only "
5791 #: build/C/man2/fcntl.2:1159
5793 "SVr4, 4.3BSD, POSIX.1-2001. Only the operations B<F_DUPFD>, B<F_GETFD>, "
5794 "B<F_SETFD>, B<F_GETFL>, B<F_SETFL>, B<F_GETLK>, B<F_SETLK> and B<F_SETLKW>, "
5795 "are specified in POSIX.1-2001."
5799 #: build/C/man2/fcntl.2:1171
5801 "B<F_GETOWN> and B<F_SETOWN> are specified in POSIX.1-2001. (To get their "
5802 "definitions, define B<BSD_SOURCE>, or B<_XOPEN_SOURCE> with the value 500 or "
5803 "greater, or define B<_POSIX_C_SOURCE> with the value 200809L or greater.)"
5807 #: build/C/man2/fcntl.2:1179
5809 "B<F_DUPFD_CLOEXEC> is specified in POSIX.1-2008. (To get this definition, "
5810 "define B<_POSIX_C_SOURCE> with the value 200809L or greater, or "
5811 "B<_XOPEN_SOURCE> with the value 700 or greater.)"
5815 #. SVr4 documents additional EIO, ENOLINK and EOVERFLOW error conditions.
5817 #: build/C/man2/fcntl.2:1196
5819 "B<F_GETOWN_EX>, B<F_SETOWN_EX>, B<F_SETPIPE_SZ>, B<F_GETPIPE_SZ>, "
5820 "B<F_GETSIG>, B<F_SETSIG>, B<F_NOTIFY>, B<F_GETLEASE>, and B<F_SETLEASE> are "
5821 "Linux-specific. (Define the B<_GNU_SOURCE> macro to obtain these "
5826 #: build/C/man2/fcntl.2:1217
5828 "The original Linux B<fcntl>() system call was not designed to handle large "
5829 "file offsets (in the I<flock> structure). Consequently, an B<fcntl64>() "
5830 "system call was added in Linux 2.4. The newer system call employs a "
5831 "different structure for file locking, I<flock64>, and corresponding "
5832 "commands, B<F_GETLK64>, B<F_SETLK64>, and B<F_SETLKW64>. However, these "
5833 "details can be ignored by applications using glibc, whose B<fcntl>() "
5834 "wrapper function transparently employs the more recent system call where it "
5839 #: build/C/man2/fcntl.2:1222
5841 "The errors returned by B<dup2>(2) are different from those returned by "
5846 #: build/C/man2/fcntl.2:1228
5848 "Since kernel 2.0, there is no interaction between the types of lock placed "
5849 "by B<flock>(2) and B<fcntl>()."
5852 #. e.g., Solaris 8 documents this field in fcntl(2), and Irix 6.5
5853 #. documents it in fcntl(5). mtk, May 2007
5855 #: build/C/man2/fcntl.2:1239
5857 "Several systems have more fields in I<struct flock> such as, for example, "
5858 "I<l_sysid>. Clearly, I<l_pid> alone is not going to be very useful if the "
5859 "process holding the lock may live on a different machine."
5862 #. glibc source: sysdeps/unix/sysv/linux/i386/sysdep.h
5863 #. mtk, Dec 04: some limited testing on alpha and ia64 seems to
5864 #. indicate that ANY negative PGID value will cause F_GETOWN
5865 #. to misinterpret the return as an error. Some other architectures
5866 #. seem to have the same range check as i386.
5868 #: build/C/man2/fcntl.2:1265
5870 "A limitation of the Linux system call conventions on some architectures "
5871 "(notably i386) means that if a (negative) process group ID to be returned "
5872 "by B<F_GETOWN> falls in the range -1 to -4095, then the return value is "
5873 "wrongly interpreted by glibc as an error in the system call; that is, the "
5874 "return value of B<fcntl>() will be -1, and I<errno> will contain the "
5875 "(positive) process group ID. The Linux-specific B<F_GETOWN_EX> operation "
5876 "avoids this problem. Since glibc version 2.11, glibc makes the kernel "
5877 "B<F_GETOWN> problem invisible by implementing B<F_GETOWN> using "
5882 #: build/C/man2/fcntl.2:1282
5884 "In Linux 2.4 and earlier, there is bug that can occur when an unprivileged "
5885 "process uses B<F_SETOWN> to specify the owner of a socket file descriptor as "
5886 "a process (group) other than the caller. In this case, B<fcntl>() can "
5887 "return -1 with I<errno> set to B<EPERM>, even when the owner process (group) "
5888 "is one that the caller has permission to send signals to. Despite this "
5889 "error return, the file descriptor owner is set, and signals will be sent to "
5893 #. http://marc.info/?l=linux-kernel&m=119013491707153&w=2
5895 #: build/C/man2/fcntl.2:1297
5897 "The implementation of mandatory locking in all known versions of Linux is "
5898 "subject to race conditions which render it unreliable: a B<write>(2) call "
5899 "that overlaps with a lock may modify data after the mandatory lock is "
5900 "acquired; a B<read>(2) call that overlaps with a lock may detect changes to "
5901 "data that were made only after a write lock was acquired. Similar races "
5902 "exist between mandatory locks and B<mmap>(2). It is therefore inadvisable "
5903 "to rely on mandatory locking."
5907 #: build/C/man2/fcntl.2:1305
5909 "B<dup2>(2), B<flock>(2), B<open>(2), B<socket>(2), B<lockf>(3), "
5910 "B<capabilities>(7), B<feature_test_macros>(7)"
5914 #: build/C/man2/fcntl.2:1318
5916 "I<locks.txt>, I<mandatory-locking.txt>, and I<dnotify.txt> in the Linux "
5917 "kernel source directory I<Documentation/filesystems/> (on older kernels, "
5918 "these files are directly under the I<Documentation/> directory, and "
5919 "I<mandatory-locking.txt> is called I<mandatory.txt>)"
5923 #: build/C/man3/fexecve.3:25
5929 #: build/C/man3/fexecve.3:25
5935 #: build/C/man3/fexecve.3:28
5936 msgid "fexecve - execute program specified via file descriptor"
5940 #: build/C/man3/fexecve.3:33
5943 "B<int fexecve(int >I<fd>B<, char *const >I<argv>B<[], char *const "
5948 #: build/C/man3/fexecve.3:41
5949 msgid "B<fexecve>():"
5953 #: build/C/man3/fexecve.3:44
5955 msgid "Since glibc 2.10:"
5959 #: build/C/man3/fexecve.3:47
5960 msgid "_XOPEN_SOURCE\\ E<gt>=\\ 700 || _POSIX_C_SOURCE\\ E<gt>=\\ 200809L"
5964 #: build/C/man3/fexecve.3:47
5966 msgid "Before glibc 2.10:"
5970 #: build/C/man3/fexecve.3:50 build/C/man3/getcwd.3:54
5974 #. POSIX.1-2008 specifies the O_EXEC flag for open as an alternative,
5975 #. but Linux doesn't support this flag yet.
5977 #: build/C/man3/fexecve.3:67
5979 "B<fexecve>() performs the same task as B<execve>(2), with the difference "
5980 "that the file to be executed is specified via a file descriptor, I<fd>, "
5981 "rather than via a pathname. The file descriptor I<fd> must be opened "
5982 "read-only, and the caller must have permission to execute the file that it "
5987 #: build/C/man3/fexecve.3:74
5989 "A successful call to B<fexecve>() never returns. On error, the function "
5990 "returns, with a result value of -1, and I<errno> is set appropriately."
5994 #: build/C/man3/fexecve.3:78
5995 msgid "Errors are as for B<execve>(2), with the following additions:"
5999 #: build/C/man3/fexecve.3:86
6001 "I<fd> is not a valid file descriptor, or I<argv> is NULL, or I<envp> is "
6006 #: build/C/man3/fexecve.3:91
6007 msgid "The I</proc> filesystem could not be accessed."
6011 #: build/C/man3/fexecve.3:94
6012 msgid "B<fexecve>() is implemented since glibc 2.3.2."
6016 #: build/C/man3/fexecve.3:98
6018 "POSIX.1-2008. This function is not specified in POSIX.1-2001, and is not "
6019 "widely available on other systems."
6023 #: build/C/man3/fexecve.3:106
6025 "On Linux, B<fexecve>() is implemented using the B<proc>(5) filesystem, so "
6026 "I</proc> needs to be mounted and available at the time of the call."
6030 #: build/C/man3/fexecve.3:108
6031 msgid "B<execve>(2)"
6035 #: build/C/man2/flock.2:35
6041 #: build/C/man2/flock.2:35
6047 #: build/C/man2/flock.2:38
6048 msgid "flock - apply or remove an advisory lock on an open file"
6052 #: build/C/man2/flock.2:40
6053 msgid "B<#include E<lt>sys/file.hE<gt>>"
6057 #: build/C/man2/flock.2:42
6058 msgid "B<int flock(int >I<fd>B<, int >I<operation>B<);>"
6062 #: build/C/man2/flock.2:48
6064 "Apply or remove an advisory lock on the open file specified by I<fd>. The "
6065 "argument I<operation> is one of the following:"
6069 #: build/C/man2/flock.2:49
6075 #: build/C/man2/flock.2:54
6077 "Place a shared lock. More than one process may hold a shared lock for a "
6078 "given file at a given time."
6082 #: build/C/man2/flock.2:54
6088 #: build/C/man2/flock.2:59
6090 "Place an exclusive lock. Only one process may hold an exclusive lock for a "
6091 "given file at a given time."
6095 #: build/C/man2/flock.2:59
6101 #: build/C/man2/flock.2:62
6102 msgid "Remove an existing lock held by this process."
6106 #: build/C/man2/flock.2:71
6108 "A call to B<flock>() may block if an incompatible lock is held by another "
6109 "process. To make a nonblocking request, include B<LOCK_NB> (by ORing) with "
6110 "any of the above operations."
6114 #: build/C/man2/flock.2:73
6115 msgid "A single file may not simultaneously have both shared and exclusive locks."
6119 #: build/C/man2/flock.2:87
6121 "Locks created by B<flock>() are associated with an open file table entry. "
6122 "This means that duplicate file descriptors (created by, for example, "
6123 "B<fork>(2) or B<dup>(2)) refer to the same lock, and this lock may be "
6124 "modified or released using any of these descriptors. Furthermore, the lock "
6125 "is released either by an explicit B<LOCK_UN> operation on any of these "
6126 "duplicate descriptors, or when all such descriptors have been closed."
6130 #: build/C/man2/flock.2:96
6132 "If a process uses B<open>(2) (or similar) to obtain more than one "
6133 "descriptor for the same file, these descriptors are treated independently by "
6134 "B<flock>(). An attempt to lock the file using one of these file descriptors "
6135 "may be denied by a lock that the calling process has already placed via "
6136 "another descriptor."
6140 #: build/C/man2/flock.2:103
6142 "A process may hold only one type of lock (shared or exclusive) on a file. "
6143 "Subsequent B<flock>() calls on an already locked file will convert an "
6144 "existing lock to the new lock mode."
6148 #: build/C/man2/flock.2:108
6149 msgid "Locks created by B<flock>() are preserved across an B<execve>(2)."
6153 #: build/C/man2/flock.2:111
6155 "A shared or exclusive lock can be placed on a file regardless of the mode in "
6156 "which the file was opened."
6160 #: build/C/man2/flock.2:121
6161 msgid "I<fd> is not an open file descriptor."
6165 #: build/C/man2/flock.2:126
6167 "While waiting to acquire a lock, the call was interrupted by delivery of a "
6168 "signal caught by a handler; see B<signal>(7)."
6172 #: build/C/man2/flock.2:130
6173 msgid "I<operation> is invalid."
6177 #: build/C/man2/flock.2:133
6178 msgid "The kernel ran out of memory for allocating lock records."
6182 #: build/C/man2/flock.2:133
6184 msgid "B<EWOULDBLOCK>"
6188 #: build/C/man2/flock.2:138
6189 msgid "The file is locked and the B<LOCK_NB> flag was selected."
6193 #: build/C/man2/flock.2:147
6195 "4.4BSD (the B<flock>() call first appeared in 4.2BSD). A version of "
6196 "B<flock>(), possibly implemented in terms of B<fcntl>(2), appears on most "
6201 #: build/C/man2/flock.2:154
6203 "B<flock>() does not lock files over NFS. Use B<fcntl>(2) instead: that "
6204 "does work over NFS, given a sufficiently recent version of Linux and a "
6205 "server which supports locking."
6209 #: build/C/man2/flock.2:169
6211 "Since kernel 2.0, B<flock>() is implemented as a system call in its own "
6212 "right rather than being emulated in the GNU C library as a call to "
6213 "B<fcntl>(2). This yields true BSD semantics: there is no interaction "
6214 "between the types of lock placed by B<flock>() and B<fcntl>(2), and "
6215 "B<flock>() does not detect deadlock."
6219 #: build/C/man2/flock.2:175
6221 "B<flock>() places advisory locks only; given suitable permissions on a "
6222 "file, a process is free to ignore the use of B<flock>() and perform I/O on "
6227 #: build/C/man2/flock.2:188
6229 "B<flock>() and B<fcntl>(2) locks have different semantics with respect to "
6230 "forked processes and B<dup>(2). On systems that implement B<flock>() using "
6231 "B<fcntl>(2), the semantics of B<flock>() will be different from those "
6232 "described in this manual page."
6235 #. Kernel 2.5.21 changed things a little: during lock conversion
6236 #. it is now the highest priority process that will get the lock -- mtk
6238 #: build/C/man2/flock.2:201
6240 "Converting a lock (shared to exclusive, or vice versa) is not guaranteed to "
6241 "be atomic: the existing lock is first removed, and then a new lock is "
6242 "established. Between these two steps, a pending lock request by another "
6243 "process may be granted, with the result that the conversion either blocks, "
6244 "or fails if B<LOCK_NB> was specified. (This is the original BSD behavior, "
6245 "and occurs on many other implementations.)"
6249 #: build/C/man2/flock.2:210
6251 "B<flock>(1), B<close>(2), B<dup>(2), B<execve>(2), B<fcntl>(2), B<fork>(2), "
6252 "B<open>(2), B<lockf>(3)"
6256 #: build/C/man2/flock.2:215
6258 "I<Documentation/filesystem/locks.txt> in the Linux kernel source tree "
6259 "(I<Documentation/locks.txt> in older kernels)"
6263 #: build/C/man2/fork.2:39
6269 #: build/C/man2/fork.2:39 build/C/man2/ioperm.2:34
6275 #: build/C/man2/fork.2:42
6276 msgid "fork - create a child process"
6280 #: build/C/man2/fork.2:46
6281 msgid "B<pid_t fork(void);>"
6285 #: build/C/man2/fork.2:52
6287 "B<fork>() creates a new process by duplicating the calling process. The "
6288 "new process, referred to as the I<child>, is an exact duplicate of the "
6289 "calling process, referred to as the I<parent>, except for the following "
6294 #: build/C/man2/fork.2:56
6296 "The child has its own unique process ID, and this PID does not match the ID "
6297 "of any existing process group (B<setpgid>(2))."
6301 #: build/C/man2/fork.2:58
6302 msgid "The child's parent process ID is the same as the parent's process ID."
6306 #: build/C/man2/fork.2:62
6308 "The child does not inherit its parent's memory locks (B<mlock>(2), "
6313 #: build/C/man2/fork.2:68
6315 "Process resource utilizations (B<getrusage>(2)) and CPU time counters "
6316 "(B<times>(2)) are reset to zero in the child."
6320 #: build/C/man2/fork.2:71
6321 msgid "The child's set of pending signals is initially empty (B<sigpending>(2))."
6325 #: build/C/man2/fork.2:74
6327 "The child does not inherit semaphore adjustments from its parent "
6332 #: build/C/man2/fork.2:77
6333 msgid "The child does not inherit record locks from its parent (B<fcntl>(2))."
6337 #: build/C/man2/fork.2:82
6339 "The child does not inherit timers from its parent (B<setitimer>(2), "
6340 "B<alarm>(2), B<timer_create>(2))."
6344 #: build/C/man2/fork.2:89
6346 "The child does not inherit outstanding asynchronous I/O operations from its "
6347 "parent (B<aio_read>(3), B<aio_write>(3)), nor does it inherit any "
6348 "asynchronous I/O contexts from its parent (see B<io_setup>(2))."
6352 #: build/C/man2/fork.2:94
6354 "The process attributes in the preceding list are all specified in "
6355 "POSIX.1-2001. The parent and child also differ with respect to the "
6356 "following Linux-specific process attributes:"
6360 #: build/C/man2/fork.2:101
6362 "The child does not inherit directory change notifications (dnotify) from "
6363 "its parent (see the description of B<F_NOTIFY> in B<fcntl>(2))."
6367 #: build/C/man2/fork.2:107
6369 "The B<prctl>(2) B<PR_SET_PDEATHSIG> setting is reset so that the child does "
6370 "not receive a signal when its parent terminates."
6374 #: build/C/man2/fork.2:114
6376 "The default timer slack value is set to the parent's current timer slack "
6377 "value. See the description of B<PR_SET_TIMERSLACK> in B<prctl>(2)."
6381 #: build/C/man2/fork.2:120
6383 "Memory mappings that have been marked with the B<madvise>(2) "
6384 "B<MADV_DONTFORK> flag are not inherited across a B<fork>()."
6388 #: build/C/man2/fork.2:125
6389 msgid "The termination signal of the child is always B<SIGCHLD> (see B<clone>(2))."
6393 #: build/C/man2/fork.2:131
6395 "The port access permission bits set by B<ioperm>(2) are not inherited by "
6396 "the child; the child must turn on any bits that it requires using "
6401 #: build/C/man2/fork.2:142
6403 "The child process is created with a single thread\\(emthe one that called "
6404 "B<fork>(). The entire virtual address space of the parent is replicated in "
6405 "the child, including the states of mutexes, condition variables, and other "
6406 "pthreads objects; the use of B<pthread_atfork>(3) may be helpful for "
6407 "dealing with problems that this can cause."
6411 #: build/C/man2/fork.2:156
6413 "The child inherits copies of the parent's set of open file descriptors. "
6414 "Each file descriptor in the child refers to the same open file description "
6415 "(see B<open>(2)) as the corresponding file descriptor in the parent. This "
6416 "means that the two descriptors share open file status flags, current file "
6417 "offset, and signal-driven I/O attributes (see the description of B<F_SETOWN> "
6418 "and B<F_SETSIG> in B<fcntl>(2))."
6422 #: build/C/man2/fork.2:165
6424 "The child inherits copies of the parent's set of open message queue "
6425 "descriptors (see B<mq_overview>(7)). Each descriptor in the child refers to "
6426 "the same open message queue description as the corresponding descriptor in "
6427 "the parent. This means that the two descriptors share the same flags "
6432 #: build/C/man2/fork.2:173
6434 "The child inherits copies of the parent's set of open directory streams (see "
6435 "B<opendir>(3)). POSIX.1-2001 says that the corresponding directory streams "
6436 "in the parent and child I<may> share the directory stream positioning; on "
6437 "Linux/glibc they do not."
6441 #: build/C/man2/fork.2:180
6443 "On success, the PID of the child process is returned in the parent, and 0 is "
6444 "returned in the child. On failure, -1 is returned in the parent, no child "
6445 "process is created, and I<errno> is set appropriately."
6449 #: build/C/man2/fork.2:186
6451 "B<fork>() cannot allocate sufficient memory to copy the parent's page "
6452 "tables and allocate a task structure for the child."
6456 #: build/C/man2/fork.2:196
6458 "It was not possible to create a new process because the caller's "
6459 "B<RLIMIT_NPROC> resource limit was encountered. To exceed this limit, the "
6460 "process must have either the B<CAP_SYS_ADMIN> or the B<CAP_SYS_RESOURCE> "
6465 #: build/C/man2/fork.2:200
6467 "B<fork>() failed to allocate the necessary kernel structures because memory "
6471 #. e.g., arm (optionally), blackfin, c6x, frv, h8300, microblaze, xtensa
6473 #: build/C/man2/fork.2:206
6475 "B<fork>() is not supported on this platform (for example, hardware without "
6476 "a Memory-Management Unit)."
6480 #: build/C/man2/fork.2:215
6482 "Under Linux, B<fork>() is implemented using copy-on-write pages, so the "
6483 "only penalty that it incurs is the time and memory required to duplicate the "
6484 "parent's page tables, and to create a unique task structure for the child."
6487 #. nptl/sysdeps/unix/sysv/linux/fork.c
6488 #. and does some magic to ensure that getpid(2) returns the right value.
6490 #: build/C/man2/fork.2:239
6492 "Since version 2.3.3, rather than invoking the kernel's B<fork>() system "
6493 "call, the glibc B<fork>() wrapper that is provided as part of the NPTL "
6494 "threading implementation invokes B<clone>(2) with flags that provide the "
6495 "same effect as the traditional system call. (A call to B<fork>() is "
6496 "equivalent to a call to B<clone>(2) specifying I<flags> as just "
6497 "B<SIGCHLD>.) The glibc wrapper invokes any fork handlers that have been "
6498 "established using B<pthread_atfork>(3)."
6502 #: build/C/man2/fork.2:244
6503 msgid "See B<pipe>(2) and B<wait>(2)."
6507 #: build/C/man2/fork.2:255
6509 "B<clone>(2), B<execve>(2), B<exit>(2), B<setrlimit>(2), B<unshare>(2), "
6510 "B<vfork>(2), B<wait>(2), B<daemon>(3), B<capabilities>(7), B<credentials>(7)"
6514 #: build/C/man3/fpathconf.3:41
6520 #: build/C/man3/fpathconf.3:41
6526 #: build/C/man3/fpathconf.3:44
6527 msgid "fpathconf, pathconf - get configuration values for files"
6531 #: build/C/man3/fpathconf.3:49
6533 msgid "B<long fpathconf(int >I<fd>B<, int >I<name>B<);>\n"
6537 #: build/C/man3/fpathconf.3:51
6539 msgid "B<long pathconf(char *>I<path>B<, int >I<name>B<);>\n"
6543 #: build/C/man3/fpathconf.3:58
6545 "B<fpathconf>() gets a value for the configuration option I<name> for the "
6546 "open file descriptor I<fd>."
6550 #: build/C/man3/fpathconf.3:64
6552 "B<pathconf>() gets a value for configuration option I<name> for the "
6557 #: build/C/man3/fpathconf.3:73
6559 "The corresponding macros defined in I<E<lt>unistd.hE<gt>> are minimum "
6560 "values; if an application wants to take advantage of values which may "
6561 "change, a call to B<fpathconf>() or B<pathconf>() can be made, which may "
6562 "yield more liberal results."
6566 #: build/C/man3/fpathconf.3:78
6568 "Setting I<name> equal to one of the following constants returns the "
6569 "following configuration options:"
6573 #: build/C/man3/fpathconf.3:78
6575 msgid "B<_PC_LINK_MAX>"
6579 #: build/C/man3/fpathconf.3:88
6581 "returns the maximum number of links to the file. If I<fd> or I<path> refer "
6582 "to a directory, then the value applies to the whole directory. The "
6583 "corresponding macro is B<_POSIX_LINK_MAX>."
6587 #: build/C/man3/fpathconf.3:88
6589 msgid "B<_PC_MAX_CANON>"
6593 #: build/C/man3/fpathconf.3:97
6595 "returns the maximum length of a formatted input line, where I<fd> or I<path> "
6596 "must refer to a terminal. The corresponding macro is B<_POSIX_MAX_CANON>."
6600 #: build/C/man3/fpathconf.3:97
6602 msgid "B<_PC_MAX_INPUT>"
6606 #: build/C/man3/fpathconf.3:106
6608 "returns the maximum length of an input line, where I<fd> or I<path> must "
6609 "refer to a terminal. The corresponding macro is B<_POSIX_MAX_INPUT>."
6613 #: build/C/man3/fpathconf.3:106
6615 msgid "B<_PC_NAME_MAX>"
6619 #: build/C/man3/fpathconf.3:115
6621 "returns the maximum length of a filename in the directory I<path> or I<fd> "
6622 "that the process is allowed to create. The corresponding macro is "
6623 "B<_POSIX_NAME_MAX>."
6627 #: build/C/man3/fpathconf.3:115
6629 msgid "B<_PC_PATH_MAX>"
6633 #: build/C/man3/fpathconf.3:124
6635 "returns the maximum length of a relative pathname when I<path> or I<fd> is "
6636 "the current working directory. The corresponding macro is "
6637 "B<_POSIX_PATH_MAX>."
6641 #: build/C/man3/fpathconf.3:124
6643 msgid "B<_PC_PIPE_BUF>"
6647 #: build/C/man3/fpathconf.3:133
6649 "returns the size of the pipe buffer, where I<fd> must refer to a pipe or "
6650 "FIFO and I<path> must refer to a FIFO. The corresponding macro is "
6651 "B<_POSIX_PIPE_BUF>."
6655 #: build/C/man3/fpathconf.3:133
6657 msgid "B<_PC_CHOWN_RESTRICTED>"
6661 #: build/C/man3/fpathconf.3:146
6663 "returns nonzero if the B<chown>(2) call may not be used on this file. If "
6664 "I<fd> or I<path> refer to a directory, then this applies to all files in "
6665 "that directory. The corresponding macro is B<_POSIX_CHOWN_RESTRICTED>."
6669 #: build/C/man3/fpathconf.3:146
6671 msgid "B<_PC_NO_TRUNC>"
6675 #: build/C/man3/fpathconf.3:153
6677 "returns nonzero if accessing filenames longer than B<_POSIX_NAME_MAX> "
6678 "generates an error. The corresponding macro is B<_POSIX_NO_TRUNC>."
6682 #: build/C/man3/fpathconf.3:153
6684 msgid "B<_PC_VDISABLE>"
6688 #: build/C/man3/fpathconf.3:160
6690 "returns nonzero if special character processing can be disabled, where I<fd> "
6691 "or I<path> must refer to a terminal."
6695 #: build/C/man3/fpathconf.3:169
6697 "The limit is returned, if one exists. If the system does not have a limit "
6698 "for the requested resource, -1 is returned, and I<errno> is unchanged. If "
6699 "there is an error, -1 is returned, and I<errno> is set to reflect the nature "
6704 #: build/C/man3/fpathconf.3:177
6706 "Files with name lengths longer than the value returned for I<name> equal to "
6707 "B<_PC_NAME_MAX> may exist in the given directory."
6711 #: build/C/man3/fpathconf.3:180 build/C/man3/sysconf.3:335
6713 "Some returned values may be huge; they are not suitable for allocating "
6718 #: build/C/man3/fpathconf.3:185
6719 msgid "B<getconf>(1), B<open>(2), B<statfs>(2), B<sysconf>(3)"
6723 #: build/C/man2/fsync.2:38
6729 #: build/C/man2/fsync.2:38
6735 #: build/C/man2/fsync.2:41
6736 msgid "fsync, fdatasync - synchronize a file's in-core state with storage device"
6740 #: build/C/man2/fsync.2:45
6741 msgid "B<int fsync(int >I<fd>B<);>"
6745 #: build/C/man2/fsync.2:47
6746 msgid "B<int fdatasync(int >I<fd>B<);>"
6750 #: build/C/man2/fsync.2:55
6751 msgid "B<fsync>(): _BSD_SOURCE || _XOPEN_SOURCE"
6754 #. _POSIX_C_SOURCE\ >=\ 200112L only since glibc 2.8
6756 #: build/C/man2/fsync.2:58
6758 msgid " || /* since glibc 2.8: */ _POSIX_C_SOURCE\\ E<gt>=\\ 200112L\n"
6762 #: build/C/man2/fsync.2:61
6764 "B<fdatasync>(): _POSIX_C_SOURCE\\ E<gt>=\\ 199309L || _XOPEN_SOURCE\\ "
6769 #: build/C/man2/fsync.2:74
6771 "B<fsync>() transfers (\"flushes\") all modified in-core data of (i.e., "
6772 "modified buffer cache pages for) the file referred to by the file descriptor "
6773 "I<fd> to the disk device (or other permanent storage device) so that all "
6774 "changed information can be retrieved even after the system crashed or was "
6775 "rebooted. This includes writing through or flushing a disk cache if "
6776 "present. The call blocks until the device reports that the transfer has "
6777 "completed. It also flushes metadata information associated with the file "
6782 #: build/C/man2/fsync.2:82
6784 "Calling B<fsync>() does not necessarily ensure that the entry in the "
6785 "directory containing the file has also reached disk. For that an explicit "
6786 "B<fsync>() on a file descriptor for the directory is also needed."
6790 #: build/C/man2/fsync.2:103
6792 "B<fdatasync>() is similar to B<fsync>(), but does not flush modified "
6793 "metadata unless that metadata is needed in order to allow a subsequent data "
6794 "retrieval to be correctly handled. For example, changes to I<st_atime> or "
6795 "I<st_mtime> (respectively, time of last access and time of last "
6796 "modification; see B<stat>(2)) do not require flushing because they are not "
6797 "necessary for a subsequent data read to be handled correctly. On the other "
6798 "hand, a change to the file size (I<st_size>, as made by say "
6799 "B<ftruncate>(2)), would require a metadata flush."
6803 #: build/C/man2/fsync.2:108
6805 "The aim of B<fdatasync>() is to reduce disk activity for applications that "
6806 "do not require all metadata to be synchronized with the disk."
6810 #: build/C/man2/fsync.2:113
6812 "On success, these system calls return zero. On error, -1 is returned, and "
6813 "I<errno> is set appropriately."
6817 #: build/C/man2/fsync.2:118
6818 msgid "I<fd> is not a valid open file descriptor."
6822 #: build/C/man2/fsync.2:121
6823 msgid "An error occurred during synchronization."
6827 #: build/C/man2/fsync.2:121
6829 msgid "B<EROFS>, B<EINVAL>"
6833 #: build/C/man2/fsync.2:125
6834 msgid "I<fd> is bound to a special file which does not support synchronization."
6838 #: build/C/man2/fsync.2:127
6839 msgid "4.3BSD, POSIX.1-2001."
6843 #: build/C/man2/fsync.2:127
6845 msgid "AVAILABILITY"
6848 #. POSIX.1-2001: It shall be defined to -1 or 0 or 200112L.
6849 #. -1: unavailable, 0: ask using sysconf().
6850 #. glibc defines them to 1.
6852 #: build/C/man2/fsync.2:140
6854 "On POSIX systems on which B<fdatasync>() is available, "
6855 "B<_POSIX_SYNCHRONIZED_IO> is defined in I<E<lt>unistd.hE<gt>> to a value "
6856 "greater than 0. (See also B<sysconf>(3).)"
6860 #: build/C/man2/fsync.2:146
6862 "On some UNIX systems (but not Linux), I<fd> must be a I<writable> file "
6867 #: build/C/man2/fsync.2:152
6869 "In Linux 2.2 and earlier, B<fdatasync>() is equivalent to B<fsync>(), and "
6870 "so has no performance advantage."
6874 #: build/C/man2/fsync.2:162
6876 "The B<fsync>() implementations in older kernels and lesser used filesystems "
6877 "does not know how to flush disk caches. In these cases disk caches need to "
6878 "be disabled using B<hdparm>(8) or B<sdparm>(8) to guarantee safe "
6883 #: build/C/man2/fsync.2:171
6885 "B<bdflush>(2), B<open>(2), B<sync>(2), B<sync_file_range>(2), B<hdparm>(8), "
6886 "B<mount>(8), B<sync>(8), B<update>(8)"
6890 #: build/C/man3/get_nprocs_conf.3:26
6896 #: build/C/man3/get_nprocs_conf.3:26
6902 #: build/C/man3/get_nprocs_conf.3:29
6903 msgid "get_nprocs, get_nprocs_conf - get number of processors"
6907 #: build/C/man3/get_nprocs_conf.3:31 build/C/man2/sysinfo.2:19
6908 msgid "B<#include E<lt>sys/sysinfo.hE<gt>>"
6912 #: build/C/man3/get_nprocs_conf.3:33
6913 msgid "B<int get_nprocs(void);>"
6917 #: build/C/man3/get_nprocs_conf.3:35
6918 msgid "B<int get_nprocs_conf(void);>"
6922 #: build/C/man3/get_nprocs_conf.3:39
6924 "The function B<get_nprocs_conf>() returns the number of processors "
6925 "configured by the operating system."
6929 #: build/C/man3/get_nprocs_conf.3:46
6931 "The function B<get_nprocs>() returns the number of processors currently "
6932 "available in the system. This may be less than the number returned by "
6933 "B<get_nprocs_conf>() because processors may be offline (e.g., on "
6934 "hotpluggable systems)."
6938 #: build/C/man3/get_nprocs_conf.3:48
6939 msgid "As given in DESCRIPTION."
6943 #: build/C/man3/get_nprocs_conf.3:50 build/C/man3/getopt.3:350
6944 msgid "These functions are GNU extensions."
6949 #: build/C/man3/get_nprocs_conf.3:57
6951 "The current implementation of these functions is rather expensive, since "
6952 "they open and parse files in the I</sys> filesystem each time they are "
6957 #: build/C/man3/get_nprocs_conf.3:62
6959 "The following B<sysconf>(3) calls make use of the functions documented on "
6960 "this page to return the same information."
6964 #: build/C/man3/get_nprocs_conf.3:66
6967 " np = sysconf(_SC_NPROCESSORS_CONF); /* processors configured */\n"
6968 " np = sysconf(_SC_NPROCESSORS_ONLN); /* processors available */\n"
6972 #: build/C/man3/get_nprocs_conf.3:73
6974 "The following example shows how B<get_nprocs>() and B<get_nprocs_conf>() "
6979 #: build/C/man3/get_nprocs_conf.3:77
6982 "#include E<lt>stdio.hE<gt>\n"
6983 "#include E<lt>sys/sysinfo.hE<gt>\n"
6987 #: build/C/man3/get_nprocs_conf.3:86
6991 "main(int argc, char *argv[])\n"
6993 " printf(\"This system has %d processors configured and \"\n"
6994 " \"%d processors available.\\en\",\n"
6995 " get_nprocs_conf(), get_nprocs());\n"
7001 #: build/C/man2/get_thread_area.2:8
7003 msgid "GET_THREAD_AREA"
7007 #: build/C/man2/get_thread_area.2:8 build/C/man2/set_thread_area.2:8
7013 #: build/C/man2/get_thread_area.2:11
7014 msgid "get_thread_area - get a thread-local storage (TLS) area"
7018 #: build/C/man2/get_thread_area.2:15 build/C/man2/set_thread_area.2:15
7019 msgid "B<#include E<lt>asm/ldt.hE<gt>>"
7023 #: build/C/man2/get_thread_area.2:17
7024 msgid "B<int get_thread_area(struct user_desc *>I<u_info>B<);>"
7028 #: 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
7029 msgid "I<Note>: There is no glibc wrapper for this system call; see NOTES."
7033 #: build/C/man2/get_thread_area.2:29
7035 "B<get_thread_area>() returns an entry in the current thread's thread-local "
7036 "storage (TLS) array. The index of the entry corresponds to the value of "
7037 "I<u_info-E<gt>entry_number>, passed in by the user. If the value is in "
7038 "bounds, B<get_thread_area>() copies the corresponding TLS entry into the "
7039 "area pointed to by I<u_info>."
7043 #: build/C/man2/get_thread_area.2:35
7045 "B<get_thread_area>() returns 0 on success. Otherwise, it returns -1 and "
7046 "sets I<errno> appropriately."
7050 #: build/C/man2/get_thread_area.2:39 build/C/man2/set_thread_area.2:56
7051 msgid "I<u_info> is an invalid pointer."
7055 #: build/C/man2/get_thread_area.2:42 build/C/man2/set_thread_area.2:53
7056 msgid "I<u_info-E<gt>entry_number> is out of bounds."
7060 #: build/C/man2/get_thread_area.2:46
7061 msgid "A version of B<get_thread_area>() first appeared in Linux 2.5.32."
7065 #: build/C/man2/get_thread_area.2:50
7067 "B<get_thread_area>() is Linux-specific and should not be used in programs "
7068 "that are intended to be portable."
7072 #: build/C/man2/get_thread_area.2:55
7074 "Glibc does not provide a wrapper for this system call, since it is generally "
7075 "intended for use only by threading libraries. In the unlikely event that "
7076 "you want to call it directly, use B<syscall>(2)."
7080 #: build/C/man2/get_thread_area.2:58
7081 msgid "B<modify_ldt>(2), B<set_thread_area>(2)"
7085 #: build/C/man3/getcwd.3:32
7091 #: build/C/man3/getcwd.3:35
7092 msgid "getcwd, getwd, get_current_dir_name - get current working directory"
7096 #: build/C/man3/getcwd.3:40
7098 msgid "B<char *getcwd(char *>I<buf>B<, size_t >I<size>B<);>\n"
7102 #: build/C/man3/getcwd.3:42
7104 msgid "B<char *getwd(char *>I<buf>B<);>\n"
7108 #: build/C/man3/getcwd.3:44
7110 msgid "B<char *get_current_dir_name(void);>\n"
7114 #: build/C/man3/getcwd.3:52
7115 msgid "B<get_current_dir_name>():"
7119 #: build/C/man3/getcwd.3:57
7124 #: build/C/man3/getcwd.3:67 build/C/man3/ualarm.3:50 build/C/man3/usleep.3:59 build/C/man2/vfork.2:54
7128 " (_XOPEN_SOURCE\\ E<gt>=\\ 500 ||\n"
7129 " _XOPEN_SOURCE\\ &&\\ _XOPEN_SOURCE_EXTENDED) &&\n"
7130 " !(_POSIX_C_SOURCE\\ E<gt>=\\ 200809L || _XOPEN_SOURCE\\ E<gt>=\\ 700)\n"
7134 #: 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
7136 "Before glibc 2.12: _BSD_SOURCE || _XOPEN_SOURCE\\ E<gt>=\\ 500 || "
7137 "_XOPEN_SOURCE\\ &&\\ _XOPEN_SOURCE_EXTENDED"
7141 #: build/C/man3/getcwd.3:82
7143 "These functions return a null-terminated string containing an absolute "
7144 "pathname that is the current working directory of the calling process. The "
7145 "pathname is returned as the function result and via the argument I<buf>, if "
7150 #: build/C/man3/getcwd.3:90
7152 "The B<getcwd>() function copies an absolute pathname of the current working "
7153 "directory to the array pointed to by I<buf>, which is of length I<size>."
7157 #: build/C/man3/getcwd.3:100
7159 "If the length of the absolute pathname of the current working directory, "
7160 "including the terminating null byte, exceeds I<size> bytes, NULL is "
7161 "returned, and I<errno> is set to B<ERANGE>; an application should check for "
7162 "this error, and allocate a larger buffer if necessary."
7166 #: build/C/man3/getcwd.3:118
7168 "As an extension to the POSIX.1-2001 standard, Linux (libc4, libc5, glibc) "
7169 "B<getcwd>() allocates the buffer dynamically using B<malloc>(3) if I<buf> "
7170 "is NULL. In this case, the allocated buffer has the length I<size> unless "
7171 "I<size> is zero, when I<buf> is allocated as big as necessary. The caller "
7172 "should B<free>(3) the returned buffer."
7176 #: build/C/man3/getcwd.3:131
7178 "B<get_current_dir_name>() will B<malloc>(3) an array big enough to hold "
7179 "the absolute pathname of the current working directory. If the environment "
7180 "variable B<PWD> is set, and its value is correct, then that value will be "
7181 "returned. The caller should B<free>(3) the returned buffer."
7185 #: build/C/man3/getcwd.3:156
7187 "B<getwd>() does not B<malloc>(3) any memory. The I<buf> argument should "
7188 "be a pointer to an array at least B<PATH_MAX> bytes long. If the length of "
7189 "the absolute pathname of the current working directory, including the "
7190 "terminating null byte, exceeds B<PATH_MAX> bytes, NULL is returned, and "
7191 "I<errno> is set to B<ENAMETOOLONG>. (Note that on some systems, B<PATH_MAX> "
7192 "may not be a compile-time constant; furthermore, its value may depend on the "
7193 "filesystem, see B<pathconf>(3).) For portability and security reasons, use "
7194 "of B<getwd>() is deprecated."
7198 #: build/C/man3/getcwd.3:165
7200 "On success, these functions return a pointer to a string containing the "
7201 "pathname of the current working directory. In the case B<getcwd>() and "
7202 "B<getwd>() this is the same value as I<buf>."
7206 #: build/C/man3/getcwd.3:172
7208 "On failure, these functions return NULL, and I<errno> is set to indicate the "
7209 "error. The contents of the array pointed to by I<buf> are undefined on "
7214 #: build/C/man3/getcwd.3:176
7215 msgid "Permission to read or search a component of the filename was denied."
7219 #: build/C/man3/getcwd.3:180
7220 msgid "I<buf> points to a bad address."
7224 #: build/C/man3/getcwd.3:187
7225 msgid "The I<size> argument is zero and I<buf> is not a NULL pointer."
7229 #: build/C/man3/getcwd.3:187
7235 #: build/C/man3/getcwd.3:192
7236 msgid "B<getwd>(): I<buf> is NULL."
7240 #: build/C/man3/getcwd.3:192
7242 msgid "ENAMETOOLONG"
7246 #: build/C/man3/getcwd.3:198
7248 "B<getwd>(): The size of the null-terminated absolute pathname string exceeds "
7249 "B<PATH_MAX> bytes."
7253 #: build/C/man3/getcwd.3:201
7254 msgid "The current working directory has been unlinked."
7258 #: build/C/man3/getcwd.3:201 build/C/man3/getlogin.3:114
7264 #: build/C/man3/getcwd.3:208
7266 "The I<size> argument is less than the length of the absolute pathname of the "
7267 "working directory, including the terminating null byte. You need to "
7268 "allocate a bigger array and try again."
7272 #: build/C/man3/getcwd.3:216
7274 "B<getcwd>() conforms to POSIX.1-2001. Note however that POSIX.1-2001 "
7275 "leaves the behavior of B<getcwd>() unspecified if I<buf> is NULL."
7279 #: build/C/man3/getcwd.3:227
7281 "B<getwd>() is present in POSIX.1-2001, but marked LEGACY. POSIX.1-2008 "
7282 "removes the specification of B<getwd>(). Use B<getcwd>() instead. "
7283 "POSIX.1-2001 does not define any errors for B<getwd>()."
7287 #: build/C/man3/getcwd.3:230
7288 msgid "B<get_current_dir_name>() is a GNU extension."
7292 #: build/C/man3/getcwd.3:241
7294 "Under Linux, the function B<getcwd>() is a system call (since 2.1.92). On "
7295 "older systems it would query I</proc/self/cwd>. If both system call and "
7296 "proc filesystem are missing, a generic implementation is called. Only in "
7297 "that case can these calls fail under Linux with B<EACCES>."
7301 #: build/C/man3/getcwd.3:249
7303 "These functions are often used to save the location of the current working "
7304 "directory for the purpose of returning to it later. Opening the current "
7305 "directory (\".\") and calling B<fchdir>(2) to return is usually a faster "
7306 "and more reliable alternative when sufficiently many file descriptors are "
7307 "available, especially on platforms other than Linux."
7311 #: build/C/man3/getcwd.3:256
7313 "B<chdir>(2), B<fchdir>(2), B<open>(2), B<unlink>(2), B<free>(3), "
7318 #: build/C/man2/getdomainname.2:29
7320 msgid "GETDOMAINNAME"
7324 #: build/C/man2/getdomainname.2:29
7330 #: build/C/man2/getdomainname.2:32
7331 msgid "getdomainname, setdomainname - get/set NIS domain name"
7335 #: build/C/man2/getdomainname.2:36
7336 msgid "B<int getdomainname(char *>I<name>B<, size_t >I<len>B<);>"
7340 #: build/C/man2/getdomainname.2:38
7341 msgid "B<int setdomainname(const char *>I<name>B<, size_t >I<len>B<);>"
7345 #: build/C/man2/getdomainname.2:47
7346 msgid "B<getdomainname>(), B<setdomainname>():"
7350 #: build/C/man2/getdomainname.2:49 build/C/man3/gethostid.3:54 build/C/man2/gethostname.2:60 build/C/man3/getusershell.3:55
7351 msgid "_BSD_SOURCE || (_XOPEN_SOURCE && _XOPEN_SOURCE\\ E<lt>\\ 500)"
7355 #: build/C/man2/getdomainname.2:54
7357 "These functions are used to access or to change the NIS domain name of the "
7362 #: build/C/man2/getdomainname.2:65
7364 "B<setdomainname>() sets the domain name to the value given in the character "
7365 "array I<name>. The I<len> argument specifies the number of bytes in "
7366 "I<name>. (Thus, I<name> does not require a terminating null byte.)"
7370 #: build/C/man2/getdomainname.2:75
7372 "B<getdomainname>() returns the null-terminated domain name in the character "
7373 "array I<name>, which has a length of I<len> bytes. If the null-terminated "
7374 "domain name requires more than I<len> bytes, B<getdomainname>() returns the "
7375 "first I<len> bytes (glibc) or gives an error (libc)."
7379 #: build/C/man2/getdomainname.2:83
7380 msgid "B<setdomainname>() can fail with the following errors:"
7384 #: build/C/man2/getdomainname.2:87
7385 msgid "I<name> pointed outside of user address space."
7389 #: build/C/man2/getdomainname.2:91
7390 msgid "I<len> was negative or too large."
7394 #: build/C/man2/getdomainname.2:96
7396 "the caller is unprivileged (Linux: does not have the B<CAP_SYS_ADMIN> "
7401 #: build/C/man2/getdomainname.2:99
7402 msgid "B<getdomainname>() can fail with the following errors:"
7406 #: build/C/man2/getdomainname.2:110
7408 "For B<getdomainname>() under libc: I<name> is NULL or I<name> is longer "
7409 "than I<len> bytes."
7412 #. But they appear on most systems...
7414 #: build/C/man2/getdomainname.2:113
7415 msgid "POSIX does not specify these calls."
7419 #: build/C/man2/getdomainname.2:117
7421 "Since Linux 1.0, the limit on the length of a domain name, including the "
7422 "terminating null byte, is 64 bytes. In older kernels, it was 8 bytes."
7426 #: build/C/man2/getdomainname.2:127
7428 "On most Linux architectures (including x86), there is no B<getdomainname>() "
7429 "system call; instead, glibc implements B<getdomainname>() as a library "
7430 "function that returns a copy of the I<domainname> field returned from a call "
7435 #: build/C/man2/getdomainname.2:131
7436 msgid "B<gethostname>(2), B<sethostname>(2), B<uname>(2)"
7440 #: build/C/man3/getdtablesize.3:27
7442 msgid "GETDTABLESIZE"
7446 #: build/C/man3/getdtablesize.3:27
7452 #: build/C/man3/getdtablesize.3:30
7453 msgid "getdtablesize - get descriptor table size"
7457 #: build/C/man3/getdtablesize.3:34
7458 msgid "B<int getdtablesize(void);>"
7462 #: build/C/man3/getdtablesize.3:41
7463 msgid "B<getdtablesize>():"
7467 #: build/C/man3/getdtablesize.3:49 build/C/man2/getpagesize.2:47
7471 " !(_POSIX_C_SOURCE\\ E<gt>=\\ 200112L || _XOPEN_SOURCE\\ E<gt>=\\ 600)\n"
7475 #: build/C/man3/getdtablesize.3:61
7477 "B<getdtablesize>() returns the maximum number of files a process can have "
7478 "open, one more than the largest possible value for a file descriptor."
7482 #: build/C/man3/getdtablesize.3:63
7483 msgid "The current limit on the number of open files per process."
7487 #: build/C/man3/getdtablesize.3:69
7489 "On Linux, B<getdtablesize>() can return any of the errors described for "
7490 "B<getrlimit>(2); see NOTES below."
7494 #: build/C/man3/getdtablesize.3:77
7496 "SVr4, 4.4BSD (the B<getdtablesize>() function first appeared in 4.2BSD). "
7497 "It is not specified in POSIX.1-2001; portable applications should employ "
7498 "I<sysconf(_SC_OPEN_MAX)> instead of this call."
7502 #: build/C/man3/getdtablesize.3:90
7504 "B<getdtablesize>() is implemented as a libc library function. The glibc "
7505 "version calls B<getrlimit>(2) and returns the current B<RLIMIT_NOFILE> "
7506 "limit, or B<OPEN_MAX> when that fails. The libc4 and libc5 versions return "
7507 "B<OPEN_MAX> (set to 256 since Linux 0.98.4)."
7511 #: build/C/man3/getdtablesize.3:95
7512 msgid "B<close>(2), B<dup>(2), B<getrlimit>(2), B<open>(2)"
7516 #: build/C/man3/gethostid.3:29
7522 #: build/C/man3/gethostid.3:32
7523 msgid "gethostid, sethostid - get or set the unique identifier of the current host"
7527 #: build/C/man3/gethostid.3:36
7528 msgid "B<long gethostid(void);>"
7532 #: build/C/man3/gethostid.3:38
7533 msgid "B<int sethostid(long >I<hostid>B<);>"
7537 #: build/C/man3/gethostid.3:47
7538 msgid "B<gethostid>():"
7542 #: build/C/man3/gethostid.3:52
7543 msgid "B<sethostid>():"
7547 #: build/C/man3/gethostid.3:67
7549 "B<gethostid>() and B<sethostid>() respectively get or set a unique 32-bit "
7550 "identifier for the current machine. The 32-bit identifier is intended to be "
7551 "unique among all UNIX systems in existence. This normally resembles the "
7552 "Internet address for the local machine, as returned by B<gethostbyname>(3), "
7553 "and thus usually never needs to be set."
7557 #: build/C/man3/gethostid.3:71
7558 msgid "The B<sethostid>() call is restricted to the superuser."
7562 #: build/C/man3/gethostid.3:75
7564 "B<gethostid>() returns the 32-bit identifier for the current host as set by "
7569 #: build/C/man3/gethostid.3:81
7571 "On success, B<sethostid>() returns 0; on error, -1 is returned, and "
7572 "I<errno> is set to indicate the error."
7576 #: build/C/man3/gethostid.3:84
7577 msgid "B<sethostid>() can fail with the following errors:"
7581 #: build/C/man3/gethostid.3:88
7583 "The caller did not have permission to write to the file used to store the "
7588 #: build/C/man3/gethostid.3:92
7590 "The calling process's effective user or group ID is not the same as its "
7591 "corresponding real ID."
7595 #: build/C/man3/gethostid.3:102
7597 "4.2BSD; these functions were dropped in 4.4BSD. SVr4 includes "
7598 "B<gethostid>() but not B<sethostid>(). POSIX.1-2001 specifies "
7599 "B<gethostid>() but not B<sethostid>()."
7602 #. libc5 used /etc/hostid; libc4 didn't have these functions
7604 #: build/C/man3/gethostid.3:111
7606 "In the glibc implementation, the I<hostid> is stored in the file "
7607 "I</etc/hostid>. (In glibc versions before 2.2, the file I</var/adm/hostid> "
7612 #: build/C/man3/gethostid.3:122
7614 "In the glibc implementation, if B<gethostid>() cannot open the file "
7615 "containing the host ID, then it obtains the hostname using "
7616 "B<gethostname>(2), passes that hostname to B<gethostbyname_r>(3) in order "
7617 "to obtain the host's IPv4 address, and returns a value obtained by "
7618 "bit-twiddling the IPv4 address. (This value may not be unique.)"
7622 #: build/C/man3/gethostid.3:124
7623 msgid "It is impossible to ensure that the identifier is globally unique."
7627 #: build/C/man3/gethostid.3:127
7628 msgid "B<hostid>(1), B<gethostbyname>(3)"
7632 #: build/C/man2/gethostname.2:32
7638 #: build/C/man2/gethostname.2:35
7639 msgid "gethostname, sethostname - get/set hostname"
7643 #: build/C/man2/gethostname.2:39
7644 msgid "B<int gethostname(char *>I<name>B<, size_t >I<len>B<);>"
7648 #: build/C/man2/gethostname.2:41
7649 msgid "B<int sethostname(const char *>I<name>B<, size_t >I<len>B<);>"
7653 #: build/C/man2/gethostname.2:50
7654 msgid "B<gethostname>():"
7658 #: build/C/man2/gethostname.2:53
7659 msgid "Since glibc 2.12: _BSD_SOURCE || _XOPEN_SOURCE\\ E<gt>=\\ 500"
7663 #: build/C/man2/gethostname.2:55
7664 msgid "|| /* Since glibc 2.12: */ _POSIX_C_SOURCE\\ E<gt>=\\ 200112L"
7668 #: build/C/man2/gethostname.2:58
7669 msgid "B<sethostname>():"
7673 #: build/C/man2/gethostname.2:66
7675 "These system calls are used to access or to change the hostname of the "
7676 "current processor."
7680 #: build/C/man2/gethostname.2:77
7682 "B<sethostname>() sets the hostname to the value given in the character "
7683 "array I<name>. The I<len> argument specifies the number of bytes in "
7684 "I<name>. (Thus, I<name> does not require a terminating null byte.)"
7688 #: build/C/man2/gethostname.2:89
7690 "B<gethostname>() returns the null-terminated hostname in the character "
7691 "array I<name>, which has a length of I<len> bytes. If the null-terminated "
7692 "hostname is too large to fit, then the name is truncated, and no error is "
7693 "returned (but see NOTES below). POSIX.1-2001 says that if such truncation "
7694 "occurs, then it is unspecified whether the returned buffer includes a "
7695 "terminating null byte."
7699 #: build/C/man2/gethostname.2:99
7700 msgid "I<name> is an invalid address."
7703 #. Can't occur for gethostbyname() wrapper, since 'len' has an
7704 #. unsigned type; can occur for the underlying system call.
7706 #: build/C/man2/gethostname.2:109
7708 "I<len> is negative or, for B<sethostname>(), I<len> is larger than the "
7709 "maximum allowed size."
7713 #: build/C/man2/gethostname.2:117
7715 "(glibc B<gethostname>()) I<len> is smaller than the actual size. (Before "
7716 "version 2.1, glibc uses B<EINVAL> for this case.)"
7720 #: build/C/man2/gethostname.2:124
7722 "For B<sethostname>(), the caller did not have the B<CAP_SYS_ADMIN> "
7727 #: build/C/man2/gethostname.2:130
7729 "SVr4, 4.4BSD (these interfaces first appeared in 4.2BSD). POSIX.1-2001 "
7730 "specifies B<gethostname>() but not B<sethostname>()."
7734 #: build/C/man2/gethostname.2:140
7736 "SUSv2 guarantees that \"Host names are limited to 255 bytes\". POSIX.1-2001 "
7737 "guarantees that \"Host names (not including the terminating null byte) are "
7738 "limited to B<HOST_NAME_MAX> bytes\". On Linux, B<HOST_NAME_MAX> is defined "
7739 "with the value 64, which has been the limit since Linux 1.0 (earlier kernels "
7740 "imposed a limit of 8 bytes)."
7744 #: build/C/man2/gethostname.2:163
7746 "The GNU C library does not employ the B<gethostname>() system call; "
7747 "instead, it implements B<gethostname>() as a library function that calls "
7748 "B<uname>(2) and copies up to I<len> bytes from the returned I<nodename> "
7749 "field into I<name>. Having performed the copy, the function then checks if "
7750 "the length of the I<nodename> was greater than or equal to I<len>, and if it "
7751 "is, then the function returns -1 with I<errno> set to B<ENAMETOOLONG>; in "
7752 "this case, a terminating null byte is not included in the returned I<name>."
7755 #. At least glibc 2.0 and 2.1, older versions not checked
7757 #: build/C/man2/gethostname.2:176
7759 "Versions of glibc before 2.2 handle the case where the length of the "
7760 "I<nodename> was greater than or equal to I<len> differently: nothing is "
7761 "copied into I<name> and the function returns -1 with I<errno> set to "
7766 #: build/C/man2/gethostname.2:180
7767 msgid "B<getdomainname>(2), B<setdomainname>(2), B<uname>(2)"
7771 #: build/C/man3/getlogin.3:28
7777 #: build/C/man3/getlogin.3:28 build/C/man3/usleep.3:33
7783 #: build/C/man3/getlogin.3:31
7784 msgid "getlogin, getlogin_r, cuserid - get username"
7788 #: build/C/man3/getlogin.3:35
7789 msgid "B<char *getlogin(void);>"
7793 #: build/C/man3/getlogin.3:37
7794 msgid "B<int getlogin_r(char *>I<buf>B<, size_t >I<bufsize>B<);>"
7798 #: build/C/man3/getlogin.3:39
7799 msgid "B<#include E<lt>stdio.hE<gt>>"
7803 #: build/C/man3/getlogin.3:41
7804 msgid "B<char *cuserid(char *>I<string>B<);>"
7808 #: build/C/man3/getlogin.3:49
7809 msgid "B<getlogin_r>(): _REENTRANT || _POSIX_C_SOURCE\\ E<gt>=\\ 199506L"
7813 #: build/C/man3/getlogin.3:52
7814 msgid "B<cuserid>(): _XOPEN_SOURCE"
7818 #: build/C/man3/getlogin.3:61
7820 "B<getlogin>() returns a pointer to a string containing the name of the user "
7821 "logged in on the controlling terminal of the process, or a NULL pointer if "
7822 "this information cannot be determined. The string is statically allocated "
7823 "and might be overwritten on subsequent calls to this function or to "
7828 #: build/C/man3/getlogin.3:67
7830 "B<getlogin_r>() returns this same username in the array I<buf> of size "
7835 #: build/C/man3/getlogin.3:79
7837 "B<cuserid>() returns a pointer to a string containing a username associated "
7838 "with the effective user ID of the process. If I<string> is not a NULL "
7839 "pointer, it should be an array that can hold at least B<L_cuserid> "
7840 "characters; the string is returned in this array. Otherwise, a pointer to a "
7841 "string in a static area is returned. This string is statically allocated "
7842 "and might be overwritten on subsequent calls to this function or to "
7847 #: build/C/man3/getlogin.3:83
7849 "The macro B<L_cuserid> is an integer constant that indicates how long an "
7850 "array you might need to store a username. B<L_cuserid> is declared in "
7851 "I<E<lt>stdio.hE<gt>>."
7855 #: build/C/man3/getlogin.3:90
7857 "These functions let your program identify positively the user who is running "
7858 "(B<cuserid>()) or the user who logged in this session (B<getlogin>()). "
7859 "(These can differ when set-user-ID programs are involved.)"
7863 #: build/C/man3/getlogin.3:95
7865 "For most purposes, it is more useful to use the environment variable "
7866 "B<LOGNAME> to find out who the user is. This is more flexible precisely "
7867 "because the user can set B<LOGNAME> arbitrarily."
7871 #: build/C/man3/getlogin.3:103
7873 "B<getlogin>() returns a pointer to the username when successful, and NULL "
7874 "on failure, with I<errno> set to indicate the cause of the error. "
7875 "B<getlogin_r>() returns 0 when successful, and nonzero on failure."
7879 #: build/C/man3/getlogin.3:105
7880 msgid "POSIX specifies"
7884 #: build/C/man3/getlogin.3:108
7885 msgid "The calling process already has the maximum allowed number of open files."
7889 #: build/C/man3/getlogin.3:111
7890 msgid "The system already has the maximum allowed number of open files."
7894 #: build/C/man3/getlogin.3:111
7900 #: build/C/man3/getlogin.3:114
7901 msgid "The calling process has no controlling terminal."
7905 #: build/C/man3/getlogin.3:120
7907 "(getlogin_r) The length of the username, including the terminating null "
7908 "byte (\\(aq\\e0\\(aq), is larger than I<bufsize>."
7912 #: build/C/man3/getlogin.3:122
7913 msgid "Linux/glibc also has"
7917 #: build/C/man3/getlogin.3:125
7918 msgid "There was no corresponding entry in the utmp-file."
7922 #: build/C/man3/getlogin.3:128
7923 msgid "Insufficient memory to allocate passwd structure."
7927 #: build/C/man3/getlogin.3:128 build/C/man2/ioctl.2:107 build/C/man2/ioctl.2:111 build/C/man3/tcgetpgrp.3:95
7933 #: build/C/man3/getlogin.3:132
7934 msgid "Standard input didn't refer to a terminal. (See BUGS.)"
7938 #: build/C/man3/getlogin.3:133
7940 msgid "I</etc/passwd>"
7944 #: build/C/man3/getlogin.3:136
7945 msgid "password database file"
7949 #: build/C/man3/getlogin.3:136
7951 msgid "I</var/run/utmp>"
7955 #: build/C/man3/getlogin.3:140
7956 msgid "(traditionally I</etc/utmp>; some libc versions used I</var/adm/utmp>)"
7960 #: build/C/man3/getlogin.3:145
7961 msgid "The B<getlogin>() function is not thread-safe."
7965 #: build/C/man3/getlogin.3:149
7966 msgid "The B<getlogin_r>() function is thread-safe."
7970 #: build/C/man3/getlogin.3:154
7972 "The B<cuserid>() function is thread-safe with exceptions. It is not "
7973 "thread-safe if called with a NULL parameter."
7977 #: build/C/man3/getlogin.3:159
7978 msgid "B<getlogin>() and B<getlogin_r>() specified in POSIX.1-2001."
7982 #: build/C/man3/getlogin.3:170
7984 "System V has a B<cuserid>() function which uses the real user ID rather "
7985 "than the effective user ID. The B<cuserid>() function was included in the "
7986 "1988 version of POSIX, but removed from the 1990 version. It was present in "
7987 "SUSv2, but removed in POSIX.1-2001."
7991 #: build/C/man3/getlogin.3:177
7993 "OpenBSD has B<getlogin>() and B<setlogin>(), and a username associated with "
7994 "a session, even if it has no controlling terminal."
7998 #: build/C/man3/getlogin.3:189
8000 "Unfortunately, it is often rather easy to fool B<getlogin>(). Sometimes it "
8001 "does not work at all, because some program messed up the utmp file. Often, "
8002 "it gives only the first 8 characters of the login name. The user currently "
8003 "logged in on the controlling terminal of our program need not be the user "
8004 "who started it. Avoid B<getlogin>() for security-related purposes."
8008 #: build/C/man3/getlogin.3:199
8010 "Note that glibc does not follow the POSIX specification and uses I<stdin> "
8011 "instead of I</dev/tty>. A bug. (Other recent systems, like SunOS 5.8 and "
8012 "HP-UX 11.11 and FreeBSD 4.8 all return the login name also when I<stdin> is "
8017 #: build/C/man3/getlogin.3:209
8019 "Nobody knows precisely what B<cuserid>() does; avoid it in portable "
8020 "programs. Or avoid it altogether: use I<getpwuid(geteuid())> instead, if "
8021 "that is what you meant. B<Do not use> B<cuserid>()."
8025 #: build/C/man3/getlogin.3:213
8026 msgid "B<geteuid>(2), B<getuid>(2), B<utmp>(5)"
8030 #: build/C/man3/getopt.3:41
8036 #: build/C/man3/getopt.3:45
8038 "getopt, getopt_long, getopt_long_only, optarg, optind, opterr, optopt - "
8039 "Parse command-line options"
8043 #: build/C/man3/getopt.3:51
8046 "B<int getopt(int >I<argc>B<, char * const >I<argv[]>B<,>\n"
8047 "B< const char *>I<optstring>B<);>\n"
8051 #: build/C/man3/getopt.3:54
8054 "B<extern char *>I<optarg>B<;>\n"
8055 "B<extern int >I<optind>B<, >I<opterr>B<, >I<optopt>B<;>\n"
8059 #: build/C/man3/getopt.3:56
8061 msgid "B<#include E<lt>getopt.hE<gt>>\n"
8065 #: build/C/man3/getopt.3:60
8068 "B<int getopt_long(int >I<argc>B<, char * const >I<argv[]>B<,>\n"
8069 "B< const char *>I<optstring>B<,>\n"
8070 "B< const struct option *>I<longopts>B<, int *>I<longindex>B<);>\n"
8074 #: build/C/man3/getopt.3:64
8077 "B<int getopt_long_only(int >I<argc>B<, char * const >I<argv[]>B<,>\n"
8078 "B< const char *>I<optstring>B<,>\n"
8079 "B< const struct option *>I<longopts>B<, int *>I<longindex>B<);>\n"
8083 #: build/C/man3/getopt.3:74
8084 msgid "B<getopt>(): _POSIX_C_SOURCE\\ E<gt>=\\ 2 || _XOPEN_SOURCE"
8088 #: build/C/man3/getopt.3:78
8089 msgid "B<getopt_long>(), B<getopt_long_only>(): _GNU_SOURCE"
8093 #: build/C/man3/getopt.3:99
8095 "The B<getopt>() function parses the command-line arguments. Its arguments "
8096 "I<argc> and I<argv> are the argument count and array as passed to the "
8097 "I<main>() function on program invocation. An element of I<argv> that "
8098 "starts with \\(aq-\\(aq (and is not exactly \"-\" or \"--\") is an option "
8099 "element. The characters of this element (aside from the initial "
8100 "\\(aq-\\(aq) are option characters. If B<getopt>() is called repeatedly, "
8101 "it returns successively each of the option characters from each of the "
8106 #: build/C/man3/getopt.3:108
8108 "The variable I<optind> is the index of the next element to be processed in "
8109 "I<argv>. The system initializes this value to 1. The caller can reset it "
8110 "to 1 to restart scanning of the same I<argv>, or when scanning a new "
8115 #: build/C/man3/getopt.3:118
8117 "If B<getopt>() finds another option character, it returns that character, "
8118 "updating the external variable I<optind> and a static variable I<nextchar> "
8119 "so that the next call to B<getopt>() can resume the scan with the following "
8120 "option character or I<argv>-element."
8124 #: build/C/man3/getopt.3:124
8126 "If there are no more option characters, B<getopt>() returns -1. Then "
8127 "I<optind> is the index in I<argv> of the first I<argv>-element that is not "
8132 #: build/C/man3/getopt.3:151
8134 "I<optstring> is a string containing the legitimate option characters. If "
8135 "such a character is followed by a colon, the option requires an argument, so "
8136 "B<getopt>() places a pointer to the following text in the same "
8137 "I<argv>-element, or the text of the following I<argv>-element, in "
8138 "I<optarg>. Two colons mean an option takes an optional arg; if there is "
8139 "text in the current I<argv>-element (i.e., in the same word as the option "
8140 "name itself, for example, \"-oarg\"), then it is returned in I<optarg>, "
8141 "otherwise I<optarg> is set to zero. This is a GNU extension. If "
8142 "I<optstring> contains B<W> followed by a semicolon, then B<-W foo> is "
8143 "treated as the long option B<--foo>. (The B<-W> option is reserved by "
8144 "POSIX.2 for implementation extensions.) This behavior is a GNU extension, "
8145 "not available with libraries before glibc 2."
8149 #: build/C/man3/getopt.3:169
8151 "By default, B<getopt>() permutes the contents of I<argv> as it scans, so "
8152 "that eventually all the nonoptions are at the end. Two other modes are also "
8153 "implemented. If the first character of I<optstring> is \\(aq+\\(aq or the "
8154 "environment variable B<POSIXLY_CORRECT> is set, then option processing stops "
8155 "as soon as a nonoption argument is encountered. If the first character of "
8156 "I<optstring> is \\(aq-\\(aq, then each nonoption I<argv>-element is handled "
8157 "as if it were the argument of an option with character code 1. (This is "
8158 "used by programs that were written to expect options and other "
8159 "I<argv>-elements in any order and that care about the ordering of the two.) "
8160 "The special argument \"--\" forces an end of option-scanning regardless of "
8161 "the scanning mode."
8165 #: build/C/man3/getopt.3:177
8167 "If B<getopt>() does not recognize an option character, it prints an error "
8168 "message to I<stderr>, stores the character in I<optopt>, and returns "
8169 "\\(aq?\\(aq. The calling program may prevent the error message by setting "
8174 #: build/C/man3/getopt.3:196
8176 "If B<getopt>() finds an option character in I<argv> that was not included "
8177 "in I<optstring>, or if it detects a missing option argument, it returns "
8178 "\\(aq?\\(aq and sets the external variable I<optopt> to the actual option "
8179 "character. If the first character (following any optional \\(aq+\\(aq or "
8180 "\\(aq-\\(aq described above) of I<optstring> is a colon (\\(aq:\\(aq), then "
8181 "B<getopt>() returns \\(aq:\\(aq instead of \\(aq?\\(aq to indicate a "
8182 "missing option argument. If an error was detected, and the first character "
8183 "of I<optstring> is not a colon, and the external variable I<opterr> is "
8184 "nonzero (which is the default), B<getopt>() prints an error message."
8188 #: build/C/man3/getopt.3:196
8190 msgid "getopt_long() and getopt_long_only()"
8194 #: build/C/man3/getopt.3:212
8196 "The B<getopt_long>() function works like B<getopt>() except that it also "
8197 "accepts long options, started with two dashes. (If the program accepts only "
8198 "long options, then I<optstring> should be specified as an empty string "
8199 "(\"\"), not NULL.) Long option names may be abbreviated if the abbreviation "
8200 "is unique or is an exact match for some defined option. A long option may "
8201 "take a parameter, of the form B<--arg=param> or B<--arg param>."
8205 #: build/C/man3/getopt.3:219
8207 "I<longopts> is a pointer to the first element of an array of I<struct "
8208 "option> declared in I<E<lt>getopt.hE<gt>> as"
8212 #: build/C/man3/getopt.3:228
8216 " const char *name;\n"
8224 #: build/C/man3/getopt.3:232
8225 msgid "The meanings of the different fields are:"
8229 #: build/C/man3/getopt.3:232
8235 #: build/C/man3/getopt.3:235
8236 msgid "is the name of the long option."
8240 #: build/C/man3/getopt.3:235
8246 #: build/C/man3/getopt.3:241
8248 "is: B<no_argument> (or 0) if the option does not take an argument; "
8249 "B<required_argument> (or 1) if the option requires an argument; or "
8250 "B<optional_argument> (or 2) if the option takes an optional argument."
8254 #: build/C/man3/getopt.3:241
8260 #: build/C/man3/getopt.3:255
8262 "specifies how results are returned for a long option. If I<flag> is NULL, "
8263 "then B<getopt_long>() returns I<val>. (For example, the calling program "
8264 "may set I<val> to the equivalent short option character.) Otherwise, "
8265 "B<getopt_long>() returns 0, and I<flag> points to a variable which is set "
8266 "to I<val> if the option is found, but left unchanged if the option is not "
8271 #: build/C/man3/getopt.3:255
8277 #: build/C/man3/getopt.3:259
8278 msgid "is the value to return, or to load into the variable pointed to by I<flag>."
8282 #: build/C/man3/getopt.3:261
8283 msgid "The last element of the array has to be filled with zeros."
8287 #: build/C/man3/getopt.3:265
8289 "If I<longindex> is not NULL, it points to a variable which is set to the "
8290 "index of the long option relative to I<longopts>."
8294 #: build/C/man3/getopt.3:274
8296 "B<getopt_long_only>() is like B<getopt_long>(), but \\(aq-\\(aq as well as "
8297 "\"--\" can indicate a long option. If an option that starts with "
8298 "\\(aq-\\(aq (not \"--\") doesn't match a long option, but does match a short "
8299 "option, it is parsed as a short option instead."
8303 #: build/C/man3/getopt.3:292
8305 "If an option was successfully found, then B<getopt>() returns the option "
8306 "character. If all command-line options have been parsed, then B<getopt>() "
8307 "returns -1. If B<getopt>() encounters an option character that was not in "
8308 "I<optstring>, then \\(aq?\\(aq is returned. If B<getopt>() encounters an "
8309 "option with a missing argument, then the return value depends on the first "
8310 "character in I<optstring>: if it is \\(aq:\\(aq, then \\(aq:\\(aq is "
8311 "returned; otherwise \\(aq?\\(aq is returned."
8315 #: build/C/man3/getopt.3:304
8317 "B<getopt_long>() and B<getopt_long_only>() also return the option "
8318 "character when a short option is recognized. For a long option, they return "
8319 "I<val> if I<flag> is NULL, and 0 otherwise. Error and -1 returns are the "
8320 "same as for B<getopt>(), plus \\(aq?\\(aq for an ambiguous match or an "
8321 "extraneous parameter."
8325 #: build/C/man3/getopt.3:304
8331 #: build/C/man3/getopt.3:305
8333 msgid "B<POSIXLY_CORRECT>"
8337 #: build/C/man3/getopt.3:309
8339 "If this is set, then option processing stops as soon as a nonoption argument "
8344 #: build/C/man3/getopt.3:309
8346 msgid "B<_E<lt>PIDE<gt>_GNU_nonoption_argv_flags_>"
8350 #: build/C/man3/getopt.3:318
8352 "This variable was used by B<bash>(1) 2.0 to communicate to glibc which "
8353 "arguments are the results of wildcard expansion and so should not be "
8354 "considered as options. This behavior was removed in B<bash>(1) version "
8355 "2.01, but the support remains in glibc."
8359 #: build/C/man3/getopt.3:319
8361 msgid "B<getopt>():"
8365 #: build/C/man3/getopt.3:329
8367 "POSIX.2 and POSIX.1-2001, provided the environment variable "
8368 "B<POSIXLY_CORRECT> is set. Otherwise, the elements of I<argv> aren't really "
8369 "const, because we permute them. We pretend they're const in the prototype "
8370 "to be compatible with other systems."
8374 #: build/C/man3/getopt.3:333
8375 msgid "The use of \\(aq+\\(aq and \\(aq-\\(aq in I<optstring> is a GNU extension."
8379 #: build/C/man3/getopt.3:347
8381 "On some older implementations, B<getopt>() was declared in "
8382 "I<E<lt>stdio.hE<gt>>. SUSv1 permitted the declaration to appear in either "
8383 "I<E<lt>unistd.hE<gt>> or I<E<lt>stdio.hE<gt>>. POSIX.1-2001 marked the use "
8384 "of I<E<lt>stdio.hE<gt>> for this purpose as LEGACY. POSIX.1-2001 does not "
8385 "allow the declaration to appear in I<E<lt>stdio.hE<gt>>."
8389 #: build/C/man3/getopt.3:347
8391 msgid "B<getopt_long>() and B<getopt_long_only>():"
8395 #: build/C/man3/getopt.3:369
8397 "A program that scans multiple argument vectors, or rescans the same vector "
8398 "more than once, and wants to make use of GNU extensions such as \\(aq+\\(aq "
8399 "and \\(aq-\\(aq at the start of I<optstring>, or changes the value of "
8400 "B<POSIXLY_CORRECT> between scans, must reinitialize B<getopt>() by "
8401 "resetting I<optind> to 0, rather than the traditional value of 1. "
8402 "(Resetting to 0 forces the invocation of an internal initialization routine "
8403 "that rechecks B<POSIXLY_CORRECT> and checks for GNU extensions in "
8408 #: build/C/man3/getopt.3:376
8410 "The POSIX.2 specification of B<getopt>() has a technical error described in "
8411 "POSIX.2 Interpretation 150. The GNU implementation (and probably all other "
8412 "implementations) implements the correct behavior rather than that specified."
8416 #: build/C/man3/getopt.3:384
8418 "The following trivial example program uses B<getopt>() to handle two "
8419 "program options: I<-n>, with no associated value; and I<-t val>, which "
8420 "expects an associated value."
8424 #: build/C/man3/getopt.3:389
8427 "#include E<lt>unistd.hE<gt>\n"
8428 "#include E<lt>stdlib.hE<gt>\n"
8429 "#include E<lt>stdio.hE<gt>\n"
8433 #: build/C/man3/getopt.3:395
8437 "main(int argc, char *argv[])\n"
8439 " int flags, opt;\n"
8440 " int nsecs, tfnd;\n"
8444 #: build/C/man3/getopt.3:414
8450 " while ((opt = getopt(argc, argv, \"nt:\")) != -1) {\n"
8452 " case \\(aqn\\(aq:\n"
8455 " case \\(aqt\\(aq:\n"
8456 " nsecs = atoi(optarg);\n"
8459 " default: /* \\(aq?\\(aq */\n"
8460 " fprintf(stderr, \"Usage: %s [-t nsecs] [-n] name\\en\",\n"
8462 " exit(EXIT_FAILURE);\n"
8468 #: build/C/man3/getopt.3:416
8470 msgid " printf(\"flags=%d; tfnd=%d; optind=%d\\en\", flags, tfnd, optind);\n"
8474 #: build/C/man3/getopt.3:421
8477 " if (optind E<gt>= argc) {\n"
8478 " fprintf(stderr, \"Expected argument after options\\en\");\n"
8479 " exit(EXIT_FAILURE);\n"
8484 #: build/C/man3/getopt.3:423
8486 msgid " printf(\"name argument = %s\\en\", argv[optind]);\n"
8490 #: build/C/man3/getopt.3:425
8492 msgid " /* Other code omitted */\n"
8496 #: build/C/man3/getopt.3:433
8498 "The following example program illustrates the use of B<getopt_long>() with "
8499 "most of its features."
8503 #: build/C/man3/getopt.3:438
8506 "#include E<lt>stdio.hE<gt> /* for printf */\n"
8507 "#include E<lt>stdlib.hE<gt> /* for exit */\n"
8508 "#include E<lt>getopt.hE<gt>\n"
8512 #: build/C/man3/getopt.3:444
8516 "main(int argc, char **argv)\n"
8519 " int digit_optind = 0;\n"
8523 #: build/C/man3/getopt.3:457
8527 " int this_option_optind = optind ? optind : 1;\n"
8528 " int option_index = 0;\n"
8529 " static struct option long_options[] = {\n"
8530 " {\"add\", required_argument, 0, 0 },\n"
8531 " {\"append\", no_argument, 0, 0 },\n"
8532 " {\"delete\", required_argument, 0, 0 },\n"
8533 " {\"verbose\", no_argument, 0, 0 },\n"
8534 " {\"create\", required_argument, 0, \\(aqc\\(aq},\n"
8535 " {\"file\", required_argument, 0, 0 },\n"
8541 #: build/C/man3/getopt.3:462
8544 " c = getopt_long(argc, argv, \"abc:d:012\",\n"
8545 " long_options, &option_index);\n"
8551 #: build/C/man3/getopt.3:470
8556 " printf(\"option %s\", long_options[option_index].name);\n"
8558 " printf(\" with arg %s\", optarg);\n"
8559 " printf(\"\\en\");\n"
8564 #: build/C/man3/getopt.3:479
8567 " case \\(aq0\\(aq:\n"
8568 " case \\(aq1\\(aq:\n"
8569 " case \\(aq2\\(aq:\n"
8570 " if (digit_optind != 0 && digit_optind != this_option_optind)\n"
8571 " printf(\"digits occur in two different "
8572 "argv-elements.\\en\");\n"
8573 " digit_optind = this_option_optind;\n"
8574 " printf(\"option %c\\en\", c);\n"
8579 #: build/C/man3/getopt.3:483
8582 " case \\(aqa\\(aq:\n"
8583 " printf(\"option a\\en\");\n"
8588 #: build/C/man3/getopt.3:487
8591 " case \\(aqb\\(aq:\n"
8592 " printf(\"option b\\en\");\n"
8597 #: build/C/man3/getopt.3:491
8600 " case \\(aqc\\(aq:\n"
8601 " printf(\"option c with value \\(aq%s\\(aq\\en\", optarg);\n"
8606 #: build/C/man3/getopt.3:495
8609 " case \\(aqd\\(aq:\n"
8610 " printf(\"option d with value \\(aq%s\\(aq\\en\", optarg);\n"
8615 #: build/C/man3/getopt.3:498
8618 " case \\(aq?\\(aq:\n"
8623 #: build/C/man3/getopt.3:503
8627 " printf(\"?? getopt returned character code 0%o ??\\en\", c);\n"
8633 #: build/C/man3/getopt.3:510
8636 " if (optind E<lt> argc) {\n"
8637 " printf(\"non-option ARGV-elements: \");\n"
8638 " while (optind E<lt> argc)\n"
8639 " printf(\"%s \", argv[optind++]);\n"
8640 " printf(\"\\en\");\n"
8645 #: build/C/man3/getopt.3:516
8646 msgid "B<getsubopt>(3)"
8650 #: build/C/man2/getpagesize.2:25
8656 #: build/C/man2/getpagesize.2:25
8662 #: build/C/man2/getpagesize.2:28
8663 msgid "getpagesize - get memory page size"
8667 #: build/C/man2/getpagesize.2:32
8668 msgid "B<int getpagesize(void);>"
8672 #: build/C/man2/getpagesize.2:39
8673 msgid "B<getpagesize>():"
8677 #. This call first appeared in 4.2BSD.
8679 #: build/C/man2/getpagesize.2:64
8681 "The function B<getpagesize>() returns the number of bytes in a memory page, "
8682 "where \"page\" is a fixed-length block, the unit for memory allocation and "
8683 "file mapping performed by B<mmap>(2)."
8687 #: build/C/man2/getpagesize.2:71
8689 "SVr4, 4.4BSD, SUSv2. In SUSv2 the B<getpagesize>() call is labeled LEGACY, "
8690 "and in POSIX.1-2001 it has been dropped; HP-UX does not have this call."
8694 #: build/C/man2/getpagesize.2:76
8696 "Portable applications should employ I<sysconf(_SC_PAGESIZE)> instead of "
8701 #: build/C/man2/getpagesize.2:81
8704 "#include E<lt>unistd.hE<gt>\n"
8705 "long sz = sysconf(_SC_PAGESIZE);\n"
8709 #: build/C/man2/getpagesize.2:88
8710 msgid "(Most systems allow the synonym B<_SC_PAGE_SIZE> for B<_SC_PAGESIZE>.)"
8714 #: build/C/man2/getpagesize.2:108
8716 "Whether B<getpagesize>() is present as a Linux system call depends on the "
8717 "architecture. If it is, it returns the kernel symbol B<PAGE_SIZE>, whose "
8718 "value depends on the architecture and machine model. Generally, one uses "
8719 "binaries that are dependent on the architecture but not on the machine "
8720 "model, in order to have a single binary distribution per architecture. This "
8721 "means that a user program should not find B<PAGE_SIZE> at compile time from "
8722 "a header file, but use an actual system call, at least for those "
8723 "architectures (like sun4) where this dependency exists. Here libc4, libc5, "
8724 "glibc 2.0 fail because their B<getpagesize>() returns a statically derived "
8725 "value, and does not use a system call. Things are OK in glibc 2.1."
8729 #: build/C/man2/getpagesize.2:111
8730 msgid "B<mmap>(2), B<sysconf>(3)"
8734 #: build/C/man2/gettid.2:26
8740 #: build/C/man2/gettid.2:26
8746 #: build/C/man2/gettid.2:29
8747 msgid "gettid - get thread identification"
8751 #: build/C/man2/gettid.2:32
8753 msgid "B<#include E<lt>sys/types.hE<gt>>\n"
8757 #: build/C/man2/gettid.2:34
8759 msgid "B<pid_t gettid(void);>\n"
8763 #: build/C/man2/gettid.2:50
8765 "B<gettid>() returns the caller's thread ID (TID). In a single-threaded "
8766 "process, the thread ID is equal to the process ID (PID, as returned by "
8767 "B<getpid>(2)). In a multithreaded process, all threads have the same PID, "
8768 "but each one has a unique TID. For further details, see the discussion of "
8769 "B<CLONE_THREAD> in B<clone>(2)."
8773 #: build/C/man2/gettid.2:52
8774 msgid "On success, returns the thread ID of the calling process."
8778 #: build/C/man2/gettid.2:54
8779 msgid "This call is always successful."
8783 #: build/C/man2/gettid.2:58
8784 msgid "The B<gettid>() system call first appeared on Linux in kernel 2.4.11."
8788 #: build/C/man2/gettid.2:62
8790 "B<gettid>() is Linux-specific and should not be used in programs that are "
8791 "intended to be portable."
8794 #. FIXME See http://sourceware.org/bugzilla/show_bug.cgi?id=6399
8795 #. "gettid() should have a wrapper"
8797 #: build/C/man2/gettid.2:67
8799 "Glibc does not provide a wrapper for this system call; call it using "
8804 #: build/C/man2/gettid.2:71
8806 "The thread ID returned by this call is not the same thing as a POSIX thread "
8807 "ID (i.e., the opaque value returned by B<pthread_self>(3))."
8811 #. .BR move_pages (2),
8812 #. .BR migrate_pages (2),
8813 #. .BR process_vm_readv (2),
8816 #: build/C/man2/gettid.2:90
8818 "B<capget>(2), B<clone>(2), B<fcntl>(2), B<fork>(2), B<get_robust_list>(2), "
8819 "B<getpid>(2), B<ioprio_set>(2), B<perf_event_open>(2), "
8820 "B<sched_setaffinity>(2), B<sched_setparam>(2), B<sched_setscheduler>(2), "
8821 "B<timer_create>(2), B<tgkill>(2)"
8825 #: build/C/man3/getumask.3:28
8831 #: build/C/man3/getumask.3:28
8837 #: build/C/man3/getumask.3:31
8838 msgid "getumask - get file creation mask"
8842 #: build/C/man3/getumask.3:35 build/C/man2/truncate.2:50 build/C/man2/umask.2:39 build/C/man2/vfork.2:33
8843 msgid "B<#include E<lt>sys/types.hE<gt>>"
8847 #: build/C/man3/getumask.3:39
8848 msgid "B<mode_t getumask(void);>"
8852 #: build/C/man3/getumask.3:42
8853 msgid "This function returns the current file creation mask. It is equivalent to"
8857 #: build/C/man3/getumask.3:51
8860 "mode_t getumask(void)\n"
8862 " mode_t mask = umask( 0 );\n"
8869 #: build/C/man3/getumask.3:58
8871 "except that it is documented to be thread-safe (that is, shares a lock with "
8872 "the B<umask>(2) library call)."
8876 #: build/C/man3/getumask.3:60
8877 msgid "This is a vaporware GNU extension."
8881 #: build/C/man3/getumask.3:63
8883 "This function is documented but not implemented yet in glibc, as at version "
8888 #: build/C/man3/getumask.3:65
8893 #: build/C/man3/getusershell.3:30
8895 msgid "GETUSERSHELL"
8899 #: build/C/man3/getusershell.3:33
8900 msgid "getusershell, setusershell, endusershell - get permitted user shells"
8904 #: build/C/man3/getusershell.3:38
8906 msgid "B<char *getusershell(void);>\n"
8910 #: build/C/man3/getusershell.3:40
8912 msgid "B<void setusershell(void);>\n"
8916 #: build/C/man3/getusershell.3:42
8918 msgid "B<void endusershell(void);>\n"
8922 #: build/C/man3/getusershell.3:53
8923 msgid "B<getusershell>(), B<setusershell>(), B<endusershell>():"
8927 #: build/C/man3/getusershell.3:75
8929 "The B<getusershell>() function returns the next line from the file "
8930 "I</etc/shells>, opening the file if necessary. The line should contain the "
8931 "pathname of a valid user shell. If I</etc/shells> does not exist or is "
8932 "unreadable, B<getusershell>() behaves as if I</bin/sh> and I</bin/csh> were "
8933 "listed in the file."
8937 #: build/C/man3/getusershell.3:80
8938 msgid "The B<setusershell>() function rewinds I</etc/shells>."
8942 #: build/C/man3/getusershell.3:85
8943 msgid "The B<endusershell>() function closes I</etc/shells>."
8947 #: build/C/man3/getusershell.3:89
8948 msgid "The B<getusershell>() function returns a NULL pointer on end-of-file."
8952 #: build/C/man3/getusershell.3:92
8954 msgid "/etc/shells\n"
8958 #: build/C/man3/getusershell.3:101
8960 "The B<getusershell>(), B<setusershell>() and B<endusershell>() functions "
8961 "are not thread-safe."
8965 #: build/C/man3/getusershell.3:103
8970 #: build/C/man3/getusershell.3:105
8971 msgid "B<shells>(5)"
8975 #: build/C/man2/idle.2:32
8981 #: build/C/man2/idle.2:32 build/C/man5/shells.5:28
8987 #: build/C/man2/idle.2:35
8988 msgid "idle - make process 0 idle"
8992 #: build/C/man2/idle.2:39
8993 msgid "B<int idle(void);>"
8997 #: build/C/man2/idle.2:46
8999 "B<idle>() is an internal system call used during bootstrap. It marks the "
9000 "process's pages as swappable, lowers its priority, and enters the main "
9001 "scheduling loop. B<idle>() never returns."
9005 #: build/C/man2/idle.2:52
9007 "Only process 0 may call B<idle>(). Any user process, even a process with "
9008 "superuser permission, will receive B<EPERM>."
9012 #: build/C/man2/idle.2:55
9014 "B<idle>() never returns for process 0, and always returns -1 for a user "
9019 #: build/C/man2/idle.2:59 build/C/man2/setup.2:60
9020 msgid "Always, for a user process."
9024 #: build/C/man2/idle.2:61
9025 msgid "Since Linux 2.3.13, this system call does not exist anymore."
9029 #: build/C/man2/idle.2:64 build/C/man2/sysinfo.2:86
9031 "This function is Linux-specific, and should not be used in programs intended "
9036 #: build/C/man2/ioctl.2:41
9042 #: build/C/man2/ioctl.2:41
9048 #: build/C/man2/ioctl.2:44
9049 msgid "ioctl - control device"
9053 #: build/C/man2/ioctl.2:46
9054 msgid "B<#include E<lt>sys/ioctl.hE<gt>>"
9058 #: build/C/man2/ioctl.2:48
9059 msgid "B<int ioctl(int >I<d>B<, int >I<request>B<, ...);>"
9063 #: build/C/man2/ioctl.2:59
9065 "The B<ioctl>() function manipulates the underlying device parameters of "
9066 "special files. In particular, many operating characteristics of character "
9067 "special files (e.g., terminals) may be controlled with B<ioctl>() "
9068 "requests. The argument I<d> must be an open file descriptor."
9072 #: build/C/man2/ioctl.2:67
9074 "The second argument is a device-dependent request code. The third argument "
9075 "is an untyped pointer to memory. It's traditionally B<char *>I<argp> (from "
9076 "the days before B<void *> was valid C), and will be so named for this "
9081 #: build/C/man2/ioctl.2:83
9083 "An B<ioctl>() I<request> has encoded in it whether the argument is an I<in> "
9084 "parameter or I<out> parameter, and the size of the argument I<argp> in "
9085 "bytes. Macros and defines used in specifying an B<ioctl>() I<request> are "
9086 "located in the file I<E<lt>sys/ioctl.hE<gt>>."
9090 #: build/C/man2/ioctl.2:92
9092 "Usually, on success zero is returned. A few B<ioctl>() requests use the "
9093 "return value as an output parameter and return a nonnegative value on "
9094 "success. On error, -1 is returned, and I<errno> is set appropriately."
9098 #: build/C/man2/ioctl.2:97
9099 msgid "I<d> is not a valid descriptor."
9103 #: build/C/man2/ioctl.2:101
9104 msgid "I<argp> references an inaccessible memory area."
9108 #: build/C/man2/ioctl.2:107
9109 msgid "I<Request> or I<argp> is not valid."
9113 #: build/C/man2/ioctl.2:111
9114 msgid "I<d> is not associated with a character special device."
9118 #: build/C/man2/ioctl.2:117
9120 "The specified request does not apply to the kind of object that the "
9121 "descriptor I<d> references."
9125 #: build/C/man2/ioctl.2:132
9127 "No single standard. Arguments, returns, and semantics of B<ioctl>() vary "
9128 "according to the device driver in question (the call is used as a catch-all "
9129 "for operations that don't cleanly fit the UNIX stream I/O model). See "
9130 "B<ioctl_list>(2) for a list of many of the known B<ioctl>() calls. The "
9131 "B<ioctl>() function call appeared in Version 7 AT&T UNIX."
9135 #: build/C/man2/ioctl.2:140
9137 "In order to use this call, one needs an open file descriptor. Often the "
9138 "B<open>(2) call has unwanted side effects, that can be avoided under Linux "
9139 "by giving it the B<O_NONBLOCK> flag."
9144 #: build/C/man2/ioctl.2:148
9145 msgid "B<execve>(2), B<fcntl>(2), B<ioctl_list>(2), B<open>(2), B<sd>(4), B<tty>(4)"
9149 #: build/C/man2/ioctl_list.2:30
9155 #: build/C/man2/ioctl_list.2:30 build/C/man2/syscall.2:40
9161 #: build/C/man2/ioctl_list.2:33
9162 msgid "ioctl_list - list of ioctl calls in Linux/i386 kernel"
9166 #: build/C/man2/ioctl_list.2:40
9168 "This is Ioctl List 1.3.27, a list of ioctl calls in Linux/i386 kernel "
9169 "1.3.27. It contains 421 ioctls from "
9170 "I<E<lt>/usr/include/{asm,linux}/*.hE<gt>>. For each ioctl, its numerical "
9171 "value, its name, and its argument type are given."
9175 #: build/C/man2/ioctl_list.2:48
9177 "An argument type of I<const struct foo\\ *> means the argument is input to "
9178 "the kernel. I<struct foo\\ *> means the kernel outputs the argument. If "
9179 "the kernel uses the argument for both input and output, this is marked with "
9184 #: build/C/man2/ioctl_list.2:53
9186 "Some ioctls take more arguments or return more values than a single "
9187 "structure. These are marked I<//\\ MORE> and documented further in a "
9192 #: build/C/man2/ioctl_list.2:55
9193 msgid "This list is very incomplete."
9197 #: build/C/man2/ioctl_list.2:55
9199 msgid "ioctl structure"
9202 #. added two sections - aeb
9204 #: build/C/man2/ioctl_list.2:60
9206 "Ioctl command values are 32-bit constants. In principle these constants are "
9207 "completely arbitrary, but people have tried to build some structure into "
9212 #: build/C/man2/ioctl_list.2:79
9214 "The old Linux situation was that of mostly 16-bit constants, where the last "
9215 "byte is a serial number, and the preceding byte(s) give a type indicating "
9216 "the driver. Sometimes the major number was used: 0x03 for the B<HDIO_*> "
9217 "ioctls, 0x06 for the B<LP*> ioctls. And sometimes one or more ASCII letters "
9218 "were used. For example, B<TCGETS> has value 0x00005401, with 0x54 = "
9219 "\\(aqT\\(aq indicating the terminal driver, and B<CYGETTIMEOUT> has value "
9220 "0x00435906, with 0x43 0x59 = \\(aqC\\(aq \\(aqY\\(aq indicating the cyclades "
9225 #: build/C/man2/ioctl_list.2:87
9227 "Later (0.98p5) some more information was built into the number. One has 2 "
9228 "direction bits (00: none, 01: write, 10: read, 11: read/write) followed by "
9229 "14 size bits (giving the size of the argument), followed by an 8-bit type "
9230 "(collecting the ioctls in groups for a common purpose or a common driver), "
9231 "and an 8-bit serial number."
9235 #: build/C/man2/ioctl_list.2:98
9237 "The macros describing this structure live in I<E<lt>asm/ioctl.hE<gt>> and "
9238 "are B<_IO(type,nr)> and B<{_IOR,_IOW,_IOWR}(type,nr,size)>. They use "
9239 "I<sizeof(size)> so that size is a misnomer here: this third argument is a "
9244 #: build/C/man2/ioctl_list.2:103
9246 "Note that the size bits are very unreliable: in lots of cases they are "
9247 "wrong, either because of buggy macros using I<sizeof(sizeof(struct))>, or "
9248 "because of legacy values."
9252 #: build/C/man2/ioctl_list.2:107
9254 "Thus, it seems that the new structure only gave disadvantages: it does not "
9255 "help in checking, but it causes varying values for the various "
9260 #: build/C/man2/ioctl_list.2:113
9262 "Decent ioctls return 0 on success and -1 on error, while any output value is "
9263 "stored via the argument. However, quite a few ioctls in fact return an "
9264 "output value. This is not yet indicated below."
9268 #: build/C/man2/ioctl_list.2:115
9269 msgid "// Main table."
9273 #: build/C/man2/ioctl_list.2:117
9274 msgid "// E<lt>include/asm-i386/socket.hE<gt>"
9278 #: build/C/man2/ioctl_list.2:119
9280 msgid "0x00008901\tFIOSETOWN\tconst int *\n"
9284 #: build/C/man2/ioctl_list.2:120
9286 msgid "0x00008902\tSIOCSPGRP\tconst int *\n"
9290 #: build/C/man2/ioctl_list.2:121
9292 msgid "0x00008903\tFIOGETOWN\tint *\n"
9296 #: build/C/man2/ioctl_list.2:122
9298 msgid "0x00008904\tSIOCGPGRP\tint *\n"
9302 #: build/C/man2/ioctl_list.2:123
9304 msgid "0x00008905\tSIOCATMAR\tint *\n"
9308 #: build/C/man2/ioctl_list.2:124
9310 msgid "0x00008906\tSIOCGSTAMP\ttimeval *\n"
9314 #: build/C/man2/ioctl_list.2:128
9315 msgid "// E<lt>include/asm-i386/termios.hE<gt>"
9319 #: build/C/man2/ioctl_list.2:130
9321 msgid "0x00005401\tTCGETS\tstruct termios *\n"
9325 #: build/C/man2/ioctl_list.2:131
9327 msgid "0x00005402\tTCSETS\tconst struct termios *\n"
9331 #: build/C/man2/ioctl_list.2:132
9333 msgid "0x00005403\tTCSETSW\tconst struct termios *\n"
9337 #: build/C/man2/ioctl_list.2:133
9339 msgid "0x00005404\tTCSETSF\tconst struct termios *\n"
9343 #: build/C/man2/ioctl_list.2:134
9345 msgid "0x00005405\tTCGETA\tstruct termio *\n"
9349 #: build/C/man2/ioctl_list.2:135
9351 msgid "0x00005406\tTCSETA\tconst struct termio *\n"
9355 #: build/C/man2/ioctl_list.2:136
9357 msgid "0x00005407\tTCSETAW\tconst struct termio *\n"
9361 #: build/C/man2/ioctl_list.2:137
9363 msgid "0x00005408\tTCSETAF\tconst struct termio *\n"
9367 #: build/C/man2/ioctl_list.2:138
9369 msgid "0x00005409\tTCSBRK\tint\n"
9373 #: build/C/man2/ioctl_list.2:139
9375 msgid "0x0000540A\tTCXONC\tint\n"
9379 #: build/C/man2/ioctl_list.2:140
9381 msgid "0x0000540B\tTCFLSH\tint\n"
9385 #: build/C/man2/ioctl_list.2:141
9387 msgid "0x0000540C\tTIOCEXCL\tvoid\n"
9391 #: build/C/man2/ioctl_list.2:142
9393 msgid "0x0000540D\tTIOCNXCL\tvoid\n"
9397 #: build/C/man2/ioctl_list.2:143
9399 msgid "0x0000540E\tTIOCSCTTY\tint\n"
9403 #: build/C/man2/ioctl_list.2:144
9405 msgid "0x0000540F\tTIOCGPGRP\tpid_t *\n"
9409 #: build/C/man2/ioctl_list.2:145
9411 msgid "0x00005410\tTIOCSPGRP\tconst pid_t *\n"
9415 #: build/C/man2/ioctl_list.2:146
9417 msgid "0x00005411\tTIOCOUTQ\tint *\n"
9421 #: build/C/man2/ioctl_list.2:147
9423 msgid "0x00005412\tTIOCSTI\tconst char *\n"
9427 #: build/C/man2/ioctl_list.2:148
9429 msgid "0x00005413\tTIOCGWINSZ\tstruct winsize *\n"
9433 #: build/C/man2/ioctl_list.2:149
9435 msgid "0x00005414\tTIOCSWINSZ\tconst struct winsize *\n"
9439 #: build/C/man2/ioctl_list.2:150
9441 msgid "0x00005415\tTIOCMGET\tint *\n"
9445 #: build/C/man2/ioctl_list.2:151
9447 msgid "0x00005416\tTIOCMBIS\tconst int *\n"
9451 #: build/C/man2/ioctl_list.2:152
9453 msgid "0x00005417\tTIOCMBIC\tconst int *\n"
9457 #: build/C/man2/ioctl_list.2:153
9459 msgid "0x00005418\tTIOCMSET\tconst int *\n"
9463 #: build/C/man2/ioctl_list.2:154
9465 msgid "0x00005419\tTIOCGSOFTCAR\tint *\n"
9469 #: build/C/man2/ioctl_list.2:155
9471 msgid "0x0000541A\tTIOCSSOFTCAR\tconst int *\n"
9475 #: build/C/man2/ioctl_list.2:156
9477 msgid "0x0000541B\tFIONREAD\tint *\n"
9481 #: build/C/man2/ioctl_list.2:157
9483 msgid "0x0000541B\tTIOCINQ\tint *\n"
9487 #: build/C/man2/ioctl_list.2:158
9489 msgid "0x0000541C\tTIOCLINUX\tconst char *\t// MORE\n"
9493 #: build/C/man2/ioctl_list.2:159
9495 msgid "0x0000541D\tTIOCCONS\tvoid\n"
9499 #: build/C/man2/ioctl_list.2:160
9501 msgid "0x0000541E\tTIOCGSERIAL\tstruct serial_struct *\n"
9505 #: build/C/man2/ioctl_list.2:161
9507 msgid "0x0000541F\tTIOCSSERIAL\tconst struct serial_struct *\n"
9511 #: build/C/man2/ioctl_list.2:162
9513 msgid "0x00005420\tTIOCPKT\tconst int *\n"
9517 #: build/C/man2/ioctl_list.2:163
9519 msgid "0x00005421\tFIONBIO\tconst int *\n"
9523 #: build/C/man2/ioctl_list.2:164
9525 msgid "0x00005422\tTIOCNOTTY\tvoid\n"
9529 #: build/C/man2/ioctl_list.2:165
9531 msgid "0x00005423\tTIOCSETD\tconst int *\n"
9535 #: build/C/man2/ioctl_list.2:166
9537 msgid "0x00005424\tTIOCGETD\tint *\n"
9541 #: build/C/man2/ioctl_list.2:167
9543 msgid "0x00005425\tTCSBRKP\tint\n"
9547 #: build/C/man2/ioctl_list.2:168
9549 msgid "0x00005426\tTIOCTTYGSTRUCT\tstruct tty_struct *\n"
9553 #: build/C/man2/ioctl_list.2:169
9555 msgid "0x00005450\tFIONCLEX\tvoid\n"
9559 #: build/C/man2/ioctl_list.2:170
9561 msgid "0x00005451\tFIOCLEX\tvoid\n"
9565 #: build/C/man2/ioctl_list.2:171
9567 msgid "0x00005452\tFIOASYNC\tconst int *\n"
9571 #: build/C/man2/ioctl_list.2:172
9573 msgid "0x00005453\tTIOCSERCONFIG\tvoid\n"
9577 #: build/C/man2/ioctl_list.2:173
9579 msgid "0x00005454\tTIOCSERGWILD\tint *\n"
9583 #: build/C/man2/ioctl_list.2:174
9585 msgid "0x00005455\tTIOCSERSWILD\tconst int *\n"
9589 #: build/C/man2/ioctl_list.2:175
9591 msgid "0x00005456\tTIOCGLCKTRMIOS\tstruct termios *\n"
9595 #: build/C/man2/ioctl_list.2:176
9597 msgid "0x00005457\tTIOCSLCKTRMIOS\tconst struct termios *\n"
9601 #: build/C/man2/ioctl_list.2:177
9603 msgid "0x00005458\tTIOCSERGSTRUCT\tstruct async_struct *\n"
9607 #: build/C/man2/ioctl_list.2:178
9609 msgid "0x00005459\tTIOCSERGETLSR\tint *\n"
9613 #: build/C/man2/ioctl_list.2:185
9615 msgid "0x0000545A\tTIOCSERGETMULTI\tstruct serial_multiport_struct *\n"
9619 #: build/C/man2/ioctl_list.2:186
9621 msgid "0x0000545B\tTIOCSERSETMULTI\tconst struct serial_multiport_struct *\n"
9625 #: build/C/man2/ioctl_list.2:190
9626 msgid "// E<lt>include/linux/ax25.hE<gt>"
9630 #: build/C/man2/ioctl_list.2:192
9632 msgid "0x000089E0\tSIOCAX25GETUID\tconst struct sockaddr_ax25 *\n"
9636 #: build/C/man2/ioctl_list.2:193
9638 msgid "0x000089E1\tSIOCAX25ADDUID\tconst struct sockaddr_ax25 *\n"
9642 #: build/C/man2/ioctl_list.2:194
9644 msgid "0x000089E2\tSIOCAX25DELUID\tconst struct sockaddr_ax25 *\n"
9648 #: build/C/man2/ioctl_list.2:195
9650 msgid "0x000089E3\tSIOCAX25NOUID\tconst int *\n"
9654 #: build/C/man2/ioctl_list.2:196
9656 msgid "0x000089E4\tSIOCAX25DIGCTL\tconst int *\n"
9660 #: build/C/man2/ioctl_list.2:197
9662 msgid "0x000089E5\tSIOCAX25GETPARMS\tstruct ax25_parms_struct *\t// I-O\n"
9666 #: build/C/man2/ioctl_list.2:201
9668 msgid "0x000089E6\tSIOCAX25SETPARMS\tconst struct ax25_parms_struct *\n"
9672 #: build/C/man2/ioctl_list.2:205
9673 msgid "// E<lt>include/linux/cdk.hE<gt>"
9677 #: build/C/man2/ioctl_list.2:207
9679 msgid "0x00007314\tSTL_BINTR\tvoid\n"
9683 #: build/C/man2/ioctl_list.2:208
9685 msgid "0x00007315\tSTL_BSTART\tvoid\n"
9689 #: build/C/man2/ioctl_list.2:209
9691 msgid "0x00007316\tSTL_BSTOP\tvoid\n"
9695 #: build/C/man2/ioctl_list.2:210
9697 msgid "0x00007317\tSTL_BRESET\tvoid\n"
9701 #: build/C/man2/ioctl_list.2:214
9702 msgid "// E<lt>include/linux/cdrom.hE<gt>"
9706 #: build/C/man2/ioctl_list.2:216
9708 msgid "0x00005301\tCDROMPAUSE\tvoid\n"
9712 #: build/C/man2/ioctl_list.2:217
9714 msgid "0x00005302\tCDROMRESUME\tvoid\n"
9718 #: build/C/man2/ioctl_list.2:218
9720 msgid "0x00005303\tCDROMPLAYMSF\tconst struct cdrom_msf *\n"
9724 #: build/C/man2/ioctl_list.2:219
9726 msgid "0x00005304\tCDROMPLAYTRKIND\tconst struct cdrom_ti *\n"
9730 #: build/C/man2/ioctl_list.2:220
9732 msgid "0x00005305\tCDROMREADTOCHDR\tstruct cdrom_tochdr *\n"
9736 #: build/C/man2/ioctl_list.2:224
9738 msgid "0x00005306\tCDROMREADTOCENTRY\tstruct cdrom_tocentry *\t// I-O\n"
9742 #: build/C/man2/ioctl_list.2:228
9744 msgid "0x00005307\tCDROMSTOP\tvoid\n"
9748 #: build/C/man2/ioctl_list.2:229
9750 msgid "0x00005308\tCDROMSTART\tvoid\n"
9754 #: build/C/man2/ioctl_list.2:230
9756 msgid "0x00005309\tCDROMEJECT\tvoid\n"
9760 #: build/C/man2/ioctl_list.2:231
9762 msgid "0x0000530A\tCDROMVOLCTRL\tconst struct cdrom_volctrl *\n"
9766 #: build/C/man2/ioctl_list.2:232
9768 msgid "0x0000530B\tCDROMSUBCHNL\tstruct cdrom_subchnl *\t// I-O\n"
9772 #: build/C/man2/ioctl_list.2:233
9774 msgid "0x0000530C\tCDROMREADMODE2\tconst struct cdrom_msf *\t// MORE\n"
9778 #: build/C/man2/ioctl_list.2:234
9780 msgid "0x0000530D\tCDROMREADMODE1\tconst struct cdrom_msf *\t// MORE\n"
9784 #: build/C/man2/ioctl_list.2:235
9786 msgid "0x0000530E\tCDROMREADAUDIO\tconst struct cdrom_read_audio *\t// MORE\n"
9790 #: build/C/man2/ioctl_list.2:236
9792 msgid "0x0000530F\tCDROMEJECT_SW\tint\n"
9796 #: build/C/man2/ioctl_list.2:240
9798 msgid "0x00005310\tCDROMMULTISESSION\tstruct cdrom_multisession *\t// I-O\n"
9802 #: build/C/man2/ioctl_list.2:244
9804 msgid "0x00005311\tCDROM_GET_UPC\tstruct { char [8]; } *\n"
9808 #: build/C/man2/ioctl_list.2:245
9810 msgid "0x00005312\tCDROMRESET\tvoid\n"
9814 #: build/C/man2/ioctl_list.2:246
9816 msgid "0x00005313\tCDROMVOLREAD\tstruct cdrom_volctrl *\n"
9820 #: build/C/man2/ioctl_list.2:247
9822 msgid "0x00005314\tCDROMREADRAW\tconst struct cdrom_msf *\t// MORE\n"
9826 #: build/C/man2/ioctl_list.2:248
9828 msgid "0x00005315\tCDROMREADCOOKED\tconst struct cdrom_msf *\t// MORE\n"
9832 #: build/C/man2/ioctl_list.2:249
9834 msgid "0x00005316\tCDROMSEEK\tconst struct cdrom_msf *\n"
9838 #: build/C/man2/ioctl_list.2:253
9839 msgid "// E<lt>include/linux/cm206.hE<gt>"
9843 #: build/C/man2/ioctl_list.2:255
9845 msgid "0x00002000\tCM206CTL_GET_STAT\tint\n"
9849 #: build/C/man2/ioctl_list.2:256
9851 msgid "0x00002001\tCM206CTL_GET_LAST_STAT\tint\n"
9855 #: build/C/man2/ioctl_list.2:260
9856 msgid "// E<lt>include/linux/cyclades.hE<gt>"
9860 #: build/C/man2/ioctl_list.2:262
9862 msgid "0x00435901\tCYGETMON\tstruct cyclades_monitor *\n"
9866 #: build/C/man2/ioctl_list.2:263
9868 msgid "0x00435902\tCYGETTHRESH\tint *\n"
9872 #: build/C/man2/ioctl_list.2:264
9874 msgid "0x00435903\tCYSETTHRESH\tint\n"
9878 #: build/C/man2/ioctl_list.2:265
9880 msgid "0x00435904\tCYGETDEFTHRESH\tint *\n"
9884 #: build/C/man2/ioctl_list.2:266
9886 msgid "0x00435905\tCYSETDEFTHRESH\tint\n"
9890 #: build/C/man2/ioctl_list.2:267
9892 msgid "0x00435906\tCYGETTIMEOUT\tint *\n"
9896 #: build/C/man2/ioctl_list.2:268
9898 msgid "0x00435907\tCYSETTIMEOUT\tint\n"
9902 #: build/C/man2/ioctl_list.2:269
9904 msgid "0x00435908\tCYGETDEFTIMEOUT\tint *\n"
9908 #: build/C/man2/ioctl_list.2:270
9910 msgid "0x00435909\tCYSETDEFTIMEOUT\tint\n"
9914 #: build/C/man2/ioctl_list.2:274
9915 msgid "// E<lt>include/linux/ext2_fs.hE<gt>"
9919 #: build/C/man2/ioctl_list.2:276
9921 msgid "0x80046601\tEXT2_IOC_GETFLAGS\tint *\n"
9925 #: build/C/man2/ioctl_list.2:277
9927 msgid "0x40046602\tEXT2_IOC_SETFLAGS\tconst int *\n"
9931 #: build/C/man2/ioctl_list.2:278
9933 msgid "0x80047601\tEXT2_IOC_GETVERSION\tint *\n"
9937 #: build/C/man2/ioctl_list.2:279
9939 msgid "0x40047602\tEXT2_IOC_SETVERSION\tconst int *\n"
9943 #: build/C/man2/ioctl_list.2:283
9944 msgid "// E<lt>include/linux/fd.hE<gt>"
9948 #: build/C/man2/ioctl_list.2:285
9950 msgid "0x00000000\tFDCLRPRM\tvoid\n"
9954 #: build/C/man2/ioctl_list.2:286
9956 msgid "0x00000001\tFDSETPRM\tconst struct floppy_struct *\n"
9960 #: build/C/man2/ioctl_list.2:287
9962 msgid "0x00000002\tFDDEFPRM\tconst struct floppy_struct *\n"
9966 #: build/C/man2/ioctl_list.2:288
9968 msgid "0x00000003\tFDGETPRM\tstruct floppy_struct *\n"
9972 #: build/C/man2/ioctl_list.2:289
9974 msgid "0x00000004\tFDMSGON\tvoid\n"
9978 #: build/C/man2/ioctl_list.2:290
9980 msgid "0x00000005\tFDMSGOFF\tvoid\n"
9984 #: build/C/man2/ioctl_list.2:291
9986 msgid "0x00000006\tFDFMTBEG\tvoid\n"
9990 #: build/C/man2/ioctl_list.2:292
9992 msgid "0x00000007\tFDFMTTRK\tconst struct format_descr *\n"
9996 #: build/C/man2/ioctl_list.2:293
9998 msgid "0x00000008\tFDFMTEND\tvoid\n"
10002 #: build/C/man2/ioctl_list.2:294
10004 msgid "0x0000000A\tFDSETEMSGTRESH\tint\n"
10008 #: build/C/man2/ioctl_list.2:295
10010 msgid "0x0000000B\tFDFLUSH\tvoid\n"
10014 #: build/C/man2/ioctl_list.2:296
10016 msgid "0x0000000C\tFDSETMAXERRS\tconst struct floppy_max_errors *\n"
10020 #: build/C/man2/ioctl_list.2:297
10022 msgid "0x0000000E\tFDGETMAXERRS\tstruct floppy_max_errors *\n"
10026 #: build/C/man2/ioctl_list.2:298
10028 msgid "0x00000010\tFDGETDRVTYP\tstruct { char [16]; } *\n"
10032 #: build/C/man2/ioctl_list.2:299
10034 msgid "0x00000014\tFDSETDRVPRM\tconst struct floppy_drive_params *\n"
10038 #: build/C/man2/ioctl_list.2:300
10040 msgid "0x00000015\tFDGETDRVPRM\tstruct floppy_drive_params *\n"
10044 #: build/C/man2/ioctl_list.2:301
10046 msgid "0x00000016\tFDGETDRVSTAT\tstruct floppy_drive_struct *\n"
10050 #: build/C/man2/ioctl_list.2:302
10052 msgid "0x00000017\tFDPOLLDRVSTAT\tstruct floppy_drive_struct *\n"
10056 #: build/C/man2/ioctl_list.2:303
10058 msgid "0x00000018\tFDRESET\tint\n"
10062 #: build/C/man2/ioctl_list.2:304
10064 msgid "0x00000019\tFDGETFDCSTAT\tstruct floppy_fdc_state *\n"
10068 #: build/C/man2/ioctl_list.2:305
10070 msgid "0x0000001B\tFDWERRORCLR\tvoid\n"
10074 #: build/C/man2/ioctl_list.2:306
10076 msgid "0x0000001C\tFDWERRORGET\tstruct floppy_write_errors *\n"
10080 #: build/C/man2/ioctl_list.2:310
10082 msgid "0x0000001E\tFDRAWCMD\tstruct floppy_raw_cmd *\t// MORE // I-O\n"
10086 #: build/C/man2/ioctl_list.2:311
10088 msgid "0x00000028\tFDTWADDLE\tvoid\n"
10091 #. type: Plain text
10092 #: build/C/man2/ioctl_list.2:315
10093 msgid "// E<lt>include/linux/fs.hE<gt>"
10097 #: build/C/man2/ioctl_list.2:317
10099 msgid "0x0000125D\tBLKROSET\tconst int *\n"
10103 #: build/C/man2/ioctl_list.2:318
10105 msgid "0x0000125E\tBLKROGET\tint *\n"
10109 #: build/C/man2/ioctl_list.2:319
10111 msgid "0x0000125F\tBLKRRPART\tvoid\n"
10115 #: build/C/man2/ioctl_list.2:320
10117 msgid "0x00001260\tBLKGETSIZE\tunsigned long *\n"
10121 #: build/C/man2/ioctl_list.2:321
10123 msgid "0x00001261\tBLKFLSBUF\tvoid\n"
10127 #: build/C/man2/ioctl_list.2:322
10129 msgid "0x00001262\tBLKRASET\tint\n"
10133 #: build/C/man2/ioctl_list.2:323
10135 msgid "0x00001263\tBLKRAGET\tint *\n"
10139 #: build/C/man2/ioctl_list.2:324
10141 msgid "0x00000001\tFIBMAP\tint *\t// I-O\n"
10145 #: build/C/man2/ioctl_list.2:325
10147 msgid "0x00000002\tFIGETBSZ\tint *\n"
10150 #. type: Plain text
10151 #: build/C/man2/ioctl_list.2:329
10152 msgid "// E<lt>include/linux/hdreg.hE<gt>"
10156 #: build/C/man2/ioctl_list.2:331
10158 msgid "0x00000301\tHDIO_GETGEO\tstruct hd_geometry *\n"
10162 #: build/C/man2/ioctl_list.2:332
10164 msgid "0x00000302\tHDIO_GET_UNMASKINTR\tint *\n"
10168 #: build/C/man2/ioctl_list.2:333
10170 msgid "0x00000304\tHDIO_GET_MULTCOUNT\tint *\n"
10174 #: build/C/man2/ioctl_list.2:334
10176 msgid "0x00000307\tHDIO_GET_IDENTITY\tstruct hd_driveid *\n"
10180 #: build/C/man2/ioctl_list.2:335
10182 msgid "0x00000308\tHDIO_GET_KEEPSETTINGS\tint *\n"
10186 #: build/C/man2/ioctl_list.2:336
10188 msgid "0x00000309\tHDIO_GET_CHIPSET\tint *\n"
10192 #: build/C/man2/ioctl_list.2:337
10194 msgid "0x0000030A\tHDIO_GET_NOWERR\tint *\n"
10198 #: build/C/man2/ioctl_list.2:338
10200 msgid "0x0000030B\tHDIO_GET_DMA\tint *\n"
10204 #: build/C/man2/ioctl_list.2:339
10206 msgid "0x0000031F\tHDIO_DRIVE_CMD\tint *\t// I-O\n"
10210 #: build/C/man2/ioctl_list.2:340
10212 msgid "0x00000321\tHDIO_SET_MULTCOUNT\tint\n"
10216 #: build/C/man2/ioctl_list.2:341
10218 msgid "0x00000322\tHDIO_SET_UNMASKINTR\tint\n"
10222 #: build/C/man2/ioctl_list.2:342
10224 msgid "0x00000323\tHDIO_SET_KEEPSETTINGS\tint\n"
10228 #: build/C/man2/ioctl_list.2:343
10230 msgid "0x00000324\tHDIO_SET_CHIPSET\tint\n"
10234 #: build/C/man2/ioctl_list.2:344
10236 msgid "0x00000325\tHDIO_SET_NOWERR\tint\n"
10240 #: build/C/man2/ioctl_list.2:345
10242 msgid "0x00000326\tHDIO_SET_DMA\tint\n"
10245 #. type: Plain text
10246 #: build/C/man2/ioctl_list.2:349
10247 msgid "// E<lt>include/linux/if_eql.hE<gt>"
10251 #: build/C/man2/ioctl_list.2:351
10253 msgid "0x000089F0\tEQL_ENSLAVE\tstruct ifreq *\t// MORE // I-O\n"
10257 #: build/C/man2/ioctl_list.2:352
10259 msgid "0x000089F1\tEQL_EMANCIPATE\tstruct ifreq *\t// MORE // I-O\n"
10263 #: build/C/man2/ioctl_list.2:353
10265 msgid "0x000089F2\tEQL_GETSLAVECFG\tstruct ifreq *\t// MORE // I-O\n"
10269 #: build/C/man2/ioctl_list.2:354
10271 msgid "0x000089F3\tEQL_SETSLAVECFG\tstruct ifreq *\t// MORE // I-O\n"
10275 #: build/C/man2/ioctl_list.2:355
10277 msgid "0x000089F4\tEQL_GETMASTRCFG\tstruct ifreq *\t// MORE // I-O\n"
10281 #: build/C/man2/ioctl_list.2:356
10283 msgid "0x000089F5\tEQL_SETMASTRCFG\tstruct ifreq *\t// MORE // I-O\n"
10286 #. type: Plain text
10287 #: build/C/man2/ioctl_list.2:360
10288 msgid "// E<lt>include/linux/if_plip.hE<gt>"
10292 #: build/C/man2/ioctl_list.2:362
10294 msgid "0x000089F0\tSIOCDEVPLIP\tstruct ifreq *\t// I-O\n"
10297 #. type: Plain text
10298 #: build/C/man2/ioctl_list.2:366
10299 msgid "// E<lt>include/linux/if_ppp.hE<gt>"
10303 #: build/C/man2/ioctl_list.2:368
10305 msgid "0x00005490\tPPPIOCGFLAGS\tint *\n"
10309 #: build/C/man2/ioctl_list.2:369
10311 msgid "0x00005491\tPPPIOCSFLAGS\tconst int *\n"
10315 #: build/C/man2/ioctl_list.2:370
10317 msgid "0x00005492\tPPPIOCGASYNCMAP\tint *\n"
10321 #: build/C/man2/ioctl_list.2:371
10323 msgid "0x00005493\tPPPIOCSASYNCMAP\tconst int *\n"
10327 #: build/C/man2/ioctl_list.2:372
10329 msgid "0x00005494\tPPPIOCGUNIT\tint *\n"
10333 #: build/C/man2/ioctl_list.2:373
10335 msgid "0x00005495\tPPPIOCSINPSIG\tconst int *\n"
10339 #: build/C/man2/ioctl_list.2:374
10341 msgid "0x00005497\tPPPIOCSDEBUG\tconst int *\n"
10345 #: build/C/man2/ioctl_list.2:375
10347 msgid "0x00005498\tPPPIOCGDEBUG\tint *\n"
10351 #: build/C/man2/ioctl_list.2:376
10353 msgid "0x00005499\tPPPIOCGSTAT\tstruct ppp_stats *\n"
10357 #: build/C/man2/ioctl_list.2:377
10359 msgid "0x0000549A\tPPPIOCGTIME\tstruct ppp_ddinfo *\n"
10363 #: build/C/man2/ioctl_list.2:378
10365 msgid "0x0000549B\tPPPIOCGXASYNCMAP\tstruct { int [8]; } *\n"
10369 #: build/C/man2/ioctl_list.2:379
10371 msgid "0x0000549C\tPPPIOCSXASYNCMAP\tconst struct { int [8]; } *\n"
10375 #: build/C/man2/ioctl_list.2:380
10377 msgid "0x0000549D\tPPPIOCSMRU\tconst int *\n"
10381 #: build/C/man2/ioctl_list.2:381
10383 msgid "0x0000549E\tPPPIOCRASYNCMAP\tconst int *\n"
10387 #: build/C/man2/ioctl_list.2:382
10389 msgid "0x0000549F\tPPPIOCSMAXCID\tconst int *\n"
10392 #. type: Plain text
10393 #: build/C/man2/ioctl_list.2:386
10394 msgid "// E<lt>include/linux/ipx.hE<gt>"
10398 #: build/C/man2/ioctl_list.2:388
10400 msgid "0x000089E0\tSIOCAIPXITFCRT\tconst char *\n"
10404 #: build/C/man2/ioctl_list.2:389
10406 msgid "0x000089E1\tSIOCAIPXPRISLT\tconst char *\n"
10410 #: build/C/man2/ioctl_list.2:390
10412 msgid "0x000089E2\tSIOCIPXCFGDATA\tstruct ipx_config_data *\n"
10415 #. type: Plain text
10416 #: build/C/man2/ioctl_list.2:394
10417 msgid "// E<lt>include/linux/kd.hE<gt>"
10421 #: build/C/man2/ioctl_list.2:396
10423 msgid "0x00004B60\tGIO_FONT\tstruct { char [8192]; } *\n"
10427 #: build/C/man2/ioctl_list.2:397
10429 msgid "0x00004B61\tPIO_FONT\tconst struct { char [8192]; } *\n"
10433 #: build/C/man2/ioctl_list.2:401
10435 msgid "0x00004B6B\tGIO_FONTX\tstruct console_font_desc *\t// MORE // I-O\n"
10439 #: build/C/man2/ioctl_list.2:402
10441 msgid "0x00004B6C\tPIO_FONTX\tconst struct console_font_desc *\t//MORE\n"
10445 #: build/C/man2/ioctl_list.2:406
10447 msgid "0x00004B70\tGIO_CMAP\tstruct { char [48]; } *\n"
10451 #: build/C/man2/ioctl_list.2:407
10453 msgid "0x00004B71\tPIO_CMAP\tconst struct { char [48]; }\n"
10457 #: build/C/man2/ioctl_list.2:411
10459 msgid "0x00004B2F\tKIOCSOUND\tint\n"
10463 #: build/C/man2/ioctl_list.2:412
10465 msgid "0x00004B30\tKDMKTONE\tint\n"
10469 #: build/C/man2/ioctl_list.2:413
10471 msgid "0x00004B31\tKDGETLED\tchar *\n"
10475 #: build/C/man2/ioctl_list.2:414
10477 msgid "0x00004B32\tKDSETLED\tint\n"
10481 #: build/C/man2/ioctl_list.2:415
10483 msgid "0x00004B33\tKDGKBTYPE\tchar *\n"
10487 #: build/C/man2/ioctl_list.2:416
10489 msgid "0x00004B34\tKDADDIO\tint\t// MORE\n"
10493 #: build/C/man2/ioctl_list.2:417
10495 msgid "0x00004B35\tKDDELIO\tint\t// MORE\n"
10499 #: build/C/man2/ioctl_list.2:418
10501 msgid "0x00004B36\tKDENABIO\tvoid\t// MORE\n"
10505 #: build/C/man2/ioctl_list.2:419
10507 msgid "0x00004B37\tKDDISABIO\tvoid\t// MORE\n"
10511 #: build/C/man2/ioctl_list.2:420
10513 msgid "0x00004B3A\tKDSETMODE\tint\n"
10517 #: build/C/man2/ioctl_list.2:421
10519 msgid "0x00004B3B\tKDGETMODE\tint *\n"
10523 #: build/C/man2/ioctl_list.2:422
10525 msgid "0x00004B3C\tKDMAPDISP\tvoid\t// MORE\n"
10529 #: build/C/man2/ioctl_list.2:423
10531 msgid "0x00004B3D\tKDUNMAPDISP\tvoid\t// MORE\n"
10535 #: build/C/man2/ioctl_list.2:424
10537 msgid "0x00004B40\tGIO_SCRNMAP\tstruct { char [E_TABSZ]; } *\n"
10541 #: build/C/man2/ioctl_list.2:428
10543 msgid "0x00004B41\tPIO_SCRNMAP\tconst struct { char [E_TABSZ]; } *\n"
10547 #: build/C/man2/ioctl_list.2:429
10549 msgid "0x00004B69\tGIO_UNISCRNMAP\tstruct { short [E_TABSZ]; } *\n"
10553 #: build/C/man2/ioctl_list.2:430
10555 msgid "0x00004B6A\tPIO_UNISCRNMAP\tconst struct { short [E_TABSZ]; } *\n"
10559 #: build/C/man2/ioctl_list.2:434
10561 msgid "0x00004B66\tGIO_UNIMAP\tstruct unimapdesc *\t// MORE // I-O\n"
10565 #: build/C/man2/ioctl_list.2:435
10567 msgid "0x00004B67\tPIO_UNIMAP\tconst struct unimapdesc *\t// MORE\n"
10571 #: build/C/man2/ioctl_list.2:436
10573 msgid "0x00004B68\tPIO_UNIMAPCLR\tconst struct unimapinit *\n"
10577 #: build/C/man2/ioctl_list.2:437
10579 msgid "0x00004B44\tKDGKBMODE\tint *\n"
10583 #: build/C/man2/ioctl_list.2:438
10585 msgid "0x00004B45\tKDSKBMODE\tint\n"
10589 #: build/C/man2/ioctl_list.2:439
10591 msgid "0x00004B62\tKDGKBMETA\tint *\n"
10595 #: build/C/man2/ioctl_list.2:440
10597 msgid "0x00004B63\tKDSKBMETA\tint\n"
10601 #: build/C/man2/ioctl_list.2:441
10603 msgid "0x00004B64\tKDGKBLED\tint *\n"
10607 #: build/C/man2/ioctl_list.2:442
10609 msgid "0x00004B65\tKDSKBLED\tint\n"
10613 #: build/C/man2/ioctl_list.2:443
10615 msgid "0x00004B46\tKDGKBENT\tstruct kbentry *\t// I-O\n"
10619 #: build/C/man2/ioctl_list.2:444
10621 msgid "0x00004B47\tKDSKBENT\tconst struct kbentry *\n"
10625 #: build/C/man2/ioctl_list.2:445
10627 msgid "0x00004B48\tKDGKBSENT\tstruct kbsentry *\t// I-O\n"
10631 #: build/C/man2/ioctl_list.2:446
10633 msgid "0x00004B49\tKDSKBSENT\tconst struct kbsentry *\n"
10637 #: build/C/man2/ioctl_list.2:447
10639 msgid "0x00004B4A\tKDGKBDIACR\tstruct kbdiacrs *\n"
10643 #: build/C/man2/ioctl_list.2:448
10645 msgid "0x00004B4B\tKDSKBDIACR\tconst struct kbdiacrs *\n"
10649 #: build/C/man2/ioctl_list.2:449
10651 msgid "0x00004B4C\tKDGETKEYCODE\tstruct kbkeycode *\t// I-O\n"
10655 #: build/C/man2/ioctl_list.2:450
10657 msgid "0x00004B4D\tKDSETKEYCODE\tconst struct kbkeycode *\n"
10661 #: build/C/man2/ioctl_list.2:451
10663 msgid "0x00004B4E\tKDSIGACCEPT\tint\n"
10666 #. type: Plain text
10667 #: build/C/man2/ioctl_list.2:455
10668 msgid "// E<lt>include/linux/lp.hE<gt>"
10672 #: build/C/man2/ioctl_list.2:457
10674 msgid "0x00000601\tLPCHAR\tint\n"
10678 #: build/C/man2/ioctl_list.2:458
10680 msgid "0x00000602\tLPTIME\tint\n"
10684 #: build/C/man2/ioctl_list.2:459
10686 msgid "0x00000604\tLPABORT\tint\n"
10690 #: build/C/man2/ioctl_list.2:460
10692 msgid "0x00000605\tLPSETIRQ\tint\n"
10696 #: build/C/man2/ioctl_list.2:461
10698 msgid "0x00000606\tLPGETIRQ\tint *\n"
10702 #: build/C/man2/ioctl_list.2:462
10704 msgid "0x00000608\tLPWAIT\tint\n"
10708 #: build/C/man2/ioctl_list.2:463
10710 msgid "0x00000609\tLPCAREFUL\tint\n"
10714 #: build/C/man2/ioctl_list.2:464
10716 msgid "0x0000060A\tLPABORTOPEN\tint\n"
10720 #: build/C/man2/ioctl_list.2:465
10722 msgid "0x0000060B\tLPGETSTATUS\tint *\n"
10726 #: build/C/man2/ioctl_list.2:466
10728 msgid "0x0000060C\tLPRESET\tvoid\n"
10732 #: build/C/man2/ioctl_list.2:467
10734 msgid "0x0000060D\tLPGETSTATS\tstruct lp_stats *\n"
10737 #. type: Plain text
10738 #: build/C/man2/ioctl_list.2:471
10739 msgid "// E<lt>include/linux/mroute.hE<gt>"
10743 #: build/C/man2/ioctl_list.2:473
10745 msgid "0x000089E0\tSIOCGETVIFCNT\tstruct sioc_vif_req *\t// I-O\n"
10749 #: build/C/man2/ioctl_list.2:474
10751 msgid "0x000089E1\tSIOCGETSGCNT\tstruct sioc_sg_req *\t// I-O\n"
10754 #. type: Plain text
10755 #: build/C/man2/ioctl_list.2:478
10756 msgid "// E<lt>include/linux/msdos_fs.hE<gt>"
10760 #: build/C/man2/ioctl_list.2:480
10762 msgid "0x82307201\tVFAT_IOCTL_READDIR_BOTH\tstruct dirent [2]\n"
10766 #: build/C/man2/ioctl_list.2:481
10768 msgid "0x82307202\tVFAT_IOCTL_READDIR_SHORT\tstruct dirent [2]\n"
10772 #: build/C/man2/ioctl_list.2:482
10774 msgid "0x80047210\tFAT_IOCTL_GET_ATTRIBUTES\t__u32 *\n"
10778 #: build/C/man2/ioctl_list.2:483
10780 msgid "0x40047211\tFAT_IOCTL_SET_ATTRIBUTES\tconst __u32 *\n"
10783 #. type: Plain text
10784 #: build/C/man2/ioctl_list.2:487
10785 msgid "// E<lt>include/linux/mtio.hE<gt>"
10789 #: build/C/man2/ioctl_list.2:489
10791 msgid "0x40086D01\tMTIOCTOP\tconst struct mtop *\n"
10795 #: build/C/man2/ioctl_list.2:490
10797 msgid "0x801C6D02\tMTIOCGET\tstruct mtget *\n"
10801 #: build/C/man2/ioctl_list.2:491
10803 msgid "0x80046D03\tMTIOCPOS\tstruct mtpos *\n"
10807 #: build/C/man2/ioctl_list.2:492
10809 msgid "0x80206D04\tMTIOCGETCONFIG\tstruct mtconfiginfo *\n"
10813 #: build/C/man2/ioctl_list.2:493
10815 msgid "0x40206D05\tMTIOCSETCONFIG\tconst struct mtconfiginfo *\n"
10818 #. type: Plain text
10819 #: build/C/man2/ioctl_list.2:497
10820 msgid "// E<lt>include/linux/netrom.hE<gt>"
10824 #: build/C/man2/ioctl_list.2:499
10826 msgid "0x000089E0\tSIOCNRGETPARMS\tstruct nr_parms_struct *\t// I-O\n"
10830 #: build/C/man2/ioctl_list.2:500
10832 msgid "0x000089E1\tSIOCNRSETPARMS\tconst struct nr_parms_struct *\n"
10836 #: build/C/man2/ioctl_list.2:501
10838 msgid "0x000089E2\tSIOCNRDECOBS\tvoid\n"
10842 #: build/C/man2/ioctl_list.2:502
10844 msgid "0x000089E3\tSIOCNRRTCTL\tconst int *\n"
10847 #. type: Plain text
10848 #: build/C/man2/ioctl_list.2:506
10849 msgid "// E<lt>include/linux/sbpcd.hE<gt>"
10853 #: build/C/man2/ioctl_list.2:508
10855 msgid "0x00009000\tDDIOCSDBG\tconst int *\n"
10859 #: build/C/man2/ioctl_list.2:509
10861 msgid "0x00005382\tCDROMAUDIOBUFSIZ\tint\n"
10864 #. type: Plain text
10865 #: build/C/man2/ioctl_list.2:513
10866 msgid "// E<lt>include/linux/scc.hE<gt>"
10870 #: build/C/man2/ioctl_list.2:515
10872 msgid "0x00005470\tTIOCSCCINI\tvoid\n"
10876 #: build/C/man2/ioctl_list.2:516
10878 msgid "0x00005471\tTIOCCHANINI\tconst struct scc_modem *\n"
10882 #: build/C/man2/ioctl_list.2:517
10884 msgid "0x00005472\tTIOCGKISS\tstruct ioctl_command *\t// I-O\n"
10888 #: build/C/man2/ioctl_list.2:518
10890 msgid "0x00005473\tTIOCSKISS\tconst struct ioctl_command *\n"
10894 #: build/C/man2/ioctl_list.2:519
10896 msgid "0x00005474\tTIOCSCCSTAT\tstruct scc_stat *\n"
10899 #. type: Plain text
10900 #: build/C/man2/ioctl_list.2:523
10901 msgid "// E<lt>include/linux/scsi.hE<gt>"
10905 #: build/C/man2/ioctl_list.2:525
10907 msgid "0x00005382\tSCSI_IOCTL_GET_IDLUN\tstruct { int [2]; } *\n"
10911 #: build/C/man2/ioctl_list.2:526
10913 msgid "0x00005383\tSCSI_IOCTL_TAGGED_ENABLE\tvoid\n"
10917 #: build/C/man2/ioctl_list.2:527
10919 msgid "0x00005384\tSCSI_IOCTL_TAGGED_DISABLE\tvoid\n"
10923 #: build/C/man2/ioctl_list.2:531
10925 msgid "0x00005385\tSCSI_IOCTL_PROBE_HOST\tconst int *\t// MORE\n"
10928 #. type: Plain text
10929 #: build/C/man2/ioctl_list.2:535
10930 msgid "// E<lt>include/linux/smb_fs.hE<gt>"
10934 #: build/C/man2/ioctl_list.2:537
10936 msgid "0x80027501\tSMB_IOC_GETMOUNTUID\tuid_t *\n"
10939 #. type: Plain text
10940 #: build/C/man2/ioctl_list.2:541
10941 msgid "// E<lt>include/linux/sockios.hE<gt>"
10945 #: build/C/man2/ioctl_list.2:543
10947 msgid "0x0000890B\tSIOCADDRT\tconst struct rtentry *\t// MORE\n"
10951 #: build/C/man2/ioctl_list.2:544
10953 msgid "0x0000890C\tSIOCDELRT\tconst struct rtentry *\t// MORE\n"
10957 #: build/C/man2/ioctl_list.2:545
10959 msgid "0x00008910\tSIOCGIFNAME\tchar []\n"
10963 #: build/C/man2/ioctl_list.2:546
10965 msgid "0x00008911\tSIOCSIFLINK\tvoid\n"
10969 #: build/C/man2/ioctl_list.2:547
10971 msgid "0x00008912\tSIOCGIFCONF\tstruct ifconf *\t// MORE // I-O\n"
10975 #: build/C/man2/ioctl_list.2:548
10977 msgid "0x00008913\tSIOCGIFFLAGS\tstruct ifreq *\t// I-O\n"
10981 #: build/C/man2/ioctl_list.2:549
10983 msgid "0x00008914\tSIOCSIFFLAGS\tconst struct ifreq *\n"
10987 #: build/C/man2/ioctl_list.2:550
10989 msgid "0x00008915\tSIOCGIFADDR\tstruct ifreq *\t// I-O\n"
10993 #: build/C/man2/ioctl_list.2:551
10995 msgid "0x00008916\tSIOCSIFADDR\tconst struct ifreq *\n"
10999 #: build/C/man2/ioctl_list.2:552
11001 msgid "0x00008917\tSIOCGIFDSTADDR\tstruct ifreq *\t// I-O\n"
11005 #: build/C/man2/ioctl_list.2:553
11007 msgid "0x00008918\tSIOCSIFDSTADDR\tconst struct ifreq *\n"
11011 #: build/C/man2/ioctl_list.2:554
11013 msgid "0x00008919\tSIOCGIFBRDADDR\tstruct ifreq *\t// I-O\n"
11017 #: build/C/man2/ioctl_list.2:555
11019 msgid "0x0000891A\tSIOCSIFBRDADDR\tconst struct ifreq *\n"
11023 #: build/C/man2/ioctl_list.2:556
11025 msgid "0x0000891B\tSIOCGIFNETMASK\tstruct ifreq *\t// I-O\n"
11029 #: build/C/man2/ioctl_list.2:557
11031 msgid "0x0000891C\tSIOCSIFNETMASK\tconst struct ifreq *\n"
11035 #: build/C/man2/ioctl_list.2:558
11037 msgid "0x0000891D\tSIOCGIFMETRIC\tstruct ifreq *\t// I-O\n"
11041 #: build/C/man2/ioctl_list.2:559
11043 msgid "0x0000891E\tSIOCSIFMETRIC\tconst struct ifreq *\n"
11047 #: build/C/man2/ioctl_list.2:560
11049 msgid "0x0000891F\tSIOCGIFMEM\tstruct ifreq *\t// I-O\n"
11053 #: build/C/man2/ioctl_list.2:561
11055 msgid "0x00008920\tSIOCSIFMEM\tconst struct ifreq *\n"
11059 #: build/C/man2/ioctl_list.2:562
11061 msgid "0x00008921\tSIOCGIFMTU\tstruct ifreq *\t// I-O\n"
11065 #: build/C/man2/ioctl_list.2:563
11067 msgid "0x00008922\tSIOCSIFMTU\tconst struct ifreq *\n"
11071 #: build/C/man2/ioctl_list.2:567
11073 msgid "0x00008923\tOLD_SIOCGIFHWADDR\tstruct ifreq *\t// I-O\n"
11077 #: build/C/man2/ioctl_list.2:568
11079 msgid "0x00008924\tSIOCSIFHWADDR\tconst struct ifreq *\t// MORE\n"
11083 #: build/C/man2/ioctl_list.2:569
11085 msgid "0x00008925\tSIOCGIFENCAP\tint *\n"
11089 #: build/C/man2/ioctl_list.2:570
11091 msgid "0x00008926\tSIOCSIFENCAP\tconst int *\n"
11095 #: build/C/man2/ioctl_list.2:571
11097 msgid "0x00008927\tSIOCGIFHWADDR\tstruct ifreq *\t// I-O\n"
11101 #: build/C/man2/ioctl_list.2:572
11103 msgid "0x00008929\tSIOCGIFSLAVE\tvoid\n"
11107 #: build/C/man2/ioctl_list.2:573
11109 msgid "0x00008930\tSIOCSIFSLAVE\tvoid\n"
11113 #: build/C/man2/ioctl_list.2:574
11115 msgid "0x00008931\tSIOCADDMULTI\tconst struct ifreq *\n"
11119 #: build/C/man2/ioctl_list.2:575
11121 msgid "0x00008932\tSIOCDELMULTI\tconst struct ifreq *\n"
11125 #: build/C/man2/ioctl_list.2:576
11127 msgid "0x00008940\tSIOCADDRTOLD\tvoid\n"
11131 #: build/C/man2/ioctl_list.2:577
11133 msgid "0x00008941\tSIOCDELRTOLD\tvoid\n"
11137 #: build/C/man2/ioctl_list.2:578
11139 msgid "0x00008950\tSIOCDARP\tconst struct arpreq *\n"
11143 #: build/C/man2/ioctl_list.2:579
11145 msgid "0x00008951\tSIOCGARP\tstruct arpreq *\t// I-O\n"
11149 #: build/C/man2/ioctl_list.2:580
11151 msgid "0x00008952\tSIOCSARP\tconst struct arpreq *\n"
11155 #: build/C/man2/ioctl_list.2:581
11157 msgid "0x00008960\tSIOCDRARP\tconst struct arpreq *\n"
11161 #: build/C/man2/ioctl_list.2:582
11163 msgid "0x00008961\tSIOCGRARP\tstruct arpreq *\t// I-O\n"
11167 #: build/C/man2/ioctl_list.2:583
11169 msgid "0x00008962\tSIOCSRARP\tconst struct arpreq *\n"
11173 #: build/C/man2/ioctl_list.2:584
11175 msgid "0x00008970\tSIOCGIFMAP\tstruct ifreq *\t// I-O\n"
11179 #: build/C/man2/ioctl_list.2:585
11181 msgid "0x00008971\tSIOCSIFMAP\tconst struct ifreq *\n"
11184 #. type: Plain text
11185 #: build/C/man2/ioctl_list.2:589
11186 msgid "// E<lt>include/linux/soundcard.hE<gt>"
11190 #: build/C/man2/ioctl_list.2:591
11192 msgid "0x00005100\tSNDCTL_SEQ_RESET\tvoid\n"
11196 #: build/C/man2/ioctl_list.2:592
11198 msgid "0x00005101\tSNDCTL_SEQ_SYNC\tvoid\n"
11202 #: build/C/man2/ioctl_list.2:596
11204 msgid "0xC08C5102\tSNDCTL_SYNTH_INFO\tstruct synth_info *\t// I-O\n"
11208 #: build/C/man2/ioctl_list.2:597
11210 msgid "0xC0045103\tSNDCTL_SEQ_CTRLRATE\tint *\t// I-O\n"
11214 #: build/C/man2/ioctl_list.2:598
11216 msgid "0x80045104\tSNDCTL_SEQ_GETOUTCOUNT\tint *\n"
11220 #: build/C/man2/ioctl_list.2:599
11222 msgid "0x80045105\tSNDCTL_SEQ_GETINCOUNT\tint *\n"
11226 #: build/C/man2/ioctl_list.2:600
11228 msgid "0x40045106\tSNDCTL_SEQ_PERCMODE\tvoid\n"
11232 #: build/C/man2/ioctl_list.2:604
11234 msgid "0x40285107\tSNDCTL_FM_LOAD_INSTR\tconst struct sbi_instrument *\n"
11238 #: build/C/man2/ioctl_list.2:608
11240 msgid "0x40045108\tSNDCTL_SEQ_TESTMIDI\tconst int *\n"
11244 #: build/C/man2/ioctl_list.2:609
11246 msgid "0x40045109\tSNDCTL_SEQ_RESETSAMPLES\tconst int *\n"
11250 #: build/C/man2/ioctl_list.2:610
11252 msgid "0x8004510A\tSNDCTL_SEQ_NRSYNTHS\tint *\n"
11256 #: build/C/man2/ioctl_list.2:611
11258 msgid "0x8004510B\tSNDCTL_SEQ_NRMIDIS\tint *\n"
11262 #: build/C/man2/ioctl_list.2:612
11264 msgid "0xC074510C\tSNDCTL_MIDI_INFO\tstruct midi_info *\t// I-O\n"
11268 #: build/C/man2/ioctl_list.2:613
11270 msgid "0x4004510D\tSNDCTL_SEQ_THRESHOLD\tconst int *\n"
11274 #: build/C/man2/ioctl_list.2:614
11276 msgid "0xC004510E\tSNDCTL_SYNTH_MEMAVL\tint *\t// I-O\n"
11280 #: build/C/man2/ioctl_list.2:615
11282 msgid "0x4004510F\tSNDCTL_FM_4OP_ENABLE\tconst int *\n"
11286 #: build/C/man2/ioctl_list.2:616
11288 msgid "0xCFB85110\tSNDCTL_PMGR_ACCESS\tstruct patmgr_info *\t// I-O\n"
11292 #: build/C/man2/ioctl_list.2:617
11294 msgid "0x00005111\tSNDCTL_SEQ_PANIC\tvoid\n"
11298 #: build/C/man2/ioctl_list.2:621
11300 msgid "0x40085112\tSNDCTL_SEQ_OUTOFBAND\tconst struct seq_event_rec *\n"
11304 #: build/C/man2/ioctl_list.2:625
11306 msgid "0xC0045401\tSNDCTL_TMR_TIMEBASE\tint *\t// I-O\n"
11310 #: build/C/man2/ioctl_list.2:626
11312 msgid "0x00005402\tSNDCTL_TMR_START\tvoid\n"
11316 #: build/C/man2/ioctl_list.2:627
11318 msgid "0x00005403\tSNDCTL_TMR_STOP\tvoid\n"
11322 #: build/C/man2/ioctl_list.2:628
11324 msgid "0x00005404\tSNDCTL_TMR_CONTINUE\tvoid\n"
11328 #: build/C/man2/ioctl_list.2:629
11330 msgid "0xC0045405\tSNDCTL_TMR_TEMPO\tint *\t// I-O\n"
11334 #: build/C/man2/ioctl_list.2:630
11336 msgid "0xC0045406\tSNDCTL_TMR_SOURCE\tint *\t// I-O\n"
11340 #: build/C/man2/ioctl_list.2:631
11342 msgid "0x40045407\tSNDCTL_TMR_METRONOME\tconst int *\n"
11346 #: build/C/man2/ioctl_list.2:632
11348 msgid "0x40045408\tSNDCTL_TMR_SELECT\tint *\t// I-O\n"
11352 #: build/C/man2/ioctl_list.2:633
11354 msgid "0xCFB85001\tSNDCTL_PMGR_IFACE\tstruct patmgr_info *\t// I-O\n"
11358 #: build/C/man2/ioctl_list.2:634
11360 msgid "0xC0046D00\tSNDCTL_MIDI_PRETIME\tint *\t// I-O\n"
11364 #: build/C/man2/ioctl_list.2:635
11366 msgid "0xC0046D01\tSNDCTL_MIDI_MPUMODE\tconst int *\n"
11370 #: build/C/man2/ioctl_list.2:639
11372 msgid "0xC0216D02\tSNDCTL_MIDI_MPUCMD\tstruct mpu_command_rec *\t// I-O\n"
11376 #: build/C/man2/ioctl_list.2:643
11378 msgid "0x00005000\tSNDCTL_DSP_RESET\tvoid\n"
11382 #: build/C/man2/ioctl_list.2:644
11384 msgid "0x00005001\tSNDCTL_DSP_SYNC\tvoid\n"
11388 #: build/C/man2/ioctl_list.2:645
11390 msgid "0xC0045002\tSNDCTL_DSP_SPEED\tint *\t// I-O\n"
11394 #: build/C/man2/ioctl_list.2:646
11396 msgid "0xC0045003\tSNDCTL_DSP_STEREO\tint *\t// I-O\n"
11400 #: build/C/man2/ioctl_list.2:647
11402 msgid "0xC0045004\tSNDCTL_DSP_GETBLKSIZE\tint *\t// I-O\n"
11406 #: build/C/man2/ioctl_list.2:648
11408 msgid "0xC0045006\tSOUND_PCM_WRITE_CHANNELS\tint *\t// I-O\n"
11412 #: build/C/man2/ioctl_list.2:649
11414 msgid "0xC0045007\tSOUND_PCM_WRITE_FILTER\tint *\t// I-O\n"
11418 #: build/C/man2/ioctl_list.2:650
11420 msgid "0x00005008\tSNDCTL_DSP_POST\tvoid\n"
11424 #: build/C/man2/ioctl_list.2:651
11426 msgid "0xC0045009\tSNDCTL_DSP_SUBDIVIDE\tint *\t// I-O\n"
11430 #: build/C/man2/ioctl_list.2:652
11432 msgid "0xC004500A\tSNDCTL_DSP_SETFRAGMENT\tint *\t// I-O\n"
11436 #: build/C/man2/ioctl_list.2:653
11438 msgid "0x8004500B\tSNDCTL_DSP_GETFMTS\tint *\n"
11442 #: build/C/man2/ioctl_list.2:654
11444 msgid "0xC0045005\tSNDCTL_DSP_SETFMT\tint *\t// I-O\n"
11448 #: build/C/man2/ioctl_list.2:658
11450 msgid "0x800C500C\tSNDCTL_DSP_GETOSPACE\tstruct audio_buf_info *\n"
11454 #: build/C/man2/ioctl_list.2:659
11456 msgid "0x800C500D\tSNDCTL_DSP_GETISPACE\tstruct audio_buf_info *\n"
11460 #: build/C/man2/ioctl_list.2:660
11462 msgid "0x0000500E\tSNDCTL_DSP_NONBLOCK\tvoid\n"
11466 #: build/C/man2/ioctl_list.2:661
11468 msgid "0x80045002\tSOUND_PCM_READ_RATE\tint *\n"
11472 #: build/C/man2/ioctl_list.2:662
11474 msgid "0x80045006\tSOUND_PCM_READ_CHANNELS\tint *\n"
11478 #: build/C/man2/ioctl_list.2:663
11480 msgid "0x80045005\tSOUND_PCM_READ_BITS\tint *\n"
11484 #: build/C/man2/ioctl_list.2:664
11486 msgid "0x80045007\tSOUND_PCM_READ_FILTER\tint *\n"
11490 #: build/C/man2/ioctl_list.2:665
11492 msgid "0x00004300\tSNDCTL_COPR_RESET\tvoid\n"
11496 #: build/C/man2/ioctl_list.2:666
11498 msgid "0xCFB04301\tSNDCTL_COPR_LOAD\tconst struct copr_buffer *\n"
11502 #: build/C/man2/ioctl_list.2:670
11504 msgid "0xC0144302\tSNDCTL_COPR_RDATA\tstruct copr_debug_buf *\t// I-O\n"
11508 #: build/C/man2/ioctl_list.2:671
11510 msgid "0xC0144303\tSNDCTL_COPR_RCODE\tstruct copr_debug_buf *\t// I-O\n"
11514 #: build/C/man2/ioctl_list.2:675
11516 msgid "0x40144304\tSNDCTL_COPR_WDATA\tconst struct copr_debug_buf *\n"
11520 #: build/C/man2/ioctl_list.2:676
11522 msgid "0x40144305\tSNDCTL_COPR_WCODE\tconst struct copr_debug_buf *\n"
11526 #: build/C/man2/ioctl_list.2:680
11528 msgid "0xC0144306\tSNDCTL_COPR_RUN\tstruct copr_debug_buf *\t// I-O\n"
11532 #: build/C/man2/ioctl_list.2:681
11534 msgid "0xC0144307\tSNDCTL_COPR_HALT\tstruct copr_debug_buf *\t// I-O\n"
11538 #: build/C/man2/ioctl_list.2:685
11540 msgid "0x4FA44308\tSNDCTL_COPR_SENDMSG\tconst struct copr_msg *\n"
11544 #: build/C/man2/ioctl_list.2:686
11546 msgid "0x8FA44309\tSNDCTL_COPR_RCVMSG\tstruct copr_msg *\n"
11550 #: build/C/man2/ioctl_list.2:687
11552 msgid "0x80044D00\tSOUND_MIXER_READ_VOLUME\tint *\n"
11556 #: build/C/man2/ioctl_list.2:688
11558 msgid "0x80044D01\tSOUND_MIXER_READ_BASS\tint *\n"
11562 #: build/C/man2/ioctl_list.2:689
11564 msgid "0x80044D02\tSOUND_MIXER_READ_TREBLE\tint *\n"
11568 #: build/C/man2/ioctl_list.2:690
11570 msgid "0x80044D03\tSOUND_MIXER_READ_SYNTH\tint *\n"
11574 #: build/C/man2/ioctl_list.2:691
11576 msgid "0x80044D04\tSOUND_MIXER_READ_PCM\tint *\n"
11580 #: build/C/man2/ioctl_list.2:692
11582 msgid "0x80044D05\tSOUND_MIXER_READ_SPEAKER\tint *\n"
11586 #: build/C/man2/ioctl_list.2:693
11588 msgid "0x80044D06\tSOUND_MIXER_READ_LINE\tint *\n"
11592 #: build/C/man2/ioctl_list.2:694
11594 msgid "0x80044D07\tSOUND_MIXER_READ_MIC\tint *\n"
11598 #: build/C/man2/ioctl_list.2:695
11600 msgid "0x80044D08\tSOUND_MIXER_READ_CD\tint *\n"
11604 #: build/C/man2/ioctl_list.2:696
11606 msgid "0x80044D09\tSOUND_MIXER_READ_IMIX\tint *\n"
11610 #: build/C/man2/ioctl_list.2:697
11612 msgid "0x80044D0A\tSOUND_MIXER_READ_ALTPCM\tint *\n"
11616 #: build/C/man2/ioctl_list.2:698
11618 msgid "0x80044D0B\tSOUND_MIXER_READ_RECLEV\tint *\n"
11622 #: build/C/man2/ioctl_list.2:699
11624 msgid "0x80044D0C\tSOUND_MIXER_READ_IGAIN\tint *\n"
11628 #: build/C/man2/ioctl_list.2:700
11630 msgid "0x80044D0D\tSOUND_MIXER_READ_OGAIN\tint *\n"
11634 #: build/C/man2/ioctl_list.2:701
11636 msgid "0x80044D0E\tSOUND_MIXER_READ_LINE1\tint *\n"
11640 #: build/C/man2/ioctl_list.2:702
11642 msgid "0x80044D0F\tSOUND_MIXER_READ_LINE2\tint *\n"
11646 #: build/C/man2/ioctl_list.2:703
11648 msgid "0x80044D10\tSOUND_MIXER_READ_LINE3\tint *\n"
11652 #: build/C/man2/ioctl_list.2:704
11654 msgid "0x80044D1C\tSOUND_MIXER_READ_MUTE\tint *\n"
11658 #: build/C/man2/ioctl_list.2:705
11660 msgid "0x80044D1D\tSOUND_MIXER_READ_ENHANCE\tint *\n"
11664 #: build/C/man2/ioctl_list.2:706
11666 msgid "0x80044D1E\tSOUND_MIXER_READ_LOUD\tint *\n"
11670 #: build/C/man2/ioctl_list.2:707
11672 msgid "0x80044DFF\tSOUND_MIXER_READ_RECSRC\tint *\n"
11676 #: build/C/man2/ioctl_list.2:708
11678 msgid "0x80044DFE\tSOUND_MIXER_READ_DEVMASK\tint *\n"
11682 #: build/C/man2/ioctl_list.2:709
11684 msgid "0x80044DFD\tSOUND_MIXER_READ_RECMASK\tint *\n"
11688 #: build/C/man2/ioctl_list.2:710
11690 msgid "0x80044DFB\tSOUND_MIXER_READ_STEREODEVS\tint *\n"
11694 #: build/C/man2/ioctl_list.2:711
11696 msgid "0x80044DFC\tSOUND_MIXER_READ_CAPS\tint *\n"
11700 #: build/C/man2/ioctl_list.2:715
11702 msgid "0xC0044D00\tSOUND_MIXER_WRITE_VOLUME\tint *\t// I-O\n"
11706 #: build/C/man2/ioctl_list.2:716
11708 msgid "0xC0044D01\tSOUND_MIXER_WRITE_BASS\tint *\t// I-O\n"
11712 #: build/C/man2/ioctl_list.2:717
11714 msgid "0xC0044D02\tSOUND_MIXER_WRITE_TREBLE\tint *\t// I-O\n"
11718 #: build/C/man2/ioctl_list.2:718
11720 msgid "0xC0044D03\tSOUND_MIXER_WRITE_SYNTH\tint *\t// I-O\n"
11724 #: build/C/man2/ioctl_list.2:719
11726 msgid "0xC0044D04\tSOUND_MIXER_WRITE_PCM\tint *\t// I-O\n"
11730 #: build/C/man2/ioctl_list.2:720
11732 msgid "0xC0044D05\tSOUND_MIXER_WRITE_SPEAKER\tint *\t// I-O\n"
11736 #: build/C/man2/ioctl_list.2:721
11738 msgid "0xC0044D06\tSOUND_MIXER_WRITE_LINE\tint *\t// I-O\n"
11742 #: build/C/man2/ioctl_list.2:722
11744 msgid "0xC0044D07\tSOUND_MIXER_WRITE_MIC\tint *\t// I-O\n"
11748 #: build/C/man2/ioctl_list.2:723
11750 msgid "0xC0044D08\tSOUND_MIXER_WRITE_CD\tint *\t// I-O\n"
11754 #: build/C/man2/ioctl_list.2:724
11756 msgid "0xC0044D09\tSOUND_MIXER_WRITE_IMIX\tint *\t// I-O\n"
11760 #: build/C/man2/ioctl_list.2:725
11762 msgid "0xC0044D0A\tSOUND_MIXER_WRITE_ALTPCM\tint *\t// I-O\n"
11766 #: build/C/man2/ioctl_list.2:726
11768 msgid "0xC0044D0B\tSOUND_MIXER_WRITE_RECLEV\tint *\t// I-O\n"
11772 #: build/C/man2/ioctl_list.2:727
11774 msgid "0xC0044D0C\tSOUND_MIXER_WRITE_IGAIN\tint *\t// I-O\n"
11778 #: build/C/man2/ioctl_list.2:728
11780 msgid "0xC0044D0D\tSOUND_MIXER_WRITE_OGAIN\tint *\t// I-O\n"
11784 #: build/C/man2/ioctl_list.2:729
11786 msgid "0xC0044D0E\tSOUND_MIXER_WRITE_LINE1\tint *\t// I-O\n"
11790 #: build/C/man2/ioctl_list.2:730
11792 msgid "0xC0044D0F\tSOUND_MIXER_WRITE_LINE2\tint *\t// I-O\n"
11796 #: build/C/man2/ioctl_list.2:731
11798 msgid "0xC0044D10\tSOUND_MIXER_WRITE_LINE3\tint *\t// I-O\n"
11802 #: build/C/man2/ioctl_list.2:732
11804 msgid "0xC0044D1C\tSOUND_MIXER_WRITE_MUTE\tint *\t// I-O\n"
11808 #: build/C/man2/ioctl_list.2:733
11810 msgid "0xC0044D1D\tSOUND_MIXER_WRITE_ENHANCE\tint *\t// I-O\n"
11814 #: build/C/man2/ioctl_list.2:734
11816 msgid "0xC0044D1E\tSOUND_MIXER_WRITE_LOUD\tint *\t// I-O\n"
11820 #: build/C/man2/ioctl_list.2:735
11822 msgid "0xC0044DFF\tSOUND_MIXER_WRITE_RECSRC\tint *\t// I-O\n"
11825 #. type: Plain text
11826 #: build/C/man2/ioctl_list.2:739
11827 msgid "// E<lt>include/linux/umsdos_fs.hE<gt>"
11831 #: build/C/man2/ioctl_list.2:741
11833 msgid "0x000004D2\tUMSDOS_READDIR_DOS\tstruct umsdos_ioctl *\t// I-O\n"
11837 #: build/C/man2/ioctl_list.2:742
11839 msgid "0x000004D3\tUMSDOS_UNLINK_DOS\tconst struct umsdos_ioctl *\n"
11843 #: build/C/man2/ioctl_list.2:743
11845 msgid "0x000004D4\tUMSDOS_RMDIR_DOS\tconst struct umsdos_ioctl *\n"
11849 #: build/C/man2/ioctl_list.2:744
11851 msgid "0x000004D5\tUMSDOS_STAT_DOS\tstruct umsdos_ioctl *\t// I-O\n"
11855 #: build/C/man2/ioctl_list.2:745
11857 msgid "0x000004D6\tUMSDOS_CREAT_EMD\tconst struct umsdos_ioctl *\n"
11861 #: build/C/man2/ioctl_list.2:746
11863 msgid "0x000004D7\tUMSDOS_UNLINK_EMD\tconst struct umsdos_ioctl *\n"
11867 #: build/C/man2/ioctl_list.2:747
11869 msgid "0x000004D8\tUMSDOS_READDIR_EMD\tstruct umsdos_ioctl *\t// I-O\n"
11873 #: build/C/man2/ioctl_list.2:748
11875 msgid "0x000004D9\tUMSDOS_GETVERSION\tstruct umsdos_ioctl *\n"
11879 #: build/C/man2/ioctl_list.2:749
11881 msgid "0x000004DA\tUMSDOS_INIT_EMD\tvoid\n"
11885 #: build/C/man2/ioctl_list.2:750
11887 msgid "0x000004DB\tUMSDOS_DOS_SETUP\tconst struct umsdos_ioctl *\n"
11891 #: build/C/man2/ioctl_list.2:751
11893 msgid "0x000004DC\tUMSDOS_RENAME_DOS\tconst struct umsdos_ioctl *\n"
11896 #. type: Plain text
11897 #: build/C/man2/ioctl_list.2:755
11898 msgid "// E<lt>include/linux/vt.hE<gt>"
11902 #: build/C/man2/ioctl_list.2:757
11904 msgid "0x00005600\tVT_OPENQRY\tint *\n"
11908 #: build/C/man2/ioctl_list.2:758
11910 msgid "0x00005601\tVT_GETMODE\tstruct vt_mode *\n"
11914 #: build/C/man2/ioctl_list.2:759
11916 msgid "0x00005602\tVT_SETMODE\tconst struct vt_mode *\n"
11920 #: build/C/man2/ioctl_list.2:760
11922 msgid "0x00005603\tVT_GETSTATE\tstruct vt_stat *\n"
11926 #: build/C/man2/ioctl_list.2:761
11928 msgid "0x00005604\tVT_SENDSIG\tvoid\n"
11932 #: build/C/man2/ioctl_list.2:762
11934 msgid "0x00005605\tVT_RELDISP\tint\n"
11938 #: build/C/man2/ioctl_list.2:763
11940 msgid "0x00005606\tVT_ACTIVATE\tint\n"
11944 #: build/C/man2/ioctl_list.2:764
11946 msgid "0x00005607\tVT_WAITACTIVE\tint\n"
11950 #: build/C/man2/ioctl_list.2:765
11952 msgid "0x00005608\tVT_DISALLOCATE\tint\n"
11956 #: build/C/man2/ioctl_list.2:766
11958 msgid "0x00005609\tVT_RESIZE\tconst struct vt_sizes *\n"
11962 #: build/C/man2/ioctl_list.2:767
11964 msgid "0x0000560A\tVT_RESIZEX\tconst struct vt_consize *\n"
11967 #. type: Plain text
11968 #: build/C/man2/ioctl_list.2:774
11970 "// More arguments. Some ioctl's take a pointer to a structure which "
11971 "contains additional pointers. These are documented here in alphabetical "
11975 #. type: Plain text
11976 #: build/C/man2/ioctl_list.2:782
11978 "B<CDROMREADAUDIO> takes an input pointer I<const struct cdrom_read_audio\\ "
11979 "*>. The I<buf> field points to an output buffer of length I<nframes\\ * "
11980 "CD_FRAMESIZE_RAW>."
11983 #. type: Plain text
11984 #: build/C/man2/ioctl_list.2:798
11986 "B<CDROMREADCOOKED>, B<CDROMREADMODE1>, B<CDROMREADMODE2>, and "
11987 "B<CDROMREADRAW> take an input pointer I<const struct cdrom_msf\\ *>. They "
11988 "use the same pointer as an output pointer to I<char []>. The length varies "
11989 "by request. For B<CDROMREADMODE1>, most drivers use CD_FRAMESIZE, but the "
11990 "Optics Storage driver uses OPT_BLOCKSIZE instead (both have the numerical "
11994 #. type: Plain text
11995 #: build/C/man2/ioctl_list.2:804
11998 " CDROMREADCOOKED char [CD_FRAMESIZE]\n"
11999 " CDROMREADMODE1 char [CD_FRAMESIZE or OPT_BLOCKSIZE]\n"
12000 " CDROMREADMODE2 char [CD_FRAMESIZE_RAW0]\n"
12001 " CDROMREADRAW char [CD_FRAMESIZE_RAW]\n"
12004 #. type: Plain text
12005 #: build/C/man2/ioctl_list.2:818
12007 "B<EQL_ENSLAVE>, B<EQL_EMANCIPATE>, B<EQL_GETSLAVECFG>, B<EQL_SETSLAVECFG>, "
12008 "B<EQL_GETMASTERCFG>, and B<EQL_SETMASTERCFG> take a I<struct ifreq\\ *>. "
12009 "The I<ifr_data> field is a pointer to another structure as follows:"
12012 #. type: Plain text
12013 #: build/C/man2/ioctl_list.2:826
12016 " EQL_ENSLAVE const struct slaving_request *\n"
12017 " EQL_EMANCIPATE const struct slaving_request *\n"
12018 " EQL_GETSLAVECFG struct slave_config * // I-O\n"
12019 " EQL_SETSLAVECFG const struct slave_config *\n"
12020 " EQL_GETMASTERCFG struct master_config *\n"
12021 " EQL_SETMASTERCFG const struct master_config *\n"
12024 #. type: Plain text
12025 #: build/C/man2/ioctl_list.2:843
12027 "B<FDRAWCMD> takes a I<struct floppy raw_cmd\\ *>. If I<flags & "
12028 "FD_RAW_WRITE> is nonzero, then I<data> points to an input buffer of length "
12029 "I<length>. If I<flags & FD_RAW_READ> is nonzero, then I<data> points to an "
12030 "output buffer of length I<length>."
12033 #. type: Plain text
12034 #: build/C/man2/ioctl_list.2:859
12036 "B<GIO_FONTX> and B<PIO_FONTX> take a I<struct console_font_desc\\ *> or a "
12037 "I<const struct console_font_desc\\ *>, respectively. I<chardata> points to "
12038 "a buffer of I<char [charcount]>. This is an output buffer for B<GIO_FONTX> "
12039 "and an input buffer for B<PIO_FONTX>."
12042 #. type: Plain text
12043 #: build/C/man2/ioctl_list.2:875
12045 "B<GIO_UNIMAP> and B<PIO_UNIMAP> take a I<struct unimapdesc\\ *> or a I<const "
12046 "struct unimapdesc\\ *>, respectively. I<entries> points to a buffer of "
12047 "I<struct unipair [entry_ct]>. This is an output buffer for B<GIO_UNIMAP> "
12048 "and an input buffer for B<PIO_UNIMAP>."
12051 #. type: Plain text
12052 #: build/C/man2/ioctl_list.2:879
12054 "KDADDIO, KDDELIO, KDDISABIO, and KDENABIO enable or disable access to I/O "
12055 "ports. They are essentially alternate interfaces to 'ioperm'."
12058 #. type: Plain text
12059 #: build/C/man2/ioctl_list.2:885
12061 "B<KDMAPDISP> and B<KDUNMAPDISP> enable or disable memory mappings or I/O "
12062 "port access. They are not implemented in the kernel."
12065 #. type: Plain text
12066 #: build/C/man2/ioctl_list.2:893
12068 "B<SCSI_IOCTL_PROBE_HOST> takes an input pointer I<const int\\ *>, which is a "
12069 "length. It uses the same pointer as an output pointer to a I<char []> "
12070 "buffer of this length."
12073 #. type: Plain text
12074 #: build/C/man2/ioctl_list.2:899
12076 "B<SIOCADDRT> and B<SIOCDELRT> take an input pointer whose type depends on "
12080 #. type: Plain text
12081 #: build/C/man2/ioctl_list.2:904
12084 " Most protocols const struct rtentry *\n"
12085 " AX.25 const struct ax25_route *\n"
12086 " NET/ROM const struct nr_route_struct *\n"
12089 #. type: Plain text
12090 #: build/C/man2/ioctl_list.2:915
12092 "B<SIOCGIFCONF> takes a I<struct ifconf\\ *>. The I<ifc_buf> field points to "
12093 "a buffer of length I<ifc_len> bytes, into which the kernel writes a list of "
12094 "type I<struct ifreq []>."
12097 #. type: Plain text
12098 #: build/C/man2/ioctl_list.2:918
12099 msgid "B<SIOCSIFHWADDR> takes an input pointer whose type depends on the protocol:"
12102 #. type: Plain text
12103 #: build/C/man2/ioctl_list.2:922
12106 " Most protocols const struct ifreq *\n"
12107 " AX.25 const char [AX25_ADDR_LEN]\n"
12110 #. type: Plain text
12111 #: build/C/man2/ioctl_list.2:937
12113 "B<TIOCLINUX> takes a I<const char\\ *>. It uses this to distinguish several "
12114 "independent subcases. In the table below, I<N + foo> means I<foo> after an "
12115 "N-byte pad. I<struct selection> is implicitly defined in "
12116 "I<drivers/char/selection.c>"
12119 #. type: Plain text
12120 #: build/C/man2/ioctl_list.2:946
12123 " TIOCLINUX-2 1 + const struct selection *\n"
12124 " TIOCLINUX-3 void\n"
12125 " TIOCLINUX-4 void\n"
12126 " TIOCLINUX-5 4 + const struct { long [8]; } *\n"
12127 " TIOCLINUX-6 char *\n"
12128 " TIOCLINUX-7 char *\n"
12129 " TIOCLINUX-10 1 + const char *\n"
12132 #. type: Plain text
12133 #: build/C/man2/ioctl_list.2:949
12134 msgid "// Duplicate ioctls"
12137 #. type: Plain text
12138 #: build/C/man2/ioctl_list.2:954
12140 "This list does not include ioctls in the range B<SIOCDEVPRIVATE> and "
12141 "B<SIOCPROTOPRIVATE>."
12145 #: build/C/man2/ioctl_list.2:956
12147 msgid "0x00000001\tFDSETPRM\tFIBMAP\n"
12151 #: build/C/man2/ioctl_list.2:957
12153 msgid "0x00000002\tFDDEFPRM\tFIGETBSZ\n"
12157 #: build/C/man2/ioctl_list.2:958
12159 msgid "0x00005382\tCDROMAUDIOBUFSIZ\tSCSI_IOCTL_GET_IDLUN\n"
12163 #: build/C/man2/ioctl_list.2:959
12165 msgid "0x00005402\tSNDCTL_TMR_START\tTCSETS\n"
12169 #: build/C/man2/ioctl_list.2:960
12171 msgid "0x00005403\tSNDCTL_TMR_STOP\tTCSETSW\n"
12175 #: build/C/man2/ioctl_list.2:961
12177 msgid "0x00005404\tSNDCTL_TMR_CONTINUE\tTCSETSF\n"
12180 #. type: Plain text
12181 #: build/C/man2/ioctl_list.2:965
12182 msgid "B<ioctl>(2)"
12186 #: build/C/man2/ioperm.2:34
12191 #. type: Plain text
12192 #: build/C/man2/ioperm.2:37
12193 msgid "ioperm - set port input/output permissions"
12196 #. type: Plain text
12197 #: build/C/man2/ioperm.2:40
12198 msgid "B<#include E<lt>unistd.hE<gt>> /* for libc5 */"
12201 #. type: Plain text
12202 #: build/C/man2/ioperm.2:43
12203 msgid "B<#include E<lt>sys/io.hE<gt>> /* for glibc */"
12206 #. type: Plain text
12207 #: build/C/man2/ioperm.2:45
12209 "B<int ioperm(unsigned long >I<from>B<, unsigned long >I<num>B<, int "
12213 #. type: Plain text
12214 #: build/C/man2/ioperm.2:59
12216 "B<ioperm>() sets the port access permission bits for the calling thread for "
12217 "I<num> bits starting from port address I<from>. If I<turn_on> is nonzero, "
12218 "then permission for the specified bits is enabled; otherwise it is "
12219 "disabled. If I<turn_on> is nonzero, the calling thread must be privileged "
12220 "(B<CAP_SYS_RAWIO>)."
12223 #. type: Plain text
12224 #: build/C/man2/ioperm.2:68
12226 "Before Linux 2.6.8, only the first 0x3ff I/O ports could be specified in "
12227 "this manner. For more ports, the B<iopl>(2) system call had to be used "
12228 "(with a I<level> argument of 3). Since Linux 2.6.8, 65,536 I/O ports can be "
12232 #. type: Plain text
12233 #: build/C/man2/ioperm.2:78
12235 "Permissions are not inherited by the child created by B<fork>(2); following "
12236 "a B<fork>(2) the child must turn on those permissions that it needs. "
12237 "Permissions are preserved across B<execve>(2); this is useful for giving "
12238 "port access permissions to unprivileged programs."
12241 #. type: Plain text
12242 #: build/C/man2/ioperm.2:82
12244 "This call is mostly for the i386 architecture. On many other architectures "
12245 "it does not exist or will always return an error."
12248 #. type: Plain text
12249 #: build/C/man2/ioperm.2:94
12250 msgid "Invalid values for I<from> or I<num>."
12253 #. type: Plain text
12254 #: build/C/man2/ioperm.2:97
12255 msgid "(on PowerPC) This call is not supported."
12258 #. Could not allocate I/O bitmap.
12259 #. type: Plain text
12260 #: build/C/man2/ioperm.2:101
12261 msgid "Out of memory."
12264 #. type: Plain text
12265 #: build/C/man2/ioperm.2:104
12266 msgid "The calling thread has insufficient privilege."
12269 #. type: Plain text
12270 #: build/C/man2/ioperm.2:108
12272 "B<ioperm>() is Linux-specific and should not be used in programs intended "
12276 #. type: Plain text
12277 #: build/C/man2/ioperm.2:112
12279 "The I</proc/ioports> file shows the I/O ports that are currently allocated "
12283 #. type: Plain text
12284 #: build/C/man2/ioperm.2:121
12286 "Libc5 treats it as a system call and has a prototype in "
12287 "I<E<lt>unistd.hE<gt>>. Glibc1 does not have a prototype. Glibc2 has a "
12288 "prototype both in I<E<lt>sys/io.hE<gt>> and in I<E<lt>sys/perm.hE<gt>>. "
12289 "Avoid the latter, it is available on i386 only."
12292 #. type: Plain text
12293 #: build/C/man2/ioperm.2:125
12294 msgid "B<iopl>(2), B<outb>(2), B<capabilities>(7)"
12298 #: build/C/man3/lockf.3:28
12304 #: build/C/man3/lockf.3:28
12309 #. type: Plain text
12310 #: build/C/man3/lockf.3:31
12311 msgid "lockf - apply, test or remove a POSIX lock on an open file"
12314 #. type: Plain text
12315 #: build/C/man3/lockf.3:35
12316 msgid "B<int lockf(int >I<fd>B<, int >I<cmd>B<, off_t >I<len>B<);>"
12319 #. type: Plain text
12320 #: build/C/man3/lockf.3:42
12321 msgid "B<lockf>():"
12324 #. type: Plain text
12325 #: build/C/man3/lockf.3:46
12327 "_BSD_SOURCE || _SVID_SOURCE || _XOPEN_SOURCE\\ E<gt>=\\ 500 || "
12328 "_XOPEN_SOURCE\\ &&\\ _XOPEN_SOURCE_EXTENDED"
12331 #. type: Plain text
12332 #: build/C/man3/lockf.3:69
12334 "Apply, test or remove a POSIX lock on a section of an open file. The file "
12335 "is specified by I<fd>, a file descriptor open for writing, the action by "
12336 "I<cmd>, and the section consists of byte positions I<pos>..I<pos>+I<len>-1 "
12337 "if I<len> is positive, and I<pos>-I<len>..I<pos>-1 if I<len> is negative, "
12338 "where I<pos> is the current file position, and if I<len> is zero, the "
12339 "section extends from the current file position to infinity, encompassing the "
12340 "present and future end-of-file positions. In all cases, the section may "
12341 "extend past current end-of-file."
12344 #. type: Plain text
12345 #: build/C/man3/lockf.3:84
12347 "On Linux, B<lockf>() is just an interface on top of B<fcntl>(2) locking. "
12348 "Many other systems implement B<lockf>() in this way, but note that "
12349 "POSIX.1-2001 leaves the relationship between B<lockf>() and B<fcntl>(2) "
12350 "locks unspecified. A portable application should probably avoid mixing "
12351 "calls to these interfaces."
12354 #. type: Plain text
12355 #: build/C/man3/lockf.3:86
12356 msgid "Valid operations are given below:"
12360 #: build/C/man3/lockf.3:86
12365 #. type: Plain text
12366 #: build/C/man3/lockf.3:96
12368 "Set an exclusive lock on the specified section of the file. If (part of) "
12369 "this section is already locked, the call blocks until the previous lock is "
12370 "released. If this section overlaps an earlier locked section, both are "
12371 "merged. File locks are released as soon as the process holding the locks "
12372 "closes some file descriptor for the file. A child process does not inherit "
12377 #: build/C/man3/lockf.3:96
12382 #. type: Plain text
12383 #: build/C/man3/lockf.3:102
12385 "Same as B<F_LOCK> but the call never blocks and returns an error instead if "
12386 "the file is already locked."
12390 #: build/C/man3/lockf.3:102
12395 #. type: Plain text
12396 #: build/C/man3/lockf.3:106
12398 "Unlock the indicated section of the file. This may cause a locked section "
12399 "to be split into two locked sections."
12403 #: build/C/man3/lockf.3:106
12408 #. type: Plain text
12409 #: build/C/man3/lockf.3:116
12411 "Test the lock: return 0 if the specified section is unlocked or locked by "
12412 "this process; return -1, set I<errno> to B<EAGAIN> (B<EACCES> on some other "
12413 "systems), if another process holds a lock."
12416 #. type: Plain text
12417 #: build/C/man3/lockf.3:130
12419 "The file is locked and B<F_TLOCK> or B<F_TEST> was specified, or the "
12420 "operation is prohibited because the file has been memory-mapped by another "
12424 #. type: Plain text
12425 #: build/C/man3/lockf.3:142
12427 "I<fd> is not an open file descriptor; or I<cmd> is B<F_LOCK> or B<F_TLOCK> "
12428 "and I<fd> is not a writable file descriptor."
12431 #. type: Plain text
12432 #: build/C/man3/lockf.3:147
12433 msgid "The command was B<F_LOCK> and this lock operation would cause a deadlock."
12436 #. type: Plain text
12437 #: build/C/man3/lockf.3:151
12438 msgid "An invalid operation was specified in I<fd>."
12441 #. type: Plain text
12442 #: build/C/man3/lockf.3:154
12443 msgid "Too many segment locks open, lock table is full."
12446 #. type: Plain text
12447 #: build/C/man3/lockf.3:156
12448 msgid "SVr4, POSIX.1-2001."
12451 #. type: Plain text
12452 #: build/C/man3/lockf.3:159
12453 msgid "B<fcntl>(2), B<flock>(2)"
12456 #. type: Plain text
12457 #: build/C/man3/lockf.3:171
12459 "I<locks.txt> and I<mandatory-locking.txt> in the Linux kernel source "
12460 "directory I<Documentation/filesystems> (on older kernels, these files are "
12461 "directly under the I<Documentation> directory, and I<mandatory-locking.txt> "
12462 "is called I<mandatory.txt>)"
12466 #: build/C/man2/mincore.2:34
12472 #: build/C/man2/mincore.2:34
12477 #. type: Plain text
12478 #: build/C/man2/mincore.2:37
12479 msgid "mincore - determine whether pages are resident in memory"
12482 #. type: Plain text
12483 #: build/C/man2/mincore.2:41
12484 msgid "B<#include E<lt>sys/mman.hE<gt>>"
12487 #. type: Plain text
12488 #: build/C/man2/mincore.2:43
12490 "B<int mincore(void *>I<addr>B<, size_t >I<length>B<, unsigned char "
12494 #. type: Plain text
12495 #: build/C/man2/mincore.2:51
12496 msgid "B<mincore>(): _BSD_SOURCE || _SVID_SOURCE"
12499 #. type: Plain text
12500 #: build/C/man2/mincore.2:62
12502 "B<mincore>() returns a vector that indicates whether pages of the calling "
12503 "process's virtual memory are resident in core (RAM), and so will not cause a "
12504 "disk access (page fault) if referenced. The kernel returns residency "
12505 "information about the pages starting at the address I<addr>, and continuing "
12506 "for I<length> bytes."
12509 #. type: Plain text
12510 #: build/C/man2/mincore.2:76
12512 "The I<addr> argument must be a multiple of the system page size. The "
12513 "I<length> argument need not be a multiple of the page size, but since "
12514 "residency information is returned for whole pages, I<length> is effectively "
12515 "rounded up to the next multiple of the page size. One may obtain the page "
12516 "size (B<PAGE_SIZE>) using I<sysconf(_SC_PAGESIZE)>."
12519 #. type: Plain text
12520 #: build/C/man2/mincore.2:94
12522 "The I<vec> argument must point to an array containing at least "
12523 "I<(length+PAGE_SIZE-1) / PAGE_SIZE> bytes. On return, the least significant "
12524 "bit of each byte will be set if the corresponding page is currently resident "
12525 "in memory, and be clear otherwise. (The settings of the other bits in each "
12526 "byte are undefined; these bits are reserved for possible later use.) Of "
12527 "course the information returned in I<vec> is only a snapshot: pages that are "
12528 "not locked in memory can come and go at any moment, and the contents of "
12529 "I<vec> may already be stale by the time this call returns."
12532 #. type: Plain text
12533 #: build/C/man2/mincore.2:101
12535 "On success, B<mincore>() returns zero. On error, -1 is returned, and "
12536 "I<errno> is set appropriately."
12539 #. type: Plain text
12540 #: build/C/man2/mincore.2:104
12541 msgid "B<EAGAIN> kernel is temporarily out of resources."
12544 #. type: Plain text
12545 #: build/C/man2/mincore.2:108
12546 msgid "I<vec> points to an invalid address."
12549 #. type: Plain text
12550 #: build/C/man2/mincore.2:112
12551 msgid "I<addr> is not a multiple of the page size."
12554 #. type: Plain text
12555 #: build/C/man2/mincore.2:124
12557 "I<length> is greater than (I<TASK_SIZE> - I<addr>). (This could occur if a "
12558 "negative value is specified for I<length>, since that value will be "
12559 "interpreted as a large unsigned integer.) In Linux 2.6.11 and earlier, the "
12560 "error B<EINVAL> was returned for this condition."
12563 #. type: Plain text
12564 #: build/C/man2/mincore.2:132
12565 msgid "I<addr> to I<addr> + I<length> contained unmapped memory."
12568 #. type: Plain text
12569 #: build/C/man2/mincore.2:134
12570 msgid "Available since Linux 2.3.99pre1 and glibc 2.2."
12573 #. It is on at least NetBSD, FreeBSD, OpenBSD, Solaris 8,
12574 #. AIX 5.1, SunOS 4.1
12578 #. function first appeared in 4.4BSD.
12579 #. type: Plain text
12580 #: build/C/man2/mincore.2:144
12582 "B<mincore>() is not specified in POSIX.1-2001, and it is not available on "
12583 "all UNIX implementations."
12586 #. Linux (up to now, 2.6.5),
12588 #. does not return correct information for MAP_PRIVATE mappings:
12589 #. for a MAP_PRIVATE file mapping,
12591 #. returns the residency of the file pages, rather than any
12592 #. modified process-private pages that have been copied on write;
12593 #. for a MAP_PRIVATE mapping of
12596 #. always reports pages as nonresident;
12597 #. and for a MAP_PRIVATE, MAP_ANONYMOUS mapping,
12599 #. always fails with the error
12601 #. type: Plain text
12602 #: build/C/man2/mincore.2:166
12604 "Before kernel 2.6.21, B<mincore>() did not return correct information for "
12605 "B<MAP_PRIVATE> mappings, or for nonlinear mappings (established using "
12606 "B<remap_file_pages>(2))."
12609 #. type: Plain text
12610 #: build/C/man2/mincore.2:169
12611 msgid "B<mlock>(2), B<mmap>(2)"
12615 #: build/C/man2/mkdir.2:10
12621 #: build/C/man2/mkdir.2:10
12626 #. type: Plain text
12627 #: build/C/man2/mkdir.2:13
12628 msgid "mkdir - create a directory"
12631 #. .B #include <unistd.h>
12632 #. type: Plain text
12633 #: build/C/man2/mkdir.2:18
12636 "B<#include E<lt>sys/stat.hE<gt>>\n"
12637 "B<#include E<lt>sys/types.hE<gt>>\n"
12640 #. type: Plain text
12641 #: build/C/man2/mkdir.2:20
12643 msgid "B<int mkdir(const char *>I<pathname>B<, mode_t >I<mode>B<);>\n"
12646 #. type: Plain text
12647 #: build/C/man2/mkdir.2:25
12648 msgid "B<mkdir>() attempts to create a directory named I<pathname>."
12651 #. type: Plain text
12652 #: build/C/man2/mkdir.2:35
12654 "The argument I<mode> specifies the permissions to use. It is modified by "
12655 "the process's I<umask> in the usual way: the permissions of the created "
12656 "directory are (I<mode> & ~I<umask> & 0777). Other mode bits of the created "
12657 "directory depend on the operating system. For Linux, see below."
12660 #. type: Plain text
12661 #: build/C/man2/mkdir.2:45
12663 "The newly created directory will be owned by the effective user ID of the "
12664 "process. If the directory containing the file has the set-group-ID bit set, "
12665 "or if the filesystem is mounted with BSD group semantics (I<mount -o "
12666 "bsdgroups> or, synonymously I<mount -o grpid>), the new directory will "
12667 "inherit the group ownership from its parent; otherwise it will be owned by "
12668 "the effective group ID of the process."
12671 #. type: Plain text
12672 #: build/C/man2/mkdir.2:48
12674 "If the parent directory has the set-group-ID bit set then so will the newly "
12675 "created directory."
12678 #. type: Plain text
12679 #: build/C/man2/mkdir.2:53
12681 "B<mkdir>() returns zero on success, or -1 if an error occurred (in which "
12682 "case, I<errno> is set appropriately)."
12685 #. type: Plain text
12686 #: build/C/man2/mkdir.2:62
12688 "The parent directory does not allow write permission to the process, or one "
12689 "of the directories in I<pathname> did not allow search permission. (See "
12690 "also B<path_resolution>(7).)"
12694 #: build/C/man2/mkdir.2:62
12699 #. type: Plain text
12700 #: build/C/man2/mkdir.2:66
12702 "The user's quota of disk blocks or inodes on the filesystem has been "
12707 #: build/C/man2/mkdir.2:66
12712 #. type: Plain text
12713 #: build/C/man2/mkdir.2:73
12715 "I<pathname> already exists (not necessarily as a directory). This includes "
12716 "the case where I<pathname> is a symbolic link, dangling or not."
12720 #: build/C/man2/mkdir.2:80
12725 #. type: Plain text
12726 #: build/C/man2/mkdir.2:84
12727 msgid "The number of links to the parent directory would exceed B<LINK_MAX>."
12730 #. type: Plain text
12731 #: build/C/man2/mkdir.2:87
12732 msgid "I<pathname> was too long."
12735 #. type: Plain text
12736 #: build/C/man2/mkdir.2:92
12738 "A directory component in I<pathname> does not exist or is a dangling "
12743 #: build/C/man2/mkdir.2:95 build/C/man2/mkdir.2:100
12748 #. type: Plain text
12749 #: build/C/man2/mkdir.2:100
12750 msgid "The device containing I<pathname> has no room for the new directory."
12753 #. type: Plain text
12754 #: build/C/man2/mkdir.2:104
12756 "The new directory cannot be created because the user's disk quota is "
12760 #. type: Plain text
12761 #: build/C/man2/mkdir.2:114
12763 "The filesystem containing I<pathname> does not support the creation of "
12767 #. type: Plain text
12768 #: build/C/man2/mkdir.2:118
12769 msgid "I<pathname> refers to a file on a read-only filesystem."
12772 #. SVr4 documents additional EIO, EMULTIHOP
12773 #. type: Plain text
12774 #: build/C/man2/mkdir.2:121
12775 msgid "SVr4, BSD, POSIX.1-2001."
12778 #. type: Plain text
12779 #: build/C/man2/mkdir.2:129
12781 "Under Linux apart from the permission bits, only the B<S_ISVTX> mode bit is "
12782 "honored. That is, under Linux the created directory actually gets mode "
12783 "(I<mode> & ~I<umask> & 01777). See also B<stat>(2)."
12786 #. type: Plain text
12787 #: build/C/man2/mkdir.2:133
12789 "There are many infelicities in the protocol underlying NFS. Some of these "
12790 "affect B<mkdir>()."
12793 #. type: Plain text
12794 #: build/C/man2/mkdir.2:145
12796 "B<mkdir>(1), B<chmod>(2), B<chown>(2), B<mkdirat>(2), B<mknod>(2), "
12797 "B<mount>(2), B<rmdir>(2), B<stat>(2), B<umask>(2), B<unlink>(2), "
12798 "B<path_resolution>(7)"
12802 #: build/C/man2/nice.2:31
12808 #: build/C/man2/nice.2:31 build/C/man2/vhangup.2:28
12813 #. type: Plain text
12814 #: build/C/man2/nice.2:34
12815 msgid "nice - change process priority"
12818 #. type: Plain text
12819 #: build/C/man2/nice.2:38
12820 msgid "B<int nice(int >I<inc>B<);>"
12823 #. type: Plain text
12824 #: build/C/man2/nice.2:46
12825 msgid "B<nice>(): _BSD_SOURCE || _SVID_SOURCE || _XOPEN_SOURCE"
12828 #. type: Plain text
12829 #: build/C/man2/nice.2:56
12831 "B<nice>() adds I<inc> to the nice value for the calling process. (A higher "
12832 "nice value means a low priority.) Only the super\\%user may specify a "
12833 "negative increment, or priority increase. The range for nice values is "
12834 "described in B<getpriority>(2)."
12837 #. type: Plain text
12838 #: build/C/man2/nice.2:61
12840 "On success, the new nice value is returned (but see NOTES below). On error, "
12841 "-1 is returned, and I<errno> is set appropriately."
12844 #. type: Plain text
12845 #: build/C/man2/nice.2:75
12847 "The calling process attempted to increase its priority by supplying a "
12848 "negative I<inc> but has insufficient privileges. Under Linux the "
12849 "B<CAP_SYS_NICE> capability is required. (But see the discussion of the "
12850 "B<RLIMIT_NICE> resource limit in B<setrlimit>(2).)"
12853 #. type: Plain text
12854 #: build/C/man2/nice.2:82
12856 "SVr4, 4.3BSD, POSIX.1-2001. However, the Linux and (g)libc (earlier than "
12857 "glibc 2.2.4) return value is nonstandard, see below. SVr4 documents an "
12858 "additional B<EINVAL> error code."
12861 #. type: Plain text
12862 #: build/C/man2/nice.2:92
12864 "SUSv2 and POSIX.1-2001 specify that B<nice>() should return the new nice "
12865 "value. However, the Linux syscall and the B<nice>() library function "
12866 "provided in older versions of (g)libc (earlier than glibc 2.2.4) return 0 on "
12867 "success. The new nice value can be found using B<getpriority>(2)."
12870 #. type: Plain text
12871 #: build/C/man2/nice.2:105
12873 "Since glibc 2.2.4, B<nice>() is implemented as a library function that "
12874 "calls B<getpriority>(2) to obtain the new nice value to be returned to the "
12875 "caller. With this implementation, a successful call can legitimately return "
12876 "-1. To reliably detect an error, set I<errno> to 0 before the call, and "
12877 "check its value when B<nice>() returns -1."
12880 #. type: Plain text
12881 #: build/C/man2/nice.2:112
12883 "B<nice>(1), B<renice>(1), B<fork>(2), B<getpriority>(2), B<setpriority>(2), "
12884 "B<capabilities>(7)"
12888 #: build/C/man2/pread.2:25
12893 #. type: Plain text
12894 #: build/C/man2/pread.2:28
12895 msgid "pread, pwrite - read from or write to a file descriptor at a given offset"
12898 #. type: Plain text
12899 #: build/C/man2/pread.2:33
12901 "B<ssize_t pread(int >I<fd>B<, void *>I<buf>B<, size_t >I<count>B<, off_t "
12905 #. type: Plain text
12906 #: build/C/man2/pread.2:36
12908 "B<ssize_t pwrite(int >I<fd>B<, const void *>I<buf>B<, size_t >I<count>B<, "
12909 "off_t >I<offset>B<);>"
12912 #. type: Plain text
12913 #: build/C/man2/pread.2:46
12914 msgid "B<pread>(), B<pwrite>():"
12917 #. type: Plain text
12918 #: build/C/man2/pread.2:48
12919 msgid "_XOPEN_SOURCE\\ E<gt>=\\ 500"
12922 #. type: Plain text
12923 #: build/C/man2/pread.2:64
12925 "B<pread>() reads up to I<count> bytes from file descriptor I<fd> at offset "
12926 "I<offset> (from the start of the file) into the buffer starting at I<buf>. "
12927 "The file offset is not changed."
12930 #. type: Plain text
12931 #: build/C/man2/pread.2:75
12933 "B<pwrite>() writes up to I<count> bytes from the buffer starting at I<buf> "
12934 "to the file descriptor I<fd> at offset I<offset>. The file offset is not "
12938 #. type: Plain text
12939 #: build/C/man2/pread.2:79
12940 msgid "The file referenced by I<fd> must be capable of seeking."
12943 #. type: Plain text
12944 #: build/C/man2/pread.2:89
12946 "On success, the number of bytes read or written is returned (zero indicates "
12947 "that nothing was written, in the case of B<pwrite>(), or end of file, in the "
12948 "case of B<pread>()), or -1 on error, in which case I<errno> is set to "
12949 "indicate the error."
12952 #. type: Plain text
12953 #: build/C/man2/pread.2:104
12955 "B<pread>() can fail and set I<errno> to any error specified for B<read>(2) "
12956 "or B<lseek>(2). B<pwrite>() can fail and set I<errno> to any error "
12957 "specified for B<write>(2) or B<lseek>(2)."
12960 #. type: Plain text
12961 #: build/C/man2/pread.2:115
12963 "The B<pread>() and B<pwrite>() system calls were added to Linux in version "
12964 "2.1.60; the entries in the i386 system call table were added in 2.1.69. C "
12965 "library support (including emulation using B<lseek>(2) on older kernels "
12966 "without the system calls) was added in glibc 2.1."
12969 #. type: Plain text
12970 #: build/C/man2/pread.2:125
12972 "The B<pread>() and B<pwrite>() system calls are especially useful in "
12973 "multithreaded applications. They allow multiple threads to perform I/O on "
12974 "the same file descriptor without being affected by changes to the file "
12975 "offset by other threads."
12978 #. type: Plain text
12979 #: build/C/man2/pread.2:141
12981 "On Linux, the underlying system calls were renamed in kernel 2.6: B<pread>() "
12982 "became B<pread64>(), and B<pwrite>() became B<pwrite64>(). The system call "
12983 "numbers remained the same. The glibc B<pread>() and B<pwrite>() wrapper "
12984 "functions transparently deal with the change."
12987 #. type: Plain text
12988 #: build/C/man2/pread.2:146 build/C/man2/truncate.2:248
12990 "On some 32-bit architectures, the calling signature for these system calls "
12991 "differ, for the reasons described in B<syscall>(2)."
12994 #. FIXME https://bugzilla.kernel.org/show_bug.cgi?id=43178
12995 #. type: Plain text
12996 #: build/C/man2/pread.2:158
12998 "POSIX requires that opening a file with the B<O_APPEND> flag should have no "
12999 "affect on the location at which B<pwrite>() writes data. However, on "
13000 "Linux, if a file is opened with B<O_APPEND>, B<pwrite>() appends data to "
13001 "the end of the file, regardless of the value of I<offset>."
13004 #. type: Plain text
13005 #: build/C/man2/pread.2:163
13006 msgid "B<lseek>(2), B<read>(2), B<readv>(2), B<write>(2)"
13010 #: build/C/man2/set_thread_area.2:8
13012 msgid "SET_THREAD_AREA"
13015 #. type: Plain text
13016 #: build/C/man2/set_thread_area.2:11
13017 msgid "set_thread_area - set a thread local storage (TLS) area"
13020 #. type: Plain text
13021 #: build/C/man2/set_thread_area.2:17
13022 msgid "B<int set_thread_area(struct user_desc *>I<u_info>B<);>"
13025 #. type: Plain text
13026 #: build/C/man2/set_thread_area.2:33
13028 "B<set_thread_area>() sets an entry in the current thread's thread-local "
13029 "storage (TLS) array. The TLS array entry set by B<set_thread_area>() "
13030 "corresponds to the value of I<u_info-E<gt>entry_number> passed in by the "
13031 "user. If this value is in bounds, B<set_thread_area>() copies the TLS "
13032 "descriptor pointed to by I<u_info> into the thread's TLS array."
13035 #. type: Plain text
13036 #: build/C/man2/set_thread_area.2:44
13038 "When B<set_thread_area>() is passed an I<entry_number> of -1, it uses a "
13039 "free TLS entry. If B<set_thread_area>() finds a free TLS entry, the value "
13040 "of I<u_info-E<gt>entry_number> is set upon return to show which entry was "
13044 #. type: Plain text
13045 #: build/C/man2/set_thread_area.2:49
13047 "B<set_thread_area>() returns 0 on success, and -1 on failure, with I<errno> "
13048 "set appropriately."
13052 #: build/C/man2/set_thread_area.2:56
13057 #. type: Plain text
13058 #: build/C/man2/set_thread_area.2:59
13059 msgid "A free TLS entry could not be located."
13062 #. type: Plain text
13063 #: build/C/man2/set_thread_area.2:63
13064 msgid "A version of B<set_thread_area>() first appeared in Linux 2.5.29."
13067 #. type: Plain text
13068 #: build/C/man2/set_thread_area.2:67
13070 "B<set_thread_area>() is Linux-specific and should not be used in programs "
13071 "that are intended to be portable."
13074 #. type: Plain text
13075 #: build/C/man2/set_thread_area.2:72
13077 "Glibc does not provide a wrapper for this system call, since it is generally "
13078 "intended only for use by threading libraries. In the unlikely event that "
13079 "you want to call it directly, use B<syscall>(2)."
13082 #. type: Plain text
13083 #: build/C/man2/set_thread_area.2:74
13084 msgid "B<get_thread_area>(2)"
13088 #: build/C/man2/setup.2:34
13094 #: build/C/man2/setup.2:34 build/C/man2/uname.2:27
13099 #. type: Plain text
13100 #: build/C/man2/setup.2:37
13101 msgid "setup - setup devices and filesystems, mount root filesystem"
13104 #. type: Plain text
13105 #: build/C/man2/setup.2:41
13106 msgid "B<int setup(void);>"
13109 #. type: Plain text
13110 #: build/C/man2/setup.2:47
13112 "B<setup>() is called once from within I<linux/init/main.c>. It calls "
13113 "initialization functions for devices and filesystems configured into the "
13114 "kernel and then mounts the root filesystem."
13117 #. type: Plain text
13118 #: build/C/man2/setup.2:53
13120 "No user process may call B<setup>(). Any user process, even a process with "
13121 "superuser permission, will receive B<EPERM>."
13124 #. type: Plain text
13125 #: build/C/man2/setup.2:56
13126 msgid "B<setup>() always returns -1 for a user process."
13129 #. type: Plain text
13130 #: build/C/man2/setup.2:62
13131 msgid "Since Linux 2.1.121, no such function exists anymore."
13134 #. type: Plain text
13135 #: build/C/man2/setup.2:65
13137 "This function is Linux-specific, and should not be used in programs intended "
13138 "to be portable, or indeed in any programs at all."
13141 #. type: Plain text
13142 #: build/C/man2/setup.2:72
13144 "The calling sequence varied: at some times I<setup ()> has had a single "
13145 "argument I<void\\ *BIOS> and at other times a single argument I<int magic>."
13149 #: build/C/man5/shells.5:28
13154 #. type: Plain text
13155 #: build/C/man5/shells.5:31
13156 msgid "shells - pathnames of valid login shells"
13159 #. type: Plain text
13160 #: build/C/man5/shells.5:37
13162 "I</etc/shells> is a text file which contains the full pathnames of valid "
13163 "login shells. This file is consulted by B<chsh>(1) and available to be "
13164 "queried by other programs."
13167 #. type: Plain text
13168 #: build/C/man5/shells.5:43
13170 "Be aware that there are programs which consult this file to find out if a "
13171 "user is a normal user; for example, FTP daemons traditionally disallow "
13172 "access to users with shells not included in this file."
13175 #. type: Plain text
13176 #: build/C/man5/shells.5:45
13177 msgid "I</etc/shells>"
13180 #. type: Plain text
13181 #: build/C/man5/shells.5:48
13182 msgid "I</etc/shells> may contain the following paths:"
13185 #. type: Plain text
13186 #: build/C/man5/shells.5:51
13190 #. type: Plain text
13191 #: build/C/man5/shells.5:53
13192 msgid "I</bin/bash>"
13195 #. type: Plain text
13196 #: build/C/man5/shells.5:55
13197 msgid "I</bin/csh>"
13200 #. type: Plain text
13201 #: build/C/man5/shells.5:59
13202 msgid "B<chsh>(1), B<getusershell>(3)"
13206 #: build/C/man3/sleep.3:26
13212 #: build/C/man3/sleep.3:26
13217 #. type: Plain text
13218 #: build/C/man3/sleep.3:29
13219 msgid "sleep - sleep for the specified number of seconds"
13222 #. type: Plain text
13223 #: build/C/man3/sleep.3:34
13225 msgid "B<unsigned int sleep(unsigned int >I<seconds>B<);>\n"
13228 #. type: Plain text
13229 #: build/C/man3/sleep.3:40
13231 "B<sleep>() makes the calling thread sleep until I<seconds> seconds have "
13232 "elapsed or a signal arrives which is not ignored."
13235 #. type: Plain text
13236 #: build/C/man3/sleep.3:44
13238 "Zero if the requested time has elapsed, or the number of seconds left to "
13239 "sleep, if the call was interrupted by a signal handler."
13242 #. type: Plain text
13243 #: build/C/man3/sleep.3:55
13245 "B<sleep>() may be implemented using B<SIGALRM>; mixing calls to B<alarm>(2) "
13246 "and B<sleep>() is a bad idea."
13249 #. type: Plain text
13250 #: build/C/man3/sleep.3:61
13252 "Using B<longjmp>(3) from a signal handler or modifying the handling of "
13253 "B<SIGALRM> while sleeping will cause undefined results."
13256 #. type: Plain text
13257 #: build/C/man3/sleep.3:66
13258 msgid "B<alarm>(2), B<nanosleep>(2), B<signal>(2), B<signal>(7)"
13262 #: build/C/man3/swab.3:31
13268 #: build/C/man3/swab.3:31
13273 #. type: Plain text
13274 #: build/C/man3/swab.3:34
13275 msgid "swab - swap adjacent bytes"
13278 #. type: Plain text
13279 #: build/C/man3/swab.3:38
13282 "B<#define _XOPEN_SOURCE> /* See feature_test_macros(7) */\n"
13283 "B<#include E<lt>unistd.hE<gt>>\n"
13286 #. type: Plain text
13287 #: build/C/man3/swab.3:40
13289 msgid "B<void swab(const void *>I<from>B<, void *>I<to>B<, ssize_t >I<n>B<);>\n"
13292 #. type: Plain text
13293 #: build/C/man3/swab.3:55
13295 "The B<swab>() function copies I<n> bytes from the array pointed to by "
13296 "I<from> to the array pointed to by I<to>, exchanging adjacent even and odd "
13297 "bytes. This function is used to exchange data between machines that have "
13298 "different low/high byte ordering."
13301 #. type: Plain text
13302 #: build/C/man3/swab.3:68
13304 "This function does nothing when I<n> is negative. When I<n> is positive and "
13305 "odd, it handles I<n-1> bytes as above, and does something unspecified with "
13306 "the last byte. (In other words, I<n> should be even.)"
13309 #. type: Plain text
13310 #: build/C/man3/swab.3:72
13311 msgid "The B<swab>() function returns no value."
13314 #. type: Plain text
13315 #: build/C/man3/swab.3:76
13316 msgid "B<bstring>(3)"
13320 #: build/C/man2/swapon.2:37
13326 #: build/C/man2/swapon.2:37
13331 #. type: Plain text
13332 #: build/C/man2/swapon.2:40
13333 msgid "swapon, swapoff - start/stop swapping to file/device"
13336 #. type: Plain text
13337 #: build/C/man2/swapon.2:44
13338 msgid "B<#include E<lt>asm/page.hE<gt> /* to find PAGE_SIZE */>"
13341 #. type: Plain text
13342 #: build/C/man2/swapon.2:46
13343 msgid "B<#include E<lt>sys/swap.hE<gt>>"
13346 #. type: Plain text
13347 #: build/C/man2/swapon.2:48
13348 msgid "B<int swapon(const char *>I<path>B<, int >I<swapflags>B<);>"
13351 #. type: Plain text
13352 #: build/C/man2/swapon.2:50
13353 msgid "B<int swapoff(const char *>I<path>B<);>"
13356 #. type: Plain text
13357 #: build/C/man2/swapon.2:57
13359 "B<swapon>() sets the swap area to the file or block device specified by "
13360 "I<path>. B<swapoff>() stops swapping to the file or block device specified "
13364 #. type: Plain text
13365 #: build/C/man2/swapon.2:67
13367 "If the B<SWAP_FLAG_PREFER> flag is specified in the B<swapon>() "
13368 "I<swapflags> argument, the new swap area will have a higher priority than "
13369 "default. The priority is encoded within I<swapflags> as:"
13372 #. type: Plain text
13373 #: build/C/man2/swapon.2:70
13374 msgid "I<(prio E<lt>E<lt> SWAP_FLAG_PRIO_SHIFT) & SWAP_FLAG_PRIO_MASK>"
13377 #. type: Plain text
13378 #: build/C/man2/swapon.2:82
13380 "If the B<SWAP_FLAG_DISCARD> flag is specified in the B<swapon>() "
13381 "I<swapflags> argument, freed swap pages will be discarded before they are "
13382 "reused, if the swap device supports the discard or trim operation. (This "
13383 "may improve performance on some Solid State Devices, but often it does not.) "
13387 #. type: Plain text
13388 #: build/C/man2/swapon.2:86
13390 "These functions may be used only by a privileged process (one having the "
13391 "B<CAP_SYS_ADMIN> capability)."
13395 #: build/C/man2/swapon.2:86
13400 #. type: Plain text
13401 #: build/C/man2/swapon.2:91
13403 "Each swap area has a priority, either high or low. The default priority is "
13404 "low. Within the low-priority areas, newer areas are even lower priority "
13405 "than older areas."
13408 #. type: Plain text
13409 #: build/C/man2/swapon.2:97
13411 "All priorities set with I<swapflags> are high-priority, higher than "
13412 "default. They may have any nonnegative value chosen by the caller. Higher "
13413 "numbers mean higher priority."
13416 #. type: Plain text
13417 #: build/C/man2/swapon.2:105
13419 "Swap pages are allocated from areas in priority order, highest priority "
13420 "first. For areas with different priorities, a higher-priority area is "
13421 "exhausted before using a lower-priority area. If two or more areas have the "
13422 "same priority, and it is the highest priority available, pages are allocated "
13423 "on a round-robin basis between them."
13426 #. type: Plain text
13427 #: build/C/man2/swapon.2:108
13429 "As of Linux 1.3.6, the kernel usually follows these rules, but there are "
13433 #. type: Plain text
13434 #: build/C/man2/swapon.2:121
13436 "(for B<swapon>()) The specified I<path> is already being used as a swap "
13440 #. type: Plain text
13441 #: build/C/man2/swapon.2:133
13443 "The file I<path> exists, but refers neither to a regular file nor to a block "
13444 "device; or, for B<swapon>(), the indicated path does not contain a valid "
13445 "swap signature or resides on an in-memory filesystem like tmpfs; or, for "
13446 "B<swapoff>(), I<path> is not currently a swap area."
13449 #. type: Plain text
13450 #: build/C/man2/swapon.2:141
13451 msgid "The file I<path> does not exist."
13454 #. type: Plain text
13455 #: build/C/man2/swapon.2:144
13456 msgid "The system has insufficient memory to start swapping."
13459 #. type: Plain text
13460 #: build/C/man2/swapon.2:151
13462 "The caller does not have the B<CAP_SYS_ADMIN> capability. Alternatively, "
13463 "the maximum number of swap files are already in use; see NOTES below."
13466 #. type: Plain text
13467 #: build/C/man2/swapon.2:157
13469 "These functions are Linux-specific and should not be used in programs "
13470 "intended to be portable. The second I<swapflags> argument was introduced in "
13474 #. type: Plain text
13475 #: build/C/man2/swapon.2:160
13476 msgid "The partition or path must be prepared with B<mkswap>(8)."
13479 #. type: Plain text
13480 #: build/C/man2/swapon.2:180
13482 "There is an upper limit on the number of swap files that may be used, "
13483 "defined by the kernel constant B<MAX_SWAPFILES>. Before kernel 2.4.10, "
13484 "B<MAX_SWAPFILES> has the value 8; since kernel 2.4.10, it has the value 32. "
13485 "Since kernel 2.6.18, the limit is decreased by 2 (thus: 30) if the kernel "
13486 "is built with the B<CONFIG_MIGRATION> option (which reserves two swap table "
13487 "entries for the page migration features of B<mbind>(2) and "
13488 "B<migrate_pages>(2)). Since kernel 2.6.32, the limit is further decreased "
13489 "by 1 if the kernel is built with the B<CONFIG_MEMORY_FAILURE> option."
13492 #. To be precise: 2.6.35.5
13493 #. type: Plain text
13494 #: build/C/man2/swapon.2:191
13496 "Discard of swap pages was introduced in kernel 2.6.29, then made conditional "
13497 "on the B<SWAP_FLAG_DISCARD> flag in kernel 2.6.36, which still discards the "
13498 "entire swap area when B<swapon>() is called, even if that flag bit is not "
13502 #. type: Plain text
13503 #: build/C/man2/swapon.2:195
13504 msgid "B<mkswap>(8), B<swapoff>(8), B<swapon>(8)"
13508 #: build/C/man2/syscall.2:40
13513 #. type: Plain text
13514 #: build/C/man2/syscall.2:43
13515 msgid "syscall - indirect system call"
13518 #. type: Plain text
13519 #: build/C/man2/syscall.2:48
13522 "B<#define _GNU_SOURCE> /* See feature_test_macros(7) */\n"
13523 "B<#include E<lt>unistd.hE<gt>>\n"
13524 "B<#include E<lt>sys/syscall.hE<gt> >/* For SYS_xxx definitions */\n"
13527 #. type: Plain text
13528 #: build/C/man2/syscall.2:50
13530 msgid "B<int syscall(int >I<number>B<, ...);>\n"
13533 #. type: Plain text
13534 #: build/C/man2/syscall.2:62
13536 "B<syscall>() is a small library function that invokes the system call whose "
13537 "assembly language interface has the specified I<number> with the specified "
13538 "arguments. Employing B<syscall>() is useful, for example, when invoking a "
13539 "system call that has no wrapper function in the C library."
13542 #. type: Plain text
13543 #: build/C/man2/syscall.2:69
13545 "B<syscall>() saves CPU registers before making the system call, restores "
13546 "the registers upon return from the system call, and stores any error code "
13547 "returned by the system call in B<errno>(3) if an error occurs."
13550 #. type: Plain text
13551 #: build/C/man2/syscall.2:72
13553 "Symbolic constants for system call numbers can be found in the header file "
13554 "I<E<lt>sys/syscall.hE<gt>>."
13557 #. type: Plain text
13558 #: build/C/man2/syscall.2:78
13560 "The return value is defined by the system call being invoked. In general, a "
13561 "0 return value indicates success. A -1 return value indicates an error, and "
13562 "an error code is stored in I<errno>."
13565 #. type: Plain text
13566 #: build/C/man2/syscall.2:82
13567 msgid "B<syscall>() first appeared in 4BSD."
13571 #: build/C/man2/syscall.2:82
13573 msgid "Architecture-specific requirements"
13576 #. type: Plain text
13577 #: build/C/man2/syscall.2:93
13579 "Each architecture ABI has its own requirements on how system call arguments "
13580 "are passed to the kernel. For system calls that have a glibc wrapper (e.g., "
13581 "most system calls), glibc handles the details of copying arguments to the "
13582 "right registers in a manner suitable for the architecture. However, when "
13583 "using B<syscall>() to make a system call, the caller might need to handle "
13584 "architecture-dependent details; this requirement is most commonly "
13585 "encountered on certain 32-bit architectures."
13588 #. type: Plain text
13589 #: build/C/man2/syscall.2:104
13591 "For example, on the ARM architecture Embedded ABI (EABI), a 64-bit value "
13592 "(e.g., I<long long>) must be aligned to an even register pair. Thus, using "
13593 "B<syscall>() instead of the wrapper provided by glibc, the B<readahead>() "
13594 "system call would be invoked as follows on the ARM architecture with the "
13598 #. type: Plain text
13599 #: build/C/man2/syscall.2:111
13602 "syscall(SYS_readahead, fd, 0,\n"
13603 " (unsigned int) (offset E<gt>E<gt> 32),\n"
13604 " (unsigned int) (offset & 0xFFFFFFFF),\n"
13608 #. type: Plain text
13609 #: build/C/man2/syscall.2:125
13611 "Since the offset argument is 64 bits, and the first argument (I<fd>) is "
13612 "passed in I<r0>, the caller must manually split and align the 64-bit value "
13613 "so that it is passed in the I<r2>/I<r3> register pair. That means inserting "
13614 "a dummy value into I<r1> (the second argument of 0)."
13617 #. Mike Frysinger: this issue ends up forcing MIPS
13618 #. O32 to take 7 arguments to syscall()
13619 #. type: Plain text
13620 #: build/C/man2/syscall.2:130
13622 "Similar issues can occur on MIPS with the O32 ABI, on PowerPC with the "
13623 "32-bit ABI, and on Xtensa."
13626 #. type: Plain text
13627 #: build/C/man2/syscall.2:141
13629 "The affected system calls are B<fadvise64_64>(2), B<ftruncate64>(2), "
13630 "B<posix_fadvise>(2), B<pread64>(2), B<pwrite64>(2), B<readahead>(2), "
13631 "B<sync_file_range>(2), and B<truncate64>(2)."
13635 #: build/C/man2/syscall.2:141
13637 msgid "Architecture calling conventions"
13640 #. type: Plain text
13641 #: build/C/man2/syscall.2:145
13643 "Every architecture has its own way of invoking and passing arguments to the "
13644 "kernel. The details for various architectures are listed in the two tables "
13648 #. type: Plain text
13649 #: build/C/man2/syscall.2:151
13651 "The first table lists the instruction used to transition to kernel mode, "
13652 "(which might not be the fastest or best way to transition to the kernel, so "
13653 "you might have to refer to the VDSO), the register used to indicate the "
13654 "system call number, and the register used to return the system call result."
13658 #: build/C/man2/syscall.2:156
13660 msgid "arch/ABI\tinstruction\tsyscall #\tretval\tNotes\n"
13664 #: build/C/man2/syscall.2:158
13666 msgid "arm/OABI\tswi NR\t-\ta1\tNR is syscall #\n"
13670 #: build/C/man2/syscall.2:159
13672 msgid "arm/EABI\tswi 0x0\tr7\tr0\n"
13676 #: build/C/man2/syscall.2:160
13678 msgid "blackfin\texcpt 0x0\tP0\tR0\n"
13682 #: build/C/man2/syscall.2:161
13684 msgid "i386\tint $0x80\teax\teax\n"
13688 #: build/C/man2/syscall.2:162
13690 msgid "ia64\tbreak 0x100000\tr15\tr10/r8\n"
13694 #: build/C/man2/syscall.2:163
13696 msgid "parisc\tble 0x100(%sr2, %r0)\tr20\tr28\n"
13700 #: build/C/man2/syscall.2:164
13702 msgid "s390\tsvc 0\tr1\tr2\tNR may be passed directly with\n"
13706 #: build/C/man2/syscall.2:165
13708 msgid "s390x\tsvc 0\tr1\tr2\t\"svc NR\" if NR is less than 256\n"
13712 #: build/C/man2/syscall.2:166
13714 msgid "sparc/32\tt 0x10\tg1\to0\n"
13718 #: build/C/man2/syscall.2:167
13720 msgid "sparc/64\tt 0x6d\tg1\to0\n"
13724 #: build/C/man2/syscall.2:168
13726 msgid "x86_64\tsyscall\trax\trax\n"
13729 #. type: Plain text
13730 #: build/C/man2/syscall.2:176
13731 msgid "The second table shows the registers used to pass the system call arguments."
13735 #: build/C/man2/syscall.2:181
13737 msgid "arch/ABI\targ1\targ2\targ3\targ4\targ5\targ6\targ7\n"
13741 #: build/C/man2/syscall.2:183
13743 msgid "arm/OABI\ta1\ta2\ta3\ta4\tv1\tv2\tv3\n"
13747 #: build/C/man2/syscall.2:184
13749 msgid "arm/EABI\tr0\tr1\tr2\tr3\tr4\tr5\tr6\n"
13753 #: build/C/man2/syscall.2:185
13755 msgid "blackfin\tR0\tR1\tR2\tR3\tR4\tR5\t-\n"
13759 #: build/C/man2/syscall.2:186
13761 msgid "i386\tebx\tecx\tedx\tesi\tedi\tebp\t-\n"
13765 #: build/C/man2/syscall.2:187
13767 msgid "ia64\tr11\tr9\tr10\tr14\tr15\tr13\t-\n"
13771 #: build/C/man2/syscall.2:188
13773 msgid "parisc\tr26\tr25\tr24\tr23\tr22\tr21\t-\n"
13777 #: build/C/man2/syscall.2:189
13779 msgid "s390\tr2\tr3\tr4\tr5\tr6\tr7\t-\n"
13783 #: build/C/man2/syscall.2:190
13785 msgid "s390x\tr2\tr3\tr4\tr5\tr6\tr7\t-\n"
13789 #: build/C/man2/syscall.2:191
13791 msgid "sparc/32\to0\to1\to2\to3\to4\to5\t-\n"
13795 #: build/C/man2/syscall.2:192
13797 msgid "sparc/64\to0\to1\to2\to3\to4\to5\t-\n"
13801 #: build/C/man2/syscall.2:193
13803 msgid "x86_64\trdi\trsi\trdx\tr10\tr8\tr9\t-\n"
13806 #. type: Plain text
13807 #: build/C/man2/syscall.2:202
13809 "Note that these tables don't cover the entire calling convention\\(emsome "
13810 "architectures may indiscriminately clobber other registers not listed here."
13813 #. type: Plain text
13814 #: build/C/man2/syscall.2:209
13817 "#define _GNU_SOURCE\n"
13818 "#include E<lt>unistd.hE<gt>\n"
13819 "#include E<lt>sys/syscall.hE<gt>\n"
13820 "#include E<lt>sys/types.hE<gt>\n"
13821 "#include E<lt>signal.hE<gt>\n"
13824 #. type: Plain text
13825 #: build/C/man2/syscall.2:214
13829 "main(int argc, char *argv[])\n"
13834 #. type: Plain text
13835 #: build/C/man2/syscall.2:218
13838 " tid = syscall(SYS_gettid);\n"
13839 " tid = syscall(SYS_tgkill, getpid(), tid, SIGHUP);\n"
13843 #. type: Plain text
13844 #: build/C/man2/syscall.2:223
13845 msgid "B<_syscall>(2), B<intro>(2), B<syscalls>(2)"
13849 #: build/C/man2/syscalls.2:31
13855 #: build/C/man2/syscalls.2:31
13860 #. type: Plain text
13861 #: build/C/man2/syscalls.2:34
13862 msgid "syscalls - Linux system calls"
13865 #. type: Plain text
13866 #: build/C/man2/syscalls.2:36
13867 msgid "Linux system calls."
13870 #. type: Plain text
13871 #: build/C/man2/syscalls.2:39
13873 "The system call is the fundamental interface between an application and the "
13878 #: build/C/man2/syscalls.2:39
13880 msgid "System calls and library wrapper functions"
13883 #. type: Plain text
13884 #: build/C/man2/syscalls.2:49
13886 "System calls are generally not invoked directly, but rather via wrapper "
13887 "functions in glibc (or perhaps some other library). For details of direct "
13888 "invocation of a system call, see B<intro>(2). Often, but not always, the "
13889 "name of the wrapper function is the same as the name of the system call that "
13890 "it invokes. For example, glibc contains a function B<truncate>() which "
13891 "invokes the underlying \"truncate\" system call."
13894 #. type: Plain text
13895 #: build/C/man2/syscalls.2:67
13897 "Often the glibc wrapper function is quite thin, doing little work other than "
13898 "copying arguments to the right registers before invoking the system call, "
13899 "and then setting I<errno> appropriately after the system call has returned. "
13900 "(These are the same steps that are performed by B<syscall>(2), which can be "
13901 "used to invoke system calls for which no wrapper function is provided.) "
13902 "Note: system calls indicate a failure by returning a negative error number "
13903 "to the caller; when this happens, the wrapper function negates the returned "
13904 "error number (to make it positive), copies it to I<errno>, and returns -1 to "
13905 "the caller of the wrapper."
13908 #. type: Plain text
13909 #: build/C/man2/syscalls.2:79
13911 "Sometimes, however, the wrapper function does some extra work before "
13912 "invoking the system call. For example, nowadays there are (for reasons "
13913 "described below) two related system calls, B<truncate>(2) and "
13914 "B<truncate64>(2), and the glibc B<truncate>() wrapper function checks which "
13915 "of those system calls are provided by the kernel and determines which should "
13920 #: build/C/man2/syscalls.2:79
13922 msgid "System call list"
13925 #. type: Plain text
13926 #: build/C/man2/syscalls.2:87
13928 "Below is a list of the Linux system calls. In the list, the I<Kernel> "
13929 "column indicates the kernel version for those system calls that were new in "
13930 "Linux 2.2, or have appeared since that kernel version. Note the following "
13934 #. type: Plain text
13935 #: build/C/man2/syscalls.2:90
13937 "Where no kernel version is indicated, the system call appeared in kernel 1.0 "
13941 #. type: Plain text
13942 #: build/C/man2/syscalls.2:96
13944 "Where a system call is marked \"1.2\" this means the system call probably "
13945 "appeared in a 1.1.x kernel version, and first appeared in a stable kernel "
13946 "with 1.2. (Development of the 1.2 kernel was initiated from a branch of "
13947 "kernel 1.0.6 via the 1.1.x unstable kernel series.)"
13950 #. Was kernel 2.0 started from a branch of 1.2.10?
13951 #. At least from the timestamps of the tarballs of
13952 #. of 1.2.10 and 1.3.0, that's how it looks, but in
13953 #. fact the diff doesn't seem very clear, the
13954 #. 1.3.0 .tar.bz is much bigger (2.0 MB) than the
13955 #. 1.2.10 .tar.bz2 (1.8 MB), and AEB points out the
13956 #. timestamps of some files in 1.3.0 seem to be older
13957 #. than those in 1.2.10. All of this suggests
13958 #. that there might not have been a clean branch point.
13959 #. type: Plain text
13960 #: build/C/man2/syscalls.2:112
13962 "Where a system call is marked \"2.0\" this means the system call probably "
13963 "appeared in a 1.3.x kernel version, and first appeared in a stable kernel "
13964 "with 2.0. (Development of the 2.0 kernel was initiated from a branch of "
13965 "kernel 1.2.x, somewhere around 1.2.10, via the 1.3.x unstable kernel "
13969 #. type: Plain text
13970 #: build/C/man2/syscalls.2:118
13972 "Where a system call is marked \"2.2\" this means the system call probably "
13973 "appeared in a 2.1.x kernel version, and first appeared in a stable kernel "
13974 "with 2.2.0. (Development of the 2.2 kernel was initiated from a branch of "
13975 "kernel 2.0.21 via the 2.1.x unstable kernel series.)"
13978 #. type: Plain text
13979 #: build/C/man2/syscalls.2:124
13981 "Where a system call is marked \"2.4\" this means the system call probably "
13982 "appeared in a 2.3.x kernel version, and first appeared in a stable kernel "
13983 "with 2.4.0. (Development of the 2.4 kernel was initiated from a branch of "
13984 "kernel 2.2.8 via the 2.3.x unstable kernel series.)"
13987 #. type: Plain text
13988 #: build/C/man2/syscalls.2:130
13990 "Where a system call is marked \"2.6\" this means the system call probably "
13991 "appeared in a 2.5.x kernel version, and first appeared in a stable kernel "
13992 "with 2.6.0. (Development of kernel 2.6 was initiated from a branch of "
13993 "kernel 2.4.15 via the 2.5.x unstable kernel series.)"
13996 #. type: Plain text
13997 #: build/C/man2/syscalls.2:137
13999 "Starting with kernel 2.6.0, the development model changed, and new system "
14000 "calls may appear in each 2.6.x release. In this case, the exact version "
14001 "number where the system call appeared is shown. This convention continues "
14002 "with the 3.x kernel series, which followed on from kernel 2.6.39."
14005 #. type: Plain text
14006 #: build/C/man2/syscalls.2:145
14008 "In some cases, a system call was added to a stable kernel series after it "
14009 "branched from the previous stable kernel series, and then backported into "
14010 "the earlier stable kernel series. For example some system calls that "
14011 "appeared in 2.6.x were also backported into a 2.4.x release after 2.4.15. "
14012 "When this is so, the version where the system call appeared in both of the "
14013 "major kernel series is listed."
14017 #. Looking at scripts/checksyscalls.sh in the kernel source is
14018 #. instructive about x86 specifics.
14019 #. type: Plain text
14020 #: build/C/man2/syscalls.2:152
14022 "The list of system calls that are available as at kernel 3.9 (or in a few "
14023 "cases only on older kernels) is as follows:"
14027 #: build/C/man2/syscalls.2:157
14029 msgid "B<System call>\tB<Kernel>\tB<Notes>\n"
14033 #: build/C/man2/syscalls.2:159
14035 msgid "B<_llseek>(2)\t1.2\n"
14039 #: build/C/man2/syscalls.2:160
14041 msgid "B<_newselect>(2)\t2.0\n"
14045 #: build/C/man2/syscalls.2:161
14047 msgid "B<_sysctl>(2)\t2.0\n"
14051 #: build/C/man2/syscalls.2:162
14053 msgid "B<accept>(2)\t2.0\tSee notes on B<socketcall>(2)\n"
14057 #: build/C/man2/syscalls.2:163
14059 msgid "B<accept4>(2)\t2.6.28\n"
14063 #: build/C/man2/syscalls.2:164
14065 msgid "B<access>(2)\t1.0\n"
14069 #: build/C/man2/syscalls.2:165
14071 msgid "B<acct>(2)\t1.0\n"
14075 #: build/C/man2/syscalls.2:166
14077 msgid "B<add_key>(2)\t2.6.11\n"
14081 #: build/C/man2/syscalls.2:167
14083 msgid "B<adjtimex>(2)\t1.0\n"
14087 #: build/C/man2/syscalls.2:168
14089 msgid "B<alarm>(2)\t1.0\n"
14093 #: build/C/man2/syscalls.2:169
14095 msgid "B<alloc_hugepages>(2)\t2.5.36\tRemoved in 2.5.44\n"
14099 #: build/C/man2/syscalls.2:170
14101 msgid "B<bdflush>(2)\t1.2\tT{\n"
14105 #: build/C/man2/syscalls.2:171
14107 msgid "Deprecated (does nothing)\n"
14111 #: build/C/man2/syscalls.2:172 build/C/man2/syscalls.2:184 build/C/man2/syscalls.2:314 build/C/man2/syscalls.2:387 build/C/man2/syscalls.2:403 build/C/man2/syscalls.2:415
14117 #: build/C/man2/syscalls.2:173
14119 msgid "since 2.6\n"
14123 #: build/C/man2/syscalls.2:174 build/C/man2/syscalls.2:186 build/C/man2/syscalls.2:316 build/C/man2/syscalls.2:389 build/C/man2/syscalls.2:405 build/C/man2/syscalls.2:417 build/C/man2/syscalls.2:545 build/C/man2/syscalls.2:590
14129 #: build/C/man2/syscalls.2:175
14131 msgid "B<bind>(2)\t2.0\tSee notes on B<socketcall>(2)\n"
14135 #: build/C/man2/syscalls.2:176
14137 msgid "B<brk>(2)\t1.0\n"
14141 #: build/C/man2/syscalls.2:177
14143 msgid "B<cacheflush>(2)\t1.2\tNot on x86\n"
14147 #: build/C/man2/syscalls.2:178
14149 msgid "B<capget>(2)\t2.2\n"
14153 #: build/C/man2/syscalls.2:179
14155 msgid "B<capset>(2)\t2.2\n"
14159 #: build/C/man2/syscalls.2:180
14161 msgid "B<chdir>(2)\t1.0\n"
14165 #: build/C/man2/syscalls.2:181
14167 msgid "B<chmod>(2)\t1.0\n"
14171 #: build/C/man2/syscalls.2:182
14173 msgid "B<chown>(2)\t2.2\tT{\n"
14177 #: build/C/man2/syscalls.2:183 build/C/man2/syscalls.2:313
14179 msgid "See B<chown>(2) for\n"
14183 #: build/C/man2/syscalls.2:185 build/C/man2/syscalls.2:315
14185 msgid "version details\n"
14189 #: build/C/man2/syscalls.2:187
14191 msgid "B<chown32>(2)\t2.4\n"
14195 #: build/C/man2/syscalls.2:188
14197 msgid "B<chroot>(2)\t1.0\n"
14201 #: build/C/man2/syscalls.2:189
14203 msgid "B<clock_adjtime>(2)\t2.6.39\n"
14207 #: build/C/man2/syscalls.2:190
14209 msgid "B<clock_getres>(2)\t2.6\n"
14213 #: build/C/man2/syscalls.2:191
14215 msgid "B<clock_gettime>(2)\t2.6\n"
14219 #: build/C/man2/syscalls.2:192
14221 msgid "B<clock_nanosleep>(2)\t2.6\n"
14225 #: build/C/man2/syscalls.2:193
14227 msgid "B<clock_settime>(2)\t2.6\n"
14231 #: build/C/man2/syscalls.2:194
14233 msgid "B<clone>(2)\t1.0\n"
14237 #: build/C/man2/syscalls.2:195
14239 msgid "B<close>(2)\t1.0\n"
14243 #: build/C/man2/syscalls.2:196
14245 msgid "B<connect>(2)\t2.0\tSee notes on B<socketcall>(2)\n"
14249 #: build/C/man2/syscalls.2:197
14251 msgid "B<creat>(2)\t1.0\n"
14255 #: build/C/man2/syscalls.2:198
14257 msgid "B<create_module>(2)\t\tRemoved in 2.6\n"
14261 #: build/C/man2/syscalls.2:199
14263 msgid "B<delete_module>(2)\t1.0\n"
14267 #: build/C/man2/syscalls.2:200
14269 msgid "B<dup>(2)\t1.0\n"
14273 #: build/C/man2/syscalls.2:201
14275 msgid "B<dup2>(2)\t1.0\n"
14279 #: build/C/man2/syscalls.2:202
14281 msgid "B<dup3>(2)\t2.6.27\n"
14285 #: build/C/man2/syscalls.2:203
14287 msgid "B<epoll_create>(2)\t2.6\n"
14291 #: build/C/man2/syscalls.2:204
14293 msgid "B<epoll_create1>(2)\t2.6.27\n"
14297 #: build/C/man2/syscalls.2:205
14299 msgid "B<epoll_ctl>(2)\t2.6\n"
14303 #: build/C/man2/syscalls.2:206
14305 msgid "B<epoll_pwait>(2)\t2.6.19\n"
14309 #: build/C/man2/syscalls.2:207
14311 msgid "B<epoll_wait>(2)\t2.6\n"
14315 #: build/C/man2/syscalls.2:208
14317 msgid "B<eventfd>(2)\t2.6.22\n"
14321 #: build/C/man2/syscalls.2:209
14323 msgid "B<eventfd2>(2)\t2.6.27\n"
14327 #: build/C/man2/syscalls.2:210
14329 msgid "B<execve>(2)\t1.0\n"
14333 #: build/C/man2/syscalls.2:211
14335 msgid "B<exit>(2)\t1.0\n"
14339 #: build/C/man2/syscalls.2:212
14341 msgid "B<exit_group>(2)\t2.6\n"
14345 #: build/C/man2/syscalls.2:213
14347 msgid "B<faccessat>(2)\t2.6.16\n"
14351 #: build/C/man2/syscalls.2:214
14353 msgid "B<fadvise64>(2)\t2.6\n"
14356 #. Implements \fBposix_fadvise\fP(2)
14358 #: build/C/man2/syscalls.2:216
14360 msgid "B<fadvise64_64>(2)\t2.6\n"
14364 #: build/C/man2/syscalls.2:217
14366 msgid "B<fallocate>(2)\t2.6.23\n"
14370 #: build/C/man2/syscalls.2:218
14372 msgid "B<fanotify_init>(2)\t2.6.37\n"
14376 #: build/C/man2/syscalls.2:219
14378 msgid "B<fanotify_mark>(2)\t2.6.37\n"
14381 #. The fanotify calls were added in Linux 2.6.36,
14382 #. but disabled while the API was finalized.
14384 #: build/C/man2/syscalls.2:222
14386 msgid "B<fchdir>(2)\t1.0\n"
14390 #: build/C/man2/syscalls.2:223
14392 msgid "B<fchmod>(2)\t1.0\n"
14396 #: build/C/man2/syscalls.2:224
14398 msgid "B<fchmodat>(2)\t2.6.16\n"
14402 #: build/C/man2/syscalls.2:225
14404 msgid "B<fchown>(2)\t1.0\n"
14408 #: build/C/man2/syscalls.2:226
14410 msgid "B<fchown32>(2)\t2.4\n"
14414 #: build/C/man2/syscalls.2:227
14416 msgid "B<fchownat>(2)\t2.6.16\n"
14420 #: build/C/man2/syscalls.2:228
14422 msgid "B<fcntl>(2)\t1.0\n"
14426 #: build/C/man2/syscalls.2:229
14428 msgid "B<fcntl64>(2)\t2.4\n"
14432 #: build/C/man2/syscalls.2:230
14434 msgid "B<fdatasync>(2)\t2.0\n"
14438 #: build/C/man2/syscalls.2:231
14440 msgid "B<fgetxattr>(2)\t2.6; 2.4.18\n"
14444 #: build/C/man2/syscalls.2:232
14446 msgid "B<finit_module>(2)\t3.8\n"
14450 #: build/C/man2/syscalls.2:233
14452 msgid "B<flistxattr>(2)\t2.6; 2.4.18\n"
14456 #: build/C/man2/syscalls.2:234
14458 msgid "B<flock>(2)\t2.0\n"
14462 #: build/C/man2/syscalls.2:235
14464 msgid "B<fork>(2)\t1.0\n"
14468 #: build/C/man2/syscalls.2:236
14470 msgid "B<free_hugepages>(2)\t2.5.36\tRemoved in 2.5.44\n"
14474 #: build/C/man2/syscalls.2:237
14476 msgid "B<fremovexattr>(2)\t2.6; 2.4.18\n"
14480 #: build/C/man2/syscalls.2:238
14482 msgid "B<fsetxattr>(2)\t2.6; 2.4.18\n"
14486 #: build/C/man2/syscalls.2:239
14488 msgid "B<fstat>(2)\t1.0\n"
14492 #: build/C/man2/syscalls.2:240
14494 msgid "B<fstat64>(2)\t2.4\n"
14498 #: build/C/man2/syscalls.2:241
14500 msgid "B<fstatat64>(2)\t2.6.16\n"
14504 #: build/C/man2/syscalls.2:242
14506 msgid "B<fstatfs>(2)\t1.0\n"
14510 #: build/C/man2/syscalls.2:243
14512 msgid "B<fstatfs64>(2)\t2.6\n"
14516 #: build/C/man2/syscalls.2:244
14518 msgid "B<fsync>(2)\t1.0\t1.0\n"
14522 #: build/C/man2/syscalls.2:245
14524 msgid "B<ftruncate>(2)\t1.0\n"
14528 #: build/C/man2/syscalls.2:246
14530 msgid "B<ftruncate64>(2)\t2.4\n"
14534 #: build/C/man2/syscalls.2:247
14536 msgid "B<futex>(2)\t2.6\n"
14540 #: build/C/man2/syscalls.2:248
14542 msgid "B<futimesat>(2)\t2.6.16\n"
14546 #: build/C/man2/syscalls.2:249
14548 msgid "B<get_kernel_syms>(2)\t\tRemoved in 2.6\n"
14552 #: build/C/man2/syscalls.2:250
14554 msgid "B<get_mempolicy>(2)\t2.6.6\n"
14558 #: build/C/man2/syscalls.2:251
14560 msgid "B<get_robust_list>(2)\t2.6.17\n"
14564 #: build/C/man2/syscalls.2:252
14566 msgid "B<get_thread_area>(2)\t2.6\n"
14570 #: build/C/man2/syscalls.2:253
14572 msgid "B<getcpu>(2)\t2.6.19\n"
14576 #: build/C/man2/syscalls.2:254
14578 msgid "B<getcwd>(2)\t2.2\n"
14582 #: build/C/man2/syscalls.2:255
14584 msgid "B<getdents>(2)\t2.0\n"
14588 #: build/C/man2/syscalls.2:256
14590 msgid "B<getdents64>(2)\t2.4\n"
14594 #: build/C/man2/syscalls.2:257
14596 msgid "B<getegid>(2)\t1.0\n"
14600 #: build/C/man2/syscalls.2:258
14602 msgid "B<getegid32>(2)\t2.4\n"
14606 #: build/C/man2/syscalls.2:259
14608 msgid "B<geteuid>(2)\t1.0\n"
14612 #: build/C/man2/syscalls.2:260
14614 msgid "B<geteuid32>(2)\t2.4\n"
14618 #: build/C/man2/syscalls.2:261
14620 msgid "B<getgid>(2)\t1.0\n"
14624 #: build/C/man2/syscalls.2:262
14626 msgid "B<getgid32>(2)\t2.4\n"
14630 #: build/C/man2/syscalls.2:263
14632 msgid "B<getgroups>(2)\t1.0\n"
14636 #: build/C/man2/syscalls.2:264
14638 msgid "B<getgroups32>(2)\t2.4\n"
14642 #: build/C/man2/syscalls.2:265
14644 msgid "B<getitimer>(2)\t1.0\n"
14648 #: build/C/man2/syscalls.2:266
14650 msgid "B<getpeername>(2)\t2.0\tSee notes on B<socketcall>(2)\n"
14654 #: build/C/man2/syscalls.2:267
14656 msgid "B<getpagesize>(2)\t2.0\tNot on x86\n"
14660 #: build/C/man2/syscalls.2:268
14662 msgid "B<getpgid>(2)\t1.0\n"
14666 #: build/C/man2/syscalls.2:269
14668 msgid "B<getpgrp>(2)\t1.0\n"
14672 #: build/C/man2/syscalls.2:270
14674 msgid "B<getpid>(2)\t1.0\n"
14678 #: build/C/man2/syscalls.2:271
14680 msgid "B<getppid>(2)\t1.0\n"
14684 #: build/C/man2/syscalls.2:272
14686 msgid "B<getpriority>(2)\t1.0\n"
14690 #: build/C/man2/syscalls.2:273
14692 msgid "B<getresgid>(2)\t2.2\n"
14696 #: build/C/man2/syscalls.2:274
14698 msgid "B<getresgid32>(2)\t2.4\n"
14702 #: build/C/man2/syscalls.2:275
14704 msgid "B<getresuid>(2)\t2.2\n"
14708 #: build/C/man2/syscalls.2:276
14710 msgid "B<getresuid32>(2)\t2.4\n"
14714 #: build/C/man2/syscalls.2:277
14716 msgid "B<getrlimit>(2)\t1.0\n"
14720 #: build/C/man2/syscalls.2:278
14722 msgid "B<getrusage>(2)\t1.0\n"
14726 #: build/C/man2/syscalls.2:279
14728 msgid "B<getsid>(2)\t2.0\n"
14732 #: build/C/man2/syscalls.2:280
14734 msgid "B<getsockname>(2)\t2.0\tSee notes on B<socketcall>(2)\n"
14738 #: build/C/man2/syscalls.2:281
14740 msgid "B<getsockopt>(2)\t2.0\tSee notes on B<socketcall>(2)\n"
14744 #: build/C/man2/syscalls.2:282
14746 msgid "B<gettid>(2)\t2.4.11\n"
14750 #: build/C/man2/syscalls.2:283
14752 msgid "B<gettimeofday>(2)\t1.0\n"
14756 #: build/C/man2/syscalls.2:284
14758 msgid "B<getuid>(2)\t1.0\n"
14762 #: build/C/man2/syscalls.2:285
14764 msgid "B<getuid32>(2)\t2.4\n"
14767 #. \fBgetunwind\fP(2) 2.4.8 ia64; DEPRECATED
14769 #: build/C/man2/syscalls.2:287
14771 msgid "B<getxattr>(2)\t2.6; 2.4.18\n"
14775 #: build/C/man2/syscalls.2:288
14777 msgid "B<init_module>(2)\t1.0\n"
14781 #: build/C/man2/syscalls.2:289
14783 msgid "B<inotify_add_watch>(2)\t2.6.13\n"
14787 #: build/C/man2/syscalls.2:290
14789 msgid "B<inotify_init>(2)\t2.6.13\n"
14793 #: build/C/man2/syscalls.2:291
14795 msgid "B<inotify_init1>(2)\t2.6.27\n"
14799 #: build/C/man2/syscalls.2:292
14801 msgid "B<inotify_rm_watch>(2)\t2.6.13\n"
14805 #: build/C/man2/syscalls.2:293
14807 msgid "B<io_cancel>(2)\t2.6\n"
14811 #: build/C/man2/syscalls.2:294
14813 msgid "B<io_destroy>(2)\t2.6\n"
14817 #: build/C/man2/syscalls.2:295
14819 msgid "B<io_getevents>(2)\t2.6\n"
14823 #: build/C/man2/syscalls.2:296
14825 msgid "B<io_setup>(2)\t2.6\n"
14829 #: build/C/man2/syscalls.2:297
14831 msgid "B<io_submit>(2)\t2.6\n"
14835 #: build/C/man2/syscalls.2:298
14837 msgid "B<ioctl>(2)\t1.0\n"
14841 #: build/C/man2/syscalls.2:299
14843 msgid "B<ioperm>(2)\t1.0\n"
14847 #: build/C/man2/syscalls.2:300
14849 msgid "B<iopl>(2)\t1.0\n"
14853 #: build/C/man2/syscalls.2:301
14855 msgid "B<ioprio_get>(2)\t2.6.13\n"
14859 #: build/C/man2/syscalls.2:302
14861 msgid "B<ioprio_set>(2)\t2.6.13\n"
14865 #: build/C/man2/syscalls.2:303
14867 msgid "B<ipc>(2)\t1.0\n"
14870 #. Implements System V IPC calls
14872 #: build/C/man2/syscalls.2:305
14874 msgid "B<kcmp>(2)\t3.5\n"
14878 #: build/C/man2/syscalls.2:306
14880 msgid "B<kern_features>(2)\t3.7\tSparc64\n"
14884 #: build/C/man2/syscalls.2:307
14886 msgid "B<kexec_load>(2)\t2.6.13\n"
14889 #. The entry in the syscall table was reserved starting in 2.6.7
14890 #. Was named sys_kexec_load() from 2.6.7 to 2.6.16
14892 #: build/C/man2/syscalls.2:310
14894 msgid "B<keyctl>(2)\t2.6.11\n"
14898 #: build/C/man2/syscalls.2:311
14900 msgid "B<kill>(2)\t1.0\n"
14904 #: build/C/man2/syscalls.2:312
14906 msgid "B<lchown>(2)\t1.0\tT{\n"
14910 #: build/C/man2/syscalls.2:317
14912 msgid "B<lchown32>(2)\t2.4\n"
14916 #: build/C/man2/syscalls.2:318
14918 msgid "B<lgetxattr>(2)\t2.6; 2.4.18\n"
14922 #: build/C/man2/syscalls.2:319
14924 msgid "B<link>(2)\t1.0\n"
14928 #: build/C/man2/syscalls.2:320
14930 msgid "B<linkat>(2)\t2.6.16\n"
14934 #: build/C/man2/syscalls.2:321
14936 msgid "B<listen>(2)\t2.0\tSee notes on B<socketcall>(2)\n"
14940 #: build/C/man2/syscalls.2:322
14942 msgid "B<listxattr>(2)\t2.6; 2.4.18\n"
14946 #: build/C/man2/syscalls.2:323
14948 msgid "B<llistxattr>(2)\t2.6; 2.4.18\n"
14952 #: build/C/man2/syscalls.2:324
14954 msgid "B<lookup_dcookie>(2)\t2.6\n"
14958 #: build/C/man2/syscalls.2:325
14960 msgid "B<lremovexattr>(2)\t2.6; 2.4.18\n"
14964 #: build/C/man2/syscalls.2:326
14966 msgid "B<lseek>(2)\t1.0\n"
14970 #: build/C/man2/syscalls.2:327
14972 msgid "B<lsetxattr>(2)\t2.6; 2.4.18\n"
14976 #: build/C/man2/syscalls.2:328
14978 msgid "B<lstat>(2)\t1.0\n"
14982 #: build/C/man2/syscalls.2:329
14984 msgid "B<lstat64>(2)\t2.4\n"
14988 #: build/C/man2/syscalls.2:330
14990 msgid "B<madvise>(2)\t2.4\n"
14994 #: build/C/man2/syscalls.2:331
14996 msgid "B<madvise1>(2)\t2.4\n"
15000 #: build/C/man2/syscalls.2:332
15002 msgid "B<mbind>(2)\t2.6.6\n"
15005 #. \fBmemory_ordering\fP(2) ??? Sparc64
15007 #: build/C/man2/syscalls.2:334
15009 msgid "B<migrate_pages>(2)\t2.6.16\n"
15013 #: build/C/man2/syscalls.2:335
15015 msgid "B<mincore>(2)\t2.4\n"
15019 #: build/C/man2/syscalls.2:336
15021 msgid "B<mkdir>(2)\t1.0\n"
15025 #: build/C/man2/syscalls.2:337
15027 msgid "B<mkdirat>(2)\t2.6.16\n"
15031 #: build/C/man2/syscalls.2:338
15033 msgid "B<mknod>(2)\t1.0\n"
15037 #: build/C/man2/syscalls.2:339
15039 msgid "B<mknodat>(2)\t2.6.16\n"
15043 #: build/C/man2/syscalls.2:340
15045 msgid "B<mlock>(2)\t2.0\n"
15049 #: build/C/man2/syscalls.2:341
15051 msgid "B<mlockall>(2)\t2.0\n"
15055 #: build/C/man2/syscalls.2:342
15057 msgid "B<mmap>(2)\t1.0\n"
15061 #: build/C/man2/syscalls.2:343
15063 msgid "B<mmap2>(2)\t2.4\n"
15067 #: build/C/man2/syscalls.2:344
15069 msgid "B<modify_ldt>(2)\t1.0\n"
15073 #: build/C/man2/syscalls.2:345
15075 msgid "B<mount>(2)\t1.0\n"
15079 #: build/C/man2/syscalls.2:346
15081 msgid "B<move_pages>(2)\t2.6.18\n"
15085 #: build/C/man2/syscalls.2:347
15087 msgid "B<mprotect>(2)\t1.0\n"
15091 #: build/C/man2/syscalls.2:348
15093 msgid "B<mq_getsetattr>(2)\t2.6.6\n"
15096 #. Implements \fBmq_getattr\fP(3) and \fBmq_setattr\fP(3)
15098 #: build/C/man2/syscalls.2:350
15100 msgid "B<mq_notify>(2)\t2.6.6\n"
15104 #: build/C/man2/syscalls.2:351
15106 msgid "B<mq_open>(2)\t2.6.6\n"
15110 #: build/C/man2/syscalls.2:352
15112 msgid "B<mq_timedreceive>(2)\t2.6.6\n"
15116 #: build/C/man2/syscalls.2:353
15118 msgid "B<mq_timedsend>(2)\t2.6.6\n"
15122 #: build/C/man2/syscalls.2:354
15124 msgid "B<mq_unlink>(2)\t2.6.6\n"
15128 #: build/C/man2/syscalls.2:355
15130 msgid "B<mremap>(2)\t2.0\n"
15134 #: build/C/man2/syscalls.2:356
15136 msgid "B<msgctl>(2)\t2.0\tSee notes on B<ipc>(2)\n"
15140 #: build/C/man2/syscalls.2:357
15142 msgid "B<msgget>(2)\t2.0\tSee notes on B<ipc>(2)\n"
15146 #: build/C/man2/syscalls.2:358
15148 msgid "B<msgrcv>(2)\t2.0\tSee notes on B<ipc>(2)\n"
15152 #: build/C/man2/syscalls.2:359
15154 msgid "B<msgsnd>(2)\t2.0\tSee notes on B<ipc>(2)\n"
15158 #: build/C/man2/syscalls.2:360
15160 msgid "B<msync>(2)\t2.0\n"
15163 #. \fBmultiplexer\fP(2) ?? __NR_multiplexer reserved on
15164 #. PowerPC, but unimplemented?
15166 #: build/C/man2/syscalls.2:363
15168 msgid "B<munlock>(2)\t2.0\n"
15172 #: build/C/man2/syscalls.2:364
15174 msgid "B<munlockall>(2)\t2.0\n"
15178 #: build/C/man2/syscalls.2:365
15180 msgid "B<munmap>(2)\t1.0\n"
15184 #: build/C/man2/syscalls.2:366
15186 msgid "B<name_to_handle_at>(2)\t2.6.39\n"
15190 #: build/C/man2/syscalls.2:367
15192 msgid "B<nanosleep>(2)\t2.0\n"
15196 #: build/C/man2/syscalls.2:368
15198 msgid "B<nfsservctl>(2)\t2.2\tRemoved in 3.1\n"
15202 #: build/C/man2/syscalls.2:369
15204 msgid "B<nice>(2)\t1.0\n"
15208 #: build/C/man2/syscalls.2:370
15210 msgid "B<oldfstat>(2)\t1.0\n"
15214 #: build/C/man2/syscalls.2:371
15216 msgid "B<oldlstat>(2)\t1.0\n"
15220 #: build/C/man2/syscalls.2:372
15222 msgid "B<oldolduname>(2)\t1.0\n"
15226 #: build/C/man2/syscalls.2:373
15228 msgid "B<oldstat>(2)\t1.0\n"
15232 #: build/C/man2/syscalls.2:374
15234 msgid "B<olduname>(2)\t1.0\n"
15238 #: build/C/man2/syscalls.2:375
15240 msgid "B<open>(2)\t1.0\n"
15244 #: build/C/man2/syscalls.2:376
15246 msgid "B<open_by_handle_at>(2)\t2.6.39\n"
15250 #: build/C/man2/syscalls.2:377
15252 msgid "B<openat>(2)\t2.6.16\n"
15256 #: build/C/man2/syscalls.2:378
15258 msgid "B<pause>(2)\t1.0\n"
15262 #: build/C/man2/syscalls.2:379
15264 msgid "B<pciconfig_iobase>(2)\t2.2.15; 2.4\tNot on x86\n"
15267 #. Alpha, PowerPC, ARM; not x86
15269 #: build/C/man2/syscalls.2:381
15271 msgid "B<pciconfig_read>(2)\t2.0.26; 2.2\tNot on x86\n"
15274 #. , PowerPC, ARM; not x86
15276 #: build/C/man2/syscalls.2:383
15278 msgid "B<pciconfig_write>(2)\t2.0.26; 2.2\tNot on x86\n"
15281 #. , PowerPC, ARM; not x86
15283 #: build/C/man2/syscalls.2:385
15285 msgid "B<perf_event_open>(2)\t2.6.31\tT{\n"
15289 #: build/C/man2/syscalls.2:386
15291 msgid "Was called perf_counter_open()\n"
15295 #: build/C/man2/syscalls.2:388
15297 msgid "in 2.6.31; renamed in 2.6.32\n"
15301 #: build/C/man2/syscalls.2:390
15303 msgid "B<personality>(2)\t1.2\n"
15307 #: build/C/man2/syscalls.2:391
15309 msgid "B<perfctr>(2)\t2.2\tSparc; removed in 2.6.34\n"
15312 #. commit c7d5a0050773e98d1094eaa9f2a1a793fafac300 removed perfctr()
15314 #: build/C/man2/syscalls.2:393
15316 msgid "B<perfmonctl>(2)\t2.4\tia64\n"
15320 #: build/C/man2/syscalls.2:394
15322 msgid "B<pipe>(2)\t1.0\n"
15326 #: build/C/man2/syscalls.2:395
15328 msgid "B<pipe2>(2)\t2.6.27\n"
15332 #: build/C/man2/syscalls.2:396
15334 msgid "B<pivot_root>(2)\t2.4\n"
15338 #: build/C/man2/syscalls.2:397
15340 msgid "B<poll>(2)\t2.0.36; 2.2\n"
15344 #: build/C/man2/syscalls.2:398
15346 msgid "B<ppc_rtas>(2)\t\tPowerPC only\n"
15350 #: build/C/man2/syscalls.2:399
15352 msgid "B<ppoll>(2)\t2.6.16\n"
15356 #: build/C/man2/syscalls.2:400
15358 msgid "B<prctl>(2)\t2.2\n"
15362 #: build/C/man2/syscalls.2:401
15364 msgid "B<pread64>(2)\t\tT{\n"
15368 #: build/C/man2/syscalls.2:402
15370 msgid "Added as \"pread\" in 2.2;\n"
15374 #: build/C/man2/syscalls.2:404
15376 msgid "renamed \"pread64\" in 2.6\n"
15380 #: build/C/man2/syscalls.2:406
15382 msgid "B<preadv>(2)\t2.6.30\n"
15386 #: build/C/man2/syscalls.2:407
15388 msgid "B<prlimit>(2)\t2.6.36\n"
15392 #: build/C/man2/syscalls.2:408
15394 msgid "B<process_vm_readv>(2)\t3.2\n"
15398 #: build/C/man2/syscalls.2:409
15400 msgid "B<process_vm_writev>(2)\t3.2\n"
15404 #: build/C/man2/syscalls.2:410
15406 msgid "B<pselect6>(2)\t2.6.16\n"
15409 #. Implements \fBpselect\fP(2)
15411 #: build/C/man2/syscalls.2:412
15413 msgid "B<ptrace>(2)\t1.0\n"
15417 #: build/C/man2/syscalls.2:413
15419 msgid "B<pwrite64>(2)\t\tT{\n"
15423 #: build/C/man2/syscalls.2:414
15425 msgid "Added as \"pwrite\" in 2.2;\n"
15429 #: build/C/man2/syscalls.2:416
15431 msgid "renamed \"pwrite64\" in 2.6\n"
15435 #: build/C/man2/syscalls.2:418
15437 msgid "B<pwritev>(2)\t2.6.30\n"
15441 #: build/C/man2/syscalls.2:419
15443 msgid "B<query_module>(2)\t2.2\tRemoved in 2.6\n"
15447 #: build/C/man2/syscalls.2:420
15449 msgid "B<quotactl>(2)\t1.0\n"
15453 #: build/C/man2/syscalls.2:421
15455 msgid "B<read>(2)\t1.0\n"
15459 #: build/C/man2/syscalls.2:422
15461 msgid "B<readahead>(2)\t2.4.13\n"
15465 #: build/C/man2/syscalls.2:423
15467 msgid "B<readdir>(2)\t1.0\n"
15470 #. Supersedes \fBgetdents\fP(2)
15472 #: build/C/man2/syscalls.2:425
15474 msgid "B<readlink>(2)\t1.0\n"
15478 #: build/C/man2/syscalls.2:426
15480 msgid "B<readlinkat>(2)\t2.6.16\n"
15484 #: build/C/man2/syscalls.2:427
15486 msgid "B<readv>(2)\t2.0\n"
15490 #: build/C/man2/syscalls.2:428
15492 msgid "B<reboot>(2)\t1.0\n"
15496 #: build/C/man2/syscalls.2:429
15498 msgid "B<recv>(2)\t2.0\tSee notes on B<socketcall>(2)\n"
15502 #: build/C/man2/syscalls.2:430
15504 msgid "B<recvfrom>(2)\t2.0\tSee notes on B<socketcall>(2)\n"
15508 #: build/C/man2/syscalls.2:431
15510 msgid "B<recvmsg>(2)\t2.0\tSee notes on B<socketcall>(2)\n"
15514 #: build/C/man2/syscalls.2:432
15516 msgid "B<recvmmsg>(2)\t2.6.33\n"
15520 #: build/C/man2/syscalls.2:433
15522 msgid "B<remap_file_pages>(2)\t2.6\n"
15526 #: build/C/man2/syscalls.2:434
15528 msgid "B<removexattr>(2)\t2.6; 2.4.18\n"
15532 #: build/C/man2/syscalls.2:435
15534 msgid "B<rename>(2)\t1.0\n"
15538 #: build/C/man2/syscalls.2:436
15540 msgid "B<renameat>(2)\t2.6.16\n"
15544 #: build/C/man2/syscalls.2:437
15546 msgid "B<request_key>(2)\t2.6.11\n"
15550 #: build/C/man2/syscalls.2:438
15552 msgid "B<restart_syscall>(2)\t2.6\n"
15556 #: build/C/man2/syscalls.2:439
15558 msgid "B<rmdir>(2)\t1.0\n"
15562 #: build/C/man2/syscalls.2:440
15564 msgid "B<rt_sigaction>(2)\t2.2\n"
15568 #: build/C/man2/syscalls.2:441
15570 msgid "B<rt_sigpending>(2)\t2.2\n"
15574 #: build/C/man2/syscalls.2:442
15576 msgid "B<rt_sigprocmask>(2)\t2.2\n"
15580 #: build/C/man2/syscalls.2:443
15582 msgid "B<rt_sigqueueinfo>(2)\t2.2\n"
15586 #: build/C/man2/syscalls.2:444
15588 msgid "B<rt_sigreturn>(2)\t2.2\n"
15592 #: build/C/man2/syscalls.2:445
15594 msgid "B<rt_sigsuspend>(2)\t2.2\n"
15598 #: build/C/man2/syscalls.2:446
15600 msgid "B<rt_sigtimedwait>(2)\t2.2\n"
15604 #: build/C/man2/syscalls.2:447
15606 msgid "B<rt_tgsigqueueinfo>(2)\t2.6.31\n"
15610 #: build/C/man2/syscalls.2:448
15612 msgid "B<s390_runtime_instr>(2)\t3.7\ts390 only\n"
15616 #: build/C/man2/syscalls.2:449
15618 msgid "B<sched_get_priority_max>(2)\t2.0\n"
15622 #: build/C/man2/syscalls.2:450
15624 msgid "B<sched_get_priority_min>(2)\t2.0\n"
15628 #: build/C/man2/syscalls.2:451
15630 msgid "B<sched_getaffinity>(2)\t2.6\n"
15634 #: build/C/man2/syscalls.2:452
15636 msgid "B<sched_getparam>(2)\t2.0\n"
15640 #: build/C/man2/syscalls.2:453
15642 msgid "B<sched_getscheduler>(2)\t2.0\n"
15646 #: build/C/man2/syscalls.2:454
15648 msgid "B<sched_rr_get_interval>(2)\t2.0\n"
15652 #: build/C/man2/syscalls.2:455
15654 msgid "B<sched_setaffinity>(2)\t2.6\n"
15658 #: build/C/man2/syscalls.2:456
15660 msgid "B<sched_setparam>(2)\t2.0\n"
15664 #: build/C/man2/syscalls.2:457
15666 msgid "B<sched_setscheduler>(2)\t2.0\n"
15670 #: build/C/man2/syscalls.2:458
15672 msgid "B<sched_yield>(2)\t2.0\n"
15676 #: build/C/man2/syscalls.2:459
15678 msgid "B<select>(2)\t1.0\n"
15682 #: build/C/man2/syscalls.2:460
15684 msgid "B<semctl>(2)\t2.0\tSee notes on B<ipc>(2)\n"
15688 #: build/C/man2/syscalls.2:461
15690 msgid "B<semget>(2)\t2.0\tSee notes on B<ipc>(2)\n"
15694 #: build/C/man2/syscalls.2:462
15696 msgid "B<semop>(2)\t2.0\tSee notes on B<ipc>(2)\n"
15700 #: build/C/man2/syscalls.2:463
15702 msgid "B<semtimedop>(2)\t2.6; 2.4.22\n"
15706 #: build/C/man2/syscalls.2:464
15708 msgid "B<send>(2)\t2.0\tSee notes on B<socketcall>(2)\n"
15712 #: build/C/man2/syscalls.2:465
15714 msgid "B<sendfile>(2)\t2.2\n"
15718 #: build/C/man2/syscalls.2:466
15720 msgid "B<sendfile64>(2)\t2.6; 2.4.19\n"
15724 #: build/C/man2/syscalls.2:467
15726 msgid "B<sendmmsg>(2)\t3.0\n"
15730 #: build/C/man2/syscalls.2:468
15732 msgid "B<sendmsg>(2)\t2.0\tSee notes on B<socketcall>(2)\n"
15736 #: build/C/man2/syscalls.2:469
15738 msgid "B<sendto>(2)\t2.0\tSee notes on B<socketcall>(2)\n"
15742 #: build/C/man2/syscalls.2:470
15744 msgid "B<set_mempolicy>(2)\t2.6.6\n"
15748 #: build/C/man2/syscalls.2:471
15750 msgid "B<set_robust_list>(2)\t2.6.17\n"
15754 #: build/C/man2/syscalls.2:472
15756 msgid "B<set_thread_area>(2)\t2.6\n"
15760 #: build/C/man2/syscalls.2:473
15762 msgid "B<set_tid_address>(2)\t2.6\n"
15765 #. See http://lkml.org/lkml/2005/8/1/83
15766 #. "[PATCH] remove sys_set_zone_reclaim()"
15768 #: build/C/man2/syscalls.2:476
15770 msgid "B<setdomainname>(2)\t1.0\n"
15774 #: build/C/man2/syscalls.2:477
15776 msgid "B<setfsgid>(2)\t1.2\n"
15780 #: build/C/man2/syscalls.2:478
15782 msgid "B<setfsgid32>(2)\t2.4\n"
15786 #: build/C/man2/syscalls.2:479
15788 msgid "B<setfsuid>(2)\t1.2\n"
15792 #: build/C/man2/syscalls.2:480
15794 msgid "B<setfsuid32>(2)\t2.4\n"
15798 #: build/C/man2/syscalls.2:481
15800 msgid "B<setgid>(2)\t1.0\n"
15804 #: build/C/man2/syscalls.2:482
15806 msgid "B<setgid32>(2)\t2.4\n"
15810 #: build/C/man2/syscalls.2:483
15812 msgid "B<setgroups>(2)\t1.0\n"
15816 #: build/C/man2/syscalls.2:484
15818 msgid "B<setgroups32>(2)\t2.4\n"
15822 #: build/C/man2/syscalls.2:485
15824 msgid "B<sethostname>(2)\t1.0\n"
15828 #: build/C/man2/syscalls.2:486
15830 msgid "B<setitimer>(2)\t1.0\n"
15834 #: build/C/man2/syscalls.2:487
15836 msgid "B<setns>(2)\t3.0\n"
15840 #: build/C/man2/syscalls.2:488
15842 msgid "B<setpgid>(2)\t1.0\n"
15846 #: build/C/man2/syscalls.2:489
15848 msgid "B<setpriority>(2)\t1.0\n"
15852 #: build/C/man2/syscalls.2:490
15854 msgid "B<setregid>(2)\t1.0\n"
15858 #: build/C/man2/syscalls.2:491
15860 msgid "B<setregid32>(2)\t2.4\n"
15864 #: build/C/man2/syscalls.2:492
15866 msgid "B<setresgid>(2)\t2.2\n"
15870 #: build/C/man2/syscalls.2:493
15872 msgid "B<setresgid32>(2)\t2.4\n"
15876 #: build/C/man2/syscalls.2:494
15878 msgid "B<setresuid>(2)\t2.2\n"
15882 #: build/C/man2/syscalls.2:495
15884 msgid "B<setresuid32>(2)\t2.4\n"
15888 #: build/C/man2/syscalls.2:496
15890 msgid "B<setreuid>(2)\t1.0\n"
15894 #: build/C/man2/syscalls.2:497
15896 msgid "B<setreuid32>(2)\t2.4\n"
15900 #: build/C/man2/syscalls.2:498
15902 msgid "B<setrlimit>(2)\t1.0\n"
15906 #: build/C/man2/syscalls.2:499
15908 msgid "B<setsid>(2)\t1.0\n"
15912 #: build/C/man2/syscalls.2:500
15914 msgid "B<setsockopt>(2)\t2.0\tSee notes on B<socketcall>(2)\n"
15918 #: build/C/man2/syscalls.2:501
15920 msgid "B<settimeofday>(2)\t1.0\n"
15924 #: build/C/man2/syscalls.2:502
15926 msgid "B<setuid>(2)\t1.0\n"
15930 #: build/C/man2/syscalls.2:503
15932 msgid "B<setuid32>(2)\t2.4\n"
15936 #: build/C/man2/syscalls.2:504
15938 msgid "B<setup>(2)\t\tRemoved in 2.2\n"
15942 #: build/C/man2/syscalls.2:505
15944 msgid "B<setxattr>(2)\t2.6; 2.4.18\n"
15948 #: build/C/man2/syscalls.2:506
15950 msgid "B<sgetmask>(2)\t1.0\n"
15954 #: build/C/man2/syscalls.2:507
15956 msgid "B<shmat>(2)\t2.0\tSee notes on B<ipc>(2)\n"
15960 #: build/C/man2/syscalls.2:508
15962 msgid "B<shmctl>(2)\t2.0\tSee notes on B<ipc>(2)\n"
15966 #: build/C/man2/syscalls.2:509
15968 msgid "B<shmdt>(2)\t2.0\tSee notes on B<ipc>(2)\n"
15972 #: build/C/man2/syscalls.2:510
15974 msgid "B<shmget>(2)\t2.0\tSee notes on B<ipc>(2)\n"
15978 #: build/C/man2/syscalls.2:511
15980 msgid "B<shutdown>(2)\t2.0\tSee notes on B<socketcall>(2)\n"
15984 #: build/C/man2/syscalls.2:512
15986 msgid "B<sigaction>(2)\t1.0\n"
15990 #: build/C/man2/syscalls.2:513
15992 msgid "B<sigaltstack>(2)\t2.2\n"
15996 #: build/C/man2/syscalls.2:514
15998 msgid "B<signal>(2)\t1.0\n"
16002 #: build/C/man2/syscalls.2:515
16004 msgid "B<signalfd>(2)\t2.6.22\n"
16008 #: build/C/man2/syscalls.2:516
16010 msgid "B<signalfd4>(2)\t2.6.27\n"
16014 #: build/C/man2/syscalls.2:517
16016 msgid "B<sigpending>(2)\t1.0\n"
16020 #: build/C/man2/syscalls.2:518
16022 msgid "B<sigprocmask>(2)\t1.0\n"
16026 #: build/C/man2/syscalls.2:519
16028 msgid "B<sigreturn>(2)\t1.0\n"
16032 #: build/C/man2/syscalls.2:520
16034 msgid "B<sigsuspend>(2)\t1.0\n"
16038 #: build/C/man2/syscalls.2:521
16040 msgid "B<socket>(2)\t2.0\tSee notes on B<socketcall>(2)\n"
16044 #: build/C/man2/syscalls.2:522
16046 msgid "B<socketcall>(2)\t1.0\n"
16049 #. Implements BSD socket calls
16051 #: build/C/man2/syscalls.2:524
16053 msgid "B<socketpair>(2)\t2.0\tSee notes on B<socketcall>(2)\n"
16057 #: build/C/man2/syscalls.2:525
16059 msgid "B<splice>(2)\t2.6.17\n"
16063 #: build/C/man2/syscalls.2:526
16065 msgid "B<spu_create>(2)\t2.6.16\tPowerPC only\n"
16069 #: build/C/man2/syscalls.2:527
16071 msgid "B<spu_run>(2)\t2.6.16\tPowerPC only\n"
16075 #: build/C/man2/syscalls.2:528
16077 msgid "B<ssetmask>(2)\t1.0\n"
16081 #: build/C/man2/syscalls.2:529
16083 msgid "B<stat>(2)\t1.0\n"
16087 #: build/C/man2/syscalls.2:530
16089 msgid "B<stat64>(2)\t2.4\n"
16093 #: build/C/man2/syscalls.2:531
16095 msgid "B<statfs>(2)\t1.0\n"
16099 #: build/C/man2/syscalls.2:532
16101 msgid "B<statfs64>(2)\t2.6\n"
16105 #: build/C/man2/syscalls.2:533
16107 msgid "B<stime>(2)\t1.0\n"
16111 #: build/C/man2/syscalls.2:534
16113 msgid "B<subpage_prot>(2)\t2.6.25\tPowerPC if\n"
16117 #: build/C/man2/syscalls.2:535
16119 msgid "\t\tCONFIG_PPC_64K_PAGES\n"
16123 #: build/C/man2/syscalls.2:536
16125 msgid "B<swapoff>(2)\t1.0\n"
16129 #: build/C/man2/syscalls.2:537
16131 msgid "B<swapon>(2)\t1.0\n"
16135 #: build/C/man2/syscalls.2:538
16137 msgid "B<symlink>(2)\t1.0\n"
16141 #: build/C/man2/syscalls.2:539
16143 msgid "B<symlinkat>(2)\t2.6.16\n"
16147 #: build/C/man2/syscalls.2:540
16149 msgid "B<sync>(2)\t1.0\n"
16153 #: build/C/man2/syscalls.2:541
16155 msgid "B<sync_file_range>(2)\t2.6.17\n"
16159 #: build/C/man2/syscalls.2:542
16161 msgid "B<sync_file_range2>(2)\t2.6.22\tT{\n"
16165 #: build/C/man2/syscalls.2:543
16167 msgid "Architecture-specific\n"
16171 #: build/C/man2/syscalls.2:544
16173 msgid "variant of B<sync_file_range>(2)\n"
16176 #. PowerPC, ARM, tile
16177 #. First appeared on ARM, as arm_sync_file_range(), but later renamed
16178 #. \fBsys_debug_setcontext\fP(2) ??? PowerPC if CONFIG_PPC32
16180 #: build/C/man2/syscalls.2:549
16182 msgid "B<syncfs>(2)\t2.6.39\n"
16186 #: build/C/man2/syscalls.2:550
16188 msgid "B<sysfs>(2)\t1.2\n"
16192 #: build/C/man2/syscalls.2:551
16194 msgid "B<sysinfo>(2)\t1.0\n"
16198 #: build/C/man2/syscalls.2:552
16200 msgid "B<syslog>(2)\t1.0\n"
16203 #. glibc interface is \fBklogctl\fP(3)
16205 #: build/C/man2/syscalls.2:554
16207 msgid "B<tee>(2)\t2.6.17\n"
16211 #: build/C/man2/syscalls.2:555
16213 msgid "B<tgkill>(2)\t2.6\n"
16217 #: build/C/man2/syscalls.2:556
16219 msgid "B<time>(2)\t1.0\n"
16223 #: build/C/man2/syscalls.2:557
16225 msgid "B<timer_create>(2)\t2.6\n"
16229 #: build/C/man2/syscalls.2:558
16231 msgid "B<timer_delete>(2)\t2.6\n"
16235 #: build/C/man2/syscalls.2:559
16237 msgid "B<timer_getoverrun>(2)\t2.6\n"
16241 #: build/C/man2/syscalls.2:560
16243 msgid "B<timer_gettime>(2)\t2.6\n"
16247 #: build/C/man2/syscalls.2:561
16249 msgid "B<timer_settime>(2)\t2.6\n"
16253 #: build/C/man2/syscalls.2:562
16255 msgid "B<timerfd_create>(2)\t2.6.25\n"
16259 #: build/C/man2/syscalls.2:563
16261 msgid "B<timerfd_gettime>(2)\t2.6.25\n"
16265 #: build/C/man2/syscalls.2:564
16267 msgid "B<timerfd_settime>(2)\t2.6.25\n"
16271 #: build/C/man2/syscalls.2:565
16273 msgid "B<times>(2)\t1.0\n"
16277 #: build/C/man2/syscalls.2:566
16279 msgid "B<tkill>(2)\t2.6; 2.4.22\n"
16283 #: build/C/man2/syscalls.2:567
16285 msgid "B<truncate>(2)\t1.0\n"
16289 #: build/C/man2/syscalls.2:568
16291 msgid "B<truncate64>(2)\t2.4\n"
16295 #: build/C/man2/syscalls.2:569
16297 msgid "B<ugetrlimit>(2)\t2.4\n"
16301 #: build/C/man2/syscalls.2:570
16303 msgid "B<umask>(2)\t1.0\n"
16307 #: build/C/man2/syscalls.2:571
16309 msgid "B<umount>(2)\t1.0\n"
16312 #. sys_oldumount() -- __NR_umount
16314 #: build/C/man2/syscalls.2:573
16316 msgid "B<umount2>(2)\t2.2\n"
16319 #. sys_umount() -- __NR_umount2
16321 #: build/C/man2/syscalls.2:575
16323 msgid "B<uname>(2)\t1.0\n"
16327 #: build/C/man2/syscalls.2:576
16329 msgid "B<unlink>(2)\t1.0\n"
16333 #: build/C/man2/syscalls.2:577
16335 msgid "B<unlinkat>(2)\t2.6.16\n"
16339 #: build/C/man2/syscalls.2:578
16341 msgid "B<unshare>(2)\t2.6.16\n"
16345 #: build/C/man2/syscalls.2:579
16347 msgid "B<uselib>(2)\t1.0\n"
16351 #: build/C/man2/syscalls.2:580
16353 msgid "B<ustat>(2)\t1.0\n"
16357 #: build/C/man2/syscalls.2:581
16359 msgid "B<utime>(2)\t1.0\n"
16363 #: build/C/man2/syscalls.2:582
16365 msgid "B<utimensat>(2)\t2.6.22\n"
16369 #: build/C/man2/syscalls.2:583
16371 msgid "B<utimes>(2)\t2.2\n"
16375 #: build/C/man2/syscalls.2:584
16377 msgid "B<utrap_install>(2)\t2.2\tSparc\n"
16381 #: build/C/man2/syscalls.2:585
16383 msgid "B<vfork>(2)\t2.2\n"
16387 #: build/C/man2/syscalls.2:586
16389 msgid "B<vhangup>(2)\t1.0\n"
16393 #: build/C/man2/syscalls.2:587
16395 msgid "B<vm86old>(2)\t1.0\tT{\n"
16399 #: build/C/man2/syscalls.2:588
16401 msgid "Was \"vm86\"; renamed in\n"
16405 #: build/C/man2/syscalls.2:589
16407 msgid "2.0.28/2.2\n"
16411 #: build/C/man2/syscalls.2:591
16413 msgid "B<vm86>(2)\t2.0.28; 2.2\n"
16417 #: build/C/man2/syscalls.2:592
16419 msgid "B<vmsplice>(2)\t2.6.17\n"
16423 #: build/C/man2/syscalls.2:593
16425 msgid "B<wait4>(2)\t1.0\n"
16429 #: build/C/man2/syscalls.2:594
16431 msgid "B<waitid>(2)\t2.6.10\n"
16435 #: build/C/man2/syscalls.2:595
16437 msgid "B<waitpid>(2)\t1.0\n"
16441 #: build/C/man2/syscalls.2:596
16443 msgid "B<write>(2)\t1.0\n"
16447 #: build/C/man2/syscalls.2:597
16449 msgid "B<writev>(2)\t2.0\n"
16452 #. type: Plain text
16453 #: build/C/man2/syscalls.2:606
16455 "On many platforms, including x86-32, socket calls are all multiplexed (via "
16456 "glibc wrapper functions) through B<socketcall>(2) and similarly System V "
16457 "IPC calls are multiplexed through B<ipc>(2)."
16460 #. __NR_afs_syscall is 53 on Linux 2.6.22/i386
16461 #. __NR_break is 17 on Linux 2.6.22/i386
16462 #. __NR_ftime is 35 on Linux 2.6.22/i386
16463 #. __NR_getpmsg is 188 on Linux 2.6.22/i386
16464 #. __NR_gtty is 32 on Linux 2.6.22/i386
16465 #. __NR_idle is 112 on Linux 2.6.22/i386
16466 #. __NR_lock is 53 on Linux 2.6.22/i386
16467 #. __NR_madvise1 is 219 on Linux 2.6.22/i386
16468 #. __NR_mpx is 66 on Linux 2.6.22/i386
16469 #. Slot has been reused
16470 #. __NR_prof is 44 on Linux 2.6.22/i386
16471 #. __NR_profil is 98 on Linux 2.6.22/i386
16472 #. __NR_putpmsg is 189 on Linux 2.6.22/i386
16473 #. __NR_security is 223 on Linux 2.4/i386
16474 #. __NR_security is 223 on Linux 2.4/i386; absent on 2.6/i386, present
16475 #. on a couple of 2.6 architectures
16476 #. __NR_stty is 31 on Linux 2.6.22/i386
16477 #. The security call is for future use.
16478 #. __NR_tuxcall is 184 on x86_64, also on PPC and alpha
16479 #. __NR_ulimit is 58 on Linux 2.6.22/i386
16480 #. __NR_vserver is 273 on Linux 2.6.22/i386
16481 #. type: Plain text
16482 #: build/C/man2/syscalls.2:651
16484 "Although slots are reserved for them in the system call table, the following "
16485 "system calls are not implemented in the standard kernel: B<afs_syscall>(2), "
16486 "B<break>(2), B<ftime>(2), B<getpmsg>(2), B<gtty>(2), B<idle>(2), B<lock>(2), "
16487 "B<madvise1>(2), B<mpx>(2), B<phys>(2), B<prof>(2), B<profil>(2), "
16488 "B<putpmsg>(2), B<security>(2), B<stty>(2), B<tuxcall>(2), B<ulimit>(2), and "
16489 "B<vserver>(2) (see also B<unimplemented>(2)). However, B<ftime>(3), "
16490 "B<profil>(3) and B<ulimit>(3) exist as library routines. The slot for "
16491 "B<phys>(2) is in use since kernel 2.1.116 for B<umount>(2); B<phys>(2) "
16492 "will never be implemented. The B<getpmsg>(2) and B<putpmsg>(2) calls are "
16493 "for kernels patched to support STREAMS, and may never be in the standard "
16497 #. type: Plain text
16498 #: build/C/man2/syscalls.2:656
16500 "There was briefly B<set_zone_reclaim>(2), added in Linux 2.6.13, and removed "
16501 "in 2.6.16; this system call was never available to user space."
16504 #. type: Plain text
16505 #: build/C/man2/syscalls.2:673
16507 "Roughly speaking, the code belonging to the system call with number __NR_xxx "
16508 "defined in I</usr/include/asm/unistd.h> can be found in the Linux kernel "
16509 "source in the routine I<sys_xxx>(). (The dispatch table for i386 can be "
16510 "found in I</usr/src/linux/arch/i386/kernel/entry.S>.) There are many "
16511 "exceptions, however, mostly because older system calls were superseded by "
16512 "newer ones, and this has been treated somewhat unsystematically. On "
16513 "platforms with proprietary operating-system emulation, such as parisc, "
16514 "sparc, sparc64 and alpha, there are many additional system calls; mips64 "
16515 "also contains a full set of 32-bit system calls."
16518 #. type: Plain text
16519 #: build/C/man2/syscalls.2:692
16521 "Over time, changes to the interfaces of some system calls have been "
16522 "necessary. One reason for such changes was the need to increase the size of "
16523 "structures or scalar values passed to the system call. Because of these "
16524 "changes, there are now various groups of related system calls (e.g., "
16525 "B<truncate>(2) and B<truncate64>(2)) which perform similar tasks, but "
16526 "which vary in details such as the size of their arguments. (As noted "
16527 "earlier, applications are generally unaware of this: the glibc wrapper "
16528 "functions do some work to ensure that the right system call is invoked, and "
16529 "that ABI compatibility is preserved for old binaries.) Examples of systems "
16530 "calls that exist in multiple versions are the following:"
16533 #. e.g., on 2.6.22/i386: __NR_oldstat 18, __NR_stat 106, __NR_stat64 195
16534 #. The stat system calls deal with three different data structures,
16535 #. defined in include/asm-i386/stat.h: __old_kernel_stat, stat, stat64
16536 #. type: Plain text
16537 #: build/C/man2/syscalls.2:713
16539 "By now there are three different versions of B<stat>(2): I<sys_stat>() "
16540 "(slot I<__NR_oldstat>), I<sys_newstat>() (slot I<__NR_stat>), and "
16541 "I<sys_stat64>() (slot I<__NR_stat64>), with the last being the most "
16542 "current. A similar story applies for B<lstat>(2) and B<fstat>(2)."
16545 #. type: Plain text
16546 #: build/C/man2/syscalls.2:724
16548 "Similarly, the defines I<__NR_oldolduname>, I<__NR_olduname>, and "
16549 "I<__NR_uname> refer to the routines I<sys_olduname>(), I<sys_uname>() and "
16550 "I<sys_newuname>()."
16553 #. type: Plain text
16554 #: build/C/man2/syscalls.2:731
16556 "In Linux 2.0, a new version of B<vm86>(2) appeared, with the old and the "
16557 "new kernel routines being named I<sys_vm86old>() and I<sys_vm86>()."
16560 #. type: Plain text
16561 #: build/C/man2/syscalls.2:742
16563 "In Linux 2.4, a new version of B<getrlimit>(2) appeared, with the old and "
16564 "the new kernel routines being named I<sys_old_getrlimit>() (slot "
16565 "I<__NR_getrlimit>) and I<sys_getrlimit>() (slot I<__NR_ugetrlimit>)."
16568 #. 64-bit off_t changes: ftruncate64, *stat64,
16569 #. fcntl64 (because of the flock structure), getdents64, *statfs64
16570 #. type: Plain text
16571 #: build/C/man2/syscalls.2:754
16573 "Linux 2.4 increased the size of user and group IDs from 16 to 32 bits. To "
16574 "support this change, a range of system calls were added (e.g., "
16575 "B<chown32>(2), B<getuid32>(2), B<getgroups32>(2), B<setresuid32>(2)), "
16576 "superseding earlier calls of the same name without the \"32\" suffix."
16579 #. type: Plain text
16580 #: build/C/man2/syscalls.2:771
16582 "Linux 2.4 added support for applications on 32-bit architectures to access "
16583 "large files (i.e., files for which the sizes and file offsets can't be "
16584 "represented in 32 bits.) To support this change, replacements were required "
16585 "for system calls that deal with file offsets and sizes. Thus the following "
16586 "system calls were added: B<fcntl64>(2), B<ftruncate64>(2), B<getdents64>(2), "
16587 "B<stat64>(2), B<statfs64>(2), and their analogs that work with file "
16588 "descriptors or symbolic links. These system calls supersede the older "
16589 "system calls which, except in the case of the \"stat\" calls, have the same "
16590 "name without the \"64\" suffix."
16593 #. type: Plain text
16594 #: build/C/man2/syscalls.2:775
16596 "On newer platforms that only have 64-bit file access and 32-bit uids (e.g., "
16597 "alpha, ia64, s390x) there are no *64 or *32 calls. Where the *64 and *32 "
16598 "calls exist, the other versions are obsolete."
16601 #. type: Plain text
16602 #: build/C/man2/syscalls.2:783
16604 "The I<rt_sig*> calls were added in kernel 2.2 to support the addition of "
16605 "real-time signals (see B<signal>(7)). These system calls supersede the "
16606 "older system calls of the same name without the \"rt_\" prefix."
16609 #. (used by libc 6)
16611 #. Two system call numbers,
16612 #. .IR __NR__llseek
16614 #. .IR __NR__sysctl
16615 #. have an additional underscore absent in
16616 #. .IR sys_llseek ()
16618 #. .IR sys_sysctl ().
16620 #. In kernel 2.1.81,
16624 #. were swapped; that is,
16626 #. was added with the semantics that were then current for
16628 #. and the semantics of the latter call were changed to what
16630 #. type: Plain text
16631 #: build/C/man2/syscalls.2:833
16633 "The B<select>(2) and B<mmap>(2) system calls use five or more arguments, "
16634 "which caused problems in the way argument passing on the i386 used to be set "
16635 "up. Thus, while other architectures have I<sys_select>() and I<sys_mmap>() "
16636 "corresponding to I<__NR_select> and I<__NR_mmap>, on i386 one finds "
16637 "I<old_select>() and I<old_mmap>() (routines that use a pointer to a "
16638 "argument block) instead. These days passing five arguments is not a problem "
16639 "any more, and there is a I<__NR__newselect> that corresponds directly to "
16640 "I<sys_select>() and similarly I<__NR_mmap2>."
16643 #. type: Plain text
16644 #: build/C/man2/syscalls.2:837
16645 msgid "B<syscall>(2), B<unimplemented>(2), B<libc>(7)"
16649 #: build/C/man3/sysconf.3:27
16655 #: build/C/man3/sysconf.3:27
16660 #. type: Plain text
16661 #: build/C/man3/sysconf.3:30
16662 msgid "sysconf - get configuration information at run time"
16665 #. type: Plain text
16666 #: build/C/man3/sysconf.3:35
16668 msgid "B<long sysconf(int >I<name>B<);>\n"
16671 #. type: Plain text
16672 #: build/C/man3/sysconf.3:40
16674 "POSIX allows an application to test at compile or run time whether certain "
16675 "options are supported, or what the value is of certain configurable "
16676 "constants or limits."
16679 #. type: Plain text
16680 #: build/C/man3/sysconf.3:46
16682 "At compile time this is done by including I<E<lt>unistd.hE<gt>> and/or "
16683 "I<E<lt>limits.hE<gt>> and testing the value of certain macros."
16686 #. type: Plain text
16687 #: build/C/man3/sysconf.3:56
16689 "At run time, one can ask for numerical values using the present function "
16690 "B<sysconf>(). One can ask for numerical values that may depend on the "
16691 "filesystem a file is in using the calls B<fpathconf>(3) and "
16692 "B<pathconf>(3). One can ask for string values using B<confstr>(3)."
16695 #. except that sysconf(_SC_OPEN_MAX) may change answer after a call
16696 #. to setrlimit( ) which changes the RLIMIT_NOFILE soft limit
16697 #. type: Plain text
16698 #: build/C/man3/sysconf.3:61
16700 "The values obtained from these functions are system configuration "
16701 "constants. They do not change during the lifetime of a process."
16704 #. and 999 to indicate support for options no longer present in the latest
16706 #. type: Plain text
16707 #: build/C/man3/sysconf.3:84
16709 "For options, typically, there is a constant B<_POSIX_FOO> that may be "
16710 "defined in I<E<lt>unistd.hE<gt>>. If it is undefined, one should ask at run "
16711 "time. If it is defined to -1, then the option is not supported. If it is "
16712 "defined to 0, then relevant functions and headers exist, but one has to ask "
16713 "at run time what degree of support is available. If it is defined to a "
16714 "value other than -1 or 0, then the option is supported. Usually the value "
16715 "(such as 200112L) indicates the year and month of the POSIX revision "
16716 "describing the option. Glibc uses the value 1 to indicate support as long "
16717 "as the POSIX revision has not been published yet. The B<sysconf>() "
16718 "argument will be B<_SC_FOO>. For a list of options, see B<posixoptions>(7)."
16721 #. type: Plain text
16722 #: build/C/man3/sysconf.3:104
16724 "For variables or limits, typically, there is a constant B<_FOO>, maybe "
16725 "defined in I<E<lt>limits.hE<gt>>, or B<_POSIX_FOO>, maybe defined in "
16726 "I<E<lt>unistd.hE<gt>>. The constant will not be defined if the limit is "
16727 "unspecified. If the constant is defined, it gives a guaranteed value, and a "
16728 "greater value might actually be supported. If an application wants to take "
16729 "advantage of values which may change between systems, a call to B<sysconf>() "
16730 "can be made. The B<sysconf>() argument will be B<_SC_FOO>."
16734 #: build/C/man3/sysconf.3:104
16736 msgid "POSIX.1 variables"
16739 #. type: Plain text
16740 #: build/C/man3/sysconf.3:109
16742 "We give the name of the variable, the name of the B<sysconf>() argument "
16743 "used to inquire about its value, and a short description."
16746 #. [for the moment: only the things that are unconditionally present]
16748 #. .BR AIO_LISTIO_MAX " - " _SC_AIO_LISTIO_MAX
16749 #. (if _POSIX_ASYNCHRONOUS_IO)
16750 #. Maximum number of I/O operations in a single list I/O call.
16751 #. Must not be less than _POSIX_AIO_LISTIO_MAX.
16753 #. .BR AIO_MAX " - " _SC_AIO_MAX
16754 #. (if _POSIX_ASYNCHRONOUS_IO)
16755 #. Maximum number of outstanding asynchronous I/O operations.
16756 #. Must not be less than _POSIX_AIO_MAX.
16758 #. .BR AIO_PRIO_DELTA_MAX " - " _SC_AIO_PRIO_DELTA_MAX
16759 #. (if _POSIX_ASYNCHRONOUS_IO)
16760 #. The maximum amount by which a process can decrease its
16761 #. asynchronous I/O priority level from its own scheduling priority.
16762 #. Must be nonnegative.
16763 #. type: Plain text
16764 #: build/C/man3/sysconf.3:128
16765 msgid "First, the POSIX.1 compatible values."
16769 #: build/C/man3/sysconf.3:128
16771 msgid "B<ARG_MAX> - B<_SC_ARG_MAX>"
16774 #. type: Plain text
16775 #: build/C/man3/sysconf.3:136
16777 "The maximum length of the arguments to the B<exec>(3) family of functions. "
16778 "Must not be less than B<_POSIX_ARG_MAX> (4096)."
16782 #: build/C/man3/sysconf.3:136
16784 msgid "B<CHILD_MAX> - B<_SC_CHILD_MAX>"
16787 #. type: Plain text
16788 #: build/C/man3/sysconf.3:142
16790 "The maximum number of simultaneous processes per user ID. Must not be less "
16791 "than B<_POSIX_CHILD_MAX> (25)."
16795 #: build/C/man3/sysconf.3:142
16797 msgid "B<HOST_NAME_MAX> - B<_SC_HOST_NAME_MAX>"
16800 #. type: Plain text
16801 #: build/C/man3/sysconf.3:150
16803 "Maximum length of a hostname, not including the terminating null byte, as "
16804 "returned by B<gethostname>(2). Must not be less than "
16805 "B<_POSIX_HOST_NAME_MAX> (255)."
16809 #: build/C/man3/sysconf.3:150
16811 msgid "B<LOGIN_NAME_MAX> - B<_SC_LOGIN_NAME_MAX>"
16814 #. type: Plain text
16815 #: build/C/man3/sysconf.3:156
16817 "Maximum length of a login name, including the terminating null byte. Must "
16818 "not be less than B<_POSIX_LOGIN_NAME_MAX> (9)."
16822 #: build/C/man3/sysconf.3:156
16824 msgid "clock ticks - B<_SC_CLK_TCK>"
16827 #. type: Plain text
16828 #: build/C/man3/sysconf.3:165
16830 "The number of clock ticks per second. The corresponding variable is "
16831 "obsolete. It was of course called B<CLK_TCK>. (Note: the macro "
16832 "B<CLOCKS_PER_SEC> does not give information: it must equal 1000000.)"
16836 #: build/C/man3/sysconf.3:165
16838 msgid "B<OPEN_MAX> - B<_SC_OPEN_MAX>"
16841 #. type: Plain text
16842 #: build/C/man3/sysconf.3:171
16844 "The maximum number of files that a process can have open at any time. Must "
16845 "not be less than B<_POSIX_OPEN_MAX> (20)."
16849 #: build/C/man3/sysconf.3:171
16851 msgid "B<PAGESIZE> - B<_SC_PAGESIZE>"
16854 #. type: Plain text
16855 #: build/C/man3/sysconf.3:176
16857 "Size of a page in bytes. Must not be less than 1. (Some systems use "
16858 "PAGE_SIZE instead.)"
16862 #: build/C/man3/sysconf.3:176 build/C/man3/sysconf.3:263
16864 msgid "B<RE_DUP_MAX> - B<_SC_RE_DUP_MAX>"
16867 #. type: Plain text
16868 #: build/C/man3/sysconf.3:185
16870 "The number of repeated occurrences of a BRE permitted by B<regexec>(3) and "
16871 "B<regcomp>(3). Must not be less than B<_POSIX2_RE_DUP_MAX> (255)."
16875 #: build/C/man3/sysconf.3:185
16877 msgid "B<STREAM_MAX> - B<_SC_STREAM_MAX>"
16880 #. type: Plain text
16881 #: build/C/man3/sysconf.3:194
16883 "The maximum number of streams that a process can have open at any time. If "
16884 "defined, it has the same value as the standard C macro B<FOPEN_MAX>. Must "
16885 "not be less than B<_POSIX_STREAM_MAX> (8)."
16889 #: build/C/man3/sysconf.3:194
16891 msgid "B<SYMLOOP_MAX> - B<_SC_SYMLOOP_MAX>"
16894 #. type: Plain text
16895 #: build/C/man3/sysconf.3:202
16897 "The maximum number of symbolic links seen in a pathname before resolution "
16898 "returns B<ELOOP>. Must not be less than B<_POSIX_SYMLOOP_MAX> (8)."
16902 #: build/C/man3/sysconf.3:202
16904 msgid "B<TTY_NAME_MAX> - B<_SC_TTY_NAME_MAX>"
16907 #. type: Plain text
16908 #: build/C/man3/sysconf.3:209
16910 "The maximum length of terminal device name, including the terminating null "
16911 "byte. Must not be less than B<_POSIX_TTY_NAME_MAX> (9)."
16915 #: build/C/man3/sysconf.3:209
16917 msgid "B<TZNAME_MAX> - B<_SC_TZNAME_MAX>"
16920 #. type: Plain text
16921 #: build/C/man3/sysconf.3:215
16923 "The maximum number of bytes in a timezone name. Must not be less than "
16924 "B<_POSIX_TZNAME_MAX> (6)."
16928 #: build/C/man3/sysconf.3:215
16930 msgid "B<_POSIX_VERSION> - B<_SC_VERSION>"
16933 #. type: Plain text
16934 #: build/C/man3/sysconf.3:223
16936 "indicates the year and month the POSIX.1 standard was approved in the format "
16937 "B<YYYYMML>; the value B<199009L> indicates the Sept. 1990 revision."
16941 #: build/C/man3/sysconf.3:223
16943 msgid "POSIX.2 variables"
16946 #. type: Plain text
16947 #: build/C/man3/sysconf.3:225
16948 msgid "Next, the POSIX.2 values, giving limits for utilities."
16952 #: build/C/man3/sysconf.3:225
16954 msgid "B<BC_BASE_MAX> - B<_SC_BC_BASE_MAX>"
16957 #. type: Plain text
16958 #: build/C/man3/sysconf.3:232
16959 msgid "indicates the maximum I<obase> value accepted by the B<bc>(1) utility."
16963 #: build/C/man3/sysconf.3:232
16965 msgid "B<BC_DIM_MAX> - B<_SC_BC_DIM_MAX>"
16968 #. type: Plain text
16969 #: build/C/man3/sysconf.3:236
16970 msgid "indicates the maximum value of elements permitted in an array by B<bc>(1)."
16974 #: build/C/man3/sysconf.3:236
16976 msgid "B<BC_SCALE_MAX> - B<_SC_BC_SCALE_MAX>"
16979 #. type: Plain text
16980 #: build/C/man3/sysconf.3:242
16981 msgid "indicates the maximum I<scale> value allowed by B<bc>(1)."
16985 #: build/C/man3/sysconf.3:242
16987 msgid "B<BC_STRING_MAX> - B<_SC_BC_STRING_MAX>"
16990 #. type: Plain text
16991 #: build/C/man3/sysconf.3:246
16992 msgid "indicates the maximum length of a string accepted by B<bc>(1)."
16996 #: build/C/man3/sysconf.3:246
16998 msgid "B<COLL_WEIGHTS_MAX> - B<_SC_COLL_WEIGHTS_MAX>"
17001 #. type: Plain text
17002 #: build/C/man3/sysconf.3:252
17004 "indicates the maximum numbers of weights that can be assigned to an entry of "
17005 "the B<LC_COLLATE order> keyword in the locale definition file,"
17009 #: build/C/man3/sysconf.3:252
17011 msgid "B<EXPR_NEST_MAX> - B<_SC_EXPR_NEST_MAX>"
17014 #. type: Plain text
17015 #: build/C/man3/sysconf.3:257
17017 "is the maximum number of expressions which can be nested within parentheses "
17022 #: build/C/man3/sysconf.3:257
17024 msgid "B<LINE_MAX> - B<_SC_LINE_MAX>"
17027 #. type: Plain text
17028 #: build/C/man3/sysconf.3:263
17030 "The maximum length of a utility's input line, either from standard input or "
17031 "from a file. This includes space for a trailing newline."
17034 #. type: Plain text
17035 #: build/C/man3/sysconf.3:269
17037 "The maximum number of repeated occurrences of a regular expression when the "
17038 "interval notation B<\\e{m,n\\e}> is used."
17042 #: build/C/man3/sysconf.3:269
17044 msgid "B<POSIX2_VERSION> - B<_SC_2_VERSION>"
17047 #. type: Plain text
17048 #: build/C/man3/sysconf.3:273
17049 msgid "indicates the version of the POSIX.2 standard in the format of YYYYMML."
17053 #: build/C/man3/sysconf.3:273
17055 msgid "B<POSIX2_C_DEV> - B<_SC_2_C_DEV>"
17058 #. type: Plain text
17059 #: build/C/man3/sysconf.3:277
17061 "indicates whether the POSIX.2 C language development facilities are "
17066 #: build/C/man3/sysconf.3:277
17068 msgid "B<POSIX2_FORT_DEV> - B<_SC_2_FORT_DEV>"
17071 #. type: Plain text
17072 #: build/C/man3/sysconf.3:281
17073 msgid "indicates whether the POSIX.2 FORTRAN development utilities are supported."
17077 #: build/C/man3/sysconf.3:281
17079 msgid "B<POSIX2_FORT_RUN> - B<_SC_2_FORT_RUN>"
17082 #. type: Plain text
17083 #: build/C/man3/sysconf.3:284
17084 msgid "indicates whether the POSIX.2 FORTRAN run-time utilities are supported."
17088 #: build/C/man3/sysconf.3:284
17090 msgid "B<_POSIX2_LOCALEDEF> - B<_SC_2_LOCALEDEF>"
17093 #. type: Plain text
17094 #: build/C/man3/sysconf.3:289
17096 "indicates whether the POSIX.2 creation of locates via B<localedef>(1) is "
17101 #: build/C/man3/sysconf.3:289
17103 msgid "B<POSIX2_SW_DEV> - B<_SC_2_SW_DEV>"
17106 #. type: Plain text
17107 #: build/C/man3/sysconf.3:293
17109 "indicates whether the POSIX.2 software development utilities option is "
17113 #. type: Plain text
17114 #: build/C/man3/sysconf.3:295
17115 msgid "These values also exist, but may not be standard."
17119 #: build/C/man3/sysconf.3:295
17121 msgid " - B<_SC_PHYS_PAGES>"
17124 #. type: Plain text
17125 #: build/C/man3/sysconf.3:302
17127 "The number of pages of physical memory. Note that it is possible for the "
17128 "product of this value and the value of B<_SC_PAGESIZE> to overflow."
17132 #: build/C/man3/sysconf.3:302
17134 msgid " - B<_SC_AVPHYS_PAGES>"
17137 #. type: Plain text
17138 #: build/C/man3/sysconf.3:305
17139 msgid "The number of currently available pages of physical memory."
17143 #: build/C/man3/sysconf.3:305
17145 msgid " - B<_SC_NPROCESSORS_CONF>"
17148 #. type: Plain text
17149 #: build/C/man3/sysconf.3:308
17150 msgid "The number of processors configured."
17154 #: build/C/man3/sysconf.3:308
17156 msgid " - B<_SC_NPROCESSORS_ONLN>"
17159 #. type: Plain text
17160 #: build/C/man3/sysconf.3:311
17161 msgid "The number of processors currently online (available)."
17164 #. type: Plain text
17165 #: build/C/man3/sysconf.3:324
17167 "If I<name> is invalid, -1 is returned, and I<errno> is set to B<EINVAL>. "
17168 "Otherwise, the value returned is the value of the system resource and "
17169 "I<errno> is not changed. In the case of options, a positive value is "
17170 "returned if a queried option is available, and -1 if it is not. In the case "
17171 "of limits, -1 means that there is no definite limit."
17174 #. type: Plain text
17175 #: build/C/man3/sysconf.3:332
17177 "It is difficult to use B<ARG_MAX> because it is not specified how much of "
17178 "the argument space for B<exec>(3) is consumed by the user's environment "
17182 #. type: Plain text
17183 #: build/C/man3/sysconf.3:343
17185 "B<bc>(1), B<expr>(1), B<getconf>(1), B<locale>(1), B<fpathconf>(3), "
17186 "B<pathconf>(3), B<posixoptions>(7)"
17190 #: build/C/man2/sysctl.2:30
17196 #: build/C/man2/sysctl.2:30
17201 #. type: Plain text
17202 #: build/C/man2/sysctl.2:33
17203 msgid "sysctl - read/write system parameters"
17206 #. type: Plain text
17207 #: build/C/man2/sysctl.2:38
17209 msgid "B<#include E<lt>linux/sysctl.hE<gt>>\n"
17212 #. type: Plain text
17213 #: build/C/man2/sysctl.2:40
17215 msgid "B<int _sysctl(struct __sysctl_args *>I<args>B<);>\n"
17218 #. type: Plain text
17219 #: build/C/man2/sysctl.2:47
17220 msgid "B<Do not use this system call!> See NOTES."
17223 #. type: Plain text
17224 #: build/C/man2/sysctl.2:54
17226 "The B<_sysctl>() call reads and/or writes kernel parameters. For example, "
17227 "the hostname, or the maximum number of open files. The argument has the "
17231 #. type: Plain text
17232 #: build/C/man2/sysctl.2:66
17235 "struct __sysctl_args {\n"
17236 " int *name; /* integer vector describing variable */\n"
17237 " int nlen; /* length of this vector */\n"
17238 " void *oldval; /* 0 or address where to store old value */\n"
17239 " size_t *oldlenp; /* available room for old value,\n"
17240 " overwritten by actual size of old value */\n"
17241 " void *newval; /* 0 or address of new value */\n"
17242 " size_t newlen; /* size of new value */\n"
17246 #. type: Plain text
17247 #: build/C/man2/sysctl.2:74
17249 "This call does a search in a tree structure, possibly resembling a directory "
17250 "tree under I</proc/sys>, and if the requested item is found calls some "
17251 "appropriate routine to read or modify the value."
17254 #. type: Plain text
17255 #: build/C/man2/sysctl.2:81
17257 "Upon successful completion, B<_sysctl>() returns 0. Otherwise, a value of "
17258 "-1 is returned and I<errno> is set to indicate the error."
17261 #. type: Plain text
17262 #: build/C/man2/sysctl.2:88
17264 "The invocation asked for the previous value by setting I<oldval> non-NULL, "
17265 "but allowed zero room in I<oldlenp>."
17268 #. type: Plain text
17269 #: build/C/man2/sysctl.2:92
17270 msgid "I<name> was not found."
17274 #: build/C/man2/sysctl.2:92
17276 msgid "B<EACCES>, B<EPERM>"
17279 #. type: Plain text
17280 #: build/C/man2/sysctl.2:100
17282 "No search permission for one of the encountered \"directories\", or no read "
17283 "permission where I<oldval> was nonzero, or no write permission where "
17284 "I<newval> was nonzero."
17287 #. type: Plain text
17288 #: build/C/man2/sysctl.2:114
17290 "This call is Linux-specific, and should not be used in programs intended to "
17291 "be portable. A B<sysctl>() call has been present in Linux since version "
17292 "1.3.57. It originated in 4.4BSD. Only Linux has the I</proc/sys> mirror, "
17293 "and the object naming schemes differ between Linux and 4.4BSD, but the "
17294 "declaration of the B<sysctl>() function is the same in both."
17297 #. See http://lwn.net/Articles/247243/
17298 #. Though comments in suggest that it is needed by old glibc binaries,
17299 #. so maybe it's not going away.
17300 #. type: Plain text
17301 #: build/C/man2/sysctl.2:131
17303 "Glibc does not provide a wrapper for this system call; call it using "
17304 "B<syscall>(2). Or rather... I<don't> call it: use of this system call has "
17305 "long been discouraged, and it is so unloved that B<it is likely to disappear "
17306 "in a future kernel version>. Since Linux 2.6.24, uses of this system call "
17307 "result in warnings in the kernel log. Remove it from your programs now; use "
17308 "the I</proc/sys> interface instead."
17311 #. type: Plain text
17312 #: build/C/man2/sysctl.2:135
17314 "This system call is available only if the kernel was configured with the "
17315 "B<CONFIG_SYSCTL_SYSCALL> option."
17318 #. type: Plain text
17319 #: build/C/man2/sysctl.2:138
17321 "The object names vary between kernel versions, making this system call "
17322 "worthless for applications."
17325 #. type: Plain text
17326 #: build/C/man2/sysctl.2:140
17327 msgid "Not all available objects are properly documented."
17330 #. type: Plain text
17331 #: build/C/man2/sysctl.2:143
17333 "It is not yet possible to change operating system by writing to "
17334 "I</proc/sys/kernel/ostype>."
17337 #. type: Plain text
17338 #: build/C/man2/sysctl.2:152
17341 "#define _GNU_SOURCE\n"
17342 "#include E<lt>unistd.hE<gt>\n"
17343 "#include E<lt>sys/syscall.hE<gt>\n"
17344 "#include E<lt>string.hE<gt>\n"
17345 "#include E<lt>stdio.hE<gt>\n"
17346 "#include E<lt>stdlib.hE<gt>\n"
17347 "#include E<lt>linux/sysctl.hE<gt>\n"
17350 #. type: Plain text
17351 #: build/C/man2/sysctl.2:154
17353 msgid "int _sysctl(struct __sysctl_args *args );\n"
17356 #. type: Plain text
17357 #: build/C/man2/sysctl.2:156
17359 msgid "#define OSNAMESZ 100\n"
17362 #. type: Plain text
17363 #: build/C/man2/sysctl.2:164
17369 " struct __sysctl_args args;\n"
17370 " char osname[OSNAMESZ];\n"
17371 " size_t osnamelth;\n"
17372 " int name[] = { CTL_KERN, KERN_OSTYPE };\n"
17375 #. type: Plain text
17376 #: build/C/man2/sysctl.2:170
17379 " memset(&args, 0, sizeof(struct __sysctl_args));\n"
17380 " args.name = name;\n"
17381 " args.nlen = sizeof(name)/sizeof(name[0]);\n"
17382 " args.oldval = osname;\n"
17383 " args.oldlenp = &osnamelth;\n"
17386 #. type: Plain text
17387 #: build/C/man2/sysctl.2:172
17389 msgid " osnamelth = sizeof(osname);\n"
17392 #. type: Plain text
17393 #: build/C/man2/sysctl.2:180
17396 " if (syscall(SYS__sysctl, &args) == -1) {\n"
17397 " perror(\"_sysctl\");\n"
17398 " exit(EXIT_FAILURE);\n"
17400 " printf(\"This machine is running %*s\\en\", osnamelth, osname);\n"
17401 " exit(EXIT_SUCCESS);\n"
17405 #. type: Plain text
17406 #: build/C/man2/sysctl.2:183 build/C/man2/sysinfo.2:96
17411 #: build/C/man2/sysinfo.2:14
17417 #: build/C/man2/sysinfo.2:14
17422 #. type: Plain text
17423 #: build/C/man2/sysinfo.2:17
17424 msgid "sysinfo - returns information on overall system statistics"
17427 #. type: Plain text
17428 #: build/C/man2/sysinfo.2:21
17429 msgid "B<int sysinfo(struct sysinfo *>I<info>B<);>"
17432 #. type: Plain text
17433 #: build/C/man2/sysinfo.2:25
17435 "Until Linux 2.3.16, B<sysinfo>() used to return information in the "
17436 "following structure:"
17439 #. type: Plain text
17440 #: build/C/man2/sysinfo.2:40
17443 "struct sysinfo {\n"
17444 " long uptime; /* Seconds since boot */\n"
17445 " unsigned long loads[3]; /* 1, 5, and 15 minute load averages */\n"
17446 " unsigned long totalram; /* Total usable main memory size */\n"
17447 " unsigned long freeram; /* Available memory size */\n"
17448 " unsigned long sharedram; /* Amount of shared memory */\n"
17449 " unsigned long bufferram; /* Memory used by buffers */\n"
17450 " unsigned long totalswap; /* Total swap space size */\n"
17451 " unsigned long freeswap; /* swap space still available */\n"
17452 " unsigned short procs; /* Number of current processes */\n"
17453 " char _f[22]; /* Pads structure to 64 bytes */\n"
17457 #. type: Plain text
17458 #: build/C/man2/sysinfo.2:44
17459 msgid "and the sizes were given in bytes."
17462 #. type: Plain text
17463 #: build/C/man2/sysinfo.2:47
17464 msgid "Since Linux 2.3.23 (i386), 2.3.48 (all architectures) the structure is:"
17467 #. type: Plain text
17468 #: build/C/man2/sysinfo.2:65
17471 "struct sysinfo {\n"
17472 " long uptime; /* Seconds since boot */\n"
17473 " unsigned long loads[3]; /* 1, 5, and 15 minute load averages */\n"
17474 " unsigned long totalram; /* Total usable main memory size */\n"
17475 " unsigned long freeram; /* Available memory size */\n"
17476 " unsigned long sharedram; /* Amount of shared memory */\n"
17477 " unsigned long bufferram; /* Memory used by buffers */\n"
17478 " unsigned long totalswap; /* Total swap space size */\n"
17479 " unsigned long freeswap; /* swap space still available */\n"
17480 " unsigned short procs; /* Number of current processes */\n"
17481 " unsigned long totalhigh; /* Total high memory size */\n"
17482 " unsigned long freehigh; /* Available high memory size */\n"
17483 " unsigned int mem_unit; /* Memory unit size in bytes */\n"
17484 " char _f[20-2*sizeof(long)-sizeof(int)]; /* Padding to 64 bytes */\n"
17488 #. type: Plain text
17489 #: build/C/man2/sysinfo.2:69
17490 msgid "and the sizes are given as multiples of I<mem_unit> bytes."
17493 #. type: Plain text
17494 #: build/C/man2/sysinfo.2:74
17496 "B<sysinfo>() provides a simple way of getting overall system statistics. "
17497 "This is more portable than reading I</dev/kmem>."
17500 #. type: Plain text
17501 #: build/C/man2/sysinfo.2:83
17502 msgid "pointer to I<struct\\ sysinfo> is invalid"
17505 #. type: Plain text
17506 #: build/C/man2/sysinfo.2:94
17508 "The Linux kernel has a B<sysinfo>() system call since 0.98.pl6. Linux libc "
17509 "contains a B<sysinfo>() routine since 5.3.5, and glibc has one since 1.90."
17513 #: build/C/man3/tcgetpgrp.3:25
17519 #: build/C/man3/tcgetpgrp.3:25
17524 #. type: Plain text
17525 #: build/C/man3/tcgetpgrp.3:28
17526 msgid "tcgetpgrp, tcsetpgrp - get and set terminal foreground process group"
17529 #. type: Plain text
17530 #: build/C/man3/tcgetpgrp.3:32
17531 msgid "B<pid_t tcgetpgrp(int >I<fd>B<);>"
17534 #. type: Plain text
17535 #: build/C/man3/tcgetpgrp.3:34
17536 msgid "B<int tcsetpgrp(int >I<fd>B<, pid_t >I<pgrp>B<);>"
17539 #. The process itself may be a background process.
17540 #. type: Plain text
17541 #: build/C/man3/tcgetpgrp.3:42
17543 "The function B<tcgetpgrp>() returns the process group ID of the foreground "
17544 "process group on the terminal associated to I<fd>, which must be the "
17545 "controlling terminal of the calling process."
17548 #. type: Plain text
17549 #: build/C/man3/tcgetpgrp.3:55
17551 "The function B<tcsetpgrp>() makes the process group with process group ID "
17552 "I<pgrp> the foreground process group on the terminal associated to I<fd>, "
17553 "which must be the controlling terminal of the calling process, and still be "
17554 "associated with its session. Moreover, I<pgrp> must be a (nonempty) process "
17555 "group belonging to the same session as the calling process."
17558 #. type: Plain text
17559 #: build/C/man3/tcgetpgrp.3:64
17561 "If B<tcsetpgrp>() is called by a member of a background process group in "
17562 "its session, and the calling process is not blocking or ignoring B<SIGTTOU>, "
17563 "a B<SIGTTOU> signal is sent to all members of this background process group."
17566 #. type: Plain text
17567 #: build/C/man3/tcgetpgrp.3:79
17569 "When I<fd> refers to the controlling terminal of the calling process, the "
17570 "function B<tcgetpgrp>() will return the foreground process group ID of that "
17571 "terminal if there is one, and some value larger than 1 that is not presently "
17572 "a process group ID otherwise. When I<fd> does not refer to the controlling "
17573 "terminal of the calling process, -1 is returned, and I<errno> is set "
17577 #. type: Plain text
17578 #: build/C/man3/tcgetpgrp.3:86
17580 "When successful, B<tcsetpgrp>() returns 0. Otherwise, it returns -1, and "
17581 "I<errno> is set appropriately."
17584 #. type: Plain text
17585 #: build/C/man3/tcgetpgrp.3:95
17586 msgid "I<pgrp> has an unsupported value."
17589 #. type: Plain text
17590 #: build/C/man3/tcgetpgrp.3:104
17592 "The calling process does not have a controlling terminal, or it has one but "
17593 "it is not described by I<fd>, or, for B<tcsetpgrp>(), this controlling "
17594 "terminal is no longer associated with the session of the calling process."
17597 #. type: Plain text
17598 #: build/C/man3/tcgetpgrp.3:109
17600 "I<pgrp> has a supported value, but is not the process group ID of a process "
17601 "in the same session as the calling process."
17604 #. type: Plain text
17605 #: build/C/man3/tcgetpgrp.3:117
17607 "These functions are implemented via the B<TIOCGPGRP> and B<TIOCSPGRP> "
17612 #: build/C/man3/tcgetpgrp.3:117 build/C/man2/vfork.2:234
17617 #. type: Plain text
17618 #: build/C/man3/tcgetpgrp.3:120
17619 msgid "The ioctls appeared in 4.2BSD. The functions are POSIX inventions."
17622 #. type: Plain text
17623 #: build/C/man3/tcgetpgrp.3:124
17624 msgid "B<setpgid>(2), B<setsid>(2), B<credentials>(7)"
17628 #: build/C/man2/truncate.2:43
17634 #: build/C/man2/truncate.2:43
17639 #. type: Plain text
17640 #: build/C/man2/truncate.2:46
17641 msgid "truncate, ftruncate - truncate a file to a specified length"
17644 #. type: Plain text
17645 #: build/C/man2/truncate.2:52
17646 msgid "B<int truncate(const char *>I<path>B<, off_t >I<length>B<);>"
17649 #. type: Plain text
17650 #: build/C/man2/truncate.2:54
17651 msgid "B<int ftruncate(int >I<fd>B<, off_t >I<length>B<);>"
17654 #. type: Plain text
17655 #: build/C/man2/truncate.2:63
17656 msgid "B<truncate>():"
17659 #. type: Plain text
17660 #: build/C/man2/truncate.2:71
17661 msgid "B<ftruncate>():"
17664 #. type: Plain text
17665 #: build/C/man2/truncate.2:76
17666 msgid "|| /* Since glibc 2.3.5: */ _POSIX_C_SOURCE\\ E<gt>=\\ 200112L"
17669 #. type: Plain text
17670 #: build/C/man2/truncate.2:91
17672 "The B<truncate>() and B<ftruncate>() functions cause the regular file "
17673 "named by I<path> or referenced by I<fd> to be truncated to a size of "
17674 "precisely I<length> bytes."
17677 #. type: Plain text
17678 #: build/C/man2/truncate.2:95
17680 "If the file previously was larger than this size, the extra data is lost. "
17681 "If the file previously was shorter, it is extended, and the extended part "
17682 "reads as null bytes (\\(aq\\e0\\(aq)."
17685 #. type: Plain text
17686 #: build/C/man2/truncate.2:97
17687 msgid "The file offset is not changed."
17690 #. type: Plain text
17691 #: build/C/man2/truncate.2:104
17693 "If the size changed, then the st_ctime and st_mtime fields (respectively, "
17694 "time of last status change and time of last modification; see B<stat>(2)) "
17695 "for the file are updated, and the set-user-ID and set-group-ID permission "
17696 "bits may be cleared."
17699 #. type: Plain text
17700 #: build/C/man2/truncate.2:110
17702 "With B<ftruncate>(), the file must be open for writing; with B<truncate>(), "
17703 "the file must be writable."
17706 #. type: Plain text
17707 #: build/C/man2/truncate.2:118
17708 msgid "For B<truncate>():"
17711 #. type: Plain text
17712 #: build/C/man2/truncate.2:124
17714 "Search permission is denied for a component of the path prefix, or the named "
17715 "file is not writable by the user. (See also B<path_resolution>(7).)"
17718 #. type: Plain text
17719 #: build/C/man2/truncate.2:128
17720 msgid "I<Path> points outside the process's allocated address space."
17724 #: build/C/man2/truncate.2:128
17729 #. type: Plain text
17730 #: build/C/man2/truncate.2:133
17731 msgid "The argument I<length> is larger than the maximum file size. (XSI)"
17734 #. type: Plain text
17735 #: build/C/man2/truncate.2:140
17737 "While blocked waiting to complete, the call was interrupted by a signal "
17738 "handler; see B<fcntl>(2) and B<signal>(7)."
17741 #. type: Plain text
17742 #: build/C/man2/truncate.2:145
17743 msgid "The argument I<length> is negative or larger than the maximum file size."
17746 #. type: Plain text
17747 #: build/C/man2/truncate.2:148
17748 msgid "An I/O error occurred updating the inode."
17751 #. type: Plain text
17752 #: build/C/man2/truncate.2:151
17753 msgid "The named file is a directory."
17756 #. type: Plain text
17757 #: build/C/man2/truncate.2:154
17758 msgid "Too many symbolic links were encountered in translating the pathname."
17761 #. type: Plain text
17762 #: build/C/man2/truncate.2:158
17764 "A component of a pathname exceeded 255 characters, or an entire pathname "
17765 "exceeded 1023 characters."
17768 #. type: Plain text
17769 #: build/C/man2/truncate.2:161
17770 msgid "The named file does not exist."
17773 #. This happens for at least MSDOS and VFAT filesystems
17774 #. on kernel 2.6.13
17775 #. type: Plain text
17776 #: build/C/man2/truncate.2:170
17778 "The underlying filesystem does not support extending a file beyond its "
17782 #. type: Plain text
17783 #: build/C/man2/truncate.2:176
17784 msgid "The file is a pure procedure (shared text) file that is being executed."
17787 #. type: Plain text
17788 #: build/C/man2/truncate.2:183
17790 "For B<ftruncate>() the same errors apply, but instead of things that can be "
17791 "wrong with I<path>, we now have things that can be wrong with the file "
17792 "descriptor, I<fd>:"
17795 #. type: Plain text
17796 #: build/C/man2/truncate.2:187
17797 msgid "I<fd> is not a valid descriptor."
17801 #: build/C/man2/truncate.2:187
17803 msgid "B<EBADF> or B<EINVAL>"
17806 #. type: Plain text
17807 #: build/C/man2/truncate.2:191
17808 msgid "I<fd> is not open for writing."
17811 #. type: Plain text
17812 #: build/C/man2/truncate.2:195
17813 msgid "I<fd> does not reference a regular file."
17816 #. POSIX.1-1996 has
17817 #. .BR ftruncate ().
17818 #. POSIX.1-2001 also has
17819 #. .BR truncate (),
17820 #. as an XSI extension.
17822 #. SVr4 documents additional
17824 #. error conditions EMFILE, EMULTIHP, ENFILE, ENOLINK. SVr4 documents for
17825 #. .BR ftruncate ()
17826 #. an additional EAGAIN error condition.
17827 #. type: Plain text
17828 #: build/C/man2/truncate.2:208
17829 msgid "4.4BSD, SVr4, POSIX.1-2001 (these calls first appeared in 4.2BSD)."
17832 #. At the very least: OSF/1, Solaris 7, and FreeBSD conform, mtk, Jan 2002
17833 #. type: Plain text
17834 #: build/C/man2/truncate.2:229
17836 "The details in DESCRIPTION are for XSI-compliant systems. For "
17837 "non-XSI-compliant systems, the POSIX standard allows two behaviors for "
17838 "B<ftruncate>() when I<length> exceeds the file length (note that "
17839 "B<truncate>() is not specified at all in such an environment): either "
17840 "returning an error, or extending the file. Like most UNIX implementations, "
17841 "Linux follows the XSI requirement when dealing with native filesystems. "
17842 "However, some nonnative filesystems do not permit B<truncate>() and "
17843 "B<ftruncate>() to be used to extend a file beyond its current length: a "
17844 "notable example on Linux is VFAT."
17847 #. type: Plain text
17848 #: build/C/man2/truncate.2:243
17850 "The original Linux B<truncate>() and B<ftruncate>() system calls were not "
17851 "designed to handle large file offsets. Consequently, Linux 2.4 added "
17852 "B<truncate64>() and B<ftruncate64>() system calls that handle large "
17853 "files. However, these details can be ignored by applications using glibc, "
17854 "whose wrapper functions transparently employ the more recent system calls "
17855 "where they are available."
17858 #. http://sourceware.org/bugzilla/show_bug.cgi?id=12037
17859 #. type: Plain text
17860 #: build/C/man2/truncate.2:256
17862 "A header file bug in glibc 2.12 meant that the minimum value of "
17863 "B<_POSIX_C_SOURCE> required to expose the declaration of B<ftruncate>() was "
17864 "200809L instead of 200112L. This has been fixed in later glibc versions."
17867 #. type: Plain text
17868 #: build/C/man2/truncate.2:260
17869 msgid "B<open>(2), B<stat>(2), B<path_resolution>(7)"
17873 #: build/C/man3/ualarm.3:24
17878 #. type: Plain text
17879 #: build/C/man3/ualarm.3:27
17880 msgid "ualarm - schedule signal after given number of microseconds"
17883 #. type: Plain text
17884 #: build/C/man3/ualarm.3:32
17886 msgid "B<useconds_t ualarm(useconds_t >I<usecs>B<, useconds_t >I<interval>B<);>\n"
17889 #. type: Plain text
17890 #: build/C/man3/ualarm.3:40
17891 msgid "B<ualarm>():"
17894 #. type: Plain text
17895 #: build/C/man3/ualarm.3:69
17897 "The B<ualarm>() function causes the signal B<SIGALRM> to be sent to the "
17898 "invoking process after (not less than) I<usecs> microseconds. The delay "
17899 "may be lengthened slightly by any system activity or by the time spent "
17900 "processing the call or by the granularity of system timers."
17903 #. type: Plain text
17904 #: build/C/man3/ualarm.3:73
17905 msgid "Unless caught or ignored, the B<SIGALRM> signal will terminate the process."
17908 #. type: Plain text
17909 #: build/C/man3/ualarm.3:81
17911 "If the I<interval> argument is nonzero, further B<SIGALRM> signals will be "
17912 "sent every I<interval> microseconds after the first."
17915 #. type: Plain text
17916 #: build/C/man3/ualarm.3:84
17918 "This function returns the number of microseconds remaining for any alarm "
17919 "that was previously set, or 0 if no alarm was pending."
17922 #. type: Plain text
17923 #: build/C/man3/ualarm.3:88
17924 msgid "Interrupted by a signal."
17927 #. type: Plain text
17928 #: build/C/man3/ualarm.3:92
17930 "I<usecs> or I<interval> is not smaller than 1000000. (On systems where that "
17931 "is considered an error.)"
17934 #. type: Plain text
17935 #: build/C/man3/ualarm.3:100
17937 "4.3BSD, POSIX.1-2001. POSIX.1-2001 marks B<ualarm>() as obsolete. "
17938 "POSIX.1-2008 removes the specification of B<ualarm>(). 4.3BSD, SUSv2, and "
17939 "POSIX do not define any errors."
17942 #. This case is not documented in HP-US, Solar, FreeBSD, NetBSD, or OpenBSD!
17943 #. type: Plain text
17944 #: build/C/man3/ualarm.3:107
17946 "POSIX.1-2001 does not specify what happens if the I<usecs> argument is 0. "
17947 "On Linux (and probably most other systems), the effect is to cancel any "
17951 #. type: Plain text
17952 #: build/C/man3/ualarm.3:120
17954 "The type I<useconds_t> is an unsigned integer type capable of holding "
17955 "integers in the range [0,1000000]. On the original BSD implementation, and "
17956 "in glibc before version 2.1, the arguments to B<ualarm>() were instead "
17957 "typed as I<unsigned int>. Programs will be more portable if they never "
17958 "mention I<useconds_t> explicitly."
17961 #. type: Plain text
17962 #: build/C/man3/ualarm.3:134
17964 "The interaction of this function with other timer functions such as "
17965 "B<alarm>(2), B<sleep>(3), B<nanosleep>(2), B<setitimer>(2), "
17966 "B<timer_create>(2), B<timer_delete>(2), B<timer_getoverrun>(2), "
17967 "B<timer_gettime>(2), B<timer_settime>(2), B<usleep>(3) is unspecified."
17970 #. type: Plain text
17971 #: build/C/man3/ualarm.3:142
17973 "This function is obsolete. Use B<setitimer>(2) or POSIX interval timers "
17974 "(B<timer_create>(2), etc.) instead."
17977 #. type: Plain text
17978 #: build/C/man3/ualarm.3:150
17980 "B<alarm>(2), B<getitimer>(2), B<nanosleep>(2), B<select>(2), "
17981 "B<setitimer>(2), B<usleep>(3), B<time>(7)"
17985 #: build/C/man2/umask.2:34
17991 #: build/C/man2/umask.2:34
17996 #. type: Plain text
17997 #: build/C/man2/umask.2:37
17998 msgid "umask - set file mode creation mask"
18001 #. type: Plain text
18002 #: build/C/man2/umask.2:43
18003 msgid "B<mode_t umask(mode_t >I<mask>B<);>"
18006 #. type: Plain text
18007 #: build/C/man2/umask.2:50
18009 "B<umask>() sets the calling process's file mode creation mask (umask) to "
18010 "I<mask> & 0777 (i.e., only the file permission bits of I<mask> are used), "
18011 "and returns the previous value of the mask."
18014 #. e.g., mkfifo(), creat(), mknod(), sem_open(), mq_open(), shm_open()
18015 #. but NOT the System V IPC *get() calls
18016 #. type: Plain text
18017 #: build/C/man2/umask.2:65
18019 "The umask is used by B<open>(2), B<mkdir>(2), and other system calls that "
18020 "create files to modify the permissions placed on newly created files or "
18021 "directories. Specifically, permissions in the umask are turned off from the "
18022 "I<mode> argument to B<open>(2) and B<mkdir>(2)."
18025 #. type: Plain text
18026 #: build/C/man2/umask.2:70
18028 "The constants that should be used to specify I<mask> are described under "
18032 #. type: Plain text
18033 #: build/C/man2/umask.2:79
18035 "The typical default value for the process umask is I<S_IWGRP\\ |\\ S_IWOTH> "
18036 "(octal 022). In the usual case where the I<mode> argument to B<open>(2) is "
18040 #. type: Plain text
18041 #: build/C/man2/umask.2:82
18043 msgid " S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH | S_IWOTH\n"
18046 #. type: Plain text
18047 #: build/C/man2/umask.2:86
18049 "(octal 0666) when creating a new file, the permissions on the resulting file "
18053 #. type: Plain text
18054 #: build/C/man2/umask.2:89
18056 msgid " S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH\n"
18059 #. type: Plain text
18060 #: build/C/man2/umask.2:92
18061 msgid "(because 0666 & ~022 = 0644; i.e., rw-r--r--)."
18064 #. type: Plain text
18065 #: build/C/man2/umask.2:95
18067 "This system call always succeeds and the previous value of the mask is "
18071 #. type: Plain text
18072 #: build/C/man2/umask.2:103
18074 "A child process created via B<fork>(2) inherits its parent's umask. The "
18075 "umask is left unchanged by B<execve>(2)."
18078 #. type: Plain text
18079 #: build/C/man2/umask.2:118
18081 "The umask setting also affects the permissions assigned to POSIX IPC objects "
18082 "(B<mq_open>(3), B<sem_open>(3), B<shm_open>(3)), FIFOs (B<mkfifo>(3)), and "
18083 "UNIX domain sockets (B<unix>(7)) created by the process. The umask does "
18084 "not affect the permissions assigned to System V IPC objects created by the "
18085 "process (using B<msgget>(2), B<semget>(2), B<shmget>(2))."
18088 #. type: Plain text
18089 #: build/C/man2/umask.2:124
18090 msgid "B<chmod>(2), B<mkdir>(2), B<open>(2), B<stat>(2), B<acl>(5)"
18094 #: build/C/man2/uname.2:27
18099 #. type: Plain text
18100 #: build/C/man2/uname.2:30
18101 msgid "uname - get name and information about current kernel"
18104 #. type: Plain text
18105 #: build/C/man2/uname.2:32
18106 msgid "B<#include E<lt>sys/utsname.hE<gt>>"
18109 #. type: Plain text
18110 #: build/C/man2/uname.2:34
18111 msgid "B<int uname(struct utsname *>I<buf>B<);>"
18114 #. type: Plain text
18115 #: build/C/man2/uname.2:42
18117 "B<uname>() returns system information in the structure pointed to by "
18118 "I<buf>. The I<utsname> struct is defined in I<E<lt>sys/utsname.hE<gt>>:"
18121 #. type: Plain text
18122 #: build/C/man2/uname.2:56
18125 "struct utsname {\n"
18126 " char sysname[]; /* Operating system name (e.g., \"Linux\") */\n"
18127 " char nodename[]; /* Name within \"some implementation-defined\n"
18129 " char release[]; /* Operating system release (e.g., \"2.6.28\") */\n"
18130 " char version[]; /* Operating system version */\n"
18131 " char machine[]; /* Hardware identifier */\n"
18132 "#ifdef _GNU_SOURCE\n"
18133 " char domainname[]; /* NIS or YP domain name */\n"
18138 #. type: Plain text
18139 #: build/C/man2/uname.2:63
18141 "The length of the arrays in a I<struct utsname> is unspecified (see NOTES); "
18142 "the fields are terminated by a null byte (\\(aq\\e0\\(aq)."
18145 #. type: Plain text
18146 #: build/C/man2/uname.2:73
18147 msgid "I<buf> is not valid."
18150 #. type: Plain text
18151 #: build/C/man2/uname.2:78
18152 msgid "SVr4, POSIX.1-2001. There is no B<uname>() call in 4.3BSD."
18155 #. type: Plain text
18156 #: build/C/man2/uname.2:82
18157 msgid "The I<domainname> member (the NIS or YP domain name) is a GNU extension."
18160 #. type: Plain text
18161 #: build/C/man2/uname.2:98
18163 "This is a system call, and the operating system presumably knows its name, "
18164 "release and version. It also knows what hardware it runs on. So, four of "
18165 "the fields of the struct are meaningful. On the other hand, the field "
18166 "I<nodename> is meaningless: it gives the name of the present machine in some "
18167 "undefined network, but typically machines are in more than one network and "
18168 "have several names. Moreover, the kernel has no way of knowing about such "
18169 "things, so it has to be told what to answer here. The same holds for the "
18170 "additional I<domainname> field."
18173 #. type: Plain text
18174 #: build/C/man2/uname.2:116
18176 "To this end Linux uses the system calls B<sethostname>(2) and "
18177 "B<setdomainname>(2). Note that there is no standard that says that the "
18178 "hostname set by B<sethostname>(2) is the same string as the I<nodename> "
18179 "field of the struct returned by B<uname>() (indeed, some systems allow a "
18180 "256-byte hostname and an 8-byte nodename), but this is true on Linux. The "
18181 "same holds for B<setdomainname>(2) and the I<domainname> field."
18184 #. type: Plain text
18185 #: build/C/man2/uname.2:131
18187 "The length of the fields in the struct varies. Some operating systems or "
18188 "libraries use a hardcoded 9 or 33 or 65 or 257. Other systems use "
18189 "B<SYS_NMLN> or B<_SYS_NMLN> or B<UTSLEN> or B<_UTSNAME_LENGTH>. Clearly, it "
18190 "is a bad idea to use any of these constants; just use sizeof(...). Often "
18191 "257 is chosen in order to have room for an internet hostname."
18194 #. type: Plain text
18195 #: build/C/man2/uname.2:138
18197 "Part of the utsname information is also accessible via "
18198 "I</proc/sys/kernel/>{I<ostype>, I<hostname>, I<osrelease>, I<version>, "
18203 #: build/C/man2/uname.2:138
18205 msgid "Underlying kernel interface"
18208 #. That was back before Linux 1.0
18209 #. That was also back before Linux 1.0
18210 #. type: Plain text
18211 #: build/C/man2/uname.2:167
18213 "Over time, increases in the size of the I<utsname> structure have led to "
18214 "three successive versions of B<uname>(): I<sys_olduname>() (slot "
18215 "I<__NR_oldolduname>), I<sys_uname>() (slot I<__NR_olduname>), and "
18216 "I<sys_newuname>() (slot I<__NR_uname)>. The first one used length 9 for "
18217 "all fields; the second used 65; the third also uses 65 but adds the "
18218 "I<domainname> field. The glibc B<uname>() wrapper function hides these "
18219 "details from applications, invoking the most recent version of the system "
18220 "call provided by the kernel."
18223 #. type: Plain text
18224 #: build/C/man2/uname.2:171
18225 msgid "B<uname>(1), B<getdomainname>(2), B<gethostname>(2)"
18229 #: build/C/man2/uselib.2:31
18235 #: build/C/man2/uselib.2:31
18240 #. type: Plain text
18241 #: build/C/man2/uselib.2:34
18242 msgid "uselib - load shared library"
18245 #. type: Plain text
18246 #: build/C/man2/uselib.2:38
18247 msgid "B<int uselib(const char *>I<library>B<);>"
18250 #. type: Plain text
18251 #: build/C/man2/uselib.2:48
18253 "The system call B<uselib>() serves to load a shared library to be used by "
18254 "the calling process. It is given a pathname. The address where to load is "
18255 "found in the library itself. The library can have any recognized binary "
18259 #. type: Plain text
18260 #: build/C/man2/uselib.2:59
18262 "In addition to all of the error codes returned by B<open>(2) and "
18263 "B<mmap>(2), the following may also be returned:"
18266 #. type: Plain text
18267 #: build/C/man2/uselib.2:67
18269 "The library specified by I<library> does not have read or execute "
18270 "permission, or the caller does not have search permission for one of the "
18271 "directories in the path prefix. (See also B<path_resolution>(7).)"
18274 #. type: Plain text
18275 #: build/C/man2/uselib.2:76
18277 "The file specified by I<library> is not an executable of known type, e.g., "
18278 "does not have the correct magic numbers."
18281 #. type: Plain text
18282 #: build/C/man2/uselib.2:80
18284 "B<uselib>() is Linux-specific, and should not be used in programs intended "
18288 #. type: Plain text
18289 #: build/C/man2/uselib.2:85
18291 "B<uselib>() was used by early libc startup code to load the shared "
18292 "libraries with names found in an array of names in the binary."
18295 #. libc 4.3.1f - changelog 1993-03-02
18296 #. libc 4.3.4 - changelog 1993-04-21
18297 #. type: Plain text
18298 #: build/C/man2/uselib.2:95
18300 "Since libc 4.3.2, startup code tries to prefix these names with "
18301 "\"/usr/lib\", \"/lib\" and \"\" before giving up. In libc 4.3.4 and later "
18302 "these names are looked for in the directories found in B<LD_LIBRARY_PATH>, "
18303 "and if not found there, prefixes \"/usr/lib\", \"/lib\" and \"/\" are tried."
18306 #. type: Plain text
18307 #: build/C/man2/uselib.2:100
18309 "From libc 4.4.4 on only the library \"/lib/ld.so\" is loaded, so that this "
18310 "dynamic library can load the remaining libraries needed (again using this "
18311 "call). This is also the state of affairs in libc5."
18314 #. type: Plain text
18315 #: build/C/man2/uselib.2:102
18316 msgid "glibc2 does not use this call."
18319 #. type: Plain text
18320 #: build/C/man2/uselib.2:112
18322 "B<ar>(1), B<gcc>(1), B<ld>(1), B<ldd>(1), B<mmap>(2), B<open>(2), "
18323 "B<dlopen>(3), B<capabilities>(7), B<ld.so>(8)"
18327 #: build/C/man3/usleep.3:33
18332 #. type: Plain text
18333 #: build/C/man3/usleep.3:36
18334 msgid "usleep - suspend execution for microsecond intervals"
18337 #. type: Plain text
18338 #: build/C/man3/usleep.3:41
18340 msgid "B<int usleep(useconds_t >I<usec>B<);>\n"
18343 #. type: Plain text
18344 #: build/C/man3/usleep.3:49
18345 msgid "B<usleep>():"
18348 #. type: Plain text
18349 #: build/C/man3/usleep.3:75
18351 "The B<usleep>() function suspends execution of the calling thread for (at "
18352 "least) I<usec> microseconds. The sleep may be lengthened slightly by any "
18353 "system activity or by the time spent processing the call or by the "
18354 "granularity of system timers."
18357 #. type: Plain text
18358 #: build/C/man3/usleep.3:82
18360 "The B<usleep>() function returns 0 on success. On error, -1 is returned, "
18361 "with I<errno> set to indicate the cause of the error."
18364 #. type: Plain text
18365 #: build/C/man3/usleep.3:87
18366 msgid "Interrupted by a signal; see B<signal>(7)."
18369 #. type: Plain text
18370 #: build/C/man3/usleep.3:91
18372 "I<usec> is not smaller than 1000000. (On systems where that is considered "
18376 #. type: Plain text
18377 #: build/C/man3/usleep.3:98
18379 "4.3BSD, POSIX.1-2001. POSIX.1-2001 declares this function obsolete; use "
18380 "B<nanosleep>(2) instead. POSIX.1-2008 removes the specification of "
18384 #. type: Plain text
18385 #: build/C/man3/usleep.3:105
18387 "On the original BSD implementation, and in glibc before version 2.2.2, the "
18388 "return type of this function is I<void>. The POSIX version returns I<int>, "
18389 "and this is also the prototype used since glibc 2.2.2."
18392 #. type: Plain text
18393 #: build/C/man3/usleep.3:109
18394 msgid "Only the B<EINVAL> error return is documented by SUSv2 and POSIX.1-2001."
18397 #. type: Plain text
18398 #: build/C/man3/usleep.3:117
18400 "The type I<useconds_t> is an unsigned integer type capable of holding "
18401 "integers in the range [0,1000000]. Programs will be more portable if they "
18402 "never mention this type explicitly. Use"
18405 #. type: Plain text
18406 #: build/C/man3/usleep.3:125
18409 "#include E<lt>unistd.hE<gt>\n"
18411 " unsigned int usecs;\n"
18413 " usleep(usecs);\n"
18416 #. type: Plain text
18417 #: build/C/man3/usleep.3:142
18419 "The interaction of this function with the B<SIGALRM> signal, and with other "
18420 "timer functions such as B<alarm>(2), B<sleep>(3), B<nanosleep>(2), "
18421 "B<setitimer>(2), B<timer_create>(2), B<timer_delete>(2), "
18422 "B<timer_getoverrun>(2), B<timer_gettime>(2), B<timer_settime>(2), "
18423 "B<ualarm>(3) is unspecified."
18426 #. type: Plain text
18427 #: build/C/man3/usleep.3:151
18429 "B<alarm>(2), B<getitimer>(2), B<nanosleep>(2), B<select>(2), "
18430 "B<setitimer>(2), B<sleep>(3), B<ualarm>(3), B<time>(7)"
18434 #: build/C/man2/vfork.2:28
18440 #: build/C/man2/vfork.2:28
18445 #. type: Plain text
18446 #: build/C/man2/vfork.2:31
18447 msgid "vfork - create a child process and block parent"
18450 #. type: Plain text
18451 #: build/C/man2/vfork.2:37
18452 msgid "B<pid_t vfork(void);>"
18455 #. type: Plain text
18456 #: build/C/man2/vfork.2:44
18457 msgid "B<vfork>():"
18461 #: build/C/man2/vfork.2:63
18463 msgid "Standard description"
18466 #. type: Plain text
18467 #: build/C/man2/vfork.2:82
18469 "(From POSIX.1) The B<vfork>() function has the same effect as B<fork>(2), "
18470 "except that the behavior is undefined if the process created by B<vfork>() "
18471 "either modifies any data other than a variable of type I<pid_t> used to "
18472 "store the return value from B<vfork>(), or returns from the function in "
18473 "which B<vfork>() was called, or calls any other function before "
18474 "successfully calling B<_exit>(2) or one of the B<exec>(3) family of "
18479 #: build/C/man2/vfork.2:82
18481 msgid "Linux description"
18484 #. type: Plain text
18485 #: build/C/man2/vfork.2:89
18487 "B<vfork>(), just like B<fork>(2), creates a child process of the calling "
18488 "process. For details and return value and errors, see B<fork>(2)."
18491 #. type: Plain text
18492 #: build/C/man2/vfork.2:98
18494 "B<vfork>() is a special case of B<clone>(2). It is used to create new "
18495 "processes without copying the page tables of the parent process. It may be "
18496 "useful in performance-sensitive applications where a child is created which "
18497 "then immediately issues an B<execve>(2)."
18500 #. type: Plain text
18501 #: build/C/man2/vfork.2:115
18503 "B<vfork>() differs from B<fork>(2) in that the calling thread is suspended "
18504 "until the child terminates (either normally, by calling B<_exit>(2), or "
18505 "abnormally, after delivery of a fatal signal), or it makes a call to "
18506 "B<execve>(2). Until that point, the child shares all memory with its "
18507 "parent, including the stack. The child must not return from the current "
18508 "function or call B<exit>(3), but may call B<_exit>(2)."
18511 #. type: Plain text
18512 #: build/C/man2/vfork.2:126
18514 "As with B<fork>(2), the child process created by B<vfork>() inherits copies "
18515 "of various of the caller's process attributes (e.g., file descriptors, "
18516 "signal dispositions, and current working directory); the B<vfork>() call "
18517 "differs only in the treatment of the virtual address space, as described "
18521 #. type: Plain text
18522 #: build/C/man2/vfork.2:132
18524 "Signals sent to the parent arrive after the child releases the parent's "
18525 "memory (i.e., after the child terminates or calls B<execve>(2))."
18529 #: build/C/man2/vfork.2:132
18531 msgid "Historic description"
18534 #. type: Plain text
18535 #: build/C/man2/vfork.2:159
18537 "Under Linux, B<fork>(2) is implemented using copy-on-write pages, so the "
18538 "only penalty incurred by B<fork>(2) is the time and memory required to "
18539 "duplicate the parent's page tables, and to create a unique task structure "
18540 "for the child. However, in the bad old days a B<fork>(2) would require "
18541 "making a complete copy of the caller's data space, often needlessly, since "
18542 "usually immediately afterward an B<exec>(3) is done. Thus, for greater "
18543 "efficiency, BSD introduced the B<vfork>() system call, which did not fully "
18544 "copy the address space of the parent process, but borrowed the parent's "
18545 "memory and thread of control until a call to B<execve>(2) or an exit "
18546 "occurred. The parent process was suspended while the child was using its "
18547 "resources. The use of B<vfork>() was tricky: for example, not modifying "
18548 "data in the parent process depended on knowing which variables were held in "
18552 #. type: Plain text
18553 #: build/C/man2/vfork.2:163
18555 "4.3BSD; POSIX.1-2001 (but marked OBSOLETE). POSIX.1-2008 removes the "
18556 "specification of B<vfork>()."
18559 #. In AIXv3.1 vfork is equivalent to fork.
18560 #. type: Plain text
18561 #: build/C/man2/vfork.2:174
18563 "The requirements put on B<vfork>() by the standards are weaker than those "
18564 "put on B<fork>(2), so an implementation where the two are synonymous is "
18565 "compliant. In particular, the programmer cannot rely on the parent "
18566 "remaining blocked until the child either terminates or calls B<execve>(2), "
18567 "and cannot rely on any specific behavior with respect to shared memory."
18570 #. type: Plain text
18571 #: build/C/man2/vfork.2:193
18573 "Some consider the semantics of B<vfork>() to be an architectural blemish, "
18574 "and the 4.2BSD man page stated: \"This system call will be eliminated when "
18575 "proper system sharing mechanisms are implemented. Users should not depend "
18576 "on the memory sharing semantics of B<vfork>() as it will, in that case, be "
18577 "made synonymous to B<fork>(2).\" However, even though modern memory "
18578 "management hardware has decreased the performance difference between "
18579 "B<fork>(2) and B<vfork>(), there are various reasons why Linux and other "
18580 "systems have retained B<vfork>():"
18583 #. type: Plain text
18584 #: build/C/man2/vfork.2:197
18586 "Some performance-critical applications require the small performance "
18587 "advantage conferred by B<vfork>()."
18590 #. http://stackoverflow.com/questions/4259629/what-is-the-difference-between-fork-and-vfork
18591 #. http://developers.sun.com/solaris/articles/subprocess/subprocess.html
18592 #. http://mailman.uclinux.org/pipermail/uclinux-dev/2009-April/000684.html
18593 #. type: Plain text
18594 #: build/C/man2/vfork.2:213
18596 "B<vfork>() can be implemented on systems that lack a memory-management unit "
18597 "(MMU), but B<fork>(2) can't be implemented on such systems. (POSIX.1-2008 "
18598 "removed B<vfork>() from the standard; the POSIX rationale for the "
18599 "B<posix_spawn>(3) function notes that that function, which provides "
18600 "functionality equivalent to B<fork>(2)+B<exec>(3), is designed to be "
18601 "implementable on systems that lack an MMU.)"
18604 #. type: Plain text
18605 #: build/C/man2/vfork.2:224
18607 "Fork handlers established using B<pthread_atfork>(3) are not called when a "
18608 "multithreaded program employing the NPTL threading library calls "
18609 "B<vfork>(). Fork handlers are called in this case in a program using the "
18610 "LinuxThreads threading library. (See B<pthreads>(7) for a description of "
18611 "Linux threading libraries.)"
18614 #. type: Plain text
18615 #: build/C/man2/vfork.2:232
18617 "A call to B<vfork>() is equivalent to calling B<clone>(2) with I<flags> "
18621 #. type: Plain text
18622 #: build/C/man2/vfork.2:234
18624 msgid " CLONE_VM | CLONE_VFORK | SIGCHLD\n"
18627 #. In the release notes for 4.2BSD Sam Leffler wrote: `vfork: Is still
18628 #. present, but definitely on its way out'.
18629 #. type: Plain text
18630 #: build/C/man2/vfork.2:252
18632 "The B<vfork>() system call appeared in 3.0BSD. In 4.4BSD it was made "
18633 "synonymous to B<fork>(2) but NetBSD introduced it again, cf. E<.UR "
18634 "http://www.netbsd.org\\:/Documentation\\:/kernel\\:/vfork.html> E<.UE .> In "
18635 "Linux, it has been equivalent to B<fork>(2) until 2.2.0-pre6 or so. Since "
18636 "2.2.0-pre9 (on i386, somewhat later on other architectures) it is an "
18637 "independent system call. Support was added in glibc 2.0.112."
18641 #. As far as I can tell, the following is not true in 2.6.19:
18642 #. Currently (Linux 2.3.25),
18646 #. and requires a kernel patch.
18647 #. type: Plain text
18648 #: build/C/man2/vfork.2:273
18650 "Details of the signal handling are obscure and differ between systems. The "
18651 "BSD man page states: \"To avoid a possible deadlock situation, processes "
18652 "that are children in the middle of a B<vfork>() are never sent B<SIGTTOU> "
18653 "or B<SIGTTIN> signals; rather, output or I<ioctl>s are allowed and input "
18654 "attempts result in an end-of-file indication.\""
18657 #. type: Plain text
18658 #: build/C/man2/vfork.2:279
18659 msgid "B<clone>(2), B<execve>(2), B<fork>(2), B<unshare>(2), B<wait>(2)"
18663 #: build/C/man2/vhangup.2:28
18668 #. type: Plain text
18669 #: build/C/man2/vhangup.2:31
18670 msgid "vhangup - virtually hangup the current terminal"
18673 #. type: Plain text
18674 #: build/C/man2/vhangup.2:35
18675 msgid "B<int vhangup(void);>"
18678 #. type: Plain text
18679 #: build/C/man2/vhangup.2:44
18680 msgid "B<vhangup>(): _BSD_SOURCE || (_XOPEN_SOURCE && _XOPEN_SOURCE\\ E<lt>\\ 500)"
18683 #. type: Plain text
18684 #: build/C/man2/vhangup.2:50
18686 "B<vhangup>() simulates a hangup on the current terminal. This call "
18687 "arranges for other users to have a ``clean'' terminal at login time."
18690 #. type: Plain text
18691 #: build/C/man2/vhangup.2:63
18693 "The calling process has insufficient privilege to call B<vhangup>(); the "
18694 "B<CAP_SYS_TTY_CONFIG> capability is required."
18697 #. type: Plain text
18698 #: build/C/man2/vhangup.2:66
18700 "This call is Linux-specific, and should not be used in programs intended to "
18704 #. type: Plain text
18705 #: build/C/man2/vhangup.2:69
18706 msgid "B<capabilities>(7), B<init>(8)"