Help naïve users running apt-get install in xterm or over ssh by (creating systemd session by) re-running apt-get under systemd-run. [Of course if systemd is available.] Perhaps, under `systemd-run --scope --user`.
(In reply to Vitaly Chikunov from comment #0) > Help naïve users running apt-get install in xterm or over ssh by (creating > systemd session by) re-running apt-get under systemd-run. [Of course if > systemd is available.] > > Perhaps, under `systemd-run --scope --user`. Probably, lingering should also be enabled while apt runs.
Alternative solution is built in https://git.altlinux.org/tasks/296591/ -- apt-get is wrapped with a child sub-reaper which does not exit until all created tasks (such as pdeath_execute) are finished. Because of this we don't need to defend them against systemd or reboot. ps. This will not protect in case of terminal window closing, but, perhaps, systemd-run would not protect against this (not tested), because there is output to a terminal. I believe that only something similar to screen/tmux would protect from this.
[#296591] DONE (try 4) apt.git=0.5.15lorg2-alt76
Спасибо! Давно ждали!