Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CLI fails on Windows due to invalid signal binds #723

Open
depau opened this issue Aug 26, 2024 · 1 comment
Open

CLI fails on Windows due to invalid signal binds #723

depau opened this issue Aug 26, 2024 · 1 comment

Comments

@depau
Copy link

depau commented Aug 26, 2024

If I run the bunyan CLI on Windows it fails since it attempts to bind signals that have no Windows equivalent:

deno install -fg --root "$PWD/deno/tools" --allow-{read,write,env} --allow-sys "npm:[email protected]"
$ ./deno/tools/bin/bunyan --color
error: Uncaught TypeError: Windows only supports ctrl-c (SIGINT) and ctrl-break (SIGBREAK).
    at bindSignal (ext:runtime/40_signals.js:14:10)
    at Object.addSignalListener (ext:runtime/40_signals.js:54:19)
    at Process.on (node:process:349:12)
    at Object.<anonymous> (file:///C:/Users/davide.depau/AppData/Local/deno/npm/registry.npmjs.org/bunyan/1.8.15/bin/bunyan:1532:9)
    at Object.<anonymous> (file:///C:/Users/davide.depau/AppData/Local/deno/npm/registry.npmjs.org/bunyan/1.8.15/bin/bunyan:1706:4)
    at Module._compile (node:module:729:34)
    at Object.Module._extensions..js (node:module:743:10)
    at Module.load (node:module:654:32)
    at Function.Module._load (node:module:522:12)
    at Object.loadCjsModule (ext:deno_node/02_init.js:64:22)

The problem is that Bunyan binds these:

process.on('SIGINT', function () { cleanupAndExit(1, 'SIGINT'); });
process.on('SIGQUIT', function () { cleanupAndExit(1, 'SIGQUIT'); });
process.on('SIGTERM', function () { cleanupAndExit(1, 'SIGTERM'); });
process.on('SIGHUP', function () { cleanupAndExit(1, 'SIGHUP'); });

Most of them shouldn't be bound on Windows.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants
@depau and others