diff options
author | Bedis Nbiba <bedisnbiba@gmail.com> | 2024-05-19 19:52:03 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-05-19 14:52:03 -0400 |
commit | 927cbb5ecde7581fd80ce4c6ed013ba4e742d5df (patch) | |
tree | eafa5c953d633cdcdaf665b7636f987954c9614d /ext/node/polyfills/process.ts | |
parent | 9e890399fc20ebd4d87cd490d84475309f57d56c (diff) |
fix: handle signal 0 in process.kill (#23473)
the last commit had a regression, where it removed this branch, I
haven't tested the code but I think it should work
---------
Signed-off-by: Bedis Nbiba <bedisnbiba@gmail.com>
Diffstat (limited to 'ext/node/polyfills/process.ts')
-rw-r--r-- | ext/node/polyfills/process.ts | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/ext/node/polyfills/process.ts b/ext/node/polyfills/process.ts index d9c953514..9c73f5a51 100644 --- a/ext/node/polyfills/process.ts +++ b/ext/node/polyfills/process.ts @@ -259,6 +259,10 @@ memoryUsage.rss = function (): number { // Returns a negative error code than can be recognized by errnoException function _kill(pid: number, sig: number): number { + // signal 0 does not exist in constants.os.signals, thats why it have to be handled explicitly + if (sig === 0) { + return op_node_process_kill(pid, 0); + } const maybeSignal = Object.entries(constants.os.signals).find(( [_, numericCode], ) => numericCode === sig); |