Commit Graph

5233 Commits

Author SHA1 Message Date
Michael Kerrisk 1f62722442 pthread_attr_setschedpolicy.3: Add pointer to EXAMPLE in pthread_setschedparam(3)
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2008-11-06 16:49:26 -05:00
Michael Kerrisk 2c5f1561a6 pthread_attr_setschedparam.3: Add pointer to EXAMPLE in pthread_setschedparam(3)
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2008-11-06 16:49:26 -05:00
Michael Kerrisk f51fabeb1a pthread_getschedparam.3: New link to new pthread_setschedparam.3
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2008-11-06 16:49:26 -05:00
Michael Kerrisk bec63ef665 pthread_setschedparam.3: New page for pthread_setschedparam(3) and pthread_getschedparam(3)
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2008-11-06 16:49:26 -05:00
Michael Kerrisk ce5139ca28 pthread_create.3, pthread_getattr_np.3: ffix: s/'/\\(aq/
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2008-11-06 16:49:26 -05:00
Michael Kerrisk f1e29e2764 pthread_attr_setschedpolicy.3: srcfix: Added FIXME
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2008-11-06 16:49:25 -05:00
Michael Kerrisk e7d2bb653d pthread_setaffinity_np.3: SEE ALSO: add pthread_self(3)
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2008-11-06 16:49:25 -05:00
Michael Kerrisk 83a87192af resolver.3: Fix prototype of dn_expand()
The 4th argument is "char *", not "unsigned char *".
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=504708

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
Reported-by: Trk Edwin <edwintorok@gmail.com>
2008-11-06 16:49:25 -05:00
Michael Kerrisk ecdd9a10bb pthreads.7: spfix 2008-11-06 16:49:25 -05:00
Michael Kerrisk 84ee6c22e3 pthreads.7: Add a section describing thread IDs
In particular, note that in each pthreads function that takes
a thread ID argument, that ID by definition refers to a thread
in the same process as the caller.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2008-11-06 16:49:13 -05:00
Michael Kerrisk 3ba07ec788 sched_setaffinity.2: SEE ALSO: add sched_getcpu(3)
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2008-11-06 16:49:06 -05:00
Michael Kerrisk cbdc74c919 pthread_setaffinity_np.3: SEE ALSO: add sched_getcpu(3)
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2008-11-06 16:49:06 -05:00
Michael Kerrisk a4963c7c62 pthread_attr_getschedparam.3: New link to new pthread_attr_setschedparam.3
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2008-11-06 16:49:06 -05:00
Michael Kerrisk b326494cc0 pthread_attr_setschedparam.3: New page for pthread_attr_setschedparam(3) and pthread_attr_getschedparam(3)
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2008-11-06 16:49:06 -05:00
Michael Kerrisk d71915efe6 pthread_attr_getschedpolicy.3: New link to new pthread_attr_setschedpolicy.3
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2008-11-06 16:49:05 -05:00
Michael Kerrisk 2f80dc3711 pthread_attr_setschedpolicy.3: New page for pthread_attr_setschedpolicy(3) and pthread_attr_getschedpolicy(3)
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2008-11-06 16:49:05 -05:00
Michael Kerrisk c2befb6a93 pthread_attr_setstacksize.3: EINVAL occurs on some systems if stacksize != page-size
On MacOS X at least, pthread_attr_setstacksize(3) can fail
with EINVAL if 'stacksize' is not a multiple of the system
page size.  Best to mention this so as to aid people writing
portable programs.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
Reported-by: Karsten Weiss <knweiss@gmail.com>

==
From: Karsten Weiss <knweiss@gmail.com>
Date: Fri, Oct 31, 2008 at 3:46 PM
Subject: pthread_create(3) - example bug + problems

[...]
A look in the pthread_set_stacksize man page on Mac revealed that on
Mac the stack size must not only be at least PTHREAD_STACK_MIN...
[...]
...but the new stack size must also be a multiple of the system page
size!

From pthread_attr_setstacksize(3):

    pthread_attr_setstacksize() will fail if:

    [EINVAL]           Invalid value for attr.
    [EINVAL]           stacksize is less than PTHREAD_STACK_MIN.
!!!  [EINVAL]           stacksize is not a multiple of the system page size.

See for yourself (PTHREAD_STACK_MIN==8192 on Mac OS X):

$ ./pthread_test -s $((8192*10-1)) a
pthread_attr_setstacksize: Invalid argument
$ ./pthread_test -s $((8192*10)) a
Thread 1: top of stack near 0xb0014f6c; argv_string=a
Joined with thread 1; returned value was A
$ ./pthread_test -s $((8192*10+1)) a
pthread_attr_setstacksize: Invalid argument
2008-11-06 16:49:05 -05:00
Karsten Weiss 061f742a28 pthread_create.3: Fix bug in EXAMPLE program
The bug is in this part of the code:

    /* Allocate memory for pthread_create() arguments */

    tinfo = calloc(num_threads, num_threads);
    if (tinfo == NULL)
       errExit("calloc");

The calloc() line should read like this instead:

    tinfo = calloc(num_threads, sizeof(struct thread_info));

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2008-11-06 16:49:05 -05:00
Michael Kerrisk c94081aa45 pthread_attr_setaffinity_np.3, pthread_getattr_np.3, pthread_setaffinity_np.3, pthread_tryjoin_np.3: Explain _np suffix
Add text to CONFORMING TO explaining that the "_np"
suffix is because these functions are non-portable.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
Reported-by: Karsten Weiss <K.Weiss@science-computing.de>
2008-11-06 16:49:05 -05:00
Michael Kerrisk ea75a357a4 pthread_attr_setaffinity_np.3: Remove EFAULT, add new EINVAL error
EFAULT can't occur for these functions.  EINVAL can occur
for invalid 'attr' or 'cpuset' arguments.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2008-11-06 16:48:56 -05:00
Michael Kerrisk 7415e59a75 pthread_attr_getaffinity_np.3: New link to new pthread_attr_setaffinity_np.3
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2008-11-06 16:48:54 -05:00
Michael Kerrisk f94536275a pthread_attr_setaffinity_np.3: New page for pthread_attr_setaffinity_np(3) and pthread_attr_getaffinity_np(3)
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2008-11-06 16:48:54 -05:00
Michael Kerrisk ae107f5822 pthread_setaffinity_np.3: tfix 2008-11-06 16:48:54 -05:00
Michael Kerrisk 04128e1a06 pthread_setaffinity_np.3: minor: fix function names in EXAMPLE diagnostic messages
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2008-11-06 16:48:54 -05:00
Michael Kerrisk d67ec7daf3 pthread_setaffinity_np.3: minor: Clean up SEE ALSO list
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2008-11-06 16:48:53 -05:00
Michael Kerrisk 7fec28f02a pthread_getaffinity_np.3: New link to new pthread_setaffinity_np.3
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2008-11-06 16:48:53 -05:00
Michael Kerrisk 5655765fdd pthread_setaffinity_np.3: New page for pthread_setaffinity_np(3) and pthread_getaffinity_np(3)
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2008-11-06 16:48:39 -05:00
Michael Kerrisk d84d0300a5 eventfd.2, getdents.2, mprotect.2, signalfd.2, timerfd_create.2, wait.2, backtrace.3, clock_getcpuclockid.3, end.3, fmemopen.3, fopencookie.3, frexp.3, getaddrinfo.3, getdate.3, getgrouplist.3, getprotoent_r.3, getservent_r.3, gnu_get_libc_version.3, inet.3, inet_pton.3, makecontext.3, matherr.3, offsetof.3, pthread_attr_init.3, pthread_create.3, pthread_getattr_np.3, sem_wait.3, strftime.3, strtok.3, strtol.3, core.5: srcfix
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>
2008-11-04 20:42:45 -05:00
Michael Kerrisk 3213bb2813 sched_setaffinity.3: minor: rework EPERM text
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2008-11-04 17:06:01 -05:00
Michael Kerrisk a212694364 sched_setaffinity.2: Clarify EINVAL error for cpusetsize < kernel mask size
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>
2008-11-04 17:00:02 -05:00
Michael Kerrisk 4187c37c68 sched_setaffinity.2: SEE ALSO: Add pthread_setaffinity_np(3)
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2008-11-04 16:36:45 -05:00
Michael Kerrisk 40bea7025b sched_setaffinity.2: wfix 2008-11-04 13:56:30 -05:00
Michael Kerrisk 89cb804a31 readlink.2: srcfix: Note that bufsiz has a signed type at kernel level
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.
2008-11-04 11:21:18 -05:00
Michael Kerrisk 40c75945ad epoll.7: Add error handling for epoll_wait() call in example code
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2008-11-04 10:59:13 -05:00
Michael Kerrisk 15277745c3 epoll.7: Fix error handling after accept() in example code
Simply continuing after an error is in most cases wrong,
and can lead to infinite loops (e.g., for EMFILE).
So handle an error by terminating.

http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=504202

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
Reported-by: Olaf van der Spek <olafvdspek@gmail.com>
2008-11-04 10:58:58 -05:00
Sam Varshavchik 344689bd06 pipe.2: wfix: SYNPOSIS: add missing word "int"
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2008-11-04 09:16:00 -05:00
Sam Varshavchik 1c32ee471c eventfd.2, mprotect.2, signalfd.2: ffix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2008-11-04 09:03:49 -05:00
Sam Varshavchik 5b4e617fa4 pthread_tryjoin_np.3: ffix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2008-11-04 09:00:41 -05:00
Ulrich Mueller 7c5f05139c open.2: tfix: in CONFORMING TO: s/POSIX.1-2001/POSIX.1-2008/
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2008-11-04 08:51:26 -05:00
Michael Kerrisk 66132b5e47 epoll.7: Improve example code
Fill in some gaps in example code (variable declarations,
adding listening socket to epoll set).
Give variables more meaningful names.
Other minor changes.

http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=504202

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
Reported-by: Olaf van der Spek <OlafvdSpek@gmail.com>
2008-11-01 14:30:05 -05:00
Michael Kerrisk 1c8de4731b dup.2: wfix 2008-10-30 20:43:16 -05:00
Michael Kerrisk 51d5e556bc umount.2: srcfix: remove out-of-date FIXME 2008-10-30 12:26:25 -05:00
Lefteris Dimitroulakis 289bb92874 iso_8859-7.7: Add characters for Drachma and Greek Ypogegrammeni
Lines for these two characters were added in the previous patch,
but the actual characters were not included in the 4th column
of the table.  This fixes that.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2008-10-30 11:08:19 -05:00
Michael Kerrisk 257f73f262 pthread_exit.3: BUGS: thread group with a dead leader and stop signals
Document the bug that can occur when a stop signal
is sent to a thread group whose leader has terminated.
http://thread.gmane.org/gmane.linux.kernel/611611
http://marc.info/?l=linux-kernel&m=122525468300823&w=2

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
Reported-by: Bert Wesarg <bert.wesarg@googlemail.com>
2008-10-30 10:56:59 -05:00
Michael Kerrisk d57b917015 syscalls.2: srcfix: add FIXME 2008-10-30 09:39:46 -05:00
Michael Kerrisk cc378aa6ab Changes.old: wspfix 2008-10-30 09:35:18 -05:00
Michael Kerrisk 9ee629ff75 Changes.old: Add Contributors to 3.12 Changelog
I forgot to do this before the 3.12 release.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2008-10-30 08:47:52 -05:00
Michael Kerrisk a18e24a14a vfork.2: Child holds parent's memory until execve() or *termination*
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
2008-10-30 08:12:12 -05:00
Michael Kerrisk dd68f56461 Changes.old: Reformat 3.11 Changelog entries
To be consistent with format used in 3.12 changelog (and beyond)

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2008-10-29 21:09:46 -05:00
Michael Kerrisk cac193ff17 Start of man-pages-3.13: updating Changes and Changes.old 2008-10-29 20:52:10 -05:00