Bug 196883 - getrandom(2)/glibc: undocumented possible errno value ENOSYS
Summary: getrandom(2)/glibc: undocumented possible errno value ENOSYS
Status: RESOLVED CODE_FIX
Alias: None
Product: Documentation
Classification: Unclassified
Component: man-pages (show other bugs)
Hardware: All Linux
: P1 low
Assignee: documentation_man-pages@kernel-bugs.osdl.org
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-09-09 11:49 UTC by Fabio Scotoni
Modified: 2017-09-24 07:41 UTC (History)
1 user (show)

See Also:
Kernel Version:
Subsystem:
Regression: No
Bisected commit-id:


Attachments

Description Fabio Scotoni 2017-09-09 11:49:41 UTC
The getrandom(2) page lists various possible values for errno on failure. glibc getrandom() may additionally fail with ENOSYS if the system call does not exist (see https://sourceware.org/git/?p=glibc.git;a=blob;f=sysdeps/unix/sysv/linux/getrandom.c;h=25eb6efdd6bf0859977f7677c45575f4284488ed;hb=HEAD#l40).

I'm not sure if this constellation can actually be encountered on Linux and/or if this is so glibc-specific that documenting it in these manual pages is considered out of scope.
Comment 1 Michael Kerrisk 2017-09-24 07:29:08 UTC
Seems reasonable to add this error, and I have done so.

       ENONSYS
              The  glibc wrapper function for getrandom() determined that
              the underlying kernel does not implement this system call.

Thanks!
Comment 2 Fabio Scotoni 2017-09-24 07:37:43 UTC
*ENOSYS, you've got an extra N in the name for the errno.
Comment 3 Michael Kerrisk 2017-09-24 07:41:18 UTC
Thanks! Fixed.

Note You need to log in before you can comment on or make changes to this bug.