This commit is contained in:
Michael Kerrisk 2007-06-22 20:40:07 +00:00
parent 2f0af33ba6
commit 097585edcb
44 changed files with 375 additions and 139 deletions

View File

@ -89,16 +89,19 @@ is the file descriptor of the sending socket.
.PP .PP
If If
.BR sendto () .BR sendto ()
is used on a connection-mode (SOCK_STREAM, SOCK_SEQPACKET) socket, is used on a connection-mode
the parameters .RB ( SOCK_STREAM ,
.BR SOCK_SEQPACKET )
socket, the parameters
.I to .I to
and and
.I tolen .I tolen
are ignored (and the error are ignored (and the error
.B EISCONN .B EISCONN
may be returned when they are may be returned when they are
not NULL and 0), and the error ENOTCONN is returned when the socket was not NULL and 0), and the error
not actually connected. .B ENOTCONN
is returned when the socket was not actually connected.
Otherwise, the address of the target is given by Otherwise, the address of the target is given by
.I to .I to
with with

View File

@ -110,7 +110,9 @@ calls described in
.BR termios (3) .BR termios (3)
are used to get/set the process group of the control terminal. are used to get/set the process group of the control terminal.
If a session has a controlling terminal, CLOCAL is not set and a hangup If a session has a controlling terminal,
.B CLOCAL
is not set and a hangup
occurs, then the session leader is sent a occurs, then the session leader is sent a
.BR SIGHUP . .BR SIGHUP .
If the session leader If the session leader

View File

@ -387,7 +387,9 @@ Various fields in a \fIstruct shmid_ds\fP were shorts under Linux 2.2
and have become longs under Linux 2.4. and have become longs under Linux 2.4.
To take advantage of this, To take advantage of this,
a recompilation under glibc-2.1.91 or later should suffice. a recompilation under glibc-2.1.91 or later should suffice.
(The kernel distinguishes old and new calls by an IPC_64 flag in (The kernel distinguishes old and new calls by an
.B IPC_64
flag in
.IR cmd .) .IR cmd .)
.SH "SEE ALSO" .SH "SEE ALSO"
.BR mlock (2), .BR mlock (2),

View File

@ -38,7 +38,10 @@ The
system call is analogous to system call is analogous to
.BR kill (2), .BR kill (2),
except when the specified process is part of a thread group except when the specified process is part of a thread group
(created by specifying the CLONE_THREAD flag in the call to clone). (created by specifying the
.B CLONE_THREAD
flag in the call to
.BR clone (2)).
Since all the processes in a thread group have the same PID, Since all the processes in a thread group have the same PID,
they cannot be individually signaled with they cannot be individually signaled with
.BR kill (2). .BR kill (2).

View File

@ -370,7 +370,11 @@ POSIX.1-2001 describes
and and
.BR dlsym (). .BR dlsym ().
.SH NOTES .SH NOTES
The symbols RTLD_DEFAULT and RTLD_NEXT are defined by The symbols
.B RTLD_DEFAULT
and
.B RTLD_NEXT
are defined by
.I <dlfcn.h> .I <dlfcn.h>
only when only when
.B _GNU_SOURCE .B _GNU_SOURCE

View File

@ -37,11 +37,11 @@ flockfile, ftrylockfile, funlockfile \- lock FILE for stdio
The stdio functions are thread-safe. The stdio functions are thread-safe.
This is achieved by assigning This is achieved by assigning
to each to each
.B FILE .I FILE
object a lockcount and (if the lockcount is non-zero) object a lockcount and (if the lockcount is non-zero)
an owning thread. an owning thread.
For each library call, these functions wait until the For each library call, these functions wait until the
.B FILE .I FILE
object object
is no longer locked by a different thread, then lock it, do the is no longer locked by a different thread, then lock it, do the
requested I/O, and unlock the object again. requested I/O, and unlock the object again.
@ -61,7 +61,7 @@ On the other hand, maybe the locking overhead should be avoided
for greater efficiency. for greater efficiency.
.LP .LP
To this end, a thread can explicitly lock the To this end, a thread can explicitly lock the
.B FILE .I FILE
object, object,
then do its series of I/O actions, then unlock. then do its series of I/O actions, then unlock.
This prevents This prevents

View File

@ -136,7 +136,7 @@ Upon successful completion
and and
.BR open_memstream () .BR open_memstream ()
return a return a
.B FILE .I FILE
pointer. pointer.
Otherwise, NULL is returned and the global variable Otherwise, NULL is returned and the global variable
.I errno .I errno

View File

@ -83,7 +83,7 @@ Output streams are flushed (any unwritten buffer contents are
transferred to the host environment) before the stream is disassociated from transferred to the host environment) before the stream is disassociated from
the file. the file.
The value of a pointer to a The value of a pointer to a
.B FILE .I FILE
object is indeterminate after a file is closed (garbage). object is indeterminate after a file is closed (garbage).
.PP .PP
A file may be subsequently reopened, by the same or another program A file may be subsequently reopened, by the same or another program

View File

@ -51,7 +51,7 @@ __freading, __fsetlocking, __fwritable, __fwriting, _flushlbf \- interfaces to s
.SH DESCRIPTION .SH DESCRIPTION
Solaris introduced routines to allow portable access to the Solaris introduced routines to allow portable access to the
internals of the internals of the
.B FILE .I FILE
structure, and glibc also implemented these. structure, and glibc also implemented these.
.LP .LP
The The

View File

@ -44,7 +44,7 @@ than zero if \fIs1\fP is found, respectively, to be less than,
to match, or be greater than \fIs2\fP. to match, or be greater than \fIs2\fP.
The comparison is based on The comparison is based on
strings interpreted as appropriate for the program's current locale strings interpreted as appropriate for the program's current locale
for category \fILC_COLLATE\fP. (See for category \fBLC_COLLATE\fP. (See
.BR setlocale (3).) .BR setlocale (3).)
.SH "RETURN VALUE" .SH "RETURN VALUE"
The The

View File

@ -91,8 +91,10 @@ and
.I int_frac_digits .I int_frac_digits
items of the current locale. items of the current locale.
If the right precision is 0, no radix character is printed. If the right precision is 0, no radix character is printed.
(The radix character here is determined by LC_MONETARY, and may (The radix character here is determined by
differ from that specified by LC_NUMERIC.) .BR LC_MONETARY ,
and may differ from that specified by
.BR LC_NUMERIC .)
.LP .LP
Finally, the conversion specification must be ended with a Finally, the conversion specification must be ended with a
conversion character. conversion character.
@ -117,7 +119,9 @@ in the array \fIs\fP, not including the terminating null byte,
provided the string, including the terminating null byte, fits. provided the string, including the terminating null byte, fits.
Otherwise, it sets Otherwise, it sets
.I errno .I errno
to E2BIG, returns \-1, and the contents of the array is undefined. to
.BR E2BIG ,
returns \-1, and the contents of the array is undefined.
.SH "CONFORMING TO" .SH "CONFORMING TO"
Not in POSIX.1-2001. Not in POSIX.1-2001.
Present on several other systems. Present on several other systems.

View File

@ -254,7 +254,9 @@ would return \fImax\fP if the array was too small.)
Note that the return value 0 does not necessarily indicate an error; Note that the return value 0 does not necessarily indicate an error;
for example, in many locales %p yields an empty string. for example, in many locales %p yields an empty string.
.SH ENVIRONMENT .SH ENVIRONMENT
The environment variables TZ and LC_TIME are used. The environment variables TZ and
.B LC_TIME
are used.
.SH "CONFORMING TO" .SH "CONFORMING TO"
SVr4, C89, C99. SVr4, C89, C99.
There are strict inclusions between the set of conversions There are strict inclusions between the set of conversions

View File

@ -133,7 +133,9 @@ The locale's equivalent of AM or PM. (Note: there may be none.)
.B %r .B %r
The 12-hour clock time (using the locale's AM or PM). The 12-hour clock time (using the locale's AM or PM).
In the POSIX locale equivalent to %I:%M:%S %p. In the POSIX locale equivalent to %I:%M:%S %p.
If \fIt_fmt_ampm\fP is empty in the LC_TIME part of the current locale If \fIt_fmt_ampm\fP is empty in the
.B LC_TIME
part of the current locale
then the behavior is undefined. then the behavior is undefined.
.TP .TP
.B %R .B %R
@ -290,7 +292,8 @@ This function is available since libc 4.6.8.
Linux libc4 and libc5 includes define the prototype unconditionally; Linux libc4 and libc5 includes define the prototype unconditionally;
glibc2 includes provide a prototype only when glibc2 includes provide a prototype only when
.B _XOPEN_SOURCE .B _XOPEN_SOURCE
or _GNU_SOURCE or
.B _GNU_SOURCE
are defined. are defined.
.PP .PP
Before libc 5.4.13 whitespace (and the 'n' and 't' specifications) Before libc 5.4.13 whitespace (and the 'n' and 't' specifications)

View File

@ -88,15 +88,24 @@ function returns the result of the conversion,
unless the value would underflow or overflow. unless the value would underflow or overflow.
If an underflow occurs, If an underflow occurs,
.BR strtol () .BR strtol ()
returns LONG_MIN. returns
.BR LONG_MIN .
If an overflow occurs, If an overflow occurs,
.BR strtol () .BR strtol ()
returns LONG_MAX. returns
.BR LONG_MAX .
In both cases, \fIerrno\fP is set to In both cases, \fIerrno\fP is set to
.BR ERANGE . .BR ERANGE .
Precisely the same holds for Precisely the same holds for
.BR strtoll () .BR strtoll ()
(with LLONG_MIN and LLONG_MAX instead of LONG_MIN and LONG_MAX). (with
.B LLONG_MIN
and
.B LLONG_MAX
instead of
.B LONG_MIN
and
.BR LONG_MAX ).
.SH ERRORS .SH ERRORS
.TP .TP
.B EINVAL .B EINVAL
@ -119,7 +128,13 @@ to C99 and POSIX.1-2001.
Since Since
.BR strtol () .BR strtol ()
can legitimately return 0, can legitimately return 0,
LONG_MAX, or LONG_MIN (LLONG_MAX or LLONG_MIN for .BR LONG_MAX ,
or
.B LONG_MIN
.RB ( LLONG_MAX
or
.B LLONG_MIN
for
.BR strtoll ()) .BR strtoll ())
on both success and failure, the calling program should set on both success and failure, the calling program should set
.I errno .I errno

View File

@ -54,7 +54,9 @@ is to compare two strings and find the "right" order, while
.BR strcmp (3) .BR strcmp (3)
only finds the lexicographic order. only finds the lexicographic order.
This function does not use This function does not use
the locale category LC_COLLATE, so is meant mostly for situations the locale category
.BR LC_COLLATE ,
so is meant mostly for situations
where the strings are expected to be in ASCII. where the strings are expected to be in ASCII.
What this function does is the following. What this function does is the following.

View File

@ -49,7 +49,7 @@ on the two strings before their transformation.
The first \fIn\fP characters of the transformed string are placed in The first \fIn\fP characters of the transformed string are placed in
\fIdest\fP. \fIdest\fP.
The transformation is based on the program's current The transformation is based on the program's current
locale for category \fILC_COLLATE\fP. (See locale for category \fBLC_COLLATE\fP. (See
.BR setlocale (3)). .BR setlocale (3)).
.SH "RETURN VALUE" .SH "RETURN VALUE"
The The

View File

@ -178,7 +178,8 @@ Must not be less than _POSIX_STREAM_MAX (8).
.TP .TP
.BR SYMLOOP_MAX .BR SYMLOOP_MAX
The maximum number of symbolic links seen in a pathname before resolution The maximum number of symbolic links seen in a pathname before resolution
returns ELOOP. returns
.BR ELOOP .
Must not be less than _POSIX_SYMLOOP_MAX (8). Must not be less than _POSIX_SYMLOOP_MAX (8).
.TP .TP
.BR TTY_NAME_MAX " - " _SC_TTY_NAME_MAX .BR TTY_NAME_MAX " - " _SC_TTY_NAME_MAX

View File

@ -105,8 +105,11 @@ process in the same session as the calling process.
.SH "CONFORMING TO" .SH "CONFORMING TO"
POSIX.1-2001. POSIX.1-2001.
.SH NOTES .SH NOTES
These functions are implemented via the TIOCGPGRP and These functions are implemented via the
TIOCSPGRP ioctls. .B TIOCGPGRP
and
.B TIOCSPGRP
ioctls.
.SS History .SS History
The ioctls appeared in 4.2BSD. The ioctls appeared in 4.2BSD.
The functions are POSIX inventions. The functions are POSIX inventions.

View File

@ -59,7 +59,8 @@ it has one but it is not described by
.SH "CONFORMING TO" .SH "CONFORMING TO"
POSIX.1-2001 POSIX.1-2001
.SH NOTES .SH NOTES
This function is implemented via the TIOCGSID This function is implemented via the
.B TIOCGSID
.BR ioctl (2), .BR ioctl (2),
present present
since Linux 2.1.71. since Linux 2.1.71.

View File

@ -48,7 +48,9 @@ Attempts to find an appropriate directory go through the following
steps: steps:
.TP .TP
a) a)
In case the environment variable TMPDIR exists and In case the environment variable
.B TMPDIR
exists and
contains the name of an appropriate directory, that is used. contains the name of an appropriate directory, that is used.
.TP .TP
b) b)
@ -103,7 +105,9 @@ Or better yet, use
or or
.BR tmpfile (3). .BR tmpfile (3).
SUSv2 does not mention the use of TMPDIR; glibc will use it only SUSv2 does not mention the use of
.BR TMPDIR ;
glibc will use it only
when the program is not set-user-ID. when the program is not set-user-ID.
On SVr4, the directory used under \fBd)\fP is On SVr4, the directory used under \fBd)\fP is
.IR /tmp .IR /tmp
@ -117,10 +121,14 @@ is reentrant, and thus thread safe, unlike
The The
.BR tempnam () .BR tempnam ()
function generates a different string each time it is called, function generates a different string each time it is called,
up to TMP_MAX (defined in up to
.B TMP_MAX
(defined in
.IR <stdio.h> ) .IR <stdio.h> )
times. times.
If it is called more than TMP_MAX times, If it is called more than
.BR TMP_MAX
times,
the behavior is implementation defined. the behavior is implementation defined.
.LP .LP
.BR tempnam () .BR tempnam ()

View File

@ -264,7 +264,8 @@ or
.BR _SVID_SOURCE ] .BR _SVID_SOURCE ]
.TP .TP
.B CBAUDEX .B CBAUDEX
(not in POSIX) Extra baud speed mask (1 bit), included in CBAUD. (not in POSIX) Extra baud speed mask (1 bit), included in
.BR CBAUD .
[requires [requires
.B _BSD_SOURCE .B _BSD_SOURCE
or or
@ -277,7 +278,9 @@ structure without specifying where precisely, and provides
and and
.BR cfsetispeed () .BR cfsetispeed ()
for getting at it. for getting at it.
Some systems use bits selected by CBAUD in Some systems use bits selected by
.B CBAUD
in
.IR c_cflag , .IR c_cflag ,
other systems use separate fields, for example, other systems use separate fields, for example,
.I sg_ispeed .I sg_ispeed
@ -313,8 +316,14 @@ For use by \fBshl\fP (shell layers). (Not implemented on Linux.)
.TP .TP
.B CIBAUD .B CIBAUD
(not in POSIX) Mask for input speeds. (not in POSIX) Mask for input speeds.
The values for the CIBAUD bits are The values for the
the same as the values for the CBAUD bits, shifted left IBSHIFT bits. .B CIBAUD
bits are
the same as the values for the
.B CBAUD
bits, shifted left
.B IBSHIFT
bits.
[requires [requires
.B _BSD_SOURCE .B _BSD_SOURCE
or or
@ -455,7 +464,9 @@ Interrupt character.
Send a Send a
.B SIGINT .B SIGINT
signal. signal.
Recognized when ISIG is set, and then not passed as input. Recognized when
.B ISIG
is set, and then not passed as input.
.TP .TP
.B VQUIT .B VQUIT
(034, FS, Ctrl-\e) (034, FS, Ctrl-\e)
@ -463,20 +474,26 @@ Quit character.
Send Send
.BR SIGQUIT .BR SIGQUIT
signal. signal.
Recognized when ISIG is set, and then not passed as input. Recognized when
.B ISIG
is set, and then not passed as input.
.TP .TP
.B VERASE .B VERASE
(0177, DEL, rubout, or 010, BS, Ctrl-H, or also #) (0177, DEL, rubout, or 010, BS, Ctrl-H, or also #)
Erase character. Erase character.
This erases the previous not-yet-erased character, This erases the previous not-yet-erased character,
but does not erase past EOF or beginning-of-line. but does not erase past EOF or beginning-of-line.
Recognized when ICANON is set, and then not passed as input. Recognized when
.B ICANON
is set, and then not passed as input.
.TP .TP
.B VKILL .B VKILL
(025, NAK, Ctrl-U, or Ctrl-X, or also @) (025, NAK, Ctrl-U, or Ctrl-X, or also @)
Kill character. Kill character.
This erases the input since the last EOF or beginning-of-line. This erases the input since the last EOF or beginning-of-line.
Recognized when ICANON is set, and then not passed as input. Recognized when
.B ICANON
is set, and then not passed as input.
.TP .TP
.B VEOF .B VEOF
(004, EOT, Ctrl-D) (004, EOT, Ctrl-D)
@ -486,7 +503,9 @@ to the waiting user program without waiting for end-of-line.
If it is the first character of the line, the If it is the first character of the line, the
.BR read (2) .BR read (2)
in the user program returns 0, which signifies end-of-file. in the user program returns 0, which signifies end-of-file.
Recognized when ICANON is set, and then not passed as input. Recognized when
.B ICANON
is set, and then not passed as input.
.TP .TP
.B VMIN .B VMIN
Minimum number of characters for non-canonical read. Minimum number of characters for non-canonical read.
@ -494,7 +513,9 @@ Minimum number of characters for non-canonical read.
.B VEOL .B VEOL
(0, NUL) (0, NUL)
Additional end-of-line character. Additional end-of-line character.
Recognized when ICANON is set. Recognized when
.B ICANON
is set.
.TP .TP
.B VTIME .B VTIME
Timeout in deciseconds for non-canonical read. Timeout in deciseconds for non-canonical read.
@ -502,7 +523,9 @@ Timeout in deciseconds for non-canonical read.
.B VEOL2 .B VEOL2
(not in POSIX; 0, NUL) (not in POSIX; 0, NUL)
Yet another end-of-line character. Yet another end-of-line character.
Recognized when ICANON is set. Recognized when
.B ICANON
is set.
.TP .TP
.B VSWTCH .B VSWTCH
(not in POSIX; not supported under Linux; 0, NUL) (not in POSIX; not supported under Linux; 0, NUL)
@ -513,13 +536,17 @@ Switch character.
(021, DC1, Ctrl-Q) (021, DC1, Ctrl-Q)
Start character. Start character.
Restarts output stopped by the Stop character. Restarts output stopped by the Stop character.
Recognized when IXON is set, and then not passed as input. Recognized when
.B IXON
is set, and then not passed as input.
.TP .TP
.B VSTOP .B VSTOP
(023, DC3, Ctrl-S) (023, DC3, Ctrl-S)
Stop character. Stop character.
Stop output until Start character typed. Stop output until Start character typed.
Recognized when IXON is set, and then not passed as input. Recognized when
.B IXON
is set, and then not passed as input.
.TP .TP
.B VSUSP .B VSUSP
(032, SUB, Ctrl-Z) (032, SUB, Ctrl-Z)
@ -527,7 +554,9 @@ Suspend character.
Send Send
.B SIGTSTP .B SIGTSTP
signal. signal.
Recognized when ISIG is set, and then not passed as input. Recognized when
.B ISIG
is set, and then not passed as input.
.TP .TP
.B VDSUSP .B VDSUSP
(not in POSIX; not supported under Linux; 031, EM, Ctrl-Y) (not in POSIX; not supported under Linux; 031, EM, Ctrl-Y)
@ -535,7 +564,10 @@ Delayed suspend character:
send send
.B SIGTSTP .B SIGTSTP
signal when the character is read by the user program. signal when the character is read by the user program.
Recognized when IEXTEN and ISIG are set, and the system supports Recognized when
.B IEXTEN
and
.B ISIG are set, and the system supports
job control, and then not passed as input. job control, and then not passed as input.
.TP .TP
.B VLNEXT .B VLNEXT
@ -543,32 +575,53 @@ job control, and then not passed as input.
Literal next. Literal next.
Quotes the next input character, depriving it of Quotes the next input character, depriving it of
a possible special meaning. a possible special meaning.
Recognized when IEXTEN is set, and then not passed as input. Recognized when
.B IEXTEN
is set, and then not passed as input.
.TP .TP
.B VWERASE .B VWERASE
(not in POSIX; 027, ETB, Ctrl-W) (not in POSIX; 027, ETB, Ctrl-W)
Word erase. Word erase.
Recognized when ICANON and IEXTEN are set, and then not passed as input. Recognized when
.B ICANON
and
.B IEXTEN
are set, and then not passed as input.
.TP .TP
.B VREPRINT .B VREPRINT
(not in POSIX; 022, DC2, Ctrl-R) (not in POSIX; 022, DC2, Ctrl-R)
Reprint unread characters. Reprint unread characters.
Recognized when ICANON and IEXTEN are set, and then not passed as input. Recognized when
.B ICANON
and
.B IEXTEN
are set, and then not passed as input.
.TP .TP
.B VDISCARD .B VDISCARD
(not in POSIX; not supported under Linux; 017, SI, Ctrl-O) (not in POSIX; not supported under Linux; 017, SI, Ctrl-O)
Toggle: start/stop discarding pending output. Toggle: start/stop discarding pending output.
Recognized when IEXTEN is set, and then not passed as input. Recognized when
.B IEXTEN
is set, and then not passed as input.
.TP .TP
.B VSTATUS .B VSTATUS
(not in POSIX; not supported under Linux; (not in POSIX; not supported under Linux;
status request: 024, DC4, Ctrl-T). status request: 024, DC4, Ctrl-T).
.LP .LP
These symbolic subscript values are all different, except that These symbolic subscript values are all different, except that
VTIME, VMIN may have the same value as VEOL, VEOF, respectively. .BR VTIME ,
.BR VMIN
may have the same value as
.BR VEOL ,
.BR VEOF ,
respectively.
In non-canonical mode the special character meaning is replaced In non-canonical mode the special character meaning is replaced
by the timeout meaning. by the timeout meaning.
For an explanation of VMIN and VTIME, see the description of For an explanation of
.B VMIN
and
.BR VTIME ,
see the description of
non-canonical mode below. non-canonical mode below.
.SS "Retrieving and changing terminal settings" .SS "Retrieving and changing terminal settings"
.PP .PP

View File

@ -62,7 +62,9 @@ and
.I P_tmpdir .I P_tmpdir
are defined in are defined in
.IR <stdio.h> , .IR <stdio.h> ,
just like the TMP_MAX mentioned below.) just like the
.B TMP_MAX
mentioned below.)
.SH "RETURN VALUE" .SH "RETURN VALUE"
The The
.BR tmpnam () .BR tmpnam ()
@ -76,8 +78,12 @@ SVr4, 4.3BSD, C89, C99, POSIX.1-2001.
The The
.BR tmpnam () .BR tmpnam ()
function generates a different string each time it is called, function generates a different string each time it is called,
up to TMP_MAX times. up to
If it is called more than TMP_MAX times, .B TMP_MAX
times.
If it is called more than
.B TMP_MAX
times,
the behavior is implementation defined. the behavior is implementation defined.
.LP .LP
Although Although

View File

@ -45,7 +45,8 @@ tzset, tzname, timezone, daylight \- initialize time conversion information
The The
.BR tzset () .BR tzset ()
function initializes the \fItzname\fP variable from the function initializes the \fItzname\fP variable from the
TZ environment variable. .B TZ
environment variable.
This function is automatically called by the This function is automatically called by the
other time conversion functions that depend on the time zone. other time conversion functions that depend on the time zone.
In a SysV-like environment it will also set the variables \fItimezone\fP In a SysV-like environment it will also set the variables \fItimezone\fP
@ -53,7 +54,9 @@ In a SysV-like environment it will also set the variables \fItimezone\fP
have any daylight saving time rules, non-zero if there is a time during have any daylight saving time rules, non-zero if there is a time during
the year when daylight saving time applies). the year when daylight saving time applies).
.PP .PP
If the TZ variable does not appear in the environment, the \fItzname\fP If the
.B TZ
variable does not appear in the environment, the \fItzname\fP
variable is initialized with the best approximation of local wall clock variable is initialized with the best approximation of local wall clock
time, as specified by the time, as specified by the
.BR tzfile (5)-format .BR tzfile (5)-format
@ -63,11 +66,15 @@ found in the system timezone directory (see below).
.I /etc/localtime .I /etc/localtime
used here, a symlink to the right file in the system timezone directory.) used here, a symlink to the right file in the system timezone directory.)
.PP .PP
If the TZ variable does appear in the environment but its value is empty If the
.B TZ
variable does appear in the environment but its value is empty
or its value cannot be interpreted using any of the formats specified or its value cannot be interpreted using any of the formats specified
below, Coordinated Universal Time (UTC) is used. below, Coordinated Universal Time (UTC) is used.
.PP .PP
The value of TZ can be one of three formats. The value of
.B TZ
can be one of three formats.
The first format is used The first format is used
when there is no daylight saving time in the local time zone: when there is no daylight saving time in the local time zone:
.sp .sp
@ -168,7 +175,9 @@ Libc4 and libc5 use
and, since libc-5.4.6, and, since libc-5.4.6,
when this doesn't work, will try when this doesn't work, will try
.IR /usr/share/zoneinfo . .IR /usr/share/zoneinfo .
Glibc2 will use the environment variable TZDIR, when that exists. Glibc2 will use the environment variable
.BR TZDIR ,
when that exists.
Its default depends on how it was installed, but normally is Its default depends on how it was installed, but normally is
.IR /usr/share/zoneinfo . .IR /usr/share/zoneinfo .
.LP .LP

View File

@ -51,10 +51,10 @@ granularity of system timers.
0 on success, \-1 on error. 0 on success, \-1 on error.
.SH ERRORS .SH ERRORS
.TP .TP
EINTR .B EINTR
Interrupted by a signal. Interrupted by a signal.
.TP .TP
EINVAL .B EINVAL
\fIusec\fP is not smaller than 1000000. \fIusec\fP is not smaller than 1000000.
(On systems where that is considered an error.) (On systems where that is considered an error.)
.SH "CONFORMING TO" .SH "CONFORMING TO"

View File

@ -51,7 +51,11 @@ Equivalent to
Allow the output buffer to drain, discard pending input, and Allow the output buffer to drain, discard pending input, and
set the current serial port settings. set the current serial port settings.
.LP .LP
The following four ioctls are just like TCGETS, TCSETS, TCSETSW, TCSETSF, The following four ioctls are just like
.BR TCGETS ,
.BR TCSETS ,
.BR TCSETSW ,
.BR TCSETSF ,
except that they take a except that they take a
.I "struct termio *" .I "struct termio *"
instead of a instead of a
@ -141,7 +145,8 @@ HP-UX ignores
.IR arg .) .IR arg .)
.TP .TP
.BI "TCSBRKP int " arg .BI "TCSBRKP int " arg
So-called "POSIX version" of TCSBRK. So-called "POSIX version" of
.BR TCSBRK .
It treats non-zero It treats non-zero
.I arg .I arg
as a timeinterval measured in deciseconds, and does nothing as a timeinterval measured in deciseconds, and does nothing
@ -160,14 +165,19 @@ Equivalent to
.br .br
See See
.BR tcflow (3) .BR tcflow (3)
for the argument values TCOOFF, TCOON, TCIOFF, TCION. for the argument values
.BR TCOOFF ,
.BR TCOON ,
.BR TCIOFF ,
.BR TCION .
.SS "Buffer count and flushing" .SS "Buffer count and flushing"
.TP .TP
.BI "FIONREAD int *" argp .BI "FIONREAD int *" argp
Get the number of bytes in the input buffer. Get the number of bytes in the input buffer.
.TP .TP
.BI "TIOCINQ int *" argp .BI "TIOCINQ int *" argp
Same as FIONREAD. Same as
.BR FIONREAD .
.TP .TP
.BI "TIOCOUTQ int *" argp .BI "TIOCOUTQ int *" argp
Get the number of bytes in the output buffer. Get the number of bytes in the output buffer.
@ -178,7 +188,10 @@ Equivalent to
.br .br
See See
.BR tcflush (3) .BR tcflush (3)
for the argument values TCIFLUSH, TCOFLUSH, TCIOFLUSH. for the argument values
.BR TCIFLUSH ,
.BR TCOFLUSH ,
.BR TCIOFLUSH .
.SS "Faking input" .SS "Faking input"
.TP .TP
.BI "TIOCSTI const char *" argp .BI "TIOCSTI const char *" argp
@ -193,7 +206,9 @@ or
to the given tty. to the given tty.
If that was a pty master, send it to the slave. If that was a pty master, send it to the slave.
Anybody can do this as long as the output was not redirected yet. Anybody can do this as long as the output was not redirected yet.
If it was redirected already EBUSY is returned, If it was redirected already
.B EBUSY
is returned,
but root may stop redirection by using this ioctl with but root may stop redirection by using this ioctl with
.I fd .I fd
pointing at pointing at
@ -207,7 +222,8 @@ Make the given tty the controlling tty of the current process.
The current process must be a session leader and not have a The current process must be a session leader and not have a
controlling tty already. controlling tty already.
If this tty is already the controlling tty If this tty is already the controlling tty
of a different session group then the ioctl fails with EPERM, of a different session group then the ioctl fails with
.BR EPERM ,
unless the caller is root and unless the caller is root and
.I arg .I arg
equals 1, in which case the tty is stolen, and all processes that had equals 1, in which case the tty is stolen, and all processes that had
@ -239,7 +255,8 @@ Set the foreground process group ID of this tty.
.TP .TP
.BI "TIOCGSID pid_t *" argp .BI "TIOCGSID pid_t *" argp
Get the session ID of the given tty. Get the session ID of the given tty.
This will fail with ENOTTY This will fail with
.B ENOTTY
in case the tty is not a master pty and not our controlling tty. in case the tty is not a master pty and not our controlling tty.
Strange. Strange.
.SS "Exclusive mode" .SS "Exclusive mode"
@ -249,7 +266,9 @@ Put the tty into exclusive mode.
No further No further
.BR open (2) .BR open (2)
operations on the terminal are permitted. operations on the terminal are permitted.
(They will fail with EBUSY, except for root.) (They will fail with
.BR EBUSY ,
except for root.)
.TP .TP
.BI "TIOCNXCL void" .BI "TIOCNXCL void"
Disable exclusive mode. Disable exclusive mode.
@ -267,13 +286,16 @@ Enable (when
.RI * argp .RI * argp
is non-zero) or disable packet mode. is non-zero) or disable packet mode.
Can be applied to the master side of a pseudo-terminal only (and will return Can be applied to the master side of a pseudo-terminal only (and will return
ENOTTY otherwise). .B ENOTTY
otherwise).
In packet mode, each subsequent In packet mode, each subsequent
.BR read (2) .BR read (2)
will return a packet that either contains a single non-zero control byte, will return a packet that either contains a single non-zero control byte,
or has a single byte containing zero (''\0') followed by data or has a single byte containing zero (''\0') followed by data
written on the slave side of the pty. written on the slave side of the pty.
If the first byte is not TIOCPKT_DATA (0), it is an OR of one If the first byte is not
.B TIOCPKT_DATA
(0), it is an OR of one
or more of the following bits: or more of the following bits:
.nf .nf
@ -297,7 +319,11 @@ and
.BR rlogind (8) .BR rlogind (8)
to implement a remote-echoed, locally `^S/^Q' flow-controlled remote login. to implement a remote-echoed, locally `^S/^Q' flow-controlled remote login.
The BSD ioctls TIOCSTOP, TIOCSTART, TIOCUCNTL, TIOCREMOTE The BSD ioctls
.BR TIOCSTOP ,
.BR TIOCSTART ,
.BR TIOCUCNTL ,
.BR TIOCREMOTE
have not been implemented under Linux. have not been implemented under Linux.
.SS "Modem control" .SS "Modem control"
.TP .TP
@ -341,16 +367,24 @@ Set the CLOCAL flag in the termios structure when
.RI * argp .RI * argp
is non-zero, and clear it otherwise. is non-zero, and clear it otherwise.
.LP .LP
If the CLOCAL flag for a line is off, the hardware carrier detect (DCD) If the
.B CLOCAL
flag for a line is off, the hardware carrier detect (DCD)
signal is significant, and an signal is significant, and an
.BR open (2) .BR open (2)
of the corresponding tty will block until DCD is asserted, of the corresponding tty will block until DCD is asserted,
unless the O_NONBLOCK flag is given. unless the
If CLOCAL is set, the line behaves as if DCD is always asserted. .B O_NONBLOCK
flag is given.
If
.B CLOCAL
is set, the line behaves as if DCD is always asserted.
The software carrier flag is usually turned on for local devices, The software carrier flag is usually turned on for local devices,
and is off for lines with modems. and is off for lines with modems.
.SS "Linux specific" .SS "Linux specific"
For the TIOCLINUX ioctl, see For the
.B TIOCLINUX
ioctl, see
.BR console_ioctl (4). .BR console_ioctl (4).
.SS "Kernel debugging" .SS "Kernel debugging"
.sp .sp
@ -418,7 +452,7 @@ main(void)
.BR termios (3), .BR termios (3),
.BR console_ioctl (4), .BR console_ioctl (4),
.BR pty (7) .BR pty (7)
."
.\" FIONBIO const int * .\" FIONBIO const int *
.\" FIONCLEX void .\" FIONCLEX void
.\" FIOCLEX void .\" FIOCLEX void

View File

@ -301,7 +301,9 @@ the amount of the mapping that is currently resident in RAM,
the number clean and dirty shared pages in the mapping, the number clean and dirty shared pages in the mapping,
and the number clean and dirty private pages in the mapping. and the number clean and dirty private pages in the mapping.
This file is only present if the CONFIG_MMU kernel configuration This file is only present if the
.B CONFIG_MMU
kernel configuration
option is enabled. option is enabled.
.TP .TP
.I /proc/[number]/stat .I /proc/[number]/stat
@ -546,15 +548,17 @@ directory are not available if the main thread has already terminated
.BR pthread_exit (3)). .BR pthread_exit (3)).
.TP .TP
.I /proc/apm .I /proc/apm
Advanced power management version and battery information Advanced power management version and battery information when
when CONFIG_APM is defined at kernel compilation time. .B CONFIG_APM
is defined at kernel compilation time.
.TP .TP
.I /proc/bus .I /proc/bus
Contains subdirectories for installed busses. Contains subdirectories for installed busses.
.TP .TP
.I /proc/bus/pccard .I /proc/bus/pccard
Subdirectory for pcmcia devices when CONFIG_PCMCIA is set Subdirectory for pcmcia devices when
at kernel compilation time. .B CONFIG_PCMCIA
is set at kernel compilation time.
.TP .TP
.I /proc/bus/pccard/drivers .I /proc/bus/pccard/drivers
.TP .TP
@ -607,8 +611,9 @@ Empty subdirectory.
List of the execution domains (ABI personalities). List of the execution domains (ABI personalities).
.TP .TP
.I /proc/fb .I /proc/fb
Frame buffer information when CONFIG_FB is defined during kernel Frame buffer information when
compilation. .B CONFIG_FB
is defined during kernel compilation.
.TP .TP
.I /proc/filesystems .I /proc/filesystems
A text listing of the filesystems which were compiled into the kernel. A text listing of the filesystems which were compiled into the kernel.
@ -716,8 +721,9 @@ and leases
.RB ( fcntl (2)). .RB ( fcntl (2)).
.TP .TP
.I /proc/malloc .I /proc/malloc
This file is only present if CONFIGDEBUGMALLOC was defined during This file is only present if
compilation. .B CONFIGDEBUGMALLOC
was defined during compilation.
.TP .TP
.I /proc/meminfo .I /proc/meminfo
This is used by This is used by
@ -1702,7 +1708,9 @@ Values are:
.br .br
In mode 0, calls of In mode 0, calls of
.BR mmap (2) .BR mmap (2)
with MAP_NORESERVE set are not checked, and the default check is very weak, with
.BR MAP_NORESERVE
set are not checked, and the default check is very weak,
leading to the risk of getting a process "OOM-killed". leading to the risk of getting a process "OOM-killed".
Under Linux 2.4 any non-zero value implies mode 1. Under Linux 2.4 any non-zero value implies mode 1.
In mode 2 (available since Linux 2.6), the total virtual address space In mode 2 (available since Linux 2.6), the total virtual address space

View File

@ -45,7 +45,8 @@ the terminal actually in use.
(Other aspects of the terminal are (Other aspects of the terminal are
handled by handled by
.BR stty (1).) .BR stty (1).)
The termcap database is indexed on the TERM The termcap database is indexed on the
.B TERM
environment variable. environment variable.
.LP .LP
Termcap entries must be defined on a single logical line, with '\\' Termcap entries must be defined on a single logical line, with '\\'
@ -60,7 +61,8 @@ This short name may consist of capital or small letters.
In 4.4BSD termcap entries this field is omitted. In 4.4BSD termcap entries this field is omitted.
.LP .LP
The second subfield (first, in the newer 4.4BSD format) contains the The second subfield (first, in the newer 4.4BSD format) contains the
name used by the environment variable TERM. name used by the environment variable
.BR TERM .
It should be spelled in lowercase letters. It should be spelled in lowercase letters.
Selectable hardware capabilities should be marked Selectable hardware capabilities should be marked
by appending a hyphen and a suffix to this name. by appending a hyphen and a suffix to this name.

View File

@ -38,7 +38,9 @@ whitespace, followed by a tty name (a device name without the
This association is used by the program This association is used by the program
.BR tset (1) .BR tset (1)
to set the environment variable TERM to the default terminal name for to set the environment variable
.B TERM
to the default terminal name for
the user's current tty. the user's current tty.
This facility was designed for a traditional time-sharing environment This facility was designed for a traditional time-sharing environment

View File

@ -107,7 +107,9 @@ Bypass permission checks for operations on System V IPC objects.
.B CAP_KILL .B CAP_KILL
Bypass permission checks for sending signals (see Bypass permission checks for sending signals (see
.BR kill (2)). .BR kill (2)).
This includes use of the KDSIGACCEPT ioctl. This includes use of the
.B KDSIGACCEPT
ioctl.
.\" FIXME CAP_KILL also has an effect for threads + setting child .\" FIXME CAP_KILL also has an effect for threads + setting child
.\" termination signal to other than SIGCHLD: without this .\" termination signal to other than SIGCHLD: without this
.\" capability, the termination signal reverts to SIGCHLD .\" capability, the termination signal reverts to SIGCHLD

View File

@ -130,7 +130,8 @@ by waiting for an event only after
.BR read (2) .BR read (2)
or or
.BR write (2) .BR write (2)
return EAGAIN return
.BR EAGAIN .
.RE .RE
.PP .PP
By contrast, when used as a level-triggered interface, By contrast, when used as a level-triggered interface,
@ -169,12 +170,15 @@ non-blocking socket on which
.BR listen (2) .BR listen (2)
has been called. has been called.
The function do_use_fd() uses the new ready The function do_use_fd() uses the new ready
file descriptor until EAGAIN is returned by either file descriptor until
.B EAGAIN
is returned by either
.BR read (2) .BR read (2)
or or
.BR write (2). .BR write (2).
An event-driven state machine application should, after having received An event-driven state machine application should, after having received
EAGAIN, record its current state so that at the next call to do_use_fd() .BR EAGAIN ,
record its current state so that at the next call to do_use_fd()
it will continue to it will continue to
.BR read (2) .BR read (2)
or or
@ -230,7 +234,8 @@ with
What happens if you add the same file descriptor to an epoll set twice? What happens if you add the same file descriptor to an epoll set twice?
.TP .TP
.B A1 .B A1
You will probably get EEXIST. You will probably get
.BR EEXIST .
However, it is possible that two However, it is possible that two
threads may add the same file descriptor twice. threads may add the same file descriptor twice.
This is a harmless condition. This is a harmless condition.
@ -302,7 +307,9 @@ Modify will re-read available I/O.
.TP .TP
.B Q9 .B Q9
Do I need to continuously read/write a file descriptor Do I need to continuously read/write a file descriptor
until EAGAIN when using the until
.B EAGAIN
when using the
.B EPOLLET .B EPOLLET
flag (edge-triggered behavior) ? flag (edge-triggered behavior) ?
.TP .TP
@ -313,7 +320,8 @@ Receiving an event from
should suggest to you that such file descriptor is ready should suggest to you that such file descriptor is ready
for the requested I/O operation. for the requested I/O operation.
You have simply to consider it ready until you will receive the You have simply to consider it ready until you will receive the
next EAGAIN. next
.BR EAGAIN .
When and how you will use such file descriptor is entirely up When and how you will use such file descriptor is entirely up
to you. to you.
Also, the condition that the read/write I/O space is exhausted can Also, the condition that the read/write I/O space is exhausted can

View File

@ -33,7 +33,9 @@ A process can open a FIFO in non-blocking mode.
In this In this
case, opening for read only will succeed even if no-one has case, opening for read only will succeed even if no-one has
opened on the write side yet; opening for write only will opened on the write side yet; opening for write only will
fail with ENXIO (no such device or address) unless the other fail with
.B ENXIO
(no such device or address) unless the other
end has already been opened. end has already been opened.
.PP .PP
Under Linux, opening a FIFO for read and write will succeed Under Linux, opening a FIFO for read and write will succeed

View File

@ -160,7 +160,9 @@ more useful way and adds three more types:
(iii) Ranges X\-Y comprise all characters that fall between X (iii) Ranges X\-Y comprise all characters that fall between X
and Y (inclusive) in the current collating sequence as defined and Y (inclusive) in the current collating sequence as defined
by the LC_COLLATE category in the current locale. by the
.B LC_COLLATE
category in the current locale.
(iv) Named character classes, like (iv) Named character classes, like
.nf .nf

View File

@ -155,7 +155,8 @@ member of
.I struct in_addr .I struct in_addr
contains the host interface address in network byte order. contains the host interface address in network byte order.
.I in_addr .I in_addr
should be assigned one of the INADDR_* values (e.g., INADDR_ANY) should be assigned one of the INADDR_* values (e.g.,
.BR INADDR_ANY )
or set using the or set using the
.BR inet_aton (3), .BR inet_aton (3),
.BR inet_addr (3), .BR inet_addr (3),

View File

@ -190,7 +190,9 @@ is not up.
.B SIOCGIFCONF .B SIOCGIFCONF
Return a list of interface (transport layer) addresses. Return a list of interface (transport layer) addresses.
This currently This currently
means only addresses of the AF_INET (IPv4) family for compatibility. means only addresses of the
.B AF_INET
(IPv4) family for compatibility.
The user passes a The user passes a
.B ifconf .B ifconf
structure as argument to the ioctl. structure as argument to the ioctl.

View File

@ -379,7 +379,8 @@ The
.BR recvmsg (2) .BR recvmsg (2)
extension is an ugly hack and should be replaced by a control message. extension is an ugly hack and should be replaced by a control message.
There is currently no way to get the original destination address of There is currently no way to get the original destination address of
packets via SOCK_DGRAM. packets via
.BR SOCK_DGRAM .
.\" .SH CREDITS .\" .SH CREDITS
.\" This man page was written by Andi Kleen with help from Matthew Wilcox. .\" This man page was written by Andi Kleen with help from Matthew Wilcox.
.\" PF_PACKET in Linux 2.2 was implemented .\" PF_PACKET in Linux 2.2 was implemented

View File

@ -40,7 +40,9 @@ system call.
A process may get an entirely private namespace in case A process may get an entirely private namespace in case
it \(em or one of its ancestors \(em was started by an invocation of the it \(em or one of its ancestors \(em was started by an invocation of the
.BR clone (2) .BR clone (2)
system call that had the CLONE_NEWNS flag set.) system call that had the
.BR CLONE_NEWNS
flag set.)
This handles the '/' part of the pathname. This handles the '/' part of the pathname.
If the pathname does not start with the '/' character, the If the pathname does not start with the '/' character, the
@ -65,7 +67,9 @@ an
.B EACCES .B EACCES
error is returned ("Permission denied"). error is returned ("Permission denied").
If the component is not found, an ENOENT error is returned If the component is not found, an
.B ENOENT
error is returned
("No such file or directory"). ("No such file or directory").
If the component is found, but is neither a directory nor a symbolic link, If the component is found, but is neither a directory nor a symbolic link,
@ -92,7 +96,9 @@ In order to protect the kernel against stack overflow, and also
to protect against denial of service, there are limits on the to protect against denial of service, there are limits on the
maximum recursion depth, and on the maximum number of symbolic links maximum recursion depth, and on the maximum number of symbolic links
followed. followed.
An ELOOP error is returned when the maximum is An
.B ELOOP
error is returned when the maximum is
exceeded ("Too many levels of symbolic links"). exceeded ("Too many levels of symbolic links").
.\" .\"
.\" presently: max recursion depth during symlink resolution: 5 .\" presently: max recursion depth during symlink resolution: 5
@ -147,12 +153,16 @@ operates on the file pointed to by the symlink.
There is a maximum length for pathnames. There is a maximum length for pathnames.
If the pathname (or some If the pathname (or some
intermediate pathname obtained while resolving symbolic links) intermediate pathname obtained while resolving symbolic links)
is too long, an ENAMETOOLONG error is returned ("File name too long"). is too long, an
.B ENAMETOOLONG
error is returned ("File name too long").
.SS "Empty pathname" .SS "Empty pathname"
In the original Unix, the empty pathname referred to the current directory. In the original Unix, the empty pathname referred to the current directory.
Nowadays POSIX decrees that an empty pathname must not be resolved Nowadays POSIX decrees that an empty pathname must not be resolved
successfully. successfully.
Linux returns ENOENT in this case. Linux returns
.B ENOENT
in this case.
.SS "Permissions" .SS "Permissions"
The permission bits of a file consist of three groups of three bits, cf.\& The permission bits of a file consist of three groups of three bits, cf.\&
.BR chmod (1) .BR chmod (1)

View File

@ -317,8 +317,9 @@ bash$ $( ldd /bin/ls | grep libc.so | awk '{print $3}' ) | \\
.in -4 .in -4
.fi .fi
.SS "Selecting the Threading Implementation: LD_ASSUME_KERNEL" .SS "Selecting the Threading Implementation: LD_ASSUME_KERNEL"
On systems with a glibc that supports both LinuxThreads and NPTL, On systems with a glibc that supports both LinuxThreads and NPTL, the
the LD_ASSUME_KERNEL environment variable can be used to override .B LD_ASSUME_KERNEL
environment variable can be used to override
the dynamic linker's default choice of threading implementation. the dynamic linker's default choice of threading implementation.
This variable tells the dynamic linker to assume that it is This variable tells the dynamic linker to assume that it is
running on top of a particular kernel version. running on top of a particular kernel version.

View File

@ -177,7 +177,8 @@ They are Linux extensions and should not be used in portable programs.
Linux 2.0 enabled some bug-to-bug compatibility with BSD in the Linux 2.0 enabled some bug-to-bug compatibility with BSD in the
raw socket code when the raw socket code when the
SO_BSDCOMPAT socket option was set \(em since Linux 2.2, .B SO_BSDCOMPAT
socket option was set \(em since Linux 2.2,
this option no longer has that effect. this option no longer has that effect.
.SH NOTES .SH NOTES
By default raw sockets do path MTU (Maximum Transmission Unit) discovery. By default raw sockets do path MTU (Maximum Transmission Unit) discovery.

View File

@ -67,7 +67,9 @@ A \fIbound\fR is `{' followed by an unsigned decimal integer,
possibly followed by `,' possibly followed by `,'
possibly followed by another unsigned decimal integer, possibly followed by another unsigned decimal integer,
always followed by `}'. always followed by `}'.
The integers must lie between 0 and RE_DUP_MAX (255\*(dg) inclusive, The integers must lie between 0 and
.B RE_DUP_MAX
(255\*(dg) inclusive,
and if there are two of them, the first may not exceed the second. and if there are two of them, the first may not exceed the second.
An atom followed by a bound containing one integer \fIi\fR An atom followed by a bound containing one integer \fIi\fR
and no comma matches and no comma matches

View File

@ -421,7 +421,10 @@ data has been sent or received, the return value of that function
will be the amount of data transferred; if no data has been transferred will be the amount of data transferred; if no data has been transferred
and the timeout has been reached then \-1 is returned with and the timeout has been reached then \-1 is returned with
.I errno .I errno
set to EAGAIN or EWOULDBLOCK set to
.B EAGAIN
or
.B EWOULDBLOCK
.\" in fact to EAGAIN .\" in fact to EAGAIN
just as if the socket was specified to be nonblocking. just as if the socket was specified to be nonblocking.
If the timeout is set to zero (the default) If the timeout is set to zero (the default)
@ -648,11 +651,13 @@ Valid
operations: operations:
.TP .TP
.BR FIOGETOWN .BR FIOGETOWN
The same as the SIOCGPGRP The same as the
.B SIOCGPGRP
.BR ioctl (2). .BR ioctl (2).
.TP .TP
.BR FIOSETOWN .BR FIOSETOWN
The same as the SIOCSPGRP The same as the
.B SIOCSPGRP
.BR ioctl (2). .BR ioctl (2).
.SH VERSIONS .SH VERSIONS
.B SO_BINDTODEVICE .B SO_BINDTODEVICE
@ -671,12 +676,16 @@ Linux assumes that half of the send/receive buffer is used for internal
kernel structures; thus the sysctls are twice what can be observed kernel structures; thus the sysctls are twice what can be observed
on the wire. on the wire.
Linux will only allow port re-use with the SO_REUSEADDR option Linux will only allow port re-use with the
.B SO_REUSEADDR
option
when this option was set both in the previous program that performed a when this option was set both in the previous program that performed a
.BR bind (2) .BR bind (2)
to the port and in the program that wants to re-use the port. to the port and in the program that wants to re-use the port.
This differs from some implementations (e.g., FreeBSD) This differs from some implementations (e.g., FreeBSD)
where only the later program needs to set the SO_REUSEADDR option. where only the later program needs to set the
.B SO_REUSEADDR
option.
Typically this difference is invisible, since, for example, a server Typically this difference is invisible, since, for example, a server
program is designed to always set this option. program is designed to always set this option.
.SH BUGS .SH BUGS

View File

@ -693,7 +693,9 @@ used in code intended to be portable.
.B TCP_KEEPIDLE .B TCP_KEEPIDLE
The time (in seconds) the connection needs to remain idle The time (in seconds) the connection needs to remain idle
before TCP starts sending keepalive probes, if the socket before TCP starts sending keepalive probes, if the socket
option SO_KEEPALIVE has been set on this socket. option
.B SO_KEEPALIVE
has been set on this socket.
This option should not be used in code intended to be portable. This option should not be used in code intended to be portable.
.TP .TP
.B TCP_KEEPINTVL .B TCP_KEEPINTVL
@ -784,7 +786,8 @@ is one of the following:
.TP .TP
.BR SIOCINQ .BR SIOCINQ
Returns the amount of queued unread data in the receive buffer. Returns the amount of queued unread data in the receive buffer.
The socket must not be in LISTEN state, otherwise an error (EINVAL) The socket must not be in LISTEN state, otherwise an error
.RB ( EINVAL )
is returned. is returned.
.TP .TP
.B SIOCATMARK .B SIOCATMARK
@ -824,7 +827,8 @@ returns false.
.TP .TP
.B SIOCOUTQ .B SIOCOUTQ
Returns the amount of unsent data in the socket send queue. Returns the amount of unsent data in the socket send queue.
The socket must not be in LISTEN state, otherwise an error (EINVAL) The socket must not be in LISTEN state, otherwise an error
.BR ( EINVAL )
is returned. is returned.
.SS Error Handling .SS Error Handling
When a network error occurs, TCP tries to resend the packet. When a network error occurs, TCP tries to resend the packet.

View File

@ -89,12 +89,17 @@ bytes in
Note that names in the abstract namespace are not zero-terminated. Note that names in the abstract namespace are not zero-terminated.
.SS Socket Options .SS Socket Options
For historical reasons these socket options are specified with a For historical reasons these socket options are specified with a
SOL_SOCKET type even though they are PF_UNIX specific. .B SOL_SOCKET
type even though they are
.B PF_UNIX
specific.
They can be set with They can be set with
.BR setsockopt (2) .BR setsockopt (2)
and read with and read with
.BR getsockopt (2) .BR getsockopt (2)
by specifying SOL_SOCKET as the socket family. by specifying
.B SOL_SOCKET
as the socket family.
.TP .TP
.B SO_PASSCRED .B SO_PASSCRED
Enables the receiving of the credentials of the sending process Enables the receiving of the credentials of the sending process
@ -136,13 +141,18 @@ Ancillary data is sent and received using
and and
.BR recvmsg (2). .BR recvmsg (2).
For historical reasons the ancillary message types listed below For historical reasons the ancillary message types listed below
are specified with a SOL_SOCKET type even though they are PF_UNIX are specified with a
.B SOL_SOCKET
type even though they are
.B PF_UNIX
specific. specific.
To send them set the To send them set the
.B cmsg_level .B cmsg_level
field of the struct field of the struct
.B cmsghdr .B cmsghdr
to SOL_SOCKET and the to
.B SOL_SOCKET
and the
.B cmsg_type .B cmsg_type
field to the type. field to the type.
For more information see For more information see
@ -216,8 +226,10 @@ Passed protocol is not PF_UNIX.
Unknown socket type. Unknown socket type.
.TP .TP
.B EPROTOTYPE .B EPROTOTYPE
Remote socket does not match the local socket type (SOCK_DGRAM vs. Remote socket does not match the local socket type
SOCK_STREAM) .RB ( SOCK_DGRAM
vs.
.BR SOCK_STREAM )
.TP .TP
.B EADDRINUSE .B EADDRINUSE
Selected local address is already taken or filesystem socket Selected local address is already taken or filesystem socket
@ -282,7 +294,9 @@ The usual Unix close-behind semantics apply; the socket can be unlinked
at any time and will be finally removed from the file system when the last at any time and will be finally removed from the file system when the last
reference to it is closed. reference to it is closed.
To pass file descriptors or credentials over a SOCK_STREAM, you need To pass file descriptors or credentials over a
.BR SOCK_STREAM ,
you need
to send or receive at least one byte of non-ancillary data in the same to send or receive at least one byte of non-ancillary data in the same
.BR sendmsg (2) .BR sendmsg (2)
or or

View File

@ -185,7 +185,8 @@ environment variable.
File where File where
.B LD_DEBUG .B LD_DEBUG
output should be fed into, default is standard output. output should be fed into, default is standard output.
LD_DEBUG_OUTPUT is ignored for set-user-ID/set-group-ID binaries. .B LD_DEBUG_OUTPUT
is ignored for set-user-ID/set-group-ID binaries.
.TP .TP
.B LD_VERBOSE .B LD_VERBOSE
(glibc since 2.1) (glibc since 2.1)
@ -207,17 +208,24 @@ Shared object to be profiled.
File where File where
.B LD_PROFILE .B LD_PROFILE
output should be stored, default is standard output. output should be stored, default is standard output.
LD_PROFILE_OUTPUT is ignored for set-user-ID/set-group-ID binaries. .B LD_PROFILE_OUTPUT
is ignored for set-user-ID/set-group-ID binaries.
.TP .TP
.B LD_AOUT_LIBRARY_PATH .B LD_AOUT_LIBRARY_PATH
(libc5) (libc5)
Version of LD_LIBRARY_PATH for a.out binaries only. Version of
Old versions of ld\-linux.so.1 also supported LD_ELF_LIBRARY_PATH. .B LD_LIBRARY_PATH
for a.out binaries only.
Old versions of ld\-linux.so.1 also supported
.BR LD_ELF_LIBRARY_PATH .
.TP .TP
.B LD_AOUT_PRELOAD .B LD_AOUT_PRELOAD
(libc5) (libc5)
Version of LD_PRELOAD for a.out binaries only. Version of
Old versions of ld\-linux.so.1 also supported LD_ELF_PRELOAD. .BR LD_PRELOAD
for a.out binaries only.
Old versions of ld\-linux.so.1 also supported
.BR LD_ELF_PRELOAD .
.TP .TP
.B LD_SHOW_AUXV .B LD_SHOW_AUXV
(glibc since 2.1) (glibc since 2.1)

View File

@ -10,7 +10,9 @@ The
.B tzselect .B tzselect
program asks the user for information about the current location, program asks the user for information about the current location,
and outputs the resulting time zone description to standard output. and outputs the resulting time zone description to standard output.
The output is suitable as a value for the TZ environment variable. The output is suitable as a value for the
.B TZ
environment variable.
.PP .PP
All interaction with the user is done via standard input and standard error. All interaction with the user is done via standard input and standard error.
.SH "EXIT STATUS" .SH "EXIT STATUS"