Commit Graph

5201 Commits

Author SHA1 Message Date
Michael Kerrisk c42ad30f8c fma.3: Add some source code comments explaining two domain error cases.
Two of the "domain error" cases described on this page are treated in
the same way on Linux, but POSIX.1 specifies some optional differences
for the two cases.  Make life easier for future page reviewers/editors
by adding some comments explaining that POSIX.1-2001 distinguishes
the two cases.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
Reported-by: Nicolas Franois <nicolas.francois@centraliens.net>
2008-09-29 13:42:58 +02:00
Nicolas Franois 69cb728c2f wfix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2008-09-29 13:24:36 +02:00
Nicolas Franois 11c87468b9 nextafter.3: Make description more precise: s/next/largest/
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2008-09-29 13:22:21 +02:00
Nicolas Franois 166f4f1630 floor.3: Fix error in description: s/smallest/largest/
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2008-09-29 13:21:55 +02:00
Nicolas Franois f010f3a2ce ffix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2008-09-29 13:05:56 +02:00
Nicolas Franois 4718ba1c3b atan2.3: Fix error in description of range or return value
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>

In recent changes to the man page, mtk accidentally cganged
the description of the return value range to -pi/2..pi/2;
the corect range is -pi..pi.
2008-09-29 13:01:44 +02:00
Michael Kerrisk bc0a3def1d utimensat.2: POSIX.1-2008 revision will likely affect FTMs for futimens()
Make it clear that the POSIX.1 revision that is likely
to affect the feature test macro requirements for futimens() is
POSIX.1-2008.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
Reported-by: Nicolas Franois <nicolas.francois@centraliens.net>
2008-09-29 12:52:30 +02:00
Nicolas Franois 26b42bb4bf utimensat.2: Make various wordings a little more precise.
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>

The times argument point to *an array of* structures, and the
man-page should say that consistently.
2008-09-29 12:42:09 +02:00
Michael Kerrisk 2dd5352dae send.2: make kernel version for MSG_CONFIRM more precise
s/2.3+ only/Since Linux 2.3.15/

Reported-by: Nicolas Franois <nicolas.francois@centraliens.net>
2008-09-29 12:35:13 +02:00
Nicolas Franois aab31be272 move_pages.2: Make a detail og EPERM error more precise
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2008-09-29 12:20:39 +02:00
Marko Kreen 7d557e75c0 strcpy.3: Revert earlier change to example strncpy() calls
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>

I browsed the changes there and found a buggy code snippet:
2008-09-29 12:01:26 +02:00
Nicolas Franois 5f3fb725ab recv.2: Move kernel version number to first mention to MSG_ERRQUEUE.
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2008-09-29 11:46:01 +02:00
Nicolas Franois 553f115ece cmsg.3: Add parentheses after macro names.
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2008-09-29 11:33:04 +02:00
Nicolas Franois 494b842ba0 Remove a line of junk text.
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2008-09-29 11:30:57 +02:00
Nicolas Franois 9d16961a57 Typo and whitespace fixes
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2008-09-29 11:15:48 +02:00
Nicolas Franois 178d104e83 Minor wording fixes
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2008-09-29 11:09:52 +02:00
Nicolas Franois 44e5793157 Typo and wording fixes
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2008-09-29 11:00:36 +02:00
Kirill A. Shutemov afc4edc132 semop.2: fix typo in example
(The '&' before sop in the semop() call is unneeded.)
Signed-off-by: Kirill A. Shutemov <kirill@shutemov.name>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2008-09-29 09:49:35 +02:00
Michael Kerrisk 16d023bce2 grfix 2008-09-29 08:48:18 +02:00
Michael Kerrisk 12e86dbff5 mq_overview.7: add mq_notify() to list of lib. functions and syscalls in MQ API 2008-09-29 06:05:04 +02:00
Michael Kerrisk 247ac1d3da mg_getattr.3: mq_getattr() and mq_setattr() are layered on mq_getsetattr(2)
mq_getattr() and mq_setattr() are library functions layered on
top of the mq_getsetattr(2) system call.
(This is useful info for users of strace(1).)
2008-09-29 05:51:25 +02:00
Michael Kerrisk c89e428bcd mq_receive.3: mq_send() is a library function layered on mq_timedreceive() syscall
This info is useful for users of strace(1).
2008-09-29 05:40:37 +02:00
Michael Kerrisk 5496c8c1d2 mq_send.3: mq_send() is a library function layered on mq_timedsend() syscall
This info is useful for users of strace(1).
2008-09-29 05:36:48 +02:00
Michael Kerrisk e0d16ae5e7 wait4.2: wait3() is a library function layered on wait4().
On Linux wait3() is a library function implemented on top of wait4().
(Knowing this is useful when using strace(2), for example.)
2008-09-29 03:51:49 +02:00
Michael Kerrisk 986992f30d splice.2: note that SPLICE_F_MOVE is a no-op since kernel 2.6.21 2008-09-26 07:31:14 +02:00
Michael Kerrisk bf0e2b8a8e realpath.3: clarify that returned pathname is NULL terminated
Also clarify that null-byte is included in PATH_MAX limit.
2008-09-26 07:22:00 +02:00
Michael Kerrisk d0cb7cc649 grfix: s/null terminated string/null-terminated string/ 2008-09-26 07:13:25 +02:00
Michael Kerrisk f9db4400fd ctime.3: clarify mktime()'s use of tm_isdst
Describe use of tm_isdst for input to mktime();
explain how mktime() modifies this field.
(This field is left unchanged in case of error.)

Reported-by: Eugene V. Lyubimkin <jackyf.devel@gmail.com>
Debian bug 500178
2008-09-26 06:48:22 +02:00
Michael Kerrisk ef38dda012 ctime.3 Minor rewording
Clarify wording for ctime_r() and asctime_r() to indicate that
the bffer must be at least 26 *bytes*.
2008-09-26 06:05:54 +02:00
Michael Kerrisk 9ef659a9a8 ctime.3: minor rewording of mktime() description. 2008-09-26 06:02:10 +02:00
Michael Kerrisk 8fe528b35b ffix 2008-09-26 05:02:12 +02:00
Michael Kerrisk 901d59b5ce mlock.2: tweaks to Maxin John's patch 2008-09-25 11:18:08 +02:00
Michael Kerrisk 1ad3882cf8 tstamp 2008-09-25 11:11:53 +02:00
Michael Kerrisk 63e3731b2c tstamp 2008-09-25 11:11:08 +02:00
Maxin John 9fdc5b1260 mlock.2: add EAGAIN error.
Summary from mtk: recent work on mlock caused Maxin to notice that
the EAGAIN error was not documented.  KOSAKI Motohiro noted
that this behavior is longstanding.
=====
Dear Michael,

    As per the mlock(2) implementation bugfix which is present in
Linux 2.6.27-rc2 git commit,
(http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=a477097d9c37c1cf289c7f0257dffcfa42d50197),
the mlock(2) man page should be modified to reflect the latest changes
in the kernel.

See the LKML thread regarding this commit :
http://www.nabble.com/mlock()-return-value-issue-in-kernel-2.6.23.17-td18751601.html

This patch modifies the mlock(2) behaviour as per the SUSv3 specification.

[ENOMEM]
    Some or all of the address range specified by the addr and
    len arguments does not correspond to valid mapped pages
    in the address space of the process.

[EAGAIN]
    Some or all of the memory identified by the operation could not
    be locked when the call was made.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
Signed-off-by: Maxin B. John <maxin.john@ap.sony.com>

=====
From: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
To: "Maxin John" <maxin.john@gmail.com>
Subject: Re: mlock(2) man page modifications
Cc: kosaki.motohiro@jp.fujitsu.com,
        "Michael Kerrisk" <mtk.manpages@googlemail.com>, man@vger.kernel.org
Date: Thu, 25 Sep 2008 15:04:49 +0900 (JST)

Hi Maxin,

Thank you for your attention.
I think your point and your patch are right.

However, my patch is trivial regression fix, not behavior change.
An older kernel can return EAGAIN at memory stavation.
my patch has following hunk.

> +++ b/mm/mlock.c
> @@ -78,8 +78,6 @@ success:
>  
>         mm->locked_vm -= pages;
>  out:
> -       if (ret == -ENOMEM)
> -               ret = -EAGAIN;

In addition, 2.6.11 (oldest code of git repository) has following code.


static int mlock_fixup(struct vm_area_struct * vma, 
        unsigned long start, unsigned long end, unsigned int newflags)
{
(snip)
        vma->vm_mm->locked_vm -= pages;
out:
        if (ret == -ENOMEM)
                ret = -EAGAIN;
        return ret;
}


that behavior is linux mlock's behavior for long long time.

Thanks!
2008-09-25 11:09:31 +02:00
André Goddard Rosa 7b80ee9bff strcpy.3: Avoid redundantly filling the position 'n - 1' two times in strncpy() example code
When we use 'strncpy(buf, str, n)', strncpy() will fill chars from 0..(n - 1).
As we force the character at position 'n - 1' to be '\0' anyway, don't fill
it in strncpy() before.

Signed-off-by: André Goddard Rosa <andre.goddard@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2008-09-25 10:12:33 +02:00
André Goddard Rosa ed7bbec7a5 hsearch.3: Call hdestroy() after using hash table created by hcreate(), for the sake of completeness
Signed-off-by: André Goddard Rosa <andre.goddard@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2008-09-25 10:02:19 +02:00
Sam Varshavchik 9291ce36fe ffix 2008-09-25 09:50:14 +02:00
Michael Kerrisk 3fb3dc3c07 Fix line-wrapped URLs
Some long URLs were line wrapped, preventing scripts that
produce HTML versions of the changelog from turning
them into proper hyperlinks.
2008-09-24 23:40:28 +02:00
Michael Kerrisk ee2c437cd5 update .TH timestamp 2008-09-24 22:50:11 +02:00
Michael Kerrisk c8bd05f909 Add more detail about wrapper functions
Add a few more details about work generally done by wrapper
functions.  Note that syscall(2) performs the same steps.
2008-09-24 16:10:00 +02:00
Michael Kerrisk c892873d1a Delete old versions of .Announce and .lsm 2008-09-24 16:08:28 +02:00
Michael Kerrisk 6fcbd98a98 Start of man-pages-3.11: updating Changes and Changes.old 2008-09-24 15:44:24 +02:00
Michael Kerrisk f0463c342b Start of man-pages-3.11: updating .Announce and .lsm files 2008-09-24 15:44:24 +02:00
Michael Kerrisk 116227e960 Start of man-pages-3.11: renaming .Announce and .lsm files 2008-09-24 15:44:23 +02:00
Michael Kerrisk da36d65be4 Ready for 3.10 2008-09-23 15:52:08 +02:00
Michael Kerrisk 71c48553a1 Removed trailing white space at end of lines 2008-09-23 15:51:25 +02:00
Michael Kerrisk 0e22ac924e Expanded tabs 2008-09-23 15:51:17 +02:00
Michael Kerrisk 3fe44d51dd Tweak check of 'val' after tsearch() call. 2008-09-23 15:38:33 +02:00
Michael Kerrisk 12a29fd650 Remove unused sections 2008-09-23 15:06:28 +02:00