Skip to content

Improve ctrl + c handling #3993

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

Closed
DimitarTachev opened this issue Oct 8, 2018 · 1 comment
Closed

Improve ctrl + c handling #3993

DimitarTachev opened this issue Oct 8, 2018 · 1 comment
Assignees
Labels
Milestone

Comments

@DimitarTachev
Copy link
Contributor

Is your feature request related to a problem? Please describe.
Currently, the CLI cannot be easily killed with ctrl + c.

Describe the solution you'd like
Stop handling the SIGINT signals and let the nodejs do the job.

Describe alternatives you've considered
Extract a common helpers for managing the timeouts, intervals and child processes and keep the exit logic in a single place.

@rosen-vladimirov
Copy link
Contributor

The issue should be fixed in latest next version of nativescript CLI. To get the full benefits of it, you can install CLI's next version by executing npm i -g nativescript@next.
The new approach of handling Ctrl + C is described in the related PR. The main concept is that now CLI does not handle SIGINT signal. Instead, it starts a new child process that will cleanup the resources once CLI's process dies. As the child process is detached and executes most of its work after CLI's dead, you can pass --cleanupLogFile <path to file> where the logs of the execution will be stored. The child process will execute the cleanup actions, write information to the specified file (in case the cleanupLogFile option is not passed, it will not create log) and after that it will exit.

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

No branches or pull requests

4 participants