pkg icon indicating copy to clipboard operation
pkg copied to clipboard

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

Open yurivict opened this issue 2 years ago • 9 comments

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 avatar Jun 07 '22 18:06 yurivict

Version 1.17.5 FreeBSD 13.1

yurivict avatar Jun 07 '22 18:06 yurivict

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

0mp avatar Jul 27 '22 13:07 0mp

Does this happen during the fetching phase?

nastonen avatar Jul 27 '22 14:07 nastonen

Does this happen during the fetching phase?

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

0mp avatar Jul 27 '22 14:07 0mp

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.

nastonen avatar Jul 27 '22 14:07 nastonen

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

bapt avatar Jul 27 '22 14:07 bapt

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

avg-I avatar Aug 22 '22 07:08 avg-I

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.

mohd-akram avatar Sep 13 '23 14:09 mohd-akram

Duplicate of a 2021 issue?

  • #1956

grahamperrin avatar Dec 07 '23 01:12 grahamperrin