Follow up to https://github.com/denoland/deno/pull/30029.
Definition of signal numbers/names were moved from `ext/os` to
`ext/signals`.
All occurrences of `tokio::signal` API were replaced with helpers from
`deno_signals` helpers. Additionally clippy lints were added to ensure `tokio::signal`
is not used by accident.
Closes https://github.com/denoland/deno/issues/30223
Co-authored-by: snek <the@snek.dev>
Set up a new centralized signal handling path, which emulates the
default unless something is explicitly registered to prevent it.
Fixes: https://github.com/denoland/deno/issues/29590
---------
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
This commit changes `Deno.execPath()` API to no longer require
read permission.
This change is dictated by the fact that in common scenarios, requiring
read permission is less secure than not requiring permissions - if
a user wants to spawn a Deno subprocess using the current executable,
they would do something like:
```
new Deno.Command(Deno.execPath(), { args: ["eval", "1+1"] }).outputSync();
```
To run this program, currently one needs to pass `--allow-read
--allow-run=deno` flags.
It's possible to limit scope of `--allow-read` flag, but it's really
cumbersome to do,
so most users will opt to give a blanket `--allow-read` permission.
Not requiring read permissions allows the above program to be run with
just `--allow-run=deno` flag.
This change is in similar to relaxing of permissions in `Deno.cwd()` API
done in https://github.com/denoland/deno/pull/27192.
Ref
https://github.com/denoland/deno/issues/20061#issuecomment-2942497783
Ref https://github.com/denoland/deno/pull/27217
> `op_runtime_cpu_usage` can be optimized by accepting a `&mut [u32]`
instead of returning a serde tuple but it can be done as a follow up.
Accept a `&mut [u32]` instead of serde tuple for `op_runtime_cpu_usage`
and `op_runtime_memory_usage`
---------
Co-authored-by: Divy Srivastava <dj.srivastava23@gmail.com>
Fixes https://github.com/denoland/deno/issues/28125
Additionally "FORCE_COLOR" env var can now be accessed
without `--allow-env` check.
---------
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>