Detect user logout / shutdown in Python / GTK under Linux - SIGTERM/HUP not received
- by Ivo Wetzel
OK this is presumably a hard one, I've got an pyGTK application that has random crashes due to X Window errors that I can't catch/control.
So I created a wrapper that restarts the app as soon as it detects a crash, now comes the problem, when the user logs out or shuts down the system, the app exits with status 1. But on some X errors it does so…