.\" manual under the conditions for verbatim copying, provided that the
.\" entire resulting derived work is distributed under the terms of a
.\" permission notice identical to this one.
-.\"
+.\"
.\" Since the Linux kernel and libraries are constantly changing, this
.\" manual page may be incorrect or out-of-date. The author(s) assume no
.\" responsibility for errors or omissions, or for damages resulting from
.\" have taken the same level of care in the production of this manual,
.\" which is licensed free of charge, as they might when working
.\" professionally.
-.\"
+.\"
.\" Formatted or processed versions of this manual, if unaccompanied by
.\" the source, must acknowledge the copyright and authors of this work.
.\"
Tue Aug 6 23:50:44 CEST 2002
.BI "% " cal
August 2002
-Su Mo Tu We Th Fr Sa
+Su Mo Tu We Th Fr Sa
1 2 3
4 5 6 7 8 9 10
11 12 13 14 15 16 17
does close open file descriptors, and this may cause an unknown delay,
waiting for pending output to finish.
If the delay is undesired,
-it may be useful to call functions like
+it may be useful to call functions like
.BR tcflush (3)
before calling
.BR _exit ().
were introduced in Linux 2.5.36 and removed again in 2.5.54.
They existed only on i386 and ia64 (when built with CONFIG_HUGETLB_PAGE).
In Linux 2.4.20 the syscall numbers exist,
-but the calls fail with the error
+but the calls fail with the error
.BR ENOSYS .
.LP
On i386 the memory management hardware knows about ordinary pages (4 KiB)
if (bind(sfd, (struct sockaddr *) &my_addr,
sizeof(struct sockaddr_un)) == \-1)
die("bind");
-
+
if (listen(sfd, LISTEN_BACKLOG) == \-1)
die("listen");
- /* Now we can accept incoming connections one
+ /* Now we can accept incoming connections one
at a time using accept(2) */
peer_addr_size = sizeof(struct sockaddr_un);
.fi
.SH DESCRIPTION
.BR cacheflush ()
-flushes the contents of the indicated cache(s) for the
+flushes the contents of the indicated cache(s) for the
user addresses in the range
.I addr
-to
+to
.IR (addr+nbytes-1) .
.IR cache
may be one of:
.SH ERRORS
.TP
.B EFAULT
-Some or all of the address range
+Some or all of the address range
.I addr
-to
+to
.I (addr+nbytes-1)
is not accessible.
.TP
.B EINVAL
.I cache
-is not one of
+is not one of
.BR ICACHE ,
-.BR DCACHE ,
-or
+.BR DCACHE ,
+or
.BR BCACHE .
.SH CONFORMING TO
This Linux-specific system call is only available on MIPS based systems.
.BI "int epoll_wait(int " epfd ", struct epoll_event *" events ,
.BI " int " maxevents ", int " timeout );
.BI "int epoll_pwait(int " epfd ", struct epoll_event *" events ,
-.BI " int " maxevents ", int " timeout ,
+.BI " int " maxevents ", int " timeout ,
.BI " const sigset_t *" sigmask );
.fi
.SH DESCRIPTION
.BR epoll_pwait ()
was added to Linux in kernel 2.6.19.
-Glibc support for
+Glibc support for
.BR epoll_pwait ()
is provided starting with version 2.6.
.SH CONFORMING TO
.BR execve ().
If the set-user-ID bit is set on the program file pointed to by
-\fIfilename\fP,
-and the underlying file system is not mounted
+\fIfilename\fP,
+and the underlying file system is not mounted
.IR nosuid
(the
.B MS_NOSUID
see
.BR capabilities (7).
.IP * 4
-By default, file descriptors remain open across an
+By default, file descriptors remain open across an
.BR execve ().
File descriptors that are marked close-on-exec are closed
; see the description of
See
.BR fcntl (2)
for details.)
-POSIX.1-2001 says that if file descriptors 0, 1, and 2 would
+POSIX.1-2001 says that if file descriptors 0, 1, and 2 would
otherwise be closed after a successful
.BR execve (),
and the process would gain privilege because the set-user_ID or
then the system may open an unspecified file for each of these
file descriptors.
As a general principle, no portable program, whether privileged or not,
-can assume that these three file descriptors will remain
+can assume that these three file descriptors will remain
closed across an
.BR execve ().
.\" On Linux it appears that these file descriptors are
.\" always open after an execve(), and it looks like
.\" Solaris 8 and FreeBSD 6.1 are the same. -- mtk, 30 Apr 2007
.SS Interpreter scripts
-An interpreter script is a text file that has execute
+An interpreter script is a text file that has execute
permission enabled and whose first line is of the form:
.in +0.5i
.fi
.in
-The
-.I interpreter
+The
+.I interpreter
must be a valid pathname for an
executable which is not itself a script.
-If the
+If the
.I filename
argument of
.BR execve ()
-specifies an interpreter script, then
+specifies an interpreter script, then
.I interpreter
will be invoked with the following arguments:
where
.I arg...
-is the series of words pointed to by the
+is the series of words pointed to by the
.I argv
-argument of
+argument of
.BR execve ().
For portable use,
The semantics of the
.I optional-arg
argument of an interpreter script vary across implementations.
-On Linux, the entire string following the
+On Linux, the entire string following the
.I interpreter
name is passed as a single argument to the interpreter,
and this string can include white space.
However, behavior differs on some other systems.
Some systems
.\" e.g., Solaris 8
-use the first white space to terminate
+use the first white space to terminate
.IR optional-arg .
On some systems,
.\" e.g., FreeBSD before 6.0, but not FreeBSD 6.0 onwards
.I optional-arg
are used to delimit the arguments.
-On Linux,
+On Linux,
.I argv
and
.I envp
.\" Some Linux versions have failed to check permissions on ELF
.\" interpreters. This is a security hole, because it allows users to
.\" open any file, such as a rewinding tape device, for reading. Some
-.\" Linux versions have also had other security holes in
+.\" Linux versions have also had other security holes in
.\" .BR execve (2)
.\" that could be exploited for denial of service by a suitably crafted
.\" ELF binary. There are no known problems with 2.0.34 or 2.2.15.
char *newargv[] = { NULL, "hello", "world", NULL };
char *newenviron[] = { NULL };
- assert(argc == 2); /* argv[1] identifies
+ assert(argc == 2); /* argv[1] identifies
program to exec */
newargv[0] = argv[1];
.B O_NONBLOCK
set etc.) to determine which file descriptors are available for I/O.
.sp
-By selecting a real time signal (value >=
+By selecting a real time signal (value >=
.BR SIGRTMIN ),
multiple I/O events may be queued using the same signal numbers.
(Queuing is dependent on available memory).
and
.BR F_SETLEASE
are Linux specific.
-(Define the
+(Define the
.BR _GNU_SOURCE
macro to obtain these definitions.)
.\" .PP
.\" mtk, Dec 04: some limited testing on alpha and ia64 seems to
.\" indicate that ANY negative PGID value will cause F_GETOWN
.\" to misinterpret the return as an error. Some other architectures
-.\" seem to have the same range check as x86.
+.\" seem to have the same range check as x86.
In Linux 2.4 and earlier, there is bug that can occur
when an unprivileged process uses
.BR feature_test_macros (7)
.P
See also
-.IR Documentation/locks.txt ,
-.IR Documentation/mandatory.txt ,
-and
+.IR Documentation/locks.txt ,
+.IR Documentation/mandatory.txt ,
+and
.I Documentation/dnotify.txt
in the kernel source.
.BR fdatasync ()
is available,
.B _POSIX_SYNCHRONIZED_IO
-is defined in
+is defined in
.I <unistd.h>
to a value greater than 0.
(See also
.\" -1: unavailable, 0: ask using sysconf().
.\" glibc defines them to 1.
.SH NOTES
-In Linux 2.2 and earlier,
+In Linux 2.2 and earlier,
.BR fdatasync ()
is equivalent to
.BR fsync (2),
See also
.I Documentation/locks.txt
and
-.I Documentation/mandatory.txt
+.I Documentation/mandatory.txt
in the kernel source.
SUSv2, POSIX.1-2001.
.SH NOTES
The earliest incarnation of this mechanism was the
-.BR setjmp (3)/ longjmp (3)
+.BR setjmp (3)/ longjmp (3)
mechanism.
Since that does not define
the handling of the signal context, the next stage was the
-.BR sigsetjmp (3)/ siglongjmp (3)
+.BR sigsetjmp (3)/ siglongjmp (3)
pair.
The present mechanism gives much more control.
On the other hand,
.\" .I <sys/syscall.h>
.\" header file contains the required SYS_foo definition.
.\" Otherwise, the use of a _syscall macro is required.
-.\"
+.\"
.SH EXAMPLE
.sp
.nf
If \fIturn_on\fP is non-zero, the calling process must be privileged
.RB ( CAP_SYS_RAWIO ).
-.\" FIXME is the following ("Only the first 0x3ff I/O ports can be
+.\" FIXME is the following ("Only the first 0x3ff I/O ports can be
.\" specified in this manner") still true? Looking at changes in
.\" include/asm-i386/processor.h between 2.4 and 2.6 suggests
.\" that the limit is different in 2.6.
POSIX.1-2001 requires that if a process sends a signal to itself,
and the sending thread does not have the signal blocked,
and no other thread
-has it unblocked or is waiting for it in
+has it unblocked or is waiting for it in
.BR sigwait (3),
at least one
unblocked signal must be delivered to the sending thread before the
.B MAP_FILE
Compatibility flag.
Ignored.
-.\" On some systems, this was required as the opposite of
+.\" On some systems, this was required as the opposite of
.\" MAP_ANONYMOUS -- mtk, 1 May 2007
.TP
.B MAP_FIXED
.SH DESCRIPTION
.BR mprotect ()
changes protection for the calling process's memory page(s)
-containing any part of the address range in the
+containing any part of the address range in the
interval [\fIaddr\fP,\fIaddr\fP+\fIlen\fP\-1].
.I addr
must be aligned to a page boundary.
If the calling process tries to access memory in a manner
-that violates the protection, then the kernel generates a
+that violates the protection, then the kernel generates a
.B SIGSEGV
signal for the process.
.PP
static void
handler(int sig, siginfo_t *si, void *unused)
{
- printf("Got SIGSEGV at address: 0x%lx\\n",
+ printf("Got SIGSEGV at address: 0x%lx\\n",
(long) si\->si_addr);
exit(EXIT_FAILURE);
}
if (pagesize == \-1)
die("sysconf");
- /* Allocate a buffer aligned on a page boundary;
+ /* Allocate a buffer aligned on a page boundary;
initial protection is PROT_READ | PROT_WRITE */
buffer = memalign(pagesize, 4 * pagesize);
printf("Start of region: 0x%lx\\n", (long) buffer);
- if (mprotect(buffer + pagesize * 2, pagesize,
+ if (mprotect(buffer + pagesize * 2, pagesize,
PROT_NONE) == \-1)
die("mprotect");
.B _GNU_SOURCE
macro to get their definitions.
.SH NOTES
-Under Linux, the
+Under Linux, the
.B O_NONBLOCK
flag indicates that one wants to open
but does not necessarily have the intention to read or write.
read and write requests.
If the file is newly created, its
-.IR st_atime ,
+.IR st_atime ,
.IR st_ctime ,
.I st_mtime
fields
are set
to the current time, and so are the
.I st_ctime
-and
+and
.I st_mtime
fields of the
parent directory.
-Otherwise, if the file is modified because of the
+Otherwise, if the file is modified because of the
.B O_TRUNC
flag, its st_ctime and st_mtime fields are set to the current time.
.SH BUGS
On error, \-1 is returned and errno is set appropriately.
.TP
.BR pciconfig_iobase ()
-Returns information on locations of various I/O
+Returns information on locations of various I/O
regions in physical memory according to the
.I which
value.
Values for
.I which
-are: IOBASE_BRIDGE_NUMBER, IOBASE_MEMORY,
+are: IOBASE_BRIDGE_NUMBER, IOBASE_MEMORY,
IOBASE_IO, IOBASE_ISA_IO, IOBASE_ISA_MEM.
.SH ERRORS
.TP
.IP \- 3
No other file system may be mounted on \fIput_old\fP.
.PP
-See also
+See also
.BR pivot_root (8)
for additional usage examples.
tracing.
(\fIaddr\fP is ignored.)
.SH "RETURN VALUE"
-On success,
+On success,
.BR PTRACE_PEEK*
requests return the requested data,
while other requests return zero.
.\" Q_SYNC
.\"
.\" Linux 2.4 has:
-.\"
+.\"
.\" Q_COMP_QUOTAOFF
.\" Q_COMP_QUOTAON
.\" Q_COMP_SYNC
buffers from the file associated with the file descriptor
.I fd
into the buffers described by
-.IR iov
+.IR iov
("scatter input").
.PP
The
buffers of data described by
.I iov
to the file associated with the file descriptor
-.IR fd
+.IR fd
("gather output").
.PP
The pointer
.I iov
-points to an array of
+points to an array of
.I iovec
structures,
defined in
.BR readv ()
completely fills
.IR iov [0]
-before proceeding to
+before proceeding to
.IR iov [1],
and so on.
(If there is insufficient data, then not all buffers pointed to by
.BR writev ()
writes out the entire contents of
.IR iov [0]
-before proceeding to
+before proceeding to
.IR iov [1],
and so on.
.PP
is guaranteed to read a contiguous block of data from the file,
regardless of read operations performed in other threads or processes
that have file descriptors referring to the same open file description
-(see
+(see
.BR open (2)).
.SH "RETURN VALUE"
On success, the
the degree to which changing the nice value affects the
quantum has varied somewhat across kernel versions.
.\" .SH BUGS
-.\" As of Linux 1.3.81
+.\" As of Linux 1.3.81
.\" .BR sched_rr_get_interval ()
.\" returns with error
.\" ENOSYS, because SCHED_RR has not yet been fully implemented and tested
.BR semtimedop ()
first appeared in Linux 2.5.52,
and was subsequently backported into kernel 2.4.22.
-Glibc support for
+Glibc support for
.BR semtimedop ()
first appeared in version 2.3.3.
.SH "CONFORMING TO"
.PP
See
.BR signal (7)
-for a list of the async-signal-safe functions that can be
+for a list of the async-signal-safe functions that can be
safely called inside from inside a signal handler.
.SS Undocumented
Before the introduction of
.sp
.BI "sighandler_t signal(int " signum ", sighandler_t " handler );
.SH DESCRIPTION
-The behavior of
+The behavior of
.BR signal ()
varies across Unix versions,
and has also varied historically across different versions of Linux.
.SH "CONFORMING TO"
C89, C99, POSIX.1-2001.
.SH NOTES
-The effects of
+The effects of
.BR signal ()
in a multi-threaded process are unspecified.
.PP
.PP
See
.BR signal (7)
-for a list of the async-signal-safe functions that can be
+for a list of the async-signal-safe functions that can be
safely called inside from inside a signal handler.
.PP
The use of
.I st_size
field; instead the field is returned with the value 0.
.SH EXAMPLE
-The following program calls
+The following program calls
.BR stat (2)
and displays selected fields in the returned
.I stat
#include <sys/stat.h>
#include <time.h>
#include <stdio.h>
-#include <stdlib.h>
+#include <stdlib.h>
int
main(int argc, char *argv[])
printf("I\-node number: %ld\\n", (long) sb.st_ino);
- printf("Mode: %lo (octal)\\n",
+ printf("Mode: %lo (octal)\\n",
(unsigned long) sb.st_mode);
printf("Link count: %ld\\n", (long) sb.st_nlink);
printf("Ownership: UID=%ld GID=%ld\\n",
(long) sb.st_uid, (long) sb.st_gid);
- printf("Preferred I/O block size: %ld bytes\\n",
+ printf("Preferred I/O block size: %ld bytes\\n",
(long) sb.st_blksize);
- printf("File size: %lld bytes\\n",
+ printf("File size: %lld bytes\\n",
(long long) sb.st_size);
- printf("Blocks allocated: %lld\\n",
+ printf("Blocks allocated: %lld\\n",
(long long) sb.st_blocks);
printf("Last inode change: %s", ctime(&sb.st_ctime));
.B EPERM
The caller does not have the
.B CAP_SYS_ADMIN
-capability.
+capability.
Alternatively, the maximum number of swap files are already in use;
see NOTES below.
.SH "CONFORMING TO"
args.nlen = sizeof(name)/sizeof(name[0]);
args.oldval = osname;
args.oldlenp = &osnamelth;
-
+
osnamelth = sizeof(osname);
-
+
if (syscall(SYS__sysctl, &args) == \-1) {
perror("_sysctl");
exit(EXIT_FAILURE);
The kernel has a cyclic buffer of length LOG_BUF_LEN
(4096, since 1.3.54: 8192, since 2.1.113: 16384; in recent kernels
the size can be set at compile time) in which messages given as argument
-to the kernel function
+to the kernel function
.BR printk ()
are stored
(regardless of their loglevel).
.BR write ()
writes up to
.I count
-bytes from the buffer pointed
+bytes from the buffer pointed
.IR buf
to the file referred to by the file descriptor
.IR fd.
.BR backtrace_symbols ().
This array is
.BR malloc (3)ed
-by
+by
.BR backtrace_symbols (),
and must be freed by the caller.
(The strings pointed to by
.\" This page was initially taken from the 4.4BSD-Lite CDROM (BSD license)
-.\" with substantial updates
+.\" with substantial updates
.\" Copyright (C) 2007, Michael Kerrisk <mtk-manpages@gmx.net>
.\"
.\" @(#)bindresvport.3n 2.2 88/08/02 4.0 RPCSRC; from 1.7 88/03/14 SMI
be chosen.
If the
.BR bind (2)
-performed by
+performed by
.BR bindresvport ()
is successful, then
.I sin\->sin_port
.I sin\->sin_family
is implicitly taken to be
.BR AF_INET ,
-and an anonymous port is allocated (as above).
-However, in this case,
+and an anonymous port is allocated (as above).
+However, in this case,
.BR bindresvport ()
has no way to return the port number actually allocated.
.SH RETURN VALUE
.I sin
is not NULL and
.I sin\->sin_family
-is not
+is not
.BR AF_INET .
.SH SEE ALSO
.BR bind (2)
and
.BR signal (2)
are equivalent.
-But on older systems,
+But on older systems,
.BR signal (2)
provided unreliable signal semantics; see
.BR signal (2)
The use of
.B sighandler_t
is a GNU extension;
-this type is only defined if
+this type is only defined if
the _GNU_SOURCE feature test macro is defined.
.SH "SEE ALSO"
.BR sigaction (2),
later issue of this standard (cf. B.4.6.1).
However, POSIX.1-2001
only adds
-.BR putenv (3),
+.BR putenv (3),
and rejected
.BR clearenv ().
.SH NOTES
.I sync
routines.
Modifications to the database during a sequential scan will be reflected
-in the scan, that is,
+in the scan, that is,
records inserted behind the cursor will not be returned
while records inserted in front of the cursor will be returned.
.IP
.PP
Libraries exporting
.BR _init ()
-and
+and
.BR _fini ()
will want to be compiled as
follows, using \fIbar.c\fP as the example name:
.BR euidaccess ()
checks permissions and existence of the file identified by its argument
.IR pathname .
-However, whereas
+However, whereas
.BR access (2),
performs checks using the real user and group identifiers of the process,
.BR euidaccess ()
.I mode
is a mask consisting of one or more of
.BR R_OK ", " W_OK ", " X_OK " and " F_OK ,
-with the same meanings as for
+with the same meanings as for
.BR access (2).
.BR eaccess ()
function.
.SH NOTES
.SS Glibc Notes
-The
+The
.BR eaccess ()
function was added to glibc in version 2.4.
.SH "SEE ALSO"
.BR execve (2)
returned
.BR ENOEXEC ),
-these functions will execute the shell
+these functions will execute the shell
.RI ( /bin/sh )
with the path of the file as its first argument.
(If this attempt fails, no further searching is done.)
the exiting process turns into a "zombie" process
(which is nothing but a container for the single byte representing
the exit status) so that the parent can learn the exit status when
-it later calls one of the
+it later calls one of the
.BR wait (2)
functions.
.LP
.SH "RETURN VALUE"
The
.BR fputws ()
-function returns a
+function returns a
non-negative integer if the operation was
successful, or \-1 to indicate an error.
.SH "CONFORMING TO"
.in +0.25i
.nf
-#include <sys/types.h>
+#include <sys/types.h>
#include <stdio.h>
-#include <stdlib.h>
-#include <unistd.h>
-#include <string.h>
-#include <sys/socket.h>
+#include <stdlib.h>
+#include <unistd.h>
+#include <string.h>
+#include <sys/socket.h>
#include <netdb.h>
#define BUF_SIZE 500
}
/* getaddrinfo() returns a list of address structures.
- Try each address until we successfully bind().
- If socket(2) (or bind(2)) fails, we (close the socket
+ Try each address until we successfully bind().
+ If socket(2) (or bind(2)) fails, we (close the socket
and) try the next address. */
for (rp = result; rp != NULL; rp = rp\->ai_next) {
- sfd = socket(rp\->ai_family, rp\->ai_socktype,
+ sfd = socket(rp\->ai_family, rp\->ai_socktype,
rp\->ai_protocol);
if (sfd == \-1)
continue;
for (;;) {
peer_addr_len = sizeof(struct sockaddr_storage);
- nread = recvfrom(sfd, buf, BUF_SIZE, 0,
+ nread = recvfrom(sfd, buf, BUF_SIZE, 0,
(struct sockaddr *) &peer_addr, &peer_addr_len);
if (nread == \-1)
continue; /* Ignore failed request */
char host[NI_MAXHOST], service[NI_MAXSERV];
-
- s = getnameinfo((struct sockaddr *) &peer_addr,
+
+ s = getnameinfo((struct sockaddr *) &peer_addr,
peer_addr_len, host, NI_MAXHOST,
service, NI_MAXSERV, NI_NUMERICSERV);
- if (s == 0)
+ if (s == 0)
printf("Received %ld bytes from %s:%s\\n",
(long) nread, host, service);
else
fprintf(stderr, "getnameinfo: %s\\n", gai_strerror(s));
- if (sendto(sfd, buf, nread, 0,
+ if (sendto(sfd, buf, nread, 0,
(struct sockaddr *) &peer_addr,
- peer_addr_len) != nread)
+ peer_addr_len) != nread)
fprintf(stderr, "Error sending response\\n");
}
}
.in +0.25i
.nf
-#include <sys/types.h>
+#include <sys/types.h>
#include <sys/socket.h>
#include <netdb.h>
#include <stdio.h>
-#include <stdlib.h>
-#include <unistd.h>
-#include <string.h>
+#include <stdlib.h>
+#include <unistd.h>
+#include <string.h>
#define BUF_SIZE 500
/* getaddrinfo() returns a list of address structures.
Try each address until we successfully connect().
- If socket() (or connect()) fails, we (close the socket
+ If socket() (or connect()) fails, we (close the socket
and) try the next address. */
for (rp = result; rp != NULL; rp = rp\->ai_next) {
- sfd = socket(rp\->ai_family, rp\->ai_socktype,
+ sfd = socket(rp\->ai_family, rp\->ai_socktype,
rp\->ai_protocol);
if (sfd == \-1)
continue;
-
+
if (connect(sfd, rp\->ai_addr, rp\->ai_addrlen) != \-1)
break; /* Success */
freeaddrinfo(result); /* No longer needed */
- /* Send remaining command\-line arguments as separate
+ /* Send remaining command\-line arguments as separate
datagrams, and read responses from server */
for (j = 3; j < argc; j++) {
- len = strlen(argv[j]) + 1;
+ len = strlen(argv[j]) + 1;
/* +1 for terminating null byte */
if (len + 1 > BUF_SIZE) {
- fprintf(stderr,
+ fprintf(stderr,
"Ignoring long message in argument %d\\n", j);
continue;
}
fprintf(stderr, "partial/failed write\\n");
exit(EXIT_FAILURE);
}
-
+
nread = read(sfd, buf, BUF_SIZE);
if (nread == \-1) {
perror("read");
or
.BR getgrnam ().
.LP
-The
+The
.BR getgrnam_r ()
and
.BR getgrgid_r ()
.BR AF_INET6 .
The host address argument is a pointer to a struct of a type depending
on the address type, for example a \fIstruct in_addr *\fP (probably
-obtained via a call to
+obtained via a call to
.BR inet_addr (3))
for address type AF_INET.
.PP
.I struct hostent
does not suffice, since it contains pointers; a deep copy is required.
.LP
-In the original BSD implementation the
+In the original BSD implementation the
.I len
argument
-of
+of
.BR gethostbyname ()
was an
.IR int .
\fBL_cuserid\fP is declared in \fI<stdio.h>\fP.
.PP
These functions let your program identify positively the user who is
-running
+running
.RB ( cuserid ())
or the user who logged in this session
.RB ( getlogin ()).
or
.BR getpwuid ().
.LP
-The
+The
.BR getpwnam_r ()
and
.BR getpwuid_r ()
.BR getsubopt ()
parses the list of comma-separated suboptions provided in
.IR optionp .
-(Such a suboption list is typically produced when
+(Such a suboption list is typically produced when
.BR getopt (3)
is used to parse a command line;
see for example the \fI-o\fP option of
.BR mount (8).)
Each suboption may include an associated value,
which is separated from the suboption name by an equal sign.
-The following is an example of the kind of string
-that might be passed in
+The following is an example of the kind of string
+that might be passed in
.IR optionp :
.sp
.RS
.B ro,name=xyz
.RE
-The
+The
.I tokens
argument is a pointer to a NULL-terminated list of the tokens that
.BR getsubopt ()
-will look for in
+will look for in
.IR optionp .
The tokens should be distinct, null-terminated strings containing at
least one character, with no embedded equal signs or commas.
case RO_OPT:
readonly = 1;
break;
-
+
case RW_OPT:
readwrite = 1;
break;
-
+
case NAME_OPT:
if (value == NULL) {
fprintf(stderr, "Missing value for "
name = value;
break;
-
+
default:
fprintf(stderr, "No match found "
"for token: /%s/\\n", value);
.BR pututline ()
is documented to return void, and that is what it does on many systems
(AIX, HP-UX, Linux libc5).
-HP-UX introduces a new function
+HP-UX introduces a new function
.BR _pututline ()
-with the prototype given above for
+with the prototype given above for
.BR pututline ()
(also found in Linux libc5).
.LP
.\"
.\" References consulted:
.\" GNU glibc-2 source code and manual
-.\" OpenGroup's Single Unix specification
+.\" OpenGroup's Single Unix specification
.\" http://www.UNIX-systems.org/online.html
.\"
-.\" 2007-03-31 Bruno Haible, Describe the glibc/libiconv //TRANSLIT
-.\" and //IGNORE extensions for 'tocode'.
+.\" 2007-03-31 Bruno Haible, Describe the glibc/libiconv //TRANSLIT
+.\" and //IGNORE extensions for 'tocode'.
.\"
.TH ICONV_OPEN 3 2007-03-31 "GNU" "Linux Programmer's Manual"
.SH NAME
cannot be represented in the target character set will be silently discarded.
.PP
The resulting conversion descriptor can be used with
-.BR iconv (3)
+.BR iconv (3)
any number of times.
It remains valid until deallocated using
.BR iconv_close (3).
It tests whether \fIwc\fP is a wide character
belonging to the wide-character class "alpha".
.PP
-The wide-character class "alpha" is a subclass of the
-wide-character class "alnum",
+The wide-character class "alpha" is a subclass of the
+wide-character class "alnum",
and therefore also a subclass of the wide-character class "graph" and
of the wide-character class "print".
.PP
"alpha" is disjoint from the wide-character class "cntrl".
.PP
Being a subclass of the wide-character class "graph",
-the wide-character class "alpha" is disjoint from
+the wide-character class "alpha" is disjoint from
the wide-character class "space" and its subclass "blank".
.PP
Being a subclass of the wide-character class "alnum",
returns zero.
If \fIwc\fP is WEOF, zero is returned.
.PP
-\fIdesc\fP must be a character property descriptor
+\fIdesc\fP must be a character property descriptor
returned by the \fBwctype\fP
function.
.SH "RETURN VALUE"
The
.BR iswctype ()
-function returns non-zero if
+function returns non-zero if
the \fIwc\fP has the designated
property.
Otherwise it returns 0.
belonging to the wide-character class "digit".
.PP
The wide-character class "digit" is a subclass of the wide-character class
-"xdigit", and therefore also a subclass
+"xdigit", and therefore also a subclass
of the wide-character class "alnum", of
the wide-character class "graph" and of the wide-character class "print".
.PP
-Being a subclass of the wide character
+Being a subclass of the wide character
class "print", the wide-character class
"digit" is disjoint from the wide-character class "cntrl".
.PP
-Being a subclass of the wide-character class "graph",
+Being a subclass of the wide-character class "graph",
the wide-character class
"digit" is disjoint from the wide-character class "space" and its subclass
"blank".
.PP
-Being a subclass of the wide-character
+Being a subclass of the wide-character
class "alnum", the wide-character class
"digit" is disjoint from the wide-character class "punct".
.PP
-The wide-character class "digit" is
+The wide-character class "digit" is
disjoint from the wide-character class
"alpha" and therefore also disjoint from its subclasses "lower", "upper".
.PP
-The wide-character class "digit" always
+The wide-character class "digit" always
contains exactly the digits '0' to '9'.
.SH "RETURN VALUE"
The
.BR iswdigit ()
-function returns non-zero
+function returns non-zero
if \fIwc\fP is a wide character
belonging to the wide-character class "digit".
Otherwise it returns zero.
belonging to the wide-character class "lower".
.PP
The wide-character class "lower" is a subclass of the wide-character class
-"alpha", and therefore also a subclass
+"alpha", and therefore also a subclass
of the wide-character class "alnum", of
the wide-character class "graph" and of the wide-character class "print".
.PP
"lower" is disjoint from the wide-character class "cntrl".
.PP
Being a subclass of the wide-character class "graph",
-the wide-character class "lower" is disjoint from the
+the wide-character class "lower" is disjoint from the
wide-character class "space" and its subclass "blank".
.PP
Being a subclass of the wide-character class "alnum",
.SH "RETURN VALUE"
.BR lfind ()
returns a pointer to a matching member of the array, or
-NULL if no match is found.
+NULL if no match is found.
.BR lsearch ()
returns a pointer to
a matching member of the array, or to the newly added member if no
.SH SYNOPSIS
.nf
.\" FIXME . what will glibc 2.1 use here?
-.\" May 2007: glibc 2.5, things look to be unchanged -- the header file
+.\" May 2007: glibc 2.5, things look to be unchanged -- the header file
.\" is still linux/netlink.h -- mtk
.B #include <asm/types.h>
.br
.TP
NLMSG_LENGTH
Given the payload length,
-.IR len ,
+.IR len ,
this macro returns the aligned length to store in the
.B nlmsg_len
field of the
.\" These functions are included in libutil, hence you'll need to add
.\" .B \-lutil
.\" to your compiler command line.
-.\"
+.\"
In versions of glibc before 2.0.92,
.BR openpty ()
returns file descriptors for a BSD pseudo-terminal pair;
Print debugging messages.
.TP
.B RES_AAONLY
-Accept authoritative answers only.
+Accept authoritative answers only.
.BR res_send ()
continues until
it fins an authoritative answer or returns an error. [Not currently
Libc4 and libc5 only know about the BSD version.
Glibc uses the BSD version if the _BSD_SOURCE feature test macro is
-defined and none of _POSIX_SOURCE, _POSIX_C_SOURCE, _XOPEN_SOURCE,
+defined and none of _POSIX_SOURCE, _POSIX_C_SOURCE, _XOPEN_SOURCE,
_GNU_SOURCE, or _SVID_SOURCE is defined.
The System V version is used if _XOPEN_SOURCE is defined.
-.\"
+.\"
.\" For the BSD version, one usually uses a zero
.\" .I sigmask
.\" to indicate that no signals are to be blocked.
.nf
strncpy(buf, str, n);
-if (n > 0)
+if (n > 0)
buf[n - 1]= '\\0';
.fi
.in
and
.BR signal (2)
were equivalent.
-But on newer systems,
+But on newer systems,
.BR signal (2)
provides reliable signal semantics; see
.BR signal (2)
The use of
.B sighandler_t
is a GNU extension;
-this type is only defined if
+this type is only defined if
the _GNU_SOURCE feature test macro is defined.
.SH "SEE ALSO"
.BR sigaction (2),
.B NOFLSH
Disable flushing the input and output queues when generating the
.BR SIGINT ,
-.BR SIGQUIT ,
+.BR SIGQUIT ,
and
.B SIGSUSP
signals.
.BR tsearch ()
returns a pointer to a matching item in the tree, or to
the newly added item, or NULL if there was insufficient memory
-to add the item.
+to add the item.
.BR tfind ()
returns a pointer to the item, or
NULL if no match is found.
.BR fwide (3),
.BR printf (3),
.BR snprintf (3)
-.\" .BR wscanf (3)
+.\" .BR wscanf (3)
.\" If the you wish to distribute versions of this work under other
.\" conditions than the above, please contact the author(s) at the following
.\" for permission:
-.\"
+.\"
.\" John S. Kallal -
.\" email: <kallal@voicenet.com>
.\" mail: 518 Kerfoot Farm RD, Wilmington, DE 19803-2444, USA
The header file defines many values for
.BR mt_type ,
but the current driver reports only the generic types
-\s-1MT_ISSCSI1\s+1 (Generic SCSI-1 tape)
+\s-1MT_ISSCSI1\s+1 (Generic SCSI-1 tape)
and \s-1MT_ISSCSI2\s+1 (Generic SCSI-2 tape).
.PD 0
.IP \fBmt_resid\fP
.IP \fBmt_dsreg\fP
reports the drive's current settings for block size (in the low 24
bits) and density (in the high 8 bits).
-These fields are defined
+These fields are defined
by \s-1MT_ST_BLKSIZE_SHIFT\s+1, \s-1MT_ST_BLKSIZE_MASK\s+1,
\s-1MT_ST_DENSITY_SHIFT\s+1, and \s-1MT_ST_DENSITY_MASK\s+1.
.IP \fBmt_gstat\fP
must be the same in 32-bit mode as in 64-bit mode.
This is achieved by changing the type of
.I ut_session
-to
+to
.IR int32_t ,
and that of
.I ut_tv
-to a struct with two
+to a struct with two
.I int32_t
fields
.I tv_sec
and
.IR tv_usec .
-(Thus, in order to fill it, first get the
+(Thus, in order to fill it, first get the
time into a real \fIstruct timeval\fP,
then copy the two fields to
.IR ut_tv .)
A process can obtain its PID using
.BR getpid (2).
A PID is represented using the type
-.IR pid_t
+.IR pid_t
(defined in
.IR <sys/types.h> ).
Each process has a session ID and a process group ID,
both represented using the type
.IR pid_t .
-A process can obtain its session ID using
+A process can obtain its session ID using
.BR getsid(2),
and its process group ID using
.BR getpgrp (2).
Sessions and process groups are abstractions devised to support shell
job control.
-A process group (sometimes called a "job") is a collection of
+A process group (sometimes called a "job") is a collection of
processes that share the same process group ID;
the shell creates a new process group for the process(es) used
to execute single command or pipeline (e.g., the two processes
inherits copies of its parent's user and groups IDs.
During an
.BR execve (2),
-a process's real user and group ID and supplementary
+a process's real user and group ID and supplementary
group IDs are preserved;
the effective and saved set IDs may be changed, as described in
.BR execve (2).
.BR kill (2);
.IP *
when determining the permissions for setting
-process-scheduling parameters (nice value, real time
+process-scheduling parameters (nice value, real time
scheduling policy and priority, CPU affinity, I/O priority) using
.BR setpriority (2),
.BR sched_setaffinity (2),
.B EPOLLET
flag, the call to
.BR epoll_wait (2)
-done in step
+done in step
.B 5
will probably hang despite the available data still present in the file
input buffer;
They will be combined.
.TP
.B Q8
-Does an operation on a file descriptor affect the
+Does an operation on a file descriptor affect the
already collected but not yet reported events?
.TP
.B A8
structure is thus
.IR "sizeof(inotify_event)+len" .
-The behavior when the buffer given to
+The behavior when the buffer given to
.BR read (2)
-is too small to return information about the next event depends
+is too small to return information about the next event depends
on the kernel version: in kernels before 2.6.21,
.BR read (2)
returns 0; since kernel 2.6.21,
.\"
.\" Formatted or processed versions of this manual, if unaccompanied by
.\" the source, must acknowledge the copyright and authors of this work.
-.\"
-.\" 2007-05-30 created by mtk, using text from old man.7 plus
+.\"
+.\" 2007-05-30 created by mtk, using text from old man.7 plus
.\" rewrites and additional text.
.\"
.TH MAN-PAGES 7 2007-05-30 "Linux" "Linux Programmer's Manual"
.B groff tmac.an
package described in
.BR man (7).
-This choice is mainly for consistency: the vast majority of
+This choice is mainly for consistency: the vast majority of
existing Linux manual pages are marked up using these macros.
.SS Conventions for source file layout
-Please limit source code line length to no more than about 75 characters
+Please limit source code line length to no more than about 75 characters
wherever possible.
This helps avoid line-wrapping in some mail clients when patches are
submitted inline.
probably worse than including no version number.
Henceforth, avoid including a version number.)
.sp
-For library calls that are part of glibc or one of the
+For library calls that are part of glibc or one of the
other common GNU libraries, just use
.IR "GNU C Library" ", " GNU ,
or an empty string.
.IR Linux ", or " GNU .
.TP
.I manual
-The title of the manual (e.g., for Section 2 and 3 pages in
+The title of the manual (e.g., for Section 2 and 3 pages in
the \fIman-pages\fP package, use
.IR "Linux Programmer's Manual" ).
.RE
.SS Sections within a manual page
The list below shows conventional or suggested sections.
-Most manual pages should include at least the
+Most manual pages should include at least the
.B highlighted
sections.
Arrange a new manual page so that sections
.\" ERROR HANDLING,
ERRORS [Typically only in Sections 2, 3]
.\" May 07: Almost no current man pages have a USAGE section,,,
-.\" USAGE,
-..\" DIAGNOSTICS,
+.\" USAGE,
+..\" DIAGNOSTICS,
.\" May 07: Almost no current man pages have a SECURITY section,,,
.\" SECURITY,
ENVIRONMENT
.in
.IR "Where a traditional heading would apply" ", " "please use it" ;
this kind of consistency can make the information easier to understand.
-If you must, you can create your own
+If you must, you can create your own
headings if they make things easier to understand (this can
be especially useful for pages in Sections 4 and 5).
However, before doing this, consider whether you could use the
traditional headings, with some subsections (\fI.SS\fP) within
those sections.
-The following list elaborates on the contents of each of
+The following list elaborates on the contents of each of
the above sections.
.TP 14
.B NAME
The name of this manual page.
-See
+See
.BR man (7)
for important details of the line(s) that should follow the
\fB.SH NAME\fI command.
.\" section).
.TP
.B OPTIONS
-describes the command-line options accepted by a
+describes the command-line options accepted by a
program and how they change its behavior.
This section should only appear for Section 1 and 8 manual pages.
.\" .TP
(See
.BR standards (7).)
-If the call is not governed by any standards but commonly
-exists on other systems, note them.
+If the call is not governed by any standards but commonly
+exists on other systems, note them.
If the call is Linux specific, note this.
.TP
.B NOTES
an address for reporting bugs, place this under the BUGS section.
.TP
.B SEE ALSO
-lists related man pages, ordered by section number and
+lists related man pages, ordered by section number and
alphabetically by name, possibly followed by
other related pages or documents.
.SS Font conventions
Any reference to the subject of the current manual page
should be written with the name in bold.
If the subject is a function (i.e., this is a Section 2 or 3 page),
-then the name should be followed by a pair of parentheses
+then the name should be followed by a pair of parentheses
in Roman (normal) font.
For example, in the
.BR fcntl (2)
follows American spelling conventions;
please write all new pages and patches according to these conventions.
.SS Example Programs
-Manual pages can include example programs demonstrating how to
+Manual pages can include example programs demonstrating how to
use a system call or library function.
However, note the following:
.TP 3
for the Linux \fIman-pages\fP package, see
.BR man-pages (7).
.SS Title line
-The first command in a man page (after comment lines,
+The first command in a man page (after comment lines,
that is, lines that start with \fB.\\"\fP) should be
.RS
.sp
Unix domain stream sockets do not support the notion of out-of-band data.
.SH EXAMPLE
-See
+See
.BR bind (2).
.SH "SEE ALSO"
.BR recvmsg (2),
.B ld.so
understands the string
.I $ORIGIN
-(or equivalently
+(or equivalently
.IR ${ORIGIN} )
in an rpath specification (DT_RPATH or DT_RUNPATH) to mean
the directory containing the application executable.
.I gcc -Wl,-rpath,'$ORIGIN/../lib'
so that it finds an associated shared library in
.I somedir/lib
-no matter where
-.I somedir
+no matter where
+.I somedir
is located in the directory hierarchy.
This facilitates the creation of "turn-key" applications that
do not need to be installed into special directories,
but can instead be unpacked into any directory
and still find their own shared libraries.
-.\" ld.so also understands $LIB, with the same meaning as $ORIGIN/lib,
+.\" ld.so also understands $LIB, with the same meaning as $ORIGIN/lib,
.\" it appears.
.\"
.\" There is also $PLATFORM. This is a kind of wildcard