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

process.kill should accept negative int #15791

Closed
dreamgineer opened this issue Dec 16, 2024 · 0 comments · Fixed by #15920
Closed

process.kill should accept negative int #15791

dreamgineer opened this issue Dec 16, 2024 · 0 comments · Fixed by #15920
Assignees
Labels
bug Something isn't working confirmed bug We can reproduce this issue node:process

Comments

@dreamgineer
Copy link

What version of Bun is running?

1.1.38+bf2f153f5

What platform is your computer?

Linux 6.8.0-1017-oracle aarch64 aarch64

What steps can reproduce the bug?

  • setup wireit in a project
  • add a script in service mode
  • run and try to exit

What is the expected behavior?

Scripts gets terminated successfully

What do you see instead?

Stuck in wireit, but can type in shell.

 130 superdinmc@inst-lokp6-astral:~/Web$ micro package.json 
superdinmc@inst-lokp6-astral:~/Web$ bun dev watch
$ wireit watch
⚠️ Wireit could not identify the npm user agent, assuming it behaves like npm. Arguments may not be interpreted correctly.
                                             
 ⛅️ wrangler 3.95.0
-------------------

 Compiled Worker successfully
 Starting local server...
[wrangler:inf] Ready on http://localhost:8788
^C237 |         else {
238 |             // We used "detached" when we spawned, so our child is the leader of a
239 |             // process group. Passing the negative of a pid kills all processes in
240 |             // that group (without the negative, only the leader "sh" process would be
241 |             // killed).
242 |             process.kill(-this.#child.pid, 'SIGINT');
                          ^
RangeError: The value of "pid" is out of range. It must be a positive integer. Received -1010612
 code: "ERR_OUT_OF_RANGE"

      at #actuallyKill (/home/superdinmc/Web/node_modules/wireit/lib/script-child-process.js:242:21)
      at kill (/home/superdinmc/Web/node_modules/wireit/lib/script-child-process.js:198:22)
      at abort (/home/superdinmc/Web/node_modules/wireit/lib/execution/service.js:903:35)
      at /home/superdinmc/Web/node_modules/wireit/lib/execution/service.js:258:31
^C
^C30 superdinmc@inst-lokp6-astral:~/Web$ ⠏

Additional information

I'm using wireit with cloudflare wrangler.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working confirmed bug We can reproduce this issue node:process
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants