Skip to contentSkip to conversation

New: waitid man page does not document the 5th argument "struct rusage*"

Bug 60744 bugzilla-daemon-590EEB7GvNiWaY/[email protected] 1 participant 2 messages Aug 14, 2013 – Sep 4, 2013 1 message not in the archive Man-pages: manual pages for Linux -- Sections 2, 3, 4, 5, and 7

lore
Share & tools
lore
#0 lore raw

https://bugzilla.kernel.org/show_bug.cgi?id=60744

Bug ID: 60744
Summary: waitid man page does not document the 5th argument
"struct rusage*"
Product: Documentation
Version: unspecified
Hardware: All
OS: Linux
Status: NEW
Severity: normal
Priority: P1
Component: man-pages
Assignee: documentation_man-pages-ztI5WcYan/[email protected]
Reporter: [email protected]
Regression: No

I just spent 5 hours debugging my program and trying to figure out why the kernel overwrote my stack. I had to read the source code to realize that the real syscall took an additional 5th argument.

Wrong signature:
int waitid(idtype_t idtype, id_t id, siginfo_t *infop, int options);

Correct signature:
int waitid(idtype_t idtype, id_t id, siginfo_t *infop, int options, struct rusage* rusage);

The kernel man pages should not assume that the user is using glibc, or at least give enough information for developers to write their own, correct wrappers.

Signature · 6 lines
You are receiving this mail because:
You are watching the assignee of the bug.
--
To unsubscribe from this list: send the line "unsubscribe linux-man" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

A message that is not in the archive (sent off-list or not yet received): bug-60744-11311-3bo0kxnWaOQUvHkbgXJLS5sdmw4N0Rt+2LY78lusg7I@public.gmane.org/

#2 lore raw

[Bug 60744] waitid man page does not document the 5th argument "struct rusage*"

https://bugzilla.kernel.org/show_bug.cgi?id=60744

Michael Kerrisk <[email protected]> changed:

What |Removed |Added
----------------------------------------------------------------------------

             Status|NEW                         |RESOLVED
                 CC|                            |[email protected]
         Resolution|---                         |CODE_FIX

--- Comment #1 from Michael Kerrisk <[email protected]> --- (In reply to Hannes Landeholm from comment #0)

Quoted 7 lines

I just spent 5 hours debugging my program and trying to figure out why the kernel overwrote my stack. I had to read the source code to realize that the real syscall took an additional 5th argument.

Wrong signature:
int waitid(idtype_t idtype, id_t id, siginfo_t *infop, int options);

Quoted 7 lines

Correct signature:
int waitid(idtype_t idtype, id_t id, siginfo_t *infop, int options, struct rusage* rusage);

The kernel man pages should not assume that the user is using glibc, or at least give enough information for developers to write their own, correct wrappers.

To be precise, the page is documenting the POSIX waitid() interface (rather than glibc), but you are of course right that the page should make mention of the fifth argument. I've added some text on this.

http://git.kernel.org/cgit/docs/man-pages/man-pages.git/commit/?id=d8b13fb4d939978f02db3d49697cbccff2881a30

Cheers,

Michael

Signature · 6 lines
You are receiving this mail because:
You are watching the assignee of the bug.
--
To unsubscribe from this list: send the line "unsubscribe linux-man" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html