Skip to content
Myr

Add note about graceful termination (#562)

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Mikael Finstad · committed by GitHub · parent 19af77f · Browse files · 2 files+3 added−1 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

2 files+3 added−1 removed

  • other:+3 added−1 removed

2 files+3 added−1 removed

modified:index.d.ts+1 added-1 removed
458 unmodified lines
459 onRejected?: (reason: ExecaError<StdoutStderrType>) => ResultType | PromiseLike<ResultType>460 ): Promise<ExecaReturnValue<StdoutStderrType> | ResultType>;461462 /**463 Same as the original [`child_process#kill()`](https://nodejs.org/api/child_process.html#child_process_subprocess_kill_signal), except if `signal` is `SIGTERM` (the default value) and the child process is not terminated after 5 seconds, force it by sending `SIGKILL`.463 Same as the original [`child_process#kill()`](https://nodejs.org/api/child_process.html#child_process_subprocess_kill_signal), except if `signal` is `SIGTERM` (the default value) and the child process is not terminated after 5 seconds, force it by sending `SIGKILL`. Note that this graceful termination does not work on Windows, because Windows [doesn't support signals](https://nodejs.org/api/process.html#process_signal_events) (`SIGKILL` and `SIGTERM` has the same effect of force-killing the process immediately.) If you want to achieve graceful termination on Windows, you have to use other means, such as [`taskkill`](https://github.com/sindresorhus/taskkill).464 */465 kill(signal?: string, options?: KillOptions): void;466467 /**
463 unmodified lines
modified:readme.md+2 added
285 unmodified lines
286#### kill(signal?, options?)287288Same as the original [`child_process#kill()`](https://nodejs.org/api/child_process.html#child_process_subprocess_kill_signal) except: if `signal` is `SIGTERM` (the default value) and the child process is not terminated after 5 seconds, force it by sending `SIGKILL`.289290Note that this graceful termination does not work on Windows, because Windows [doesn't support signals](https://nodejs.org/api/process.html#process_signal_events) (`SIGKILL` and `SIGTERM` has the same effect of force-killing the process immediately.) If you want to achieve graceful termination on Windows, you have to use other means, such as [`taskkill`](https://github.com/sindresorhus/taskkill).291292##### options.forceKillAfterTimeout293294Type: `number | false`\295Default: `5000`
493 unmodified lines