deno
039bcdc6 - fix(permissions): don't require --allow-run for process.kill on self (#34382)

Commit
131 days ago
fix(permissions): don't require --allow-run for process.kill on self (#34382) Sending a signal to the current process is functionally equivalent to terminating yourself, which never required permissions in the first place (`Deno.exit`, abort, etc.). Tools like `signal-exit` (used by vite and many others) re-raise the original signal on `process.pid` so the parent shell sees the correct exit status, which forced users to grant blanket `--allow-run` just to be able to Ctrl-C a process. This skips the run-permission check in `op_node_process_kill` and `op_kill` when the target pid is the current process's pid. Signalling any other pid still requires `--allow-run` as before. Fixes #34344
Author
Parents
Loading