-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 El 2014-08-07 a las 17:00 +0200, Per Jessen escribió:
Carlos E. R. wrote:
Hah, sorry, I haven't read the whole thread. How about combining the setsid and trapping TERM ?
No, it does not work. I tried. setsid only "protects" about the terminal where the initial program was started closing. It can do nothing about the parent intentionally killing the children before it exits, at a timeout. Trapping sigterm works, but you have to do it on every child. Programs called from the child are killed, too. The only strategy that works is to wait for that timeout, till network manager starts shooting its kids, in the script. The script traps and ignores the signal, and only then it can start working on the slow tasks. - -- Cheers Carlos E. R. (from 13.1 x86_64 "Bottle" (Minas Tirith)) -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (GNU/Linux) iF4EAREIAAYFAlPktU0ACgkQja8UbcUWM1zrrgD/ZiKzZNscReY8jwB39jUPSaqs dyVZi/8nVkliw7tKIQcA/iVKquF3mafC7zgLz93gW6aHu7qpWKKxr7JThd+FczBd =N6kO -----END PGP SIGNATURE-----