Skip to content

Commit

Permalink
fix(process): process.kill allows zero or negative pids (#15920)
Browse files Browse the repository at this point in the history
  • Loading branch information
DonIsaac authored Dec 21, 2024
1 parent d6b9c44 commit 14b44ae
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions src/bun.js/bindings/BunProcess.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2948,9 +2948,6 @@ JSC_DEFINE_HOST_FUNCTION(Process_functionKill,
auto pid_value = callFrame->argument(0);
int pid = pid_value.toInt32(globalObject);
RETURN_IF_EXCEPTION(scope, {});
if (pid < 0) {
return Bun::ERR::OUT_OF_RANGE(scope, globalObject, "pid"_s, "a positive integer"_s, pid_value);
}
JSC::JSValue signalValue = callFrame->argument(1);
int signal = SIGTERM;
if (signalValue.isNumber()) {
Expand Down

0 comments on commit 14b44ae

Please sign in to comment.