mirror of
https://github.com/oven-sh/bun
synced 2026-02-09 10:28:47 +00:00
fix(process): process.kill allows zero or negative pids (#15920)
This commit is contained in:
@@ -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()) {
|
||||
|
||||
Reference in New Issue
Block a user