pmbootstrap-meow/pmb/helpers
Robert Yang 277854e80f Kill the child processes spawned by a run command
When the timeout occurs it is important to ensure clean up of child
processes. Killing only the direct process created by a command can
leave child processes running.

For example a pmbootstrap.py install will run apk add. This run command
creates multiple processes as follows:
(cmd line arguments snipped for readability)

  $ ps -e -o pid,ppid,pgid,cmd
  PID  PPID  PGID CMD
  31738 23247 31738 python3 ./pmbootstrap.py -t 15 install --no-fde
  31746 31738 31738 sudo env -i /bin/sh -c ... ;apk --no-progress add
  31747 31746 31738 /bin/sh -c ... ;apk --no-progress add
  31748 31747 31738 apk --no-progress add

The root process of the run command is PID 31746. We want to kill
the child processes too. Otherwise only running kill -9 31746 will leave
the processes 31747 and 31748 running.
2018-10-02 07:06:46 +00:00
..
__init__.py Happy new year! (update copyright to 2018) 2018-01-04 04:53:35 +01:00
args.py Move aports into own repository (pmaports) 2018-09-05 05:57:38 +00:00
cli.py Happy new year! (update copyright to 2018) 2018-01-04 04:53:35 +01:00
devices.py Happy new year! (update copyright to 2018) 2018-01-04 04:53:35 +01:00
file.py pmb: use UTF-8 in pmb.helpers.file.replace() 2018-07-11 18:26:01 +00:00
frontend.py pmbootstrap: kill process if silent for 5 minutes (rewrite logging) 2018-07-14 01:13:28 +00:00
git.py Link to wiki page if first git clone fails 2018-09-26 05:58:11 +00:00
http.py Happy new year! (update copyright to 2018) 2018-01-04 04:53:35 +01:00
logging.py Happy new year! (update copyright to 2018) 2018-01-04 04:53:35 +01:00
mount.py pmbootstrap build --src: override source for any package (#1210) 2018-02-19 22:04:01 +00:00
other.py Change default user uid to 10000 2018-08-02 20:10:56 +00:00
pkgrel_bump.py Fix conflict with mkbootimg and android-tools (#1557) 2018-06-17 21:26:34 +00:00
repo.py aportgen: Gracefully handle old aports_upstream (#1291) 2018-03-11 14:18:21 +00:00
run.py pmbootstrap: kill process if silent for 5 minutes (rewrite logging) 2018-07-14 01:13:28 +00:00
run_core.py Kill the child processes spawned by a run command 2018-10-02 07:06:46 +00:00
ui.py Show UI selection ordered by name, none remains at the beginning (#1092) 2018-01-07 03:55:27 +00:00