Page MenuHome GnuPG

gpgtar: Does not stop spawned gpg process when exiting
Closed, InvalidPublic

Description

This happens for example when one cancels the decryption of a large encrypted archive in Kleopatra (see T6524: Kleopatra / Gpgtar: Cancel does not kill the job). The gpgtar process goes away shortly after canceling the operation in Kleopatra, but the gpg process keeps running for quite some time (probably until it has finished the decryption).

Event Timeline

werner triaged this task as Normal priority.Jun 26 2023, 9:50 AM
werner added a project: gnupg24.
werner added a subscriber: werner.

Can you please test by adding --exit-on-status-write-error to the gpg invocation by gpgtar?

This option is already used. Running pgrep -a gpg in a loop (and ignoring gpg-agent processes) I get:

Mo 26. Jun 11:29:11 CEST 2023
19111 gpgtar --batch --status-fd 60 --gpg-args --no-tty --gpg-args --charset=utf8 --gpg-args --enable-progress-filter --gpg-args --exit-on-status-write-error --gpg-args --display=:0 --gpg-args --ttyname=/dev/pts/37 --gpg-args --ttytype=xterm-256color --decrypt --directory /tmp/kleopatra-JqIiXu/src -- /home/ingo/dev/g10/src.tar.gpg
19112 gpg --batch --status-fd=60 --output - --decrypt --no-tty --charset=utf8 --enable-progress-filter --exit-on-status-write-error --display=:0 --ttyname=/dev/pts/37 --ttytype=xterm-256color -- /home/ingo/dev/g10/src.tar.gpg

Mo 26. Jun 11:29:12 CEST 2023
19112 gpg --batch --status-fd=60 --output - --decrypt --no-tty --charset=utf8 --enable-progress-filter --exit-on-status-write-error --display=:0 --ttyname=/dev/pts/37 --ttytype=xterm-256color -- /home/ingo/dev/g10/src.tar.gpg

Mo 26. Jun 11:29:13 CEST 2023
19112 gpg --batch --status-fd=60 --output - --decrypt --no-tty --charset=utf8 --enable-progress-filter --exit-on-status-write-error --display=:0 --ttyname=/dev/pts/37 --ttytype=xterm-256color -- /home/ingo/dev/g10/src.tar.gpg

Mo 26. Jun 11:29:14 CEST 2023
19112 gpg --batch --status-fd=60 --output - --decrypt --no-tty --charset=utf8 --enable-progress-filter --exit-on-status-write-error --display=:0 --ttyname=/dev/pts/37 --ttytype=xterm-256color -- /home/ingo/dev/g10/src.tar.gpg

Mo 26. Jun 11:29:15 CEST 2023

Mo 26. Jun 11:29:16 CEST 2023

Sorry about that. I tested an old build which didn't call gpgme_cancel_async and therefore probably didn't properly close the channels. It seems to work if gpgme_cancel_async is called to cancel the operation.

Closing since the problem doesn't seem to occur if the operation is canceled properly.