-#~ msgid "2013-12-12"
-#~ msgstr "2013-12-12"
-
-#~ msgid "2010-09-10"
-#~ msgstr "2010-09-10"
-
-#~ msgid ""
-#~ "B<system>() executes a command specified in I<command> by calling B</bin/"
-#~ "sh -c> I<command>, and returns after the command has been completed. "
-#~ "During execution of the command, B<SIGCHLD> will be blocked, and "
-#~ "B<SIGINT> and B<SIGQUIT> will be ignored."
-#~ msgstr ""
-#~ "B<system>() は I<command> で指定したコマンドを B</bin/sh -c> I<command> "
-#~ "の形で実行する。指定したコマンドが終了すればこの関数も終了する。 コマンド"
-#~ "実行中は、 B<SIGCHLD> はブロックされ、 B<SIGINT> と B<SIGQUIT> は無視され"
-#~ "る。"
-
-#~ msgid ""
-#~ "The value returned is -1 on error (e.g., B<fork>(2) failed), and the "
-#~ "return status of the command otherwise. This latter return status is in "
-#~ "the format specified in B<wait>(2). Thus, the exit code of the command "
-#~ "will be I<WEXITSTATUS(status)>. In case I</bin/sh> could not be "
-#~ "executed, the exit status will be that of a command that does "
-#~ "I<exit(127)>."
-#~ msgstr ""
-#~ "エラーが発生した場合 (B<fork>(2) に失敗した場合など)、-1 を返す。 そうで"
-#~ "なければ、コマンドのステータスを返す。 後者の場合、ステータスは "
-#~ "B<wait>(2) で定義されているフォーマットで返ってくる。 従って、コマンドの"
-#~ "終了コードは I<WEXITSTATUS(status)> で得ることが出来る。 I</bin/sh> が実行"
-#~ "出来なかった場合、 終了ステータスはコマンドが I<exit(127)> を実行した場合"
-#~ "と同じになる。"
-
-#~ msgid ""
-#~ "It is possible for the shell command to return 127, so that code is not a "
-#~ "sure indication that the B<execve>(2) call failed."
-#~ msgstr ""
-#~ "実行したシェルコマンドが 127 (B</bin/sh> の呼び出しに失敗した時に返す値) "
-#~ "を返すことも考えられる。 そのため、プログラムは (リターンコードを見るだけ"
-#~ "では) B<execve>(2) の呼び出しが失敗したことを確実に知ることはできない。"
-
-#~ msgid "2014-01-11"
-#~ msgstr "2014-01-11"
-
-#~ msgid ""
-#~ "The B<mkostemp>() function is like B<mkstemp>(), with the difference "
-#~ "that flags as for B<open>(2) may be specified in I<flags> (e.g., "
-#~ "B<O_APPEND>, B<O_SYNC>)."
-#~ msgstr ""
-#~ "B<mkostemp>() 関数は B<mkstemp>() と同様だが、B<open>(2) に渡される\n"
-#~ "フラグ O_APPENDB<,> B<O_SYNC> など) を I<flags> で指定できる点が異なる"
-
-#~ msgid ""
-#~ "This function is not multithread safe. The function B<wcrtomb>(3) "
-#~ "provides a better interface to the same functionality."
-#~ msgstr ""
-#~ "この関数はマルチスレッドでは安全ではない。 B<wcrtomb>(3) 関数は 同じ機能"
-#~ "のより良いインターフェースを提供する。"
-
-#~ msgid ""
-#~ "The B<putenv>() function returns zero on success, or nonzero if an error "
-#~ "occurs."
-#~ msgstr ""
-#~ "B<putenv>() 関数は、成功した場合 0 を、 エラーが発生した場合 0 以外を返"
-#~ "す。"
-
-#~ msgid ""
-#~ "The B<random>() function returns a value between 0 and B<RAND_MAX>. The "
-#~ "B<srandom>() function returns no value. The B<initstate>() function "
-#~ "returns a pointer to the previous state array. The B<setstate>() "
-#~ "function returns a pointer to the previous state array, or NULL on error."
-#~ msgstr ""
-#~ "B<random>() 関数は 0 と B<RAND_MAX> の間の値を返す。 B<srandom>() 関数は"
-#~ "値を返さない。 B<initstate>() 関数は直前の状態配列へのポインタを返す。 "
-#~ "B<setstate>() 関数は直前の状態配列へのポインタを返し、 エラーの場合は "
-#~ "NULL を返す。"
-
-#~ msgid "All of these functions return 0 on success, or -1 on error."
-#~ msgstr "これらの関数は、成功すると 0 を返し、 エラーの場合は -1 を返す。"
-
-#~ msgid ""
-#~ "In locales other than the \"C\" locale, other strings may also be "
-#~ "accepted. (For example, the thousands separator of the current locale "
-#~ "may be supported.)"
-#~ msgstr ""
-#~ "\"C\" 以外のロケールの場合、その他の文字列も受け付けられるかもしれない。 "
-#~ "(例えば、現在のロケールの 1000 毎の区切り文字がサポートされているかもしれ"
-#~ "ない。)"
-
-#~ msgid ""
-#~ "Recent versions of Linux libc (later than 5.4.23) and glibc (2.x) "
-#~ "include a B<malloc>() implementation which is tunable via environment "
-#~ "variables. When B<MALLOC_CHECK_> is set, a special (less efficient) "
-#~ "implementation is used which is designed to be tolerant against simple "
-#~ "errors, such as double calls of B<free>() with the same argument, or "
-#~ "overruns of a single byte (off-by-one bugs). Not all such errors can be "
-#~ "protected against, however, and memory leaks can result. If "
-#~ "B<MALLOC_CHECK_> is set to 0, any detected heap corruption is silently "
-#~ "ignored; if set to 1, a diagnostic message is printed on I<stderr>; if "
-#~ "set to 2, B<abort>(3) is called immediately; if set to 3, a diagnostic "
-#~ "message is printed on I<stderr> and the program is aborted. Using a "
-#~ "nonzero B<MALLOC_CHECK_> value can be useful because otherwise a crash "
-#~ "may happen much later, and the true cause for the problem is then very "
-#~ "hard to track down."
-#~ msgstr ""
-#~ "最近のバージョンの Linux libc (5.4.23 以降) と glibc (2.x) では、 "
-#~ "B<malloc>() の動作を環境変数によって制御できるような実装がされている。 "
-#~ "B<MALLOC_CHECK_> が設定されていると、特殊な実装が用いられ、 単純なエラーに"
-#~ "は耐えることができるようになる (効率は悪くなる)。例えば、 B<free>() を同"
-#~ "じ引き数で二度呼び出してしまう、 1 バイトだけ行きすぎてしまう (off-by-one "
-#~ "バグ) などがこれに当たる。 しかし、これらのエラーの全てを防ぐことができる"
-#~ "わけではなく、 その場合にはメモリリークが起こってしまう。 "
-#~ "B<MALLOC_CHECK_> が 0 にセットされていると、ヒープの破壊を黙って無視す"
-#~ "る。 1 にセットされていると、診断メッセージが標準エラー出力に表示される。 "
-#~ "2 にセットされていると、ただちに B<abort>(3) が呼び出される。 3 にセット"
-#~ "されていると、診断メッセージが標準エラー出力に表示され、 プログラムは強制"
-#~ "終了 (abort) される。 B<MALLOC_CHECK_> に 0 以外の値をセットして役に立つ状"
-#~ "況としては、 実際のプロセスのクラッシュがずっと後に起こり、 本当の原因を探"
-#~ "し出すのが非常に困難な場合などが挙げられるだろう。"
+#. type: TH
+#: build/C/man2/getrandom.2:27
+#, fuzzy, no-wrap
+#| msgid "RANDOM"
+msgid "GETRANDOM"
+msgstr "RANDOM"
+
+#. type: Plain text
+#: build/C/man2/getrandom.2:30
+msgid "getrandom - obtain a series of random bytes"
+msgstr ""
+
+#. type: Plain text
+#: build/C/man2/getrandom.2:32
+#, fuzzy
+#| msgid "B<#include E<lt>unistd.hE<gt>>"
+msgid "B<#include E<lt>linux/random.hE<gt>>"
+msgstr "B<#include E<lt>unistd.hE<gt>>"
+
+#. type: Plain text
+#: build/C/man2/getrandom.2:34
+#, fuzzy
+#| msgid ""
+#| "B<int mkostemps(char *>I<template>B<, int >I<suffixlen>B<, int "
+#| ">I<flags>B<);>\n"
+msgid ""
+"B<int getrandom(void *>I<buf>B<, size_t >I<buflen>B<, unsigned int "
+">I<flags>B<);>"
+msgstr ""
+"B<int mkostemps(char *>I<template>B<, int >I<suffixlen>B<, int >I<flags>B<);"
+">\n"
+
+#. type: Plain text
+#: build/C/man2/getrandom.2:44
+msgid ""
+"The B<getrandom>() system call fills the buffer pointed to by I<buf> with "
+"up to I<buflen> random bytes. These bytes can be used to seed user-space "
+"random number generators or for cryptographic purposes."
+msgstr ""
+
+#. type: Plain text
+#: build/C/man2/getrandom.2:58
+msgid ""
+"B<getrandom>() relies on entropy gathered from device drivers and other "
+"sources of environmental noise. Unnecessarily reading large quantities of "
+"data will have a negative impact on other users of the I</dev/random> and I</"
+"dev/urandom> devices. Therefore, B<getrandom>() should not be used for "
+"Monte Carlo simulations or other programs/algorithms which are doing "
+"probabilistic sampling."
+msgstr ""
+
+#. type: Plain text
+#: build/C/man2/getrandom.2:80
+msgid ""
+"By default, B<getrandom>() draws entropy from the I</dev/urandom> pool. "
+"This behavior can be changed via the I<flags> argument. If the I</dev/"
+"urandom> pool has been initialized, reads of up to 256 bytes will always "
+"return as many bytes as requested and will not be interrupted by signals. "
+"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 B<EINTR>. If the pool has not yet been initialized, "
+"then the call blocks, unless B<GRND_RANDOM> is specified in I<flags>."
+msgstr ""
+
+#. type: Plain text
+#: build/C/man2/getrandom.2:85
+msgid ""
+"The I<flags> argument is a bit mask that can contain zero or more of the "
+"following values ORed together:"
+msgstr ""
+
+#. type: TP
+#: build/C/man2/getrandom.2:85
+#, fuzzy, no-wrap
+#| msgid "B<AT_RANDOM>"
+msgid "B<GRND_RANDOM>"
+msgstr "B<AT_RANDOM>"
+
+#. type: Plain text
+#: build/C/man2/getrandom.2:106
+msgid ""
+"If this bit is set, then random bytes are drawn from the I</dev/random> pool "
+"instead of the I</dev/urandom> pool. The I</dev/random> pool is limited "
+"based on the entropy that can be obtained from environmental noise. If the "
+"number of available bytes in I</dev/random> is less than requested in "
+"I<buflen>, the call returns just the available random bytes. If no random "
+"bytes are available, the behavior depends on the presence of "
+"B<GRND_NONBLOCK> in the I<flags> argument."
+msgstr ""
+
+#. type: TP
+#: build/C/man2/getrandom.2:106
+#, no-wrap
+msgid "B<GRND_NONBLOCK>"
+msgstr ""
+
+#. type: Plain text
+#: build/C/man2/getrandom.2:123
+msgid ""
+"By default, when reading from I</dev/random>, B<getrandom>() blocks if no "
+"random bytes are available, and when reading from I</dev/urandom>, it blocks "
+"if the entropy pool has not yet been initialized. If the B<GRND_NONBLOCK> "
+"flag is set, then B<getrandom>() does not block in these cases, but instead "
+"immediately returns -1 with I<errno> set to B<EAGAIN>."
+msgstr ""
+
+#. type: Plain text
+#: build/C/man2/getrandom.2:137
+msgid ""
+"On success, B<getrandom>() returns the number of bytes that were copied to "
+"the buffer I<buf>. This may be less than the number of bytes requested via "
+"I<buflen> if B<GRND_RANDOM> was specified in I<flags> and insufficient "
+"entropy was present in the I</dev/random> pool, or if the system call was "
+"interrupted by a signal."
+msgstr ""
+
+#. type: Plain text
+#: build/C/man2/getrandom.2:141
+#, fuzzy
+#| msgid ""
+#| "On success, these functions return the file descriptor of the temporary "
+#| "file. On error, -1 is returned, and I<errno> is set appropriately."
+msgid "On error, -1 is returned, and I<errno> is set appropriately."
+msgstr ""
+"成功すると、これらの関数は一時ファイルのファイルディスクリプターを返す。 エ"
+"ラーの場合は、-1 を返し、 I<errno> を適切に設定する。"
+
+#. type: Plain text
+#: build/C/man2/getrandom.2:146
+msgid "An invalid flag was specified in I<flags>."
+msgstr ""
+
+#. type: TP
+#: build/C/man2/getrandom.2:146
+#, no-wrap
+msgid "B<EFAULT>"
+msgstr ""
+
+#. type: Plain text
+#: build/C/man2/getrandom.2:151
+msgid ""
+"The address referred to by I<buf> is outside the accessible address space."
+msgstr ""
+
+#. type: TP
+#: build/C/man2/getrandom.2:151
+#, no-wrap
+msgid "B<EAGAIN>"
+msgstr ""
+
+#. type: Plain text
+#: build/C/man2/getrandom.2:158
+msgid ""
+"The requested entropy was not available, and B<getrandom>() would have "
+"blocked if the B<GRND_NONBLOCK> flag was not set."
+msgstr ""
+
+#. type: TP
+#: build/C/man2/getrandom.2:158
+#, fuzzy, no-wrap
+#| msgid "B<EINVAL>"
+msgid "B<EINTR>"
+msgstr "B<EINVAL>"
+
+#. type: Plain text
+#: build/C/man2/getrandom.2:168
+msgid ""
+"The call was interrupted by a signal handler; see the description of how "
+"interrupted B<read>(2) calls on \"slow\" devices are handled with and "
+"without the B<SA_RESTART> flag in the B<signal>(7) man page."
+msgstr ""
+
+#. type: Plain text
+#: build/C/man2/getrandom.2:171
+msgid "B<getrandom>() was introduced in version 3.17 of the Linux kernel."
+msgstr ""
+
+#. type: Plain text
+#: build/C/man2/getrandom.2:173
+msgid "This system call is Linux-specific."
+msgstr ""
+
+#. type: SS
+#: build/C/man2/getrandom.2:174
+#, no-wrap
+msgid "Maximum number of bytes returned"
+msgstr ""
+
+#. type: Plain text
+#: build/C/man2/getrandom.2:176
+msgid "As of Linux 3.19 the following limits apply:"
+msgstr ""
+
+#. type: Plain text
+#: build/C/man2/getrandom.2:184
+msgid ""
+"When reading from I</dev/urandom>, a maximum of 33554431 bytes is returned "
+"by a single call to B<getrandom>() on a system where I<int> has a size of "
+"32 bits."
+msgstr ""
+
+#. type: Plain text
+#: build/C/man2/getrandom.2:188
+msgid "When reading from I</dev/random>, a maximum of 512 bytes is returned."
+msgstr ""
+
+#. type: SS
+#: build/C/man2/getrandom.2:188
+#, no-wrap
+msgid "Initialization of the entropy pool"
+msgstr ""
+
+#. type: Plain text
+#: build/C/man2/getrandom.2:194
+msgid ""
+"The kernel collects bits of entropy from environment. When a sufficient "
+"number of random bits has been collected, the I</dev/urandom> entropy pool "
+"is considered to be initialized. This state is normally reached early in "
+"the system bootstrap phase."
+msgstr ""
+
+#. type: SS
+#: build/C/man2/getrandom.2:194
+#, no-wrap
+msgid "Interruption by a signal handler"
+msgstr ""
+
+#. type: Plain text
+#: build/C/man2/getrandom.2:218
+msgid ""
+"When reading from I</dev/urandom> (B<GRND_RANDOM> is not set), "
+"B<getrandom>() will block until the entropy pool has been initialized "
+"(unless the B<GRND_NONBLOCK> flag was specified). If a request is made to "
+"read a large number (more than 256) of bytes, B<getrandom>() will block "
+"until those bytes have been generated and transferred from kernel memory to "
+"I<buf>. When reading from I</dev/random> (B<GRND_RANDOM> is set), "
+"B<getrandom>() will block until some random bytes become available (unless "
+"the B<GRND_NONBLOCK> flag was specified)."
+msgstr ""
+
+#. type: Plain text
+#: build/C/man2/getrandom.2:243
+msgid ""
+"The behavior when a call to B<getrandom>() that is blocked while reading "
+"from I</dev/urandom> is interrupted by a signal handler depends on the "
+"initialization state of the entropy buffer and on the request size, "
+"I<buflen>. If the entropy is not yet initialized, then the call will fail "
+"with the B<EINTR> error. If the entropy pool has been initialized and the "
+"request size is large (I<buflen>\\ E<gt>\\ 256), the call either succeeds, "
+"returning a partially filled buffer, or fails with the error B<EINTR.> If "
+"the entropy pool has been initialized and the request size is small "
+"(I<buflen>\\ E<lt>=\\ 256), then B<getrandom>() will not fail with "
+"B<EINTR>. Instead, it will return all of the bytes that have been requested."
+msgstr ""
+
+#. type: Plain text
+#: build/C/man2/getrandom.2:249
+msgid ""
+"When reading from I</dev/random>, blocking requests of any size can be "
+"interrupted by a signal (the call fails with the error B<EINTR>)."
+msgstr ""
+
+#. type: Plain text
+#: build/C/man2/getrandom.2:257
+msgid ""
+"Calling B<getrandom>() to read I</dev/urandom> for small values (E<lt>=\\ "
+"256) of I<buflen> is the preferred mode of usage."
+msgstr ""
+
+#. type: Plain text
+#: build/C/man2/getrandom.2:264
+msgid ""
+"The special treatment of small values of I<buflen> was designed for "
+"compatibility with OpenBSD's B<getentropy>() system call."
+msgstr ""
+
+#. type: Plain text
+#: build/C/man2/getrandom.2:278
+msgid ""
+"The user of B<getrandom>() I<must> always check the return value, to "
+"determine whether either an error occurred or fewer bytes than requested "
+"were returned. In the case where B<GRND_RANDOM> is not specified and "
+"I<buflen> is less than or equal to 256, a return of fewer bytes than "
+"requested should never happen, but the careful programmer will check for "
+"this anyway!"
+msgstr ""
+
+#. type: SS
+#: build/C/man2/getrandom.2:278
+#, no-wrap
+msgid "Choice of random device"
+msgstr ""
+
+#. type: Plain text
+#: build/C/man2/getrandom.2:293
+msgid ""
+"Unless you are doing long-term key generation (and perhaps not even then), "
+"you probably shouldn't be using B<GRND_RANDOM.> The cryptographic algorithms "
+"used for I</dev/urandom> are quite conservative, and so should be sufficient "
+"for all purposes. The disadvantage of B<GRND_RANDOM> is that it can block. "
+"Furthermore, dealing with the partially fulfilled B<getrandom>() requests "
+"that can occur when using B<GRND_RANDOM> increases code complexity."
+msgstr ""
+
+#. type: SS
+#: build/C/man2/getrandom.2:293
+#, no-wrap
+msgid "Emulating OpenBSD's getentropy()"
+msgstr ""
+
+#. type: Plain text
+#: build/C/man2/getrandom.2:298
+msgid ""
+"The B<getentropy>() system call in OpenBSD can be emulated using the "
+"following function:"
+msgstr ""
+
+#. type: Plain text
+#: build/C/man2/getrandom.2:305
+#, no-wrap
+msgid ""
+"int\n"
+"getentropy(void *buf, size_t buflen)\n"
+"{\n"
+" int ret;\n"
+msgstr ""
+
+#. type: Plain text
+#: build/C/man2/getrandom.2:317
+#, no-wrap
+msgid ""
+" if (buflen E<gt> 256)\n"
+" goto failure;\n"
+" ret = getrandom(buf, buflen, 0);\n"
+" if (ret E<lt> 0)\n"
+" return ret;\n"
+" if (ret == buflen)\n"
+" return 0;\n"
+"failure:\n"
+" errno = EIO;\n"
+" return -1;\n"
+"}\n"
+msgstr ""
+
+#. FIXME patch proposed https://lkml.org/lkml/2014/11/29/16
+#. type: Plain text
+#: build/C/man2/getrandom.2:322
+msgid "As of Linux 3.19, the following bug exists:"
+msgstr ""
+
+#. type: Plain text
+#: build/C/man2/getrandom.2:326
+msgid ""
+"Depending on CPU load, B<getrandom>() does not react to interrupts before "
+"reading all bytes requested."
+msgstr ""
+
+#. type: Plain text
+#: build/C/man2/getrandom.2:330
+#, fuzzy
+#| msgid "B<drand48>(3), B<rand>(3), B<random>(3)"
+msgid "B<random>(4), B<urandom>(4), B<signal>(7)"
+msgstr "B<drand48>(3), B<rand>(3), B<random>(3)"