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 is not terminated remains null after bar is finished and program terminated. #3

Closed
Inrixia opened this issue Mar 7, 2021 · 5 comments
Assignees

Comments

@Inrixia
Copy link

Inrixia commented Mar 7, 2021

After terminating the process with Ctrl-C it does not actually close and timers continue to run in the background before erroring when trying to write to console.

This behaviour is not seen when disabling the progress bars and only requires a new instance of the MultiProgressBars class to be created. Its not affected by calling .close or .cleanup.

You can checkout the codebase I'm trying to use it in here: https://github.com/Inrixia/Floatplane-Downloader/tree/5dae0aa57be48cbb87bebc0bfa4f2c3fcad18eef

image

@kamiyo
Copy link
Owner

kamiyo commented Mar 7, 2021

I'll take a look. Seems I might have forgotten to call the cleanup code in the virtual-console from the multi-progress-bars class.

@kamiyo kamiyo self-assigned this Mar 7, 2021
@Inrixia
Copy link
Author

Inrixia commented Mar 8, 2021

I thought so too, but debugging it it seems to still be called which was very confusing. From the looks of things everything works fine dealing with redirecting the console after close and its a issue with SIGINT from crl-c. As for why the process continues in the background but with console as null I'm lost.

@kamiyo
Copy link
Owner

kamiyo commented Mar 8, 2021

Hey, I saw this github issue: nodejs/node#9050

At first, I thought it was because of a loop, but actually, I think it's because I need to actually call process.exit() in cleanup().

I'm going to build and push a new version out, let me know if it solves the problem.

@kamiyo
Copy link
Owner

kamiyo commented Mar 8, 2021

Published as multi-progress-bars@3.2.2

@Inrixia
Copy link
Author

Inrixia commented Mar 8, 2021

Looks like that fixed it! Thanks <3

@Inrixia Inrixia closed this as completed Mar 8, 2021
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