Issue 1:
Hello! Thanks for this excellent project.

I have a deno script that I would like to be able to run from the command line by taking its name. With node I would add a shebang to the top of the file like so:

#!/usr/bin/env node

Here's the (non functional) deno version.

#!/usr/bin/env deno run --allow-net

I'm unable to do this with deno because it requires additional arguments to be passed to the env, but this is not a standard env feature and as such this now no longer works on Linux.

Is there a way to work around this limitation of Linux and deno? It would be wonderful to be able to write command line programs using deno.

Thank you,

Louis

Issue 2:
Running on Void Linux

$ uname -a
Linux 5.15.12_1 #1 SMP Wed Dec 29 19:18:57 UTC 2021 x86_64 GNU/Linux

setInterval(() => console.log("Hi"), 1000)

Deno.addSignalListener("SIGKILL", () => console.log("Goodbye"));

Platform: linux x86_64
Version: 1.17.1
Args: ["deno", "run", "--unstable", "test.ts"]

thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Custom { kind: Other, error: "Refusing to register signal 9" }', runtime/ops/signal.rs:185:67
stack backtrace:
0: 0x562bf172030c - std::backtrace_rs::backtrace::libunwind::trace::hf6a6dfd7da937cb0
at /rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c/library/std/src/../../backtrace/src/backtrace/libunwind.rs:90:5
1: 0x562bf172030c - std::backtrace_rs::backtrace::trace_unsynchronized::hc596a19e4891f7f3
at /rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
2: 0x562bf172030c - std::sys_common::backtrace::_print_fmt::hb16700db31584325
at /rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c/library/std/src/sys_common/backtrace.rs:67:5
3: 0x562bf172030c - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h231c4190cfa75162
at /rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c/library/std/src/sys_common/backtrace.rs:46:22
4: 0x562bf174affc - core::fmt::write::h2a1462b5f8eea807
at /rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c/library/core/src/fmt/mod.rs:1163:17
5: 0x562bf1716c05 - std::io::Write::write_fmt::h71ddfebc68685972
at /rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c/library/std/src/io/mod.rs:1696:15
6: 0x562bf17226e0 - std::sys_common::backtrace::_print::hcc197d4bebf2b369
at /rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c/library/std/src/sys_common/backtrace.rs:49:5
7: 0x562bf17226e0 - std::sys_common::backtrace::print::h335a66af06738c7c
at /rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c/library/std/src/sys_common/backtrace.rs:36:9
8: 0x562bf17226e0 - std::panicking::default_hook::{{closure}}::h6fac9ac9c8b79e52
at /rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c/library/std/src/panicking.rs:210:50
9: 0x562bf1722295 - std::panicking::default_hook::h341c1030c6a1161b
at /rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c/library/std/src/panicking.rs:227:9
10: 0x562bf1aadaa1 - deno::setup_panic_hook::{{closure}}::hd12def7b9a8bbffb
11: 0x562bf1722f29 - std::panicking::rust_panic_with_hook::h50680ff4b44510c6
at /rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c/library/std/src/panicking.rs:628:17
12: 0x562bf17229b0 - std::panicking::begin_panic_handler::{{closure}}::h9371c0fbb1e8465a
at /rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c/library/std/src/panicking.rs:521:13
13: 0x562bf17207b4 - std::sys_common::backtrace::__rust_end_short_backtrace::h9b3efa22a5768c0f
at /rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c/library/std/src/sys_common/backtrace.rs:139:18
14: 0x562bf1722919 - rust_begin_unwind
at /rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c/library/std/src/panicking.rs:517:5
15: 0x562bf1748ac1 - core::panicking::panic_fmt::h23b9203e89cc61cf
at /rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c/library/core/src/panicking.rs:100:14
16: 0x562bf1748d73 - core::result::unwrap_failed::h32ef6b3156e8fc57
at /rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c/library/core/src/result.rs:1616:5
17: 0x562bf1e3bdf8 - deno_core::ops_json::op_sync::{{closure}}::hbae551cd30532b7f
18: 0x562bf23fc21c - <alloc::boxed::Box<F,A> as core::ops::function::Fn<Args>>::call::h61abf628f75ea5b0
19: 0x562bf241ce16 - deno_core::ops::OpTable::route_op::hc0de6c07f2d831ce
20: 0x562bf23dba0b - <extern "C" fn(A0) .> R as v8::support::CFnFrom<F>>::mapping::c_fn::h353e79b3e0e55895
21: 0x562bf097cdad - _ZN2v88internal25FunctionCallbackArguments4CallENS0_15CallHandlerInfoE
at ./../../../../v8/src/api/api-arguments-inl.h:152:3
22: 0x562bf097c2eb - _ZN2v88internal12_GLOBAL__N_119HandleApiCallHelperILb0EEENS0_11MaybeHandleINS0_6ObjectEEEPNS0_7IsolateENS0_6HandleINS0_10HeapObjectEEESA_NS8_INS0_20FunctionTemplateInfoEEENS8_IS4_EENS0_16BuiltinArgumentsE
at ./../../../../v8/src/builtins/builtins-api.cc:112:36
23: 0x562bf097b86e - _ZN2v88internalL26Builtin_Impl_HandleApiCallENS0_16BuiltinArgumentsEPNS0_7IsolateE
at ./../../../../v8/src/builtins/builtins-api.cc:142:5
24: 0x562bf1623038 - Builtins_CEntry_Return1_DontSaveFPRegs_ArgvOnStack_BuiltinExit