From ec992878e83cbafb15643e10e8101e60e2e6befc Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Wed, 23 Oct 2019 15:17:49 -0700 Subject: [PATCH] doc: revise os.md Revise os.md, mostly making it more concise. In one case, process.md was revised as well to be consistent with a revision in os.md. PR-URL: https://github.com/nodejs/node/pull/30102 Reviewed-By: Colin Ihrig Reviewed-By: Gireesh Punathil Reviewed-By: Trivikram Kamat Reviewed-By: James M Snell --- doc/api/os.md | 202 +++++++++++++++------------------------------ doc/api/process.md | 8 +- 2 files changed, 68 insertions(+), 142 deletions(-) diff --git a/doc/api/os.md b/doc/api/os.md index 75a08dcfbfe087..b7eccda6786897 100644 --- a/doc/api/os.md +++ b/doc/api/os.md @@ -4,8 +4,8 @@ > Stability: 2 - Stable -The `os` module provides operating system-related utility methods. It can be -accessed using: +The `os` module provides operating system-related utility methods and +properties. It can be accessed using: ```js const os = require('os'); @@ -18,7 +18,7 @@ added: v0.7.8 * {string} -A string constant defining the operating system-specific end-of-line marker: +The operating system-specific end-of-line marker. * `\n` on POSIX * `\r\n` on Windows @@ -30,13 +30,11 @@ added: v0.5.0 * Returns: {string} -The `os.arch()` method returns a string identifying the operating system CPU -architecture for which the Node.js binary was compiled. - -The current possible values are: `'arm'`, `'arm64'`, `'ia32'`, `'mips'`, +Returns the operating system CPU architecture for which the Node.js binary was +compiled. Possible values are `'arm'`, `'arm64'`, `'ia32'`, `'mips'`, `'mipsel'`, `'ppc'`, `'ppc64'`, `'s390'`, `'s390x'`, `'x32'`, and `'x64'`. -Equivalent to [`process.arch`][]. +The return value is equivalent to [`process.arch`][]. ## os.constants -The following signal constants are exported by `os.constants.signals`: +The following signal constants are exported by `os.constants.signals`. @@ -640,7 +568,7 @@ The following signal constants are exported by `os.constants.signals`: ### Error Constants -The following error constants are exported by `os.constants.errno`: +The following error constants are exported by `os.constants.errno`. #### POSIX Error Constants @@ -672,7 +600,7 @@ The following error constants are exported by `os.constants.errno`: - @@ -903,8 +831,8 @@ The following error constants are exported by `os.constants.errno`: - @@ -976,7 +904,7 @@ The following error constants are exported by `os.constants.errno`: #### Windows Specific Error Constants -The following error codes are specific to the Windows operating system: +The following error codes are specific to the Windows operating system.
EAGAINIndicates that there is currently no data available and to try the + Indicates that there is no data available and to try the operation again later.
EOPNOTSUPPIndicates that an operation is not supported on the socket. Note that - while ENOTSUP and EOPNOTSUPP have the same value + Indicates that an operation is not supported on the socket. Although + ENOTSUP and EOPNOTSUPP have the same value on Linux, according to POSIX.1 these error values should be distinct.)
@@ -1262,7 +1190,7 @@ added: v10.10.0 --> The following process scheduling constants are exported by -`os.constants.priority`: +`os.constants.priority`.
diff --git a/doc/api/process.md b/doc/api/process.md index 7f4a129f0493e3..dd1ecba98e6809 100644 --- a/doc/api/process.md +++ b/doc/api/process.md @@ -551,11 +551,9 @@ added: v0.5.0 * {string} -The `process.arch` property returns a string identifying the operating system -CPU architecture for which the Node.js binary was compiled. - -The current possible values are: `'arm'`, `'arm64'`, `'ia32'`, `'mips'`, -`'mipsel'`, `'ppc'`, `'ppc64'`, `'s390'`, `'s390x'`, `'x32'`, and `'x64'`. +The operating system CPU architecture for which the Node.js binary was compiled. +Possible values are: `'arm'`, `'arm64'`, `'ia32'`, `'mips'`,`'mipsel'`, `'ppc'`, +`'ppc64'`, `'s390'`, `'s390x'`, `'x32'`, and `'x64'`. ```js console.log(`This processor architecture is ${process.arch}`);