Update `watcher` on `pid-died` signal
The current 500ms interval for refreshing the children list is still not enough to correctly handle quick e.g., ^C-^D
without showing the close dialog (which by the way annoyingly stays on due to #22), and further reducing it would result in heavily increased CPU usage. The mitigation is to just run the same watch()
on the pid-died
signal of train
, which happens to finish just in time to skip the close dialog entirely when the task is already (quite recently) dead at this moment, as expected.
Also, I've changed G_PRIORITY_DEFAULT
to G_PRIORITY_DEFAULT_IDLE
for the actual in-background watch()
, (presumably) additionally lowering the CPU usage.