diff options
| author | Michael Kerrisk <mtk.manpages@gmail.com> | 2013-02-12 11:49:39 +0100 |
|---|---|---|
| committer | Michael Kerrisk <mtk.manpages@gmail.com> | 2013-02-12 11:49:39 +0100 |
| commit | 7484d5a7dd04f2813f3490f3e1e5f3d2a4df121f (patch) | |
| tree | 8afd1eeddd0c249bc8658c0b8ca7fc9405fc0ace | |
| parent | ec18b51355fef004a8af096cc8b73640f2e79aee (diff) | |
| download | man-pages-7484d5a7dd04f2813f3490f3e1e5f3d2a4df121f.tar.gz | |
getrlimit.2, setgid.2, timerfd_create.2, wait.2, getenv.3, if_nameindex.3, scanf.3, aio.7, numa.7, rtld-audit.7, udplite.7: Fix order of SH sections
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
| -rw-r--r-- | man2/getrlimit.2 | 112 | ||||
| -rw-r--r-- | man2/setgid.2 | 4 | ||||
| -rw-r--r-- | man2/timerfd_create.2 | 15 | ||||
| -rw-r--r-- | man2/wait.2 | 30 | ||||
| -rw-r--r-- | man3/getenv.3 | 9 | ||||
| -rw-r--r-- | man3/if_nameindex.3 | 9 | ||||
| -rw-r--r-- | man3/scanf.3 | 69 | ||||
| -rw-r--r-- | man7/aio.7 | 31 | ||||
| -rw-r--r-- | man7/numa.7 | 7 | ||||
| -rw-r--r-- | man7/rtld-audit.7 | 23 | ||||
| -rw-r--r-- | man7/udplite.7 | 20 |
11 files changed, 178 insertions, 151 deletions
diff --git a/man2/getrlimit.2 b/man2/getrlimit.2 index 51b68fb598..7ec1c9f506 100644 --- a/man2/getrlimit.2 +++ b/man2/getrlimit.2 @@ -522,62 +522,7 @@ For backward compatibility, glibc also provides .BR vlimit (). All new applications should be written using .BR setrlimit (). -.SH EXAMPLE -The program below demonstrates the use of -.BR prlimit (). -.PP -.nf -#define _GNU_SOURCE -#define _FILE_OFFSET_BITS 64 -#include <stdio.h> -#include <time.h> -#include <stdlib.h> -#include <unistd.h> -#include <sys/resource.h> - -#define errExit(msg) do { perror(msg); exit(EXIT_FAILURE); \\ - } while (0) - -int -main(int argc, char *argv[]) -{ - struct rlimit old, new; - struct rlimit *newp; - pid_t pid; - - if (!(argc == 2 || argc == 4)) { - fprintf(stderr, "Usage: %s <pid> [<new\-soft\-limit> " - "<new\-hard\-limit>]\\n", argv[0]); - exit(EXIT_FAILURE); - } - pid = atoi(argv[1]); /* PID of target process */ - - newp = NULL; - if (argc == 4) { - new.rlim_cur = atoi(argv[2]); - new.rlim_max = atoi(argv[3]); - newp = &new; - } - - /* Set CPU time limit of target process; retrieve and display - previous limit */ - - if (prlimit(pid, RLIMIT_CPU, newp, &old) == \-1) - errExit("prlimit\-1"); - printf("Previous limits: soft=%lld; hard=%lld\\n", - (long long) old.rlim_cur, (long long) old.rlim_max); - - /* Retrieve and display new CPU time limit */ - - if (prlimit(pid, RLIMIT_CPU, NULL, &old) == \-1) - errExit("prlimit\-2"); - printf("New limits: soft=%lld; hard=%lld\\n", - (long long) old.rlim_cur, (long long) old.rlim_max); - - exit(EXIT_FAILURE); -} -.fi .SH BUGS .\" FIXME prlimit() does not suffer .\" https://bugzilla.kernel.org/show_bug.cgi?id=5042 @@ -650,6 +595,63 @@ when .I rlim\->rlim_cur was greater than .IR rlim\->rlim_max . + +.SH EXAMPLE +The program below demonstrates the use of +.BR prlimit (). +.PP +.nf +#define _GNU_SOURCE +#define _FILE_OFFSET_BITS 64 +#include <stdio.h> +#include <time.h> +#include <stdlib.h> +#include <unistd.h> +#include <sys/resource.h> + +#define errExit(msg) do { perror(msg); exit(EXIT_FAILURE); \\ + } while (0) + +int +main(int argc, char *argv[]) +{ + struct rlimit old, new; + struct rlimit *newp; + pid_t pid; + + if (!(argc == 2 || argc == 4)) { + fprintf(stderr, "Usage: %s <pid> [<new\-soft\-limit> " + "<new\-hard\-limit>]\\n", argv[0]); + exit(EXIT_FAILURE); + } + + pid = atoi(argv[1]); /* PID of target process */ + + newp = NULL; + if (argc == 4) { + new.rlim_cur = atoi(argv[2]); + new.rlim_max = atoi(argv[3]); + newp = &new; + } + + /* Set CPU time limit of target process; retrieve and display + previous limit */ + + if (prlimit(pid, RLIMIT_CPU, newp, &old) == \-1) + errExit("prlimit\-1"); + printf("Previous limits: soft=%lld; hard=%lld\\n", + (long long) old.rlim_cur, (long long) old.rlim_max); + + /* Retrieve and display new CPU time limit */ + + if (prlimit(pid, RLIMIT_CPU, NULL, &old) == \-1) + errExit("prlimit\-2"); + printf("New limits: soft=%lld; hard=%lld\\n", + (long long) old.rlim_cur, (long long) old.rlim_max); + + exit(EXIT_FAILURE); +} +.fi .SH "SEE ALSO" .BR prlimit (1), .BR dup (2), diff --git a/man2/setgid.2 b/man2/setgid.2 index 5938472564..1d37b8f337 100644 --- a/man2/setgid.2 +++ b/man2/setgid.2 @@ -61,6 +61,8 @@ The calling process is not privileged (does not have the .I gid does not match the real group ID or saved set-group-ID of the calling process. +.SH "CONFORMING TO" +SVr4, POSIX.1-2001. .SH NOTES The original Linux .BR setgid () @@ -71,8 +73,6 @@ supporting 32-bit IDs. The glibc .BR setgid () wrapper function transparently deals with the variation across kernel versions. -.SH "CONFORMING TO" -SVr4, POSIX.1-2001. .SH "SEE ALSO" .BR getgid (2), .BR setegid (2), diff --git a/man2/timerfd_create.2 b/man2/timerfd_create.2 index 51c2bcff40..3bba13b4f0 100644 --- a/man2/timerfd_create.2 +++ b/man2/timerfd_create.2 @@ -369,6 +369,14 @@ These system calls are available on Linux since kernel 2.6.25. Library support is provided by glibc since version 2.8. .SH CONFORMING TO These system calls are Linux-specific. + +.SH BUGS +Currently, +.\" 2.6.29 +.BR timerfd_create () +supports fewer types of clock IDs than +.BR timer_create (2). + .SH EXAMPLE The following program creates a timer and then monitors its progress. The program accepts up to three command-line arguments. @@ -531,12 +539,7 @@ main(int argc, char *argv[]) exit(EXIT_SUCCESS); } .fi -.SH BUGS -Currently, -.\" 2.6.29 -.BR timerfd_create () -supports fewer types of clock IDs than -.BR timer_create (2). + .SH "SEE ALSO" .BR eventfd (2), .BR poll (2), diff --git a/man2/wait.2 b/man2/wait.2 index 46a9cfe0d8..5154e5960a 100644 --- a/man2/wait.2 +++ b/man2/wait.2 @@ -519,6 +519,21 @@ type ("clone" or "non-clone"). Do not wait for children of other threads in the same thread group. This was the default before Linux 2.4. +.SH BUGS +According to POSIX.1-2008, an application calling +.BR waitid () +must ensure that +.I infop +points to a +.I siginfo_t +structure (i.e., that it is a non-NULL pointer). +On Linux, if +.I infop +is NULL, +.BR waitid () +succeeds, and returns the process ID of the waited-for child. +Applications should avoid relying on this inconsistent, +nonstandard, and unnecessary feature. .SH EXAMPLE .\" fork.2 refers to this example program. The following program demonstrates the use of @@ -602,21 +617,6 @@ main(int argc, char *argv[]) } } .fi -.SH BUGS -According to POSIX.1-2008, an application calling -.BR waitid () -must ensure that -.I infop -points to a -.I siginfo_t -structure (i.e., that it is a non-NULL pointer). -On Linux, if -.I infop -is NULL, -.BR waitid () -succeeds, and returns the process ID of the waited-for child. -Applications should avoid relying on this inconsistent, -nonstandard, and unnecessary feature. .SH "SEE ALSO" .BR _exit (2), .BR clone (2), diff --git a/man3/getenv.3 b/man3/getenv.3 index ffb0af909f..0d6b836322 100644 --- a/man3/getenv.3 +++ b/man3/getenv.3 @@ -88,15 +88,18 @@ The .BR getenv () function returns a pointer to the value in the environment, or NULL if there is no match. + +.SH VERSIONS +.BR secure_getenv () +first appeared in glibc 2.17. + .SH "CONFORMING TO" .BR getenv (): SVr4, POSIX.1-2001, 4.3BSD, C89, C99. .BR secure_getenv () is a GNU extension. -.SH VERSIONS -.BR secure_getenv () -first appeared in glibc 2.17. + .SH NOTES The strings in the environment list are of the form \fIname=value\fP. diff --git a/man3/if_nameindex.3 b/man3/if_nameindex.3 index f9480e6ea8..7139347a32 100644 --- a/man3/if_nameindex.3 +++ b/man3/if_nameindex.3 @@ -99,6 +99,12 @@ function first appeared in glibc 2.1, but before glibc 2.3.4, the implementation only supported interfaces with IPv4 addresses. Support of interfaces that don't have IPv4 addresses is only available on kernels that support netlink. + +.SH CONFORMING TO +RFC\ 3493, POSIX.1-2001. + +This function first appeared in BSDi. + .SH EXAMPLE The program below demonstrates the use of the functions described on this page. @@ -137,10 +143,7 @@ main(int argc, char *argv[]) exit(EXIT_SUCCESS); } .fi -.SH CONFORMING TO -RFC\ 3493, POSIX.1-2001. -This function first appeared in BSDi. .SH SEE ALSO .BR getsockopt (2), .BR setsockopt (2), diff --git a/man3/scanf.3 b/man3/scanf.3 index ee8aeb348b..3eab3e5e61 100644 --- a/man3/scanf.3 +++ b/man3/scanf.3 @@ -642,40 +642,7 @@ floating-point conversion specifier (and is unaffected by etc.) .IP * It is specified in the POSIX.1-2008 standard. -.SH EXAMPLE -To use the dynamic allocation conversion specifier, specify -.B m -as a length modifier (thus -.B %ms -or -\fB%m[\fP\fIrange\fP\fB]\fP). -The caller must -.BR free (3) -the returned string, as in the following example: -.in +4n -.nf -char *p; -int n; - -errno = 0; -n = scanf("%m[a-z]", &p); -if (n == 1) { - printf("read: %s\\n", p); - free(p); -} else if (errno != 0) { - perror("scanf"); -} else { - fprintf(stderr, "No matching characters\\n"); -} -.fi -.in -.PP -As shown in the above example, it is only necessary to call -.BR free (3) -if the -.BR scanf () -call successfully read a string. .SH BUGS All functions are fully C89 conformant, but provide the additional specifiers @@ -711,6 +678,42 @@ The usage of is not the same as on 4.4BSD, as it may be used in float conversions equivalently to .BR L . + +.SH EXAMPLE +To use the dynamic allocation conversion specifier, specify +.B m +as a length modifier (thus +.B %ms +or +\fB%m[\fP\fIrange\fP\fB]\fP). +The caller must +.BR free (3) +the returned string, as in the following example: +.in +4n +.nf + +char *p; +int n; + +errno = 0; +n = scanf("%m[a-z]", &p); +if (n == 1) { + printf("read: %s\\n", p); + free(p); +} else if (errno != 0) { + perror("scanf"); +} else { + fprintf(stderr, "No matching characters\\n"); +} +.fi +.in +.PP +As shown in the above example, it is only necessary to call +.BR free (3) +if the +.BR scanf () +call successfully read a string. + .SH "SEE ALSO" .BR getc (3), .BR printf (3), diff --git a/man7/aio.7 b/man7/aio.7 index 537dbb0e8c..594fd8e535 100644 --- a/man7/aio.7 +++ b/man7/aio.7 @@ -148,6 +148,22 @@ the GNU C library provides the following extension to the POSIX AIO API: .TP 16 .BR aio_init (3) Set parameters for tuning the behavior of the glibc POSIX AIO implementation. + +.SH ERRORS +.TP +.B EINVAL +The +.I aio_reqprio +field of the +.I aiocb +structure was less than 0, +or was greater than the limit returned by the call +.IR sysconf(_SC_AIO_PRIO_DELTA_MAX) . +.SH VERSIONS +The POSIX AIO interfaces are provided by glibc since version 2.1. +.SH CONFORMING TO +POSIX.1-2001, POSIX.1-2008. + .SH NOTES It is a good idea to zero out the control block buffer before use (see .BR memset (3)). @@ -177,20 +193,7 @@ reimplemented using the kernel system calls. .\" http://lse.sourceforge.net/io/aio.html .\" http://lse.sourceforge.net/io/aionotes.txt .\" http://lwn.net/Articles/148755/ -.SH ERRORS -.TP -.B EINVAL -The -.I aio_reqprio -field of the -.I aiocb -structure was less than 0, -or was greater than the limit returned by the call -.IR sysconf(_SC_AIO_PRIO_DELTA_MAX) . -.SH VERSIONS -The POSIX AIO interfaces are provided by glibc since version 2.1. -.SH CONFORMING TO -POSIX.1-2001, POSIX.1-2008. + .SH EXAMPLE The program below opens each of the files named in its command-line arguments and queues a request on the resulting file descriptor using diff --git a/man7/numa.7 b/man7/numa.7 index 8356f98aa8..49a0a8ce00 100644 --- a/man7/numa.7 +++ b/man7/numa.7 @@ -143,6 +143,10 @@ removed from memory by the swapper soon. .TP .I writeback=<pages> Number of pages that are currently being written out to disk. + +.SH "CONFORMING TO" +No standards govern NUMA interfaces. + .SH NOTES The Linux NUMA system calls and .I /proc @@ -176,8 +180,7 @@ Some distributions include the development library and header in the separate .I numactl-devel package. -.SH "CONFORMING TO" -No standards govern NUMA interfaces. + .SH "SEE ALSO" .BR get_mempolicy (2), .BR mbind (2), diff --git a/man7/rtld-audit.7 b/man7/rtld-audit.7 index dbfdaf1c52..641d4bae00 100644 --- a/man7/rtld-audit.7 +++ b/man7/rtld-audit.7 @@ -487,6 +487,18 @@ and arguments (but does provide a .IR retval argument with the function return value). + +.SH BUGS +In glibc versions up to and include 2.9, +specifying more than one audit library in +.B LD_AUDIT +results in a run-time crash. +This is reportedly fixed in glibc 2.10. +.\" FIXME Specifying multiple audit libraries doesn't work on GNU. +.\" My simple tests on Solaris work okay, but not on Linux -- mtk, Jan 2009 +.\" glibc bug filed: http://sourceware.org/bugzilla/show_bug.cgi?id=9733 +.\" Reportedly, this is fixed on 16 Mar 2009 (i.e., for glibc 2.10) + .SH EXAMPLE .nf #include <link.h> @@ -587,16 +599,7 @@ la_i86_gnu_pltenter(Elf32_Sym *sym, unsigned int ndx, return sym\->st_value; } .fi -.SH BUGS -In glibc versions up to and include 2.9, -specifying more than one audit library in -.B LD_AUDIT -results in a run-time crash. -This is reportedly fixed in glibc 2.10. -.\" FIXME Specifying multiple audit libraries doesn't work on GNU. -.\" My simple tests on Solaris work okay, but not on Linux -- mtk, Jan 2009 -.\" glibc bug filed: http://sourceware.org/bugzilla/show_bug.cgi?id=9733 -.\" Reportedly, this is fixed on 16 Mar 2009 (i.e., for glibc 2.10) + .SH "SEE ALSO" .BR ldd (1), .BR dlopen (3), diff --git a/man7/udplite.7 b/man7/udplite.7 index 5aa7fc2552..13de4310bc 100644 --- a/man7/udplite.7 +++ b/man7/udplite.7 @@ -121,6 +121,17 @@ All errors documented for .BR udp (7) may be returned. UDP-Lite does not add further errors. + +.SH FILES +.I /proc/net/snmp +\- basic UDP-Litev4 statistics counters. +.br +.I /proc/net/snmp6 +\- basic UDP-Litev6 statistics counters. + +.SH VERSIONS +UDP-Litev4/v6 first appeared in Linux 2.6.20. + .SH BUGS .\" FIXME . remove this section once glibc supports UDP-Lite Where glibc support is missing, the following definitions are needed: @@ -133,14 +144,7 @@ Where glibc support is missing, the following definitions are needed: #define UDPLITE_RECV_CSCOV 11 .fi .in -.SH FILES -.I /proc/net/snmp -\- basic UDP-Litev4 statistics counters. -.br -.I /proc/net/snmp6 -\- basic UDP-Litev6 statistics counters. -.SH VERSIONS -UDP-Litev4/v6 first appeared in Linux 2.6.20. + .SH "SEE ALSO" .BR ip (7), .BR ipv6 (7), |
