lahwaacz / sxlock

MIT License
41 stars 21 forks source link

dpms state not correctly restored when killed #26

Open charlesgoyard opened 4 years ago

charlesgoyard commented 4 years ago

Despite the signal handler, dpms state is not restored correctly.

How to reproduce: open two terminals, start the commands on terminal B quickly after running the ones on terminal A. On terminal A:

$ xset q | grep -A 4 DPMS ; sleep 20 ; killall sxlock
DPMS (Energy Star):
  Standby: 600    Suspend: 600    Off: 600
  DPMS is Enabled
  Monitor is On

On terminal B:

$ sxlock ; sleep 2 ; xset q | grep -A 4 DPMS
sxlock: Caught signal 15; dying
DPMS (Energy Star):
  Standby: 10    Suspend: 10    Off: 10
  DPMS is Enabled
  Monitor is Off