Many sockets man pages use the name 'sockfd' already.
For consistency, changes the others to do so as well.
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
Mel Gorman reported that in Linux 2.6.27, 'addr' is rounded
down to a page boundary.
Before kernel 2.6.26, if 'addr' was taken as a hint, it was
rounded up to the next page boundary. Since Linux 2.6.24,
it is rounded down. Therefore, loosen the description of
this point to say that the address is rounded to "a nearby
page boundary".
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
Reported-by: Mel Gorman <mel@csn.ul.ie>
Internet datagram (since Linux 2.4.27/2.6.8),
and netlink (since Linux 2.6.22) sockets support
the MSG_TRUNC flag for recv(2).
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
Expand description of setdomainname() and getdomainname().
Note that getdomainname() is implemented as a library function
in glibc.
Note limits on size of domain name.
Reorganize ERRORS list.
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
Write a paragraph describing sethostname().
Clarify differences between glibc's gethostbyname() and
the kernel gethostbyname() system calls.
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
If CLONE_NEWUTS is specified, the IDs are initialized
by duplicating from calling process.
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
Reviewed-by: Serge E. Hallyn <serge@hallyn.com>
Many pages still mention use of the obsolete sysctl(2) system
call, or used the term "sysctls"; rewrite these mentions to
instead be in terms of /proc interfaces.
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This was already stated under NOTES, but make it even more
prominent by adding a sentence at the start of the DESCRIPTION.
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
When the last process in an IPC namespace is destroyed, the
IPC objects in that namespace are automatically destroyed.
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
Reported-by: Cedric Le Goater <clg@fr.ibm.com>
This is more consistent with the term "mounts namespace"
used in the 2008 ACM SIGOPS paper, "Virtual servers
and and checkpoint/restart in mainstream Linux".
(I avoided the "s", because using the plural strikes me
as klunky English, and anyway we don't talk about
the "PIDs namespace" or the "networks namespace", etc..)
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
In recent times, a number of other namespace flags have been
added to clone(2). As such, it is no longer clear to use
the generic term "namespace" to refer to the particular
namespace controlled by CLONE_NEWNS; instead, use the
term "mount-point namespace".
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
I submitted a patch to fix this. See the LKML thread
"[patch] Fix type errors in inotify interfaces", 18 Nov 2008
If/when these patches are accepted, the pages need to be updated.
After Loic Domaigne's suggestion for pthread_setaffinity_np(3), add
similar text to this page noting that the system silently
limits the set of CPUs on which the process actually runs to
the set of CPUs physically present and the limits imposed by
cpuset(7).
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
Reported-by: Loic Domaigne <tech@domaigne.com>
Acked-by: Bert Wesarg <bert.wesarg@googlemail.com>
pthread_setaffinity_np() is preferable for setting
thread CPU affinity if using the POSIX threads API.
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
Many older pages use a handle_error() macro to do simple
error handling from system and library function calls.
Switch these pages to do similar.
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
s/2.6.20/2.6.30/ to fix an earlier typo in the description
of the likely kernel version that will have fully fledged
real-time features.
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
s/\.R " "/\\\&/ as a way of getting a blank line after a .SS heading.
(Suggested by Sam Varshavchik <mrsam@courier-mta.com>)
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
For sched_setaffinity(), the EINVAL error that occurs
if 'cpusetsize' is smaller than the kernel CPU set size only
occurs with kernels before 2.6.9.
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
So on a direct syscall, the EINVAL could also occur for bufsiz < 0.
But at the moment, the error text is sufficiently vague
("bufsiz is not positive") that a change to the man page text
is probably not needed.
The page was phrased in a few places to describe the child as
holding the parent's memory until the child does an execve(2)
or an _exit(2). The latter case should really be the more
general process termimation (i.e., either _exit(2) or abnormal
termination).
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
Reported-by: Valdis.Kletnieks@vt.edu
Some file systems provide partial support for 'dt_type',
returning DT_UNKNOWN for cases they don't support.
Update the discussion of 'd_type' and DT_UNKNOWN to
support this.
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
The man page was not explicit about how the memory used by
the child is released back to the parent.
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
Reported-by: Halesh S <halesh.s@india.com>
In some cases, EINVAL can occur if 'optval' is invalid.
Note this, and point reader to an example in ip(7).
In response to:
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=216092
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
Reported-by: Christian Grigis <glove@earthling.net>
Add ".SS Program source" to clearly distinguish shell session and
descriptive text from actual program code.
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
Strategic calls to sched_yield() can be used to improve
performance, but unnecessary use should be avoided.
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
The text formerly described the operation of sched_yield() in
terms of processes. It should be in terms of threads.
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>