From e04ee9b37a73ca86a91668f32327f16b3a04c236 Mon Sep 17 00:00:00 2001 From: cjihrig Date: Sat, 6 Jul 2019 09:49:58 -0400 Subject: [PATCH] doc: format Unix consistently Update the API docs to always spell as Unix. PR-URL: https://github.com/nodejs/node/pull/28576 Reviewed-By: Ben Noordhuis Reviewed-By: Luigi Pinca Reviewed-By: Gireesh Punathil Reviewed-By: Rich Trott Reviewed-By: Anna Henningsen Reviewed-By: Ruben Bridgewater Reviewed-By: Michael Dawson --- doc/api/child_process.md | 16 ++++++++-------- doc/api/cluster.md | 2 +- doc/api/fs.md | 2 +- doc/api/net.md | 20 ++++++++++---------- doc/api/os.md | 4 ++-- doc/api/tls.md | 2 +- 6 files changed, 23 insertions(+), 23 deletions(-) diff --git a/doc/api/child_process.md b/doc/api/child_process.md index 3dc855f604bf76..c822864c657758 100644 --- a/doc/api/child_process.md +++ b/doc/api/child_process.md @@ -146,7 +146,7 @@ changes: * `encoding` {string} **Default:** `'utf8'` * `shell` {string} Shell to execute the command with. See [Shell Requirements][] and [Default Windows Shell][]. **Default:** - `'/bin/sh'` on UNIX, `process.env.ComSpec` on Windows. + `'/bin/sh'` on Unix, `process.env.ComSpec` on Windows. * `timeout` {number} **Default:** `0` * `maxBuffer` {number} Largest amount of data in bytes allowed on stdout or stderr. If exceeded, the child process is terminated and any output is @@ -260,7 +260,7 @@ changes: * `windowsVerbatimArguments` {boolean} No quoting or escaping of arguments is done on Windows. Ignored on Unix. **Default:** `false`. * `shell` {boolean|string} If `true`, runs `command` inside of a shell. Uses - `'/bin/sh'` on UNIX, and `process.env.ComSpec` on Windows. A different + `'/bin/sh'` on Unix, and `process.env.ComSpec` on Windows. A different shell can be specified as a string. See [Shell Requirements][] and [Default Windows Shell][]. **Default:** `false` (no shell). * `callback` {Function} Called with the output when process terminates. @@ -411,7 +411,7 @@ changes: * `uid` {number} Sets the user identity of the process (see setuid(2)). * `gid` {number} Sets the group identity of the process (see setgid(2)). * `shell` {boolean|string} If `true`, runs `command` inside of a shell. Uses - `'/bin/sh'` on UNIX, and `process.env.ComSpec` on Windows. A different + `'/bin/sh'` on Unix, and `process.env.ComSpec` on Windows. A different shell can be specified as a string. See [Shell Requirements][] and [Default Windows Shell][]. **Default:** `false` (no shell). * `windowsVerbatimArguments` {boolean} No quoting or escaping of arguments is @@ -666,7 +666,7 @@ child registers an event handler for the [`'disconnect'`][] event or the [`'message'`][] event. This allows the child to exit normally without the process being held open by the open IPC channel.* -On UNIX-like operating systems, the [`child_process.spawn()`][] method +On Unix-like operating systems, the [`child_process.spawn()`][] method performs memory operations synchronously before decoupling the event loop from the child. Applications with a large memory footprint may find frequent [`child_process.spawn()`][] calls to be a bottleneck. For more information, @@ -729,7 +729,7 @@ changes: * `windowsHide` {boolean} Hide the subprocess console window that would normally be created on Windows systems. **Default:** `false`. * `shell` {boolean|string} If `true`, runs `command` inside of a shell. Uses - `'/bin/sh'` on UNIX, and `process.env.ComSpec` on Windows. A different + `'/bin/sh'` on Unix, and `process.env.ComSpec` on Windows. A different shell can be specified as a string. See [Shell Requirements][] and [Default Windows Shell][]. **Default:** `false` (no shell). * Returns: {Buffer|string} The stdout from the command. @@ -780,7 +780,7 @@ changes: * `env` {Object} Environment key-value pairs. * `shell` {string} Shell to execute the command with. See [Shell Requirements][] and [Default Windows Shell][]. **Default:** - `'/bin/sh'` on UNIX, `process.env.ComSpec` on Windows. + `'/bin/sh'` on Unix, `process.env.ComSpec` on Windows. * `uid` {number} Sets the user identity of the process. (See setuid(2)). * `gid` {number} Sets the group identity of the process. (See setgid(2)). * `timeout` {number} In milliseconds the maximum amount of time the process @@ -858,7 +858,7 @@ changes: * `encoding` {string} The encoding used for all stdio inputs and outputs. **Default:** `'buffer'`. * `shell` {boolean|string} If `true`, runs `command` inside of a shell. Uses - `'/bin/sh'` on UNIX, and `process.env.ComSpec` on Windows. A different + `'/bin/sh'` on Unix, and `process.env.ComSpec` on Windows. A different shell can be specified as a string. See [Shell Requirements][] and [Default Windows Shell][]. **Default:** `false` (no shell). * `windowsVerbatimArguments` {boolean} No quoting or escaping of arguments is @@ -1255,7 +1255,7 @@ can be handled by the parent and some by the child. While the example above uses a server created using the `net` module, `dgram` module servers use exactly the same workflow with the exceptions of listening on a `'message'` event instead of `'connection'` and using `server.bind()` instead -of `server.listen()`. This is, however, currently only supported on UNIX +of `server.listen()`. This is, however, currently only supported on Unix platforms. #### Example: sending a socket object diff --git a/doc/api/cluster.md b/doc/api/cluster.md index 83a541d6554b13..8036f82e797617 100644 --- a/doc/api/cluster.md +++ b/doc/api/cluster.md @@ -589,7 +589,7 @@ The `addressType` is one of: * `4` (TCPv4) * `6` (TCPv6) -* `-1` (unix domain socket) +* `-1` (Unix domain socket) * `'udp4'` or `'udp6'` (UDP v4 or v6) ## Event: 'message' diff --git a/doc/api/fs.md b/doc/api/fs.md index 3834131d8d28f9..c369a579e27729 100644 --- a/doc/api/fs.md +++ b/doc/api/fs.md @@ -847,7 +847,7 @@ The times in the stat object have the following semantics: * `birthtime` "Birth Time" - Time of file creation. Set once when the file is created. On filesystems where birthtime is not available, this field may instead hold either the `ctime` or - `1970-01-01T00:00Z` (ie, unix epoch timestamp `0`). This value may be greater + `1970-01-01T00:00Z` (ie, Unix epoch timestamp `0`). This value may be greater than `atime` or `mtime` in this case. On Darwin and other FreeBSD variants, also set if the `atime` is explicitly set to an earlier value than the current `birthtime` using the utimes(2) system call. diff --git a/doc/api/net.md b/doc/api/net.md index f1134c0492dedc..396cad36ab18dd 100644 --- a/doc/api/net.md +++ b/doc/api/net.md @@ -17,7 +17,7 @@ const net = require('net'); ## IPC Support -The `net` module supports IPC with named pipes on Windows, and UNIX domain +The `net` module supports IPC with named pipes on Windows, and Unix domain sockets on other operating systems. ### Identifying paths for IPC connections @@ -25,18 +25,18 @@ sockets on other operating systems. [`net.connect()`][], [`net.createConnection()`][], [`server.listen()`][] and [`socket.connect()`][] take a `path` parameter to identify IPC endpoints. -On UNIX, the local domain is also known as the UNIX domain. The path is a +On Unix, the local domain is also known as the Unix domain. The path is a filesystem pathname. It gets truncated to `sizeof(sockaddr_un.sun_path) - 1`, which varies on different operating system between 91 and 107 bytes. The typical values are 107 on Linux and 103 on macOS. The path is subject to the same naming conventions and permissions checks as would be done -on file creation. If the UNIX domain socket (that is visible as a file system +on file creation. If the Unix domain socket (that is visible as a file system path) is created and used in conjunction with one of Node.js' API abstractions such as [`net.createServer()`][], it will be unlinked as part of [`server.close()`][]. On the other hand, if it is created and used outside of these abstractions, the user will need to manually remove it. The same applies when the path was created by a Node.js API but the program crashes abruptly. -In short, a UNIX domain socket once successfully created will be visible in the +In short, a Unix domain socket once successfully created will be visible in the filesystem, and will persist until unlinked. On Windows, the local domain is implemented using a named pipe. The path *must* @@ -44,7 +44,7 @@ refer to an entry in `\\?\pipe\` or `\\.\pipe\`. Any characters are permitted, but the latter may do some processing of pipe names, such as resolving `..` sequences. Despite how it might look, the pipe namespace is flat. Pipes will *not persist*. They are removed when the last reference to them is closed. -Unlike UNIX domain sockets, Windows will close and remove the pipe when the +Unlike Unix domain sockets, Windows will close and remove the pipe when the owning process exits. JavaScript string escaping requires paths to be specified with extra backslash @@ -121,7 +121,7 @@ as reported by the operating system if listening on an IP socket (useful to find which port was assigned when getting an OS-assigned address): `{ port: 12346, family: 'IPv4', address: '127.0.0.1' }`. -For a server listening on a pipe or UNIX domain socket, the name is returned +For a server listening on a pipe or Unix domain socket, the name is returned as a string. ```js @@ -241,7 +241,7 @@ added: v0.5.10 * Returns: {net.Server} Start a server listening for connections on a given `handle` that has -already been bound to a port, a UNIX domain socket, or a Windows named pipe. +already been bound to a port, a Unix domain socket, or a Windows named pipe. The `handle` object can be either a server, a socket (anything with an underlying `_handle` member), or an object with an `fd` member that is a @@ -385,7 +385,7 @@ added: v0.3.4 --> This class is an abstraction of a TCP socket or a streaming [IPC][] endpoint -(uses named pipes on Windows, and UNIX domain sockets otherwise). A +(uses named pipes on Windows, and Unix domain sockets otherwise). A `net.Socket` is also a [duplex stream][], so it can be both readable and writable, and it is also an [`EventEmitter`][]. @@ -496,7 +496,7 @@ changes: --> Emitted after resolving the hostname but before connecting. -Not applicable to UNIX sockets. +Not applicable to Unix sockets. * `err` {Error|null} The error object. See [`dns.lookup()`][]. * `address` {string} The IP address. @@ -1112,7 +1112,7 @@ server.listen('/tmp/echo.sock', () => { }); ``` -Use `nc` to connect to a UNIX domain socket server: +Use `nc` to connect to a Unix domain socket server: ```console $ nc -U /tmp/echo.sock diff --git a/doc/api/os.md b/doc/api/os.md index 88a06346828ffc..80c97e84afb14d 100644 --- a/doc/api/os.md +++ b/doc/api/os.md @@ -164,7 +164,7 @@ The properties included on each object include: ] ``` -Because `nice` values are UNIX-specific, on Windows the `nice` values of all +Because `nice` values are Unix-specific, on Windows the `nice` values of all processors are always 0. ## os.endianness() @@ -239,7 +239,7 @@ The load average is a measure of system activity, calculated by the operating system and expressed as a fractional number. As a rule of thumb, the load average should ideally be less than the number of logical CPUs in the system. -The load average is a UNIX-specific concept with no real equivalent on +The load average is a Unix-specific concept with no real equivalent on Windows platforms. On Windows, the return value is always `[0, 0, 0]`. ## os.networkInterfaces() diff --git a/doc/api/tls.md b/doc/api/tls.md index 601eedd7c9bf92..4b8fd0a4943ce0 100644 --- a/doc/api/tls.md +++ b/doc/api/tls.md @@ -1207,7 +1207,7 @@ changes: * `host` {string} Host the client should connect to. **Default:** `'localhost'`. * `port` {number} Port the client should connect to. - * `path` {string} Creates unix socket connection to path. If this option is + * `path` {string} Creates Unix socket connection to path. If this option is specified, `host` and `port` are ignored. * `socket` {stream.Duplex} Establish secure connection on a given socket rather than creating a new socket. Typically, this is an instance of