Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

doc: improve text for breakOnSigint #35692

Merged
merged 1 commit into from
Oct 24, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
70 changes: 35 additions & 35 deletions doc/api/vm.md
Original file line number Diff line number Diff line change
Expand Up @@ -146,11 +146,11 @@ changes:
* `timeout` {integer} Specifies the number of milliseconds to execute `code`
before terminating execution. If execution is terminated, an [`Error`][]
will be thrown. This value must be a strictly positive integer.
* `breakOnSigint` {boolean} If `true`, the execution will be terminated when
`SIGINT` (Ctrl+C) is received. Existing handlers for the
event that have been attached via `process.on('SIGINT')` will be disabled
during script execution, but will continue to work after that. If execution
is terminated, an [`Error`][] will be thrown. **Default:** `false`.
* `breakOnSigint` {boolean} If `true`, execution is terminated when `SIGINT`
(<kbd>Ctrl</kbd>+<kbd>C</kbd>) is received. Existing handlers for the
event that have been attached via `process.on('SIGINT')` are disabled
during script execution, but continue to work after that. If execution
is terminated, an [`Error`][] is thrown. **Default:** `false`.
* Returns: {any} the result of the very last statement executed in the script.

Runs the compiled code contained by the `vm.Script` object within the given
Expand Down Expand Up @@ -208,11 +208,11 @@ changes:
* `timeout` {integer} Specifies the number of milliseconds to execute `code`
before terminating execution. If execution is terminated, an [`Error`][]
will be thrown. This value must be a strictly positive integer.
* `breakOnSigint` {boolean} If `true`, the execution will be terminated when
`SIGINT` (Ctrl+C) is received. Existing handlers for the
event that have been attached via `process.on('SIGINT')` will be disabled
during script execution, but will continue to work after that. If execution
is terminated, an [`Error`][] will be thrown. **Default:** `false`.
* `breakOnSigint` {boolean} If `true`, execution is terminated when `SIGINT`
(<kbd>Ctrl</kbd>+<kbd>C</kbd>) is received. Existing handlers for the
event that have been attached via `process.on('SIGINT')` are disabled
during script execution, but continue to work after that. If execution
is terminated, an [`Error`][] is thrown. **Default:** `false`.
* `contextName` {string} Human-readable name of the newly created context.
**Default:** `'VM Context i'`, where `i` is an ascending numerical index of
the created context.
Expand Down Expand Up @@ -272,11 +272,11 @@ changes:
* `timeout` {integer} Specifies the number of milliseconds to execute `code`
before terminating execution. If execution is terminated, an [`Error`][]
will be thrown. This value must be a strictly positive integer.
* `breakOnSigint` {boolean} If `true`, the execution will be terminated when
`SIGINT` (Ctrl+C) is received. Existing handlers for the
event that have been attached via `process.on('SIGINT')` will be disabled
during script execution, but will continue to work after that. If execution
is terminated, an [`Error`][] will be thrown. **Default:** `false`.
* `breakOnSigint` {boolean} If `true`, execution is terminated when `SIGINT`
(<kbd>Ctrl</kbd>+<kbd>C</kbd>) is received. Existing handlers for the
event that have been attached via `process.on('SIGINT')` are disabled
during script execution, but continue to work after that. If execution
is terminated, an [`Error`][] is thrown. **Default:** `false`.
* Returns: {any} the result of the very last statement executed in the script.

Runs the compiled code contained by the `vm.Script` within the context of the
Expand Down Expand Up @@ -511,11 +511,11 @@ in the ECMAScript specification.
* `timeout` {integer} Specifies the number of milliseconds to evaluate
before terminating execution. If execution is interrupted, an [`Error`][]
will be thrown. This value must be a strictly positive integer.
* `breakOnSigint` {boolean} If `true`, the execution will be terminated when
`SIGINT` (Ctrl+C) is received. Existing handlers for the event that have
been attached via `process.on('SIGINT')` will be disabled during script
execution, but will continue to work after that. If execution is
interrupted, an [`Error`][] will be thrown. **Default:** `false`.
* `breakOnSigint` {boolean} If `true`, execution is terminated when `SIGINT`
(<kbd>Ctrl</kbd>+<kbd>C</kbd>) is received. Existing handlers for the
event that have been attached via `process.on('SIGINT')` are disabled
during script execution, but continue to work after that. If execution
is interrupted, an [`Error`][] is thrown. **Default:** `false`.
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The word interrupted here is the one thing I didn't modify for consistency. The other six instances say terminated. I wasn't completely sure the choice wasn't intentional or which word was better than the other. @nodejs/vm @nodejs/documentation

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think interrupt is a good word, especially given that that’s what SIGINT stands for :)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should it be interrupted on the other six instances then? I think consistency would be good, and @addaleax makes a good point.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should it be interrupted on the other six instances then?

I'll land this as-is and open a follow-on PR about that.

* Returns: {Promise}

Evaluate the module.
Expand Down Expand Up @@ -961,11 +961,11 @@ changes:
* `timeout` {integer} Specifies the number of milliseconds to execute `code`
before terminating execution. If execution is terminated, an [`Error`][]
will be thrown. This value must be a strictly positive integer.
* `breakOnSigint` {boolean} If `true`, the execution will be terminated when
`SIGINT` (Ctrl+C) is received. Existing handlers for the
event that have been attached via `process.on('SIGINT')` will be disabled
during script execution, but will continue to work after that. If execution
is terminated, an [`Error`][] will be thrown. **Default:** `false`.
* `breakOnSigint` {boolean} If `true`, execution is terminated when `SIGINT`
(<kbd>Ctrl</kbd>+<kbd>C</kbd>) is received. Existing handlers for the
event that have been attached via `process.on('SIGINT')` are disabled
during script execution, but continue to work after that. If execution
is terminated, an [`Error`][] is thrown. **Default:** `false`.
* `cachedData` {Buffer|TypedArray|DataView} Provides an optional `Buffer` or
`TypedArray`, or `DataView` with V8's code cache data for the supplied
source. When supplied, the `cachedDataRejected` value will be set to
Expand Down Expand Up @@ -1044,11 +1044,11 @@ changes:
* `timeout` {integer} Specifies the number of milliseconds to execute `code`
before terminating execution. If execution is terminated, an [`Error`][]
will be thrown. This value must be a strictly positive integer.
* `breakOnSigint` {boolean} If `true`, the execution will be terminated when
`SIGINT` (Ctrl+C) is received. Existing handlers for the
event that have been attached via `process.on('SIGINT')` will be disabled
during script execution, but will continue to work after that. If execution
is terminated, an [`Error`][] will be thrown. **Default:** `false`.
* `breakOnSigint` {boolean} If `true`, execution is terminated when `SIGINT`
(<kbd>Ctrl</kbd>+<kbd>C</kbd>) is received. Existing handlers for the
event that have been attached via `process.on('SIGINT')` are disabled
during script execution, but continue to work after that. If execution
is terminated, an [`Error`][] is thrown. **Default:** `false`.
* `contextName` {string} Human-readable name of the newly created context.
**Default:** `'VM Context i'`, where `i` is an ascending numerical index of
the created context.
Expand Down Expand Up @@ -1138,11 +1138,11 @@ changes:
* `timeout` {integer} Specifies the number of milliseconds to execute `code`
before terminating execution. If execution is terminated, an [`Error`][]
will be thrown. This value must be a strictly positive integer.
* `breakOnSigint` {boolean} If `true`, the execution will be terminated when
`SIGINT` (Ctrl+C) is received. Existing handlers for the
event that have been attached via `process.on('SIGINT')` will be disabled
during script execution, but will continue to work after that. If execution
is terminated, an [`Error`][] will be thrown. **Default:** `false`.
* `breakOnSigint` {boolean} If `true`, execution is terminated when `SIGINT`
(<kbd>Ctrl</kbd>+<kbd>C</kbd>) is received. Existing handlers for the
event that have been attached via `process.on('SIGINT')` are disabled
during script execution, but continue to work after that. If execution
is terminated, an [`Error`][] is thrown. **Default:** `false`.
* `cachedData` {Buffer|TypedArray|DataView} Provides an optional `Buffer` or
`TypedArray`, or `DataView` with V8's code cache data for the supplied
source. When supplied, the `cachedDataRejected` value will be set to
Expand Down