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

Pressing Ctrl-C while pkg is extracting/installing packages sometimes doesn't stop pkg #2046

Open
yurivict opened this issue Jun 7, 2022 · 9 comments

Comments

@yurivict
Copy link
Member

yurivict commented Jun 7, 2022

I pressed Ctrl-C in the middle and it kept going extracting and installing packages in the background while the main process has returned. Another instance of 'pkg' process kept running until it was killed manually.

Usually this doesn't happen and pkg cleans up fine after Ctrl-C, but it somehow happened once. There is some escape path that exists.

@yurivict
Copy link
Member Author

yurivict commented Jun 7, 2022

Version 1.17.5
FreeBSD 13.1

@0mp
Copy link
Member

0mp commented Jul 27, 2022

It's been happening to me for a couple of years now as well.

@nastonen
Copy link

Does this happen during the fetching phase?

@0mp
Copy link
Member

0mp commented Jul 27, 2022

Does this happen during the fetching phase?

AFAIR, it happened to me both in the fetching phase and the installation phase.

@nastonen
Copy link

I thought it was just me. I was working on root privilege issue recently in pkg and addressed this exact 'bug' here:
https://lists.freebsd.org/archives/freebsd-pkg/2022-July/000376.html
I had to implement a signal handler to terminate the fread() explicitly. Not sure why it won't stop when it receives SIGINT.

@bapt
Copy link
Member

bapt commented Jul 27, 2022

I confirm the bug and I am perfecly aware of it, just haven't had time yet to dive into it

@avg-I
Copy link
Member

avg-I commented Aug 22, 2022

Just want to add that this has just happened to me (for the first time ever).
pkg 1.18.4

@mohd-akram
Copy link

This is still happening as of pkg 1.20.6. Happened while it was fetching a pkg - I pressed Ctrl-C, it returned me to the shell, but seemed to remain running in the background, strangely.

@grahamperrin
Copy link
Contributor

Duplicate of a 2021 issue?

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

7 participants