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

How to kill run-z process #67

Closed
Muromi-Rikka opened this issue Apr 6, 2022 · 8 comments · Fixed by #68
Closed

How to kill run-z process #67

Muromi-Rikka opened this issue Apr 6, 2022 · 8 comments · Fixed by #68

Comments

@Muromi-Rikka
Copy link

Commands started with run-z are not terminated by ctrl+c

@surol
Copy link
Member

surol commented Apr 6, 2022

Operating system?

@Muromi-Rikka
Copy link
Author

@surol operating system use windows11 ,windows terminal with powershell

@surol
Copy link
Member

surol commented Apr 6, 2022

@Muromi-Rikka I have tried both PowerShell and cmd. Both terminate the process on Ctrl+C.
May be, this is related to some specific sub-process? Can you provide a small repro?

@Muromi-Rikka
Copy link
Author

@surol I use pnpm workspace
root package.json

{
  "scripts": {
    "all":"run-z serve:sunna,serve:lumina,watch:common",
    "serve:sunna": "pnpm --filter sunna start:dev",
    "serve:lumina": "pnpm --filter lumina start",
    "watch:common": "tsc --watch --project ./apps/common"
  },
  "devDependencies": {
    "@angular/cli": "^13.3.0",
    "@nestjs/cli": "^8.2.3",
    "run-z": "^1.10.0"
  }
}

lumina start:

{"start": "ng serve"}

sunna start:

{"start:dev": "nest start --watch"}

@surol
Copy link
Member

surol commented Apr 17, 2022

I don't believe this is related to run-z.

The Ctrl+C (SIGINT) is sent to the whole process group. So, all of lumina, sunna, and tsc receive it. It's up to them to terminate properly. It seems that one of them fail to do so.

You can try npm-run-all and its run-p command instead. It seems you are not using run-z capabilities anyway.

@surol surol closed this as completed Apr 17, 2022
@iki
Copy link

iki commented Sep 14, 2022

@surol I have the same issue, run-p closes the running nodemon correctly, run-z leaves the process running (with server port open and working). On Windows 11 too. Would be great to fix it.

@surol surol reopened this Sep 14, 2022
@Muromi-Rikka
Copy link
Author

@iki try use google/wireit

@surol surol linked a pull request Sep 15, 2022 that will close this issue
@surol
Copy link
Member

surol commented Sep 15, 2022

Version 1.10.1 should fix the issue. At least, it fixes it for run-z/triage-sigint.

If the issue still present for you, please help me find out the reason by providing a repro. E.g. by creating a PR for run-z/triage-sigint.

@surol surol closed this as completed Sep 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging a pull request may close this issue.

3 participants