From ef203e4559b046e02ca1b92a5a29216b40a9aa02 Mon Sep 17 00:00:00 2001 From: Michael Kerrisk Date: Thu, 29 Nov 2007 17:59:49 +0000 Subject: [PATCH] ffix --- man2/fcntl.2 | 19 ++++++++++++++++++- man2/nanosleep.2 | 4 ++-- man2/sched_rr_get_interval.2 | 2 +- man3/lsearch.3 | 4 ++-- man3/strsep.3 | 10 +++++----- 5 files changed, 28 insertions(+), 11 deletions(-) diff --git a/man2/fcntl.2 b/man2/fcntl.2 index 19d09318a..7bbb9db8d 100644 --- a/man2/fcntl.2 +++ b/man2/fcntl.2 @@ -53,7 +53,7 @@ .\" mtk: Noted F_SETOWN bug for socket file descriptor in Linux 2.4 .\" and earlier. Added text on permissions required to send signal. .\" -.TH FCNTL 2 2007-11-25 "Linux" "Linux Programmer's Manual" +.TH FCNTL 2 2007-12-12 "Linux" "Linux Programmer's Manual" .SH NAME fcntl \- manipulate file descriptor .SH SYNOPSIS @@ -88,6 +88,23 @@ On success, the new descriptor is returned. See .BR dup (2) for further details. +.TP +.BR F_DUPFD_CLOEXEC " (since Linux 2.6.24)" +As for a +.BR F_DUPFD , +but additionally set the +close-on-exec flag for the duplicate descriptor. +Specifying this flag permits a program to avoid an additional +.BR fcntl (2) +.B F_SETFD +operation to set the +.B FD_CLOEXEC +flag. +For an explanation of why this flag is useful, +see the explanation of +.B O_CLOEXEC +in +.BR open (2). .SS "File descriptor flags" The following commands manipulate the flags associated with a file descriptor. diff --git a/man2/nanosleep.2 b/man2/nanosleep.2 index ddb0d984f..946b63be6 100644 --- a/man2/nanosleep.2 +++ b/man2/nanosleep.2 @@ -104,7 +104,7 @@ Problem with copying information from user space. The pause has been interrupted by a non-blocked signal that was delivered to the process. The remaining sleep time has been written -into *\fIrem\fP so that the process can easily call +into \fI*rem\fP so that the process can easily call .BR nanosleep () again and continue with the pause. .TP @@ -128,7 +128,7 @@ pauses always for at least the specified time, however it can take up to 10 ms longer than specified until the process becomes runnable again. For the same reason, the value returned in case of a delivered -signal in *\fIrem\fP is usually rounded to the next larger multiple of +signal in \fI*rem\fP is usually rounded to the next larger multiple of 1/\fIHZ\fP\ s. .SS "Old behavior" In order to support applications requiring much more precise pauses diff --git a/man2/sched_rr_get_interval.2 b/man2/sched_rr_get_interval.2 index 25568e02b..e66e4f05c 100644 --- a/man2/sched_rr_get_interval.2 +++ b/man2/sched_rr_get_interval.2 @@ -52,7 +52,7 @@ struct timespec { If \fIpid\fP is zero, the time quantum for the calling process is written -into *\fItp\fP. +into \fI*tp\fP. The identified process should be running under the .B SCHED_RR scheduling policy. diff --git a/man3/lsearch.3 b/man3/lsearch.3 index f942a40a7..2ad790fc8 100644 --- a/man3/lsearch.3 +++ b/man3/lsearch.3 @@ -44,7 +44,7 @@ lfind, lsearch \- linear search of an array and .BR lsearch () perform a linear search for -\fIkey\fP in the array \fIbase\fP which has *\fInmemb\fP elements of +\fIkey\fP in the array \fIbase\fP which has \fI*nmemb\fP elements of \fIsize\fP bytes each. The comparison function referenced by \fIcompar\fP is expected to have two arguments which point to the @@ -55,7 +55,7 @@ non-zero otherwise. If .BR lsearch () does not find a matching element, then the \fIkey\fP -object is inserted at the end of the table, and *\fInmemb\fP is +object is inserted at the end of the table, and \fI*nmemb\fP is incremented. In particular, one should know that a matching element exists, or that more room is available. diff --git a/man3/strsep.3 b/man3/strsep.3 index 04afa0699..414216003 100644 --- a/man3/strsep.3 +++ b/man3/strsep.3 @@ -46,23 +46,23 @@ Feature Test Macro Requirements for glibc (see .BR strsep (): _BSD_SOURCE .SH DESCRIPTION -If *\fIstringp\fP is NULL, the +If \fI*stringp\fP is NULL, the .BR strsep () function returns NULL and does nothing else. Otherwise, this function finds the first token -in the string *\fIstringp\fP, where tokens +in the string \fI*stringp\fP, where tokens are delimited by symbols in the string \fIdelim\fP. This token is terminated with a '\\0' character (by overwriting the delimiter) -and *\fIstringp\fP is updated to point past the token. +and \fI*stringp\fP is updated to point past the token. In case no delimiter was found, the token is taken to be -the entire string *\fIstringp\fP, and *\fIstringp\fP is made NULL. +the entire string \fI*stringp\fP, and \fI*stringp\fP is made NULL. .SH "RETURN VALUE" The .BR strsep () function returns a pointer to the token, -that is, it returns the original value of *\fIstringp\fP. +that is, it returns the original value of \fI*stringp\fP. .SH "CONFORMING TO" 4.4BSD .SH NOTES