diff --git a/man2/send.2 b/man2/send.2 index d98ec9804..393211dde 100644 --- a/man2/send.2 +++ b/man2/send.2 @@ -89,16 +89,19 @@ is the file descriptor of the sending socket. .PP If .BR sendto () -is used on a connection-mode (SOCK_STREAM, SOCK_SEQPACKET) socket, -the parameters +is used on a connection-mode +.RB ( SOCK_STREAM , +.BR SOCK_SEQPACKET ) +socket, the parameters .I to and .I tolen are ignored (and the error .B EISCONN may be returned when they are -not NULL and 0), and the error ENOTCONN is returned when the socket was -not actually connected. +not NULL and 0), and the error +.B ENOTCONN +is returned when the socket was not actually connected. Otherwise, the address of the target is given by .I to with diff --git a/man2/setpgid.2 b/man2/setpgid.2 index 1312bb3bd..32718d841 100644 --- a/man2/setpgid.2 +++ b/man2/setpgid.2 @@ -110,7 +110,9 @@ calls described in .BR termios (3) 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 .BR SIGHUP . If the session leader diff --git a/man2/shmctl.2 b/man2/shmctl.2 index 5e8250077..0b527dc0f 100644 --- a/man2/shmctl.2 +++ b/man2/shmctl.2 @@ -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. To take advantage of this, a recompilation under glibc-2.1.91 or later should suffice. -(The kernel distinguishes old and new calls by an IPC_64 flag in +(The kernel distinguishes old and new calls by an +.B IPC_64 +flag in .IR cmd .) .SH "SEE ALSO" .BR mlock (2), diff --git a/man2/tkill.2 b/man2/tkill.2 index 907dc6769..6c4b2d611 100644 --- a/man2/tkill.2 +++ b/man2/tkill.2 @@ -38,7 +38,10 @@ The system call is analogous to .BR kill (2), 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, they cannot be individually signaled with .BR kill (2). diff --git a/man3/dlopen.3 b/man3/dlopen.3 index 6db32c008..2323d70ce 100644 --- a/man3/dlopen.3 +++ b/man3/dlopen.3 @@ -370,7 +370,11 @@ POSIX.1-2001 describes and .BR dlsym (). .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 only when .B _GNU_SOURCE diff --git a/man3/flockfile.3 b/man3/flockfile.3 index 107032c07..de0763df0 100644 --- a/man3/flockfile.3 +++ b/man3/flockfile.3 @@ -37,11 +37,11 @@ flockfile, ftrylockfile, funlockfile \- lock FILE for stdio The stdio functions are thread-safe. This is achieved by assigning to each -.B FILE +.I FILE object a lockcount and (if the lockcount is non-zero) an owning thread. For each library call, these functions wait until the -.B FILE +.I FILE object is no longer locked by a different thread, then lock it, do the 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. .LP To this end, a thread can explicitly lock the -.B FILE +.I FILE object, then do its series of I/O actions, then unlock. This prevents diff --git a/man3/fmemopen.3 b/man3/fmemopen.3 index a6b681ab2..94c883860 100644 --- a/man3/fmemopen.3 +++ b/man3/fmemopen.3 @@ -136,7 +136,7 @@ Upon successful completion and .BR open_memstream () return a -.B FILE +.I FILE pointer. Otherwise, NULL is returned and the global variable .I errno diff --git a/man3/stdio.3 b/man3/stdio.3 index f2f9da3ec..a2653ec69 100644 --- a/man3/stdio.3 +++ b/man3/stdio.3 @@ -83,7 +83,7 @@ Output streams are flushed (any unwritten buffer contents are transferred to the host environment) before the stream is disassociated from the file. The value of a pointer to a -.B FILE +.I FILE object is indeterminate after a file is closed (garbage). .PP A file may be subsequently reopened, by the same or another program diff --git a/man3/stdio_ext.3 b/man3/stdio_ext.3 index 9b8da4ddf..738d92d22 100644 --- a/man3/stdio_ext.3 +++ b/man3/stdio_ext.3 @@ -51,7 +51,7 @@ __freading, __fsetlocking, __fwritable, __fwriting, _flushlbf \- interfaces to s .SH DESCRIPTION Solaris introduced routines to allow portable access to the internals of the -.B FILE +.I FILE structure, and glibc also implemented these. .LP The diff --git a/man3/strcoll.3 b/man3/strcoll.3 index acc8ff3a8..d5fc5d21a 100644 --- a/man3/strcoll.3 +++ b/man3/strcoll.3 @@ -44,7 +44,7 @@ than zero if \fIs1\fP is found, respectively, to be less than, to match, or be greater than \fIs2\fP. The comparison is based on 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).) .SH "RETURN VALUE" The diff --git a/man3/strfmon.3 b/man3/strfmon.3 index bd47b55a1..84457d346 100644 --- a/man3/strfmon.3 +++ b/man3/strfmon.3 @@ -91,8 +91,10 @@ and .I int_frac_digits items of the current locale. If the right precision is 0, no radix character is printed. -(The radix character here is determined by LC_MONETARY, and may -differ from that specified by LC_NUMERIC.) +(The radix character here is determined by + .BR LC_MONETARY , +and may differ from that specified by +.BR LC_NUMERIC .) .LP Finally, the conversion specification must be ended with a 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. Otherwise, it sets .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" Not in POSIX.1-2001. Present on several other systems. diff --git a/man3/strftime.3 b/man3/strftime.3 index a9e60eb1a..1d19fbc5f 100644 --- a/man3/strftime.3 +++ b/man3/strftime.3 @@ -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; for example, in many locales %p yields an empty string. .SH ENVIRONMENT -The environment variables TZ and LC_TIME are used. +The environment variables TZ and +.B LC_TIME +are used. .SH "CONFORMING TO" SVr4, C89, C99. There are strict inclusions between the set of conversions diff --git a/man3/strptime.3 b/man3/strptime.3 index 62e00153b..babaaf6c1 100644 --- a/man3/strptime.3 +++ b/man3/strptime.3 @@ -133,7 +133,9 @@ The locale's equivalent of AM or PM. (Note: there may be none.) .B %r The 12-hour clock time (using the locale's AM or PM). 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. .TP .B %R @@ -290,7 +292,8 @@ This function is available since libc 4.6.8. Linux libc4 and libc5 includes define the prototype unconditionally; glibc2 includes provide a prototype only when .B _XOPEN_SOURCE -or _GNU_SOURCE +or +.B _GNU_SOURCE are defined. .PP Before libc 5.4.13 whitespace (and the 'n' and 't' specifications) diff --git a/man3/strtol.3 b/man3/strtol.3 index e55012b16..29e04cb36 100644 --- a/man3/strtol.3 +++ b/man3/strtol.3 @@ -88,15 +88,24 @@ function returns the result of the conversion, unless the value would underflow or overflow. If an underflow occurs, .BR strtol () -returns LONG_MIN. +returns +.BR LONG_MIN . If an overflow occurs, .BR strtol () -returns LONG_MAX. +returns +.BR LONG_MAX . In both cases, \fIerrno\fP is set to .BR ERANGE . Precisely the same holds for .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 .TP .B EINVAL @@ -119,7 +128,13 @@ to C99 and POSIX.1-2001. Since .BR strtol () 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 ()) on both success and failure, the calling program should set .I errno diff --git a/man3/strverscmp.3 b/man3/strverscmp.3 index 50d83808e..8bd0e7a3f 100644 --- a/man3/strverscmp.3 +++ b/man3/strverscmp.3 @@ -54,7 +54,9 @@ is to compare two strings and find the "right" order, while .BR strcmp (3) only finds the lexicographic order. 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. What this function does is the following. diff --git a/man3/strxfrm.3 b/man3/strxfrm.3 index 3b2b24edf..04a444989 100644 --- a/man3/strxfrm.3 +++ b/man3/strxfrm.3 @@ -49,7 +49,7 @@ on the two strings before their transformation. The first \fIn\fP characters of the transformed string are placed in \fIdest\fP. 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)). .SH "RETURN VALUE" The diff --git a/man3/sysconf.3 b/man3/sysconf.3 index 4630a463a..7ce393dfd 100644 --- a/man3/sysconf.3 +++ b/man3/sysconf.3 @@ -178,7 +178,8 @@ Must not be less than _POSIX_STREAM_MAX (8). .TP .BR SYMLOOP_MAX 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). .TP .BR TTY_NAME_MAX " - " _SC_TTY_NAME_MAX diff --git a/man3/tcgetpgrp.3 b/man3/tcgetpgrp.3 index 852f3ab80..26b159ed1 100644 --- a/man3/tcgetpgrp.3 +++ b/man3/tcgetpgrp.3 @@ -105,8 +105,11 @@ process in the same session as the calling process. .SH "CONFORMING TO" POSIX.1-2001. .SH NOTES -These functions are implemented via the TIOCGPGRP and -TIOCSPGRP ioctls. +These functions are implemented via the +.B TIOCGPGRP +and +.B TIOCSPGRP +ioctls. .SS History The ioctls appeared in 4.2BSD. The functions are POSIX inventions. diff --git a/man3/tcgetsid.3 b/man3/tcgetsid.3 index 696fb15a4..cd0259867 100644 --- a/man3/tcgetsid.3 +++ b/man3/tcgetsid.3 @@ -59,7 +59,8 @@ it has one but it is not described by .SH "CONFORMING TO" POSIX.1-2001 .SH NOTES -This function is implemented via the TIOCGSID +This function is implemented via the +.B TIOCGSID .BR ioctl (2), present since Linux 2.1.71. diff --git a/man3/tempnam.3 b/man3/tempnam.3 index fb7bd85e5..a8158e46e 100644 --- a/man3/tempnam.3 +++ b/man3/tempnam.3 @@ -48,7 +48,9 @@ Attempts to find an appropriate directory go through the following steps: .TP 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. .TP b) @@ -103,7 +105,9 @@ Or better yet, use or .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. On SVr4, the directory used under \fBd)\fP is .IR /tmp @@ -117,10 +121,14 @@ is reentrant, and thus thread safe, unlike The .BR tempnam () function generates a different string each time it is called, -up to TMP_MAX (defined in +up to +.B TMP_MAX +(defined in .IR ) 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. .LP .BR tempnam () diff --git a/man3/termios.3 b/man3/termios.3 index e826ba04f..b2e7e04c4 100644 --- a/man3/termios.3 +++ b/man3/termios.3 @@ -264,7 +264,8 @@ or .BR _SVID_SOURCE ] .TP .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 .B _BSD_SOURCE or @@ -277,7 +278,9 @@ structure without specifying where precisely, and provides and .BR cfsetispeed () for getting at it. -Some systems use bits selected by CBAUD in +Some systems use bits selected by +.B CBAUD +in .IR c_cflag , other systems use separate fields, for example, .I sg_ispeed @@ -313,8 +316,14 @@ For use by \fBshl\fP (shell layers). (Not implemented on Linux.) .TP .B CIBAUD (not in POSIX) Mask for input speeds. -The values for the CIBAUD bits are -the same as the values for the CBAUD bits, shifted left IBSHIFT bits. +The values for the +.B CIBAUD +bits are +the same as the values for the +.B CBAUD +bits, shifted left +.B IBSHIFT +bits. [requires .B _BSD_SOURCE or @@ -455,7 +464,9 @@ Interrupt character. Send a .B SIGINT 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 .B VQUIT (034, FS, Ctrl-\e) @@ -463,20 +474,26 @@ Quit character. Send .BR SIGQUIT 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 .B VERASE (0177, DEL, rubout, or 010, BS, Ctrl-H, or also #) Erase character. This erases the previous not-yet-erased character, 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 .B VKILL (025, NAK, Ctrl-U, or Ctrl-X, or also @) Kill character. 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 .B VEOF (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 .BR read (2) 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 .B VMIN Minimum number of characters for non-canonical read. @@ -494,7 +513,9 @@ Minimum number of characters for non-canonical read. .B VEOL (0, NUL) Additional end-of-line character. -Recognized when ICANON is set. +Recognized when +.B ICANON +is set. .TP .B VTIME Timeout in deciseconds for non-canonical read. @@ -502,7 +523,9 @@ Timeout in deciseconds for non-canonical read. .B VEOL2 (not in POSIX; 0, NUL) Yet another end-of-line character. -Recognized when ICANON is set. +Recognized when +.B ICANON +is set. .TP .B VSWTCH (not in POSIX; not supported under Linux; 0, NUL) @@ -513,13 +536,17 @@ Switch character. (021, DC1, Ctrl-Q) Start 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 .B VSTOP (023, DC3, Ctrl-S) Stop character. 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 .B VSUSP (032, SUB, Ctrl-Z) @@ -527,7 +554,9 @@ Suspend character. Send .B SIGTSTP 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 .B VDSUSP (not in POSIX; not supported under Linux; 031, EM, Ctrl-Y) @@ -535,7 +564,10 @@ Delayed suspend character: send .B SIGTSTP 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. .TP .B VLNEXT @@ -543,32 +575,53 @@ job control, and then not passed as input. Literal next. Quotes the next input character, depriving it of 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 .B VWERASE (not in POSIX; 027, ETB, Ctrl-W) 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 .B VREPRINT (not in POSIX; 022, DC2, Ctrl-R) 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 .B VDISCARD (not in POSIX; not supported under Linux; 017, SI, Ctrl-O) 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 .B VSTATUS (not in POSIX; not supported under Linux; status request: 024, DC4, Ctrl-T). .LP 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 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. .SS "Retrieving and changing terminal settings" .PP diff --git a/man3/tmpnam.3 b/man3/tmpnam.3 index 3ddca97b7..83ea418df 100644 --- a/man3/tmpnam.3 +++ b/man3/tmpnam.3 @@ -62,7 +62,9 @@ and .I P_tmpdir are defined in .IR , -just like the TMP_MAX mentioned below.) +just like the +.B TMP_MAX +mentioned below.) .SH "RETURN VALUE" The .BR tmpnam () @@ -76,8 +78,12 @@ SVr4, 4.3BSD, C89, C99, POSIX.1-2001. The .BR tmpnam () function generates a different string each time it is called, -up to TMP_MAX times. -If it is called more than TMP_MAX times, +up to +.B TMP_MAX +times. +If it is called more than +.B TMP_MAX +times, the behavior is implementation defined. .LP Although diff --git a/man3/tzset.3 b/man3/tzset.3 index 5d0c7207a..3ab7f74a0 100644 --- a/man3/tzset.3 +++ b/man3/tzset.3 @@ -45,7 +45,8 @@ tzset, tzname, timezone, daylight \- initialize time conversion information The .BR tzset () function initializes the \fItzname\fP variable from the -TZ environment variable. +.B TZ +environment variable. This function is automatically called by the other time conversion functions that depend on the time zone. 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 the year when daylight saving time applies). .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 time, as specified by the .BR tzfile (5)-format @@ -63,11 +66,15 @@ found in the system timezone directory (see below). .I /etc/localtime used here, a symlink to the right file in the system timezone directory.) .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 below, Coordinated Universal Time (UTC) is used. .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 when there is no daylight saving time in the local time zone: .sp @@ -168,7 +175,9 @@ Libc4 and libc5 use and, since libc-5.4.6, when this doesn't work, will try .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 .IR /usr/share/zoneinfo . .LP diff --git a/man3/usleep.3 b/man3/usleep.3 index f5ed15910..c264db174 100644 --- a/man3/usleep.3 +++ b/man3/usleep.3 @@ -51,10 +51,10 @@ granularity of system timers. 0 on success, \-1 on error. .SH ERRORS .TP -EINTR +.B EINTR Interrupted by a signal. .TP -EINVAL +.B EINVAL \fIusec\fP is not smaller than 1000000. (On systems where that is considered an error.) .SH "CONFORMING TO" diff --git a/man4/tty_ioctl.4 b/man4/tty_ioctl.4 index 11a6beac0..e4c5c45d3 100644 --- a/man4/tty_ioctl.4 +++ b/man4/tty_ioctl.4 @@ -51,7 +51,11 @@ Equivalent to Allow the output buffer to drain, discard pending input, and set the current serial port settings. .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 .I "struct termio *" instead of a @@ -141,7 +145,8 @@ HP-UX ignores .IR arg .) .TP .BI "TCSBRKP int " arg -So-called "POSIX version" of TCSBRK. +So-called "POSIX version" of +.BR TCSBRK . It treats non-zero .I arg as a timeinterval measured in deciseconds, and does nothing @@ -160,14 +165,19 @@ Equivalent to .br See .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" .TP .BI "FIONREAD int *" argp Get the number of bytes in the input buffer. .TP .BI "TIOCINQ int *" argp -Same as FIONREAD. +Same as +.BR FIONREAD . .TP .BI "TIOCOUTQ int *" argp Get the number of bytes in the output buffer. @@ -178,7 +188,10 @@ Equivalent to .br See .BR tcflush (3) -for the argument values TCIFLUSH, TCOFLUSH, TCIOFLUSH. +for the argument values +.BR TCIFLUSH , +.BR TCOFLUSH , +.BR TCIOFLUSH . .SS "Faking input" .TP .BI "TIOCSTI const char *" argp @@ -193,7 +206,9 @@ or to the given tty. If that was a pty master, send it to the slave. 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 .I fd 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 controlling tty already. 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 .I arg 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 .BI "TIOCGSID pid_t *" argp 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. Strange. .SS "Exclusive mode" @@ -249,7 +266,9 @@ Put the tty into exclusive mode. No further .BR open (2) operations on the terminal are permitted. -(They will fail with EBUSY, except for root.) +(They will fail with +.BR EBUSY , +except for root.) .TP .BI "TIOCNXCL void" Disable exclusive mode. @@ -267,13 +286,16 @@ Enable (when .RI * argp is non-zero) or disable packet mode. 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 .BR read (2) will return a packet that either contains a single non-zero control byte, or has a single byte containing zero (''\0') followed by data 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: .nf @@ -297,7 +319,11 @@ and .BR rlogind (8) 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. .SS "Modem control" .TP @@ -341,16 +367,24 @@ Set the CLOCAL flag in the termios structure when .RI * argp is non-zero, and clear it otherwise. .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 .BR open (2) of the corresponding tty will block until DCD is asserted, -unless the O_NONBLOCK flag is given. -If CLOCAL is set, the line behaves as if DCD is always asserted. +unless the +.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, and is off for lines with modems. .SS "Linux specific" -For the TIOCLINUX ioctl, see +For the +.B TIOCLINUX +ioctl, see .BR console_ioctl (4). .SS "Kernel debugging" .sp @@ -418,7 +452,7 @@ main(void) .BR termios (3), .BR console_ioctl (4), .BR pty (7) - +." .\" FIONBIO const int * .\" FIONCLEX void .\" FIOCLEX void diff --git a/man5/proc.5 b/man5/proc.5 index 2e3b12356..ddc9d631b 100644 --- a/man5/proc.5 +++ b/man5/proc.5 @@ -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, 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. .TP .I /proc/[number]/stat @@ -546,15 +548,17 @@ directory are not available if the main thread has already terminated .BR pthread_exit (3)). .TP .I /proc/apm -Advanced power management version and battery information -when CONFIG_APM is defined at kernel compilation time. +Advanced power management version and battery information when +.B CONFIG_APM +is defined at kernel compilation time. .TP .I /proc/bus Contains subdirectories for installed busses. .TP .I /proc/bus/pccard -Subdirectory for pcmcia devices when CONFIG_PCMCIA is set -at kernel compilation time. +Subdirectory for pcmcia devices when +.B CONFIG_PCMCIA +is set at kernel compilation time. .TP .I /proc/bus/pccard/drivers .TP @@ -607,8 +611,9 @@ Empty subdirectory. List of the execution domains (ABI personalities). .TP .I /proc/fb -Frame buffer information when CONFIG_FB is defined during kernel -compilation. +Frame buffer information when +.B CONFIG_FB +is defined during kernel compilation. .TP .I /proc/filesystems A text listing of the filesystems which were compiled into the kernel. @@ -716,8 +721,9 @@ and leases .RB ( fcntl (2)). .TP .I /proc/malloc -This file is only present if CONFIGDEBUGMALLOC was defined during -compilation. +This file is only present if +.B CONFIGDEBUGMALLOC +was defined during compilation. .TP .I /proc/meminfo This is used by @@ -1702,7 +1708,9 @@ Values are: .br In mode 0, calls of .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". Under Linux 2.4 any non-zero value implies mode 1. In mode 2 (available since Linux 2.6), the total virtual address space diff --git a/man5/termcap.5 b/man5/termcap.5 index fac60ae6d..74235b76c 100644 --- a/man5/termcap.5 +++ b/man5/termcap.5 @@ -45,7 +45,8 @@ the terminal actually in use. (Other aspects of the terminal are handled by .BR stty (1).) -The termcap database is indexed on the TERM +The termcap database is indexed on the +.B TERM environment variable. .LP 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. .LP 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. Selectable hardware capabilities should be marked by appending a hyphen and a suffix to this name. diff --git a/man5/ttytype.5 b/man5/ttytype.5 index 647da22d8..0045ab5e8 100644 --- a/man5/ttytype.5 +++ b/man5/ttytype.5 @@ -38,7 +38,9 @@ whitespace, followed by a tty name (a device name without the This association is used by the program .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. This facility was designed for a traditional time-sharing environment diff --git a/man7/capabilities.7 b/man7/capabilities.7 index ea0fa8a86..56cff05f7 100644 --- a/man7/capabilities.7 +++ b/man7/capabilities.7 @@ -107,7 +107,9 @@ Bypass permission checks for operations on System V IPC objects. .B CAP_KILL Bypass permission checks for sending signals (see .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 .\" termination signal to other than SIGCHLD: without this .\" capability, the termination signal reverts to SIGCHLD diff --git a/man7/epoll.7 b/man7/epoll.7 index 005dc8ff4..77a2d00d9 100644 --- a/man7/epoll.7 +++ b/man7/epoll.7 @@ -130,7 +130,8 @@ by waiting for an event only after .BR read (2) or .BR write (2) -return EAGAIN +return +.BR EAGAIN . .RE .PP By contrast, when used as a level-triggered interface, @@ -169,12 +170,15 @@ non-blocking socket on which .BR listen (2) has been called. 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) or .BR write (2). 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 .BR read (2) or @@ -230,7 +234,8 @@ with What happens if you add the same file descriptor to an epoll set twice? .TP .B A1 -You will probably get EEXIST. +You will probably get +.BR EEXIST . However, it is possible that two threads may add the same file descriptor twice. This is a harmless condition. @@ -302,7 +307,9 @@ Modify will re-read available I/O. .TP .B Q9 Do I need to continuously read/write a file descriptor -until EAGAIN when using the +until +.B EAGAIN +when using the .B EPOLLET flag (edge-triggered behavior) ? .TP @@ -313,7 +320,8 @@ Receiving an event from should suggest to you that such file descriptor is ready for the requested I/O operation. 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 to you. Also, the condition that the read/write I/O space is exhausted can diff --git a/man7/fifo.7 b/man7/fifo.7 index dd61d6702..741d796e6 100644 --- a/man7/fifo.7 +++ b/man7/fifo.7 @@ -33,7 +33,9 @@ A process can open a FIFO in non-blocking mode. In this case, opening for read only will succeed even if no-one has 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. .PP Under Linux, opening a FIFO for read and write will succeed diff --git a/man7/glob.7 b/man7/glob.7 index b704ed3e5..e8491973f 100644 --- a/man7/glob.7 +++ b/man7/glob.7 @@ -160,7 +160,9 @@ more useful way and adds three more types: (iii) Ranges X\-Y comprise all characters that fall between X 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 .nf diff --git a/man7/ip.7 b/man7/ip.7 index 3d1a8c115..78d33596b 100644 --- a/man7/ip.7 +++ b/man7/ip.7 @@ -155,7 +155,8 @@ member of .I struct in_addr contains the host interface address in network byte order. .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 .BR inet_aton (3), .BR inet_addr (3), diff --git a/man7/netdevice.7 b/man7/netdevice.7 index 5fff69481..217fb1e20 100644 --- a/man7/netdevice.7 +++ b/man7/netdevice.7 @@ -190,7 +190,9 @@ is not up. .B SIOCGIFCONF Return a list of interface (transport layer) addresses. 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 .B ifconf structure as argument to the ioctl. diff --git a/man7/packet.7 b/man7/packet.7 index 649fbbf2e..fadb8cd1f 100644 --- a/man7/packet.7 +++ b/man7/packet.7 @@ -379,7 +379,8 @@ The .BR recvmsg (2) 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 -packets via SOCK_DGRAM. +packets via +.BR SOCK_DGRAM . .\" .SH CREDITS .\" This man page was written by Andi Kleen with help from Matthew Wilcox. .\" PF_PACKET in Linux 2.2 was implemented diff --git a/man7/path_resolution.7 b/man7/path_resolution.7 index 7037d2abf..8a868ea02 100644 --- a/man7/path_resolution.7 +++ b/man7/path_resolution.7 @@ -40,7 +40,9 @@ system call. 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 .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. If the pathname does not start with the '/' character, the @@ -65,7 +67,9 @@ an .B EACCES 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"). 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 maximum recursion depth, and on the maximum number of symbolic links 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"). .\" .\" 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. If the pathname (or some 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" In the original Unix, the empty pathname referred to the current directory. Nowadays POSIX decrees that an empty pathname must not be resolved successfully. -Linux returns ENOENT in this case. +Linux returns +.B ENOENT +in this case. .SS "Permissions" The permission bits of a file consist of three groups of three bits, cf.\& .BR chmod (1) diff --git a/man7/pthreads.7 b/man7/pthreads.7 index 51c4b16db..41f52902f 100644 --- a/man7/pthreads.7 +++ b/man7/pthreads.7 @@ -317,8 +317,9 @@ bash$ $( ldd /bin/ls | grep libc.so | awk '{print $3}' ) | \\ .in -4 .fi .SS "Selecting the Threading Implementation: LD_ASSUME_KERNEL" -On systems with a glibc that supports both LinuxThreads and NPTL, -the LD_ASSUME_KERNEL environment variable can be used to override +On systems with a glibc that supports both LinuxThreads and NPTL, the +.B LD_ASSUME_KERNEL +environment variable can be used to override the dynamic linker's default choice of threading implementation. This variable tells the dynamic linker to assume that it is running on top of a particular kernel version. diff --git a/man7/raw.7 b/man7/raw.7 index 7e82d9b0b..d0e74c484 100644 --- a/man7/raw.7 +++ b/man7/raw.7 @@ -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 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. .SH NOTES By default raw sockets do path MTU (Maximum Transmission Unit) discovery. diff --git a/man7/regex.7 b/man7/regex.7 index 77f04f853..e1d34d5e9 100644 --- a/man7/regex.7 +++ b/man7/regex.7 @@ -67,7 +67,9 @@ A \fIbound\fR is `{' followed by an unsigned decimal integer, possibly followed by `,' possibly followed by another unsigned decimal integer, 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. An atom followed by a bound containing one integer \fIi\fR and no comma matches diff --git a/man7/socket.7 b/man7/socket.7 index 678121b66..e4c83d1a7 100644 --- a/man7/socket.7 +++ b/man7/socket.7 @@ -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 and the timeout has been reached then \-1 is returned with .I errno -set to EAGAIN or EWOULDBLOCK +set to +.B EAGAIN +or +.B EWOULDBLOCK .\" in fact to EAGAIN just as if the socket was specified to be nonblocking. If the timeout is set to zero (the default) @@ -648,11 +651,13 @@ Valid operations: .TP .BR FIOGETOWN -The same as the SIOCGPGRP +The same as the +.B SIOCGPGRP .BR ioctl (2). .TP .BR FIOSETOWN -The same as the SIOCSPGRP +The same as the +.B SIOCSPGRP .BR ioctl (2). .SH VERSIONS .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 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 .BR bind (2) to the port and in the program that wants to re-use the port. 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 program is designed to always set this option. .SH BUGS diff --git a/man7/tcp.7 b/man7/tcp.7 index 915293188..d54c61d41 100644 --- a/man7/tcp.7 +++ b/man7/tcp.7 @@ -693,7 +693,9 @@ used in code intended to be portable. .B TCP_KEEPIDLE The time (in seconds) the connection needs to remain idle 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. .TP .B TCP_KEEPINTVL @@ -784,7 +786,8 @@ is one of the following: .TP .BR SIOCINQ 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. .TP .B SIOCATMARK @@ -824,7 +827,8 @@ returns false. .TP .B SIOCOUTQ 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. .SS Error Handling When a network error occurs, TCP tries to resend the packet. diff --git a/man7/unix.7 b/man7/unix.7 index e6cf55d34..23c4170b2 100644 --- a/man7/unix.7 +++ b/man7/unix.7 @@ -89,12 +89,17 @@ bytes in Note that names in the abstract namespace are not zero-terminated. .SS Socket Options 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 .BR setsockopt (2) and read with .BR getsockopt (2) -by specifying SOL_SOCKET as the socket family. +by specifying +.B SOL_SOCKET +as the socket family. .TP .B SO_PASSCRED Enables the receiving of the credentials of the sending process @@ -136,13 +141,18 @@ Ancillary data is sent and received using and .BR recvmsg (2). 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. To send them set the .B cmsg_level field of the struct .B cmsghdr -to SOL_SOCKET and the +to +.B SOL_SOCKET +and the .B cmsg_type field to the type. For more information see @@ -216,8 +226,10 @@ Passed protocol is not PF_UNIX. Unknown socket type. .TP .B EPROTOTYPE -Remote socket does not match the local socket type (SOCK_DGRAM vs. -SOCK_STREAM) +Remote socket does not match the local socket type +.RB ( SOCK_DGRAM +vs. +.BR SOCK_STREAM ) .TP .B EADDRINUSE 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 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 .BR sendmsg (2) or diff --git a/man8/ld.so.8 b/man8/ld.so.8 index de602eec6..9d73b2007 100644 --- a/man8/ld.so.8 +++ b/man8/ld.so.8 @@ -185,7 +185,8 @@ environment variable. File where .B LD_DEBUG 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 .B LD_VERBOSE (glibc since 2.1) @@ -207,17 +208,24 @@ Shared object to be profiled. File where .B LD_PROFILE 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 .B LD_AOUT_LIBRARY_PATH (libc5) -Version of LD_LIBRARY_PATH for a.out binaries only. -Old versions of ld\-linux.so.1 also supported LD_ELF_LIBRARY_PATH. +Version of +.B LD_LIBRARY_PATH +for a.out binaries only. +Old versions of ld\-linux.so.1 also supported +.BR LD_ELF_LIBRARY_PATH . .TP .B LD_AOUT_PRELOAD (libc5) -Version of LD_PRELOAD for a.out binaries only. -Old versions of ld\-linux.so.1 also supported LD_ELF_PRELOAD. +Version of +.BR LD_PRELOAD +for a.out binaries only. +Old versions of ld\-linux.so.1 also supported +.BR LD_ELF_PRELOAD . .TP .B LD_SHOW_AUXV (glibc since 2.1) diff --git a/man8/tzselect.8 b/man8/tzselect.8 index f5de62a5a..c843781c6 100644 --- a/man8/tzselect.8 +++ b/man8/tzselect.8 @@ -10,7 +10,9 @@ The .B tzselect program asks the user for information about the current location, 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 All interaction with the user is done via standard input and standard error. .SH "EXIT STATUS"