Closed typeless closed 1 month ago
Yes, that's kinda by design.
The returned handle allows you to close the handler for example.
If it gets garbage collected, it will be auto-closed and removed.
Not sure how to best handle this without the potential for resource leaks.
Got it. That makes sense.
On a second thought, something like what Deno does (https://docs.deno.com/runtime/tutorials/os_signals) would be better.
When entering 'ctrl+c' Expected output (when
tjs.singal(...)
replaced withconst h = tjs.signal(..)
)Actual output