Since Node.js and Deno have different signal types, I modified the declaration of Deno.Signal to be, essentially, Deno.Signal & NodeJS.Signals, preventing us from translating "Deno-only signals" to Node.js.
I tried finding out exactly which signals that mismatch, but I think that might depend on the platform/arch you built the binary on, not sure. On my machine, SIGEMT is the only Deno signal that does not exist in Node.js. SIGIOT, SIGPOLL, SIGUNUSED, SIGXFSZ, and SIGLOST exist in Node.js, but not in Deno.
Additionally, in Node.js, process.addListener returns the NodeJS.Process object itself, whereas in Deno, Deno.addSignalListener returns void, so I figured it would only make sense for the translated Node.js code returns void as well.
I need some input on this idea.
Since Node.js and Deno have different signal types, I modified the declaration of Deno.Signal to be, essentially,
Deno.Signal & NodeJS.Signals
, preventing us from translating "Deno-only signals" to Node.js.I tried finding out exactly which signals that mismatch, but I think that might depend on the platform/arch you built the binary on, not sure. On my machine,
SIGEMT
is the only Deno signal that does not exist in Node.js.SIGIOT
,SIGPOLL
,SIGUNUSED
,SIGXFSZ
, andSIGLOST
exist in Node.js, but not in Deno.Additionally, in Node.js,
process.addListener
returns the NodeJS.Process object itself, whereas in Deno,Deno.addSignalListener
returns void, so I figured it would only make sense for the translated Node.js code returns void as well.Closes https://github.com/denoland/node_shims/issues/129