diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-17 10:51:52 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-17 10:51:52 +0000 |
commit | 4ad94864781f48b1a4b77f9cfb934622bf756ba1 (patch) | |
tree | 3900955c1886e6d2570fea7125ee1f01bafe876d /upstream/opensuse-tumbleweed/man2/getrandom.2 | |
parent | Adding upstream version 4.22.0. (diff) | |
download | manpages-l10n-4ad94864781f48b1a4b77f9cfb934622bf756ba1.tar.xz manpages-l10n-4ad94864781f48b1a4b77f9cfb934622bf756ba1.zip |
Adding upstream version 4.23.0.upstream/4.23.0
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'upstream/opensuse-tumbleweed/man2/getrandom.2')
-rw-r--r-- | upstream/opensuse-tumbleweed/man2/getrandom.2 | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/upstream/opensuse-tumbleweed/man2/getrandom.2 b/upstream/opensuse-tumbleweed/man2/getrandom.2 index 565763b3..fb96cf25 100644 --- a/upstream/opensuse-tumbleweed/man2/getrandom.2 +++ b/upstream/opensuse-tumbleweed/man2/getrandom.2 @@ -4,7 +4,7 @@ .\" .\" SPDX-License-Identifier: Linux-man-pages-copyleft .\" -.TH getrandom 2 2023-03-30 "Linux man-pages 6.05.01" +.TH getrandom 2 2024-05-02 "Linux man-pages (unreleased)" .SH NAME getrandom \- obtain a series of random bytes .SH LIBRARY @@ -13,7 +13,7 @@ Standard C library .SH SYNOPSIS .nf .B #include <sys/random.h> -.PP +.P .BI "ssize_t getrandom(void " buf [. buflen "], size_t " buflen ", \ unsigned int " flags ); .fi @@ -27,7 +27,7 @@ with up to random bytes. These bytes can be used to seed user-space random number generators or for cryptographic purposes. -.PP +.P By default, .BR getrandom () draws entropy from the @@ -38,7 +38,7 @@ device). This behavior can be changed via the .I flags argument. -.PP +.P If the .I urandom source has been initialized, @@ -48,7 +48,7 @@ No such guarantees apply for larger buffer sizes. For example, if the call is interrupted by a signal handler, it may return a partially filled buffer, or fail with the error .BR EINTR . -.PP +.P If the .I urandom source has not yet been initialized, then @@ -57,7 +57,7 @@ will block, unless .B GRND_NONBLOCK is specified in .IR flags . -.PP +.P The .I flags argument is a bit mask that can contain zero or more of the following values @@ -119,7 +119,7 @@ was specified in and insufficient entropy was present in the .I random source or the system call was interrupted by a signal. -.PP +.P On error, \-1 is returned, and .I errno is set to indicate the error. @@ -164,7 +164,7 @@ glibc 2.25. For an overview and comparison of the various interfaces that can be used to obtain randomness, see .BR random (7). -.PP +.P Unlike .I /dev/random and @@ -222,7 +222,7 @@ will block until some random bytes become available (unless the .B GRND_NONBLOCK flag was specified). -.PP +.P The behavior when a call to .BR getrandom () that is blocked while reading from the @@ -247,26 +247,26 @@ then will not fail with .BR EINTR . Instead, it will return all of the bytes that have been requested. -.PP +.P When reading from the .I random source, blocking requests of any size can be interrupted by a signal handler (the call fails with the error .BR EINTR ). -.PP +.P Using .BR getrandom () to read small buffers (<=\ 256 bytes) from the .I urandom source is the preferred mode of usage. -.PP +.P The special treatment of small values of .I buflen was designed for compatibility with OpenBSD's .BR getentropy (3), which is nowadays supported by glibc. -.PP +.P The user of .BR getrandom () .I must |