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 <info@bnoordhuis.nl> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
This commit is contained in:
parent
f67a0a17a0
commit
e04ee9b37a
@ -146,7 +146,7 @@ changes:
|
|||||||
* `encoding` {string} **Default:** `'utf8'`
|
* `encoding` {string} **Default:** `'utf8'`
|
||||||
* `shell` {string} Shell to execute the command with. See
|
* `shell` {string} Shell to execute the command with. See
|
||||||
[Shell Requirements][] and [Default Windows Shell][]. **Default:**
|
[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`
|
* `timeout` {number} **Default:** `0`
|
||||||
* `maxBuffer` {number} Largest amount of data in bytes allowed on stdout or
|
* `maxBuffer` {number} Largest amount of data in bytes allowed on stdout or
|
||||||
stderr. If exceeded, the child process is terminated and any output is
|
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
|
* `windowsVerbatimArguments` {boolean} No quoting or escaping of arguments is
|
||||||
done on Windows. Ignored on Unix. **Default:** `false`.
|
done on Windows. Ignored on Unix. **Default:** `false`.
|
||||||
* `shell` {boolean|string} If `true`, runs `command` inside of a shell. Uses
|
* `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
|
shell can be specified as a string. See [Shell Requirements][] and
|
||||||
[Default Windows Shell][]. **Default:** `false` (no shell).
|
[Default Windows Shell][]. **Default:** `false` (no shell).
|
||||||
* `callback` {Function} Called with the output when process terminates.
|
* `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)).
|
* `uid` {number} Sets the user identity of the process (see setuid(2)).
|
||||||
* `gid` {number} Sets the group identity of the process (see setgid(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
|
* `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
|
shell can be specified as a string. See [Shell Requirements][] and
|
||||||
[Default Windows Shell][]. **Default:** `false` (no shell).
|
[Default Windows Shell][]. **Default:** `false` (no shell).
|
||||||
* `windowsVerbatimArguments` {boolean} No quoting or escaping of arguments is
|
* `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
|
or the [`'message'`][] event. This allows the child to exit
|
||||||
normally without the process being held open by the open IPC channel.*
|
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
|
performs memory operations synchronously before decoupling the event loop
|
||||||
from the child. Applications with a large memory footprint may find frequent
|
from the child. Applications with a large memory footprint may find frequent
|
||||||
[`child_process.spawn()`][] calls to be a bottleneck. For more information,
|
[`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
|
* `windowsHide` {boolean} Hide the subprocess console window that would
|
||||||
normally be created on Windows systems. **Default:** `false`.
|
normally be created on Windows systems. **Default:** `false`.
|
||||||
* `shell` {boolean|string} If `true`, runs `command` inside of a shell. Uses
|
* `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
|
shell can be specified as a string. See [Shell Requirements][] and
|
||||||
[Default Windows Shell][]. **Default:** `false` (no shell).
|
[Default Windows Shell][]. **Default:** `false` (no shell).
|
||||||
* Returns: {Buffer|string} The stdout from the command.
|
* Returns: {Buffer|string} The stdout from the command.
|
||||||
@ -780,7 +780,7 @@ changes:
|
|||||||
* `env` {Object} Environment key-value pairs.
|
* `env` {Object} Environment key-value pairs.
|
||||||
* `shell` {string} Shell to execute the command with. See
|
* `shell` {string} Shell to execute the command with. See
|
||||||
[Shell Requirements][] and [Default Windows Shell][]. **Default:**
|
[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)).
|
* `uid` {number} Sets the user identity of the process. (See setuid(2)).
|
||||||
* `gid` {number} Sets the group identity of the process. (See setgid(2)).
|
* `gid` {number} Sets the group identity of the process. (See setgid(2)).
|
||||||
* `timeout` {number} In milliseconds the maximum amount of time the process
|
* `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.
|
* `encoding` {string} The encoding used for all stdio inputs and outputs.
|
||||||
**Default:** `'buffer'`.
|
**Default:** `'buffer'`.
|
||||||
* `shell` {boolean|string} If `true`, runs `command` inside of a shell. Uses
|
* `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
|
shell can be specified as a string. See [Shell Requirements][] and
|
||||||
[Default Windows Shell][]. **Default:** `false` (no shell).
|
[Default Windows Shell][]. **Default:** `false` (no shell).
|
||||||
* `windowsVerbatimArguments` {boolean} No quoting or escaping of arguments is
|
* `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`
|
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
|
module servers use exactly the same workflow with the exceptions of listening on
|
||||||
a `'message'` event instead of `'connection'` and using `server.bind()` instead
|
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.
|
platforms.
|
||||||
|
|
||||||
#### Example: sending a socket object
|
#### Example: sending a socket object
|
||||||
|
@ -589,7 +589,7 @@ The `addressType` is one of:
|
|||||||
|
|
||||||
* `4` (TCPv4)
|
* `4` (TCPv4)
|
||||||
* `6` (TCPv6)
|
* `6` (TCPv6)
|
||||||
* `-1` (unix domain socket)
|
* `-1` (Unix domain socket)
|
||||||
* `'udp4'` or `'udp6'` (UDP v4 or v6)
|
* `'udp4'` or `'udp6'` (UDP v4 or v6)
|
||||||
|
|
||||||
## Event: 'message'
|
## Event: 'message'
|
||||||
|
@ -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
|
* `birthtime` "Birth Time" - Time of file creation. Set once when the
|
||||||
file is created. On filesystems where birthtime is not available,
|
file is created. On filesystems where birthtime is not available,
|
||||||
this field may instead hold either the `ctime` or
|
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,
|
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
|
also set if the `atime` is explicitly set to an earlier value than the current
|
||||||
`birthtime` using the utimes(2) system call.
|
`birthtime` using the utimes(2) system call.
|
||||||
|
@ -17,7 +17,7 @@ const net = require('net');
|
|||||||
|
|
||||||
## IPC Support
|
## 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.
|
sockets on other operating systems.
|
||||||
|
|
||||||
### Identifying paths for IPC connections
|
### Identifying paths for IPC connections
|
||||||
@ -25,18 +25,18 @@ sockets on other operating systems.
|
|||||||
[`net.connect()`][], [`net.createConnection()`][], [`server.listen()`][] and
|
[`net.connect()`][], [`net.createConnection()`][], [`server.listen()`][] and
|
||||||
[`socket.connect()`][] take a `path` parameter to identify IPC endpoints.
|
[`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`,
|
filesystem pathname. It gets truncated to `sizeof(sockaddr_un.sun_path) - 1`,
|
||||||
which varies on different operating system between 91 and 107 bytes.
|
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
|
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
|
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
|
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
|
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
|
[`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
|
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.
|
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.
|
filesystem, and will persist until unlinked.
|
||||||
|
|
||||||
On Windows, the local domain is implemented using a named pipe. The path *must*
|
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 `..`
|
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
|
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.
|
*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.
|
owning process exits.
|
||||||
|
|
||||||
JavaScript string escaping requires paths to be specified with extra backslash
|
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):
|
(useful to find which port was assigned when getting an OS-assigned address):
|
||||||
`{ port: 12346, family: 'IPv4', address: '127.0.0.1' }`.
|
`{ 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.
|
as a string.
|
||||||
|
|
||||||
```js
|
```js
|
||||||
@ -241,7 +241,7 @@ added: v0.5.10
|
|||||||
* Returns: {net.Server}
|
* Returns: {net.Server}
|
||||||
|
|
||||||
Start a server listening for connections on a given `handle` that has
|
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
|
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
|
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
|
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
|
`net.Socket` is also a [duplex stream][], so it can be both readable and
|
||||||
writable, and it is also an [`EventEmitter`][].
|
writable, and it is also an [`EventEmitter`][].
|
||||||
|
|
||||||
@ -496,7 +496,7 @@ changes:
|
|||||||
-->
|
-->
|
||||||
|
|
||||||
Emitted after resolving the hostname but before connecting.
|
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()`][].
|
* `err` {Error|null} The error object. See [`dns.lookup()`][].
|
||||||
* `address` {string} The IP address.
|
* `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
|
```console
|
||||||
$ nc -U /tmp/echo.sock
|
$ nc -U /tmp/echo.sock
|
||||||
|
@ -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.
|
processors are always 0.
|
||||||
|
|
||||||
## os.endianness()
|
## 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
|
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.
|
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]`.
|
Windows platforms. On Windows, the return value is always `[0, 0, 0]`.
|
||||||
|
|
||||||
## os.networkInterfaces()
|
## os.networkInterfaces()
|
||||||
|
@ -1207,7 +1207,7 @@ changes:
|
|||||||
* `host` {string} Host the client should connect to. **Default:**
|
* `host` {string} Host the client should connect to. **Default:**
|
||||||
`'localhost'`.
|
`'localhost'`.
|
||||||
* `port` {number} Port the client should connect to.
|
* `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.
|
specified, `host` and `port` are ignored.
|
||||||
* `socket` {stream.Duplex} Establish secure connection on a given socket
|
* `socket` {stream.Duplex} Establish secure connection on a given socket
|
||||||
rather than creating a new socket. Typically, this is an instance of
|
rather than creating a new socket. Typically, this is an instance of
|
||||||
|
Loading…
x
Reference in New Issue
Block a user