Why does killing GS with SIGHUP crash on the 2nd time?



I'm in the process of developing an app in Python (3). One of the
functions it has it the restart the shell. I would like to refrain from
relying on calling commands from the shell using subprocess.call([]),
and so I used:
    os.kill((GS PID), 1) # 1 == SIGHUP

For some reason, using this command twice crashes the shell. It is not
python-specific, as pkill -HUP gnome-shell and killall -HUP gnome-shell
produce the same result, which is odd because Alt+F2 + "r" * (a lot)
does not crash it.

Should I be issuing a different signal to gnome-shell, or do I have to
use gnome-shell --replace from the commandline? 
-- 
Marco Scannadinari <marco scannadinari co uk>



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]