]> git.neil.brown.name Git - susman.git/log
susman.git
14 years agoRequire process requesting immediate suspend to remain active.
NeilBrown [Fri, 16 Mar 2012 01:49:52 +0000 (12:49 +1100)]
Require process requesting immediate suspend to remain active.

The process that creates 'immediate' must do so while disabling
suspend and must take a lock on the file.
If the process dies, this lock will disappear and auto-suspension
will stop.
This is a good fail-safe for development.

Might be good to make it configurable later.

Signed-off-by: NeilBrown <neilb@suse.de>
14 years agosuspend.py: add block/unblock support
NeilBrown [Fri, 16 Mar 2012 01:10:07 +0000 (12:10 +1100)]
suspend.py: add block/unblock support

Signed-off-by: NeilBrown <neilb@suse.de>
14 years agoAdd "susman" daemon
NeilBrown [Fri, 16 Mar 2012 00:36:32 +0000 (11:36 +1100)]
Add "susman" daemon

susman runs all three daemons
 lsusd
 lsused
 wakealarmd

We wait for each to get started before starting the next.

Signed-off-by: NeilBrown <neilb@suse.de>
14 years agolsused: exit if cannot bind socket.
NeilBrown [Thu, 15 Mar 2012 20:52:33 +0000 (07:52 +1100)]
lsused: exit if cannot bind socket.

Same for wakealarmd

Signed-off-by: NeilBrown <neilb@suse.de>
14 years agolsusd: add missing unlock of disable file.
NeilBrown [Thu, 15 Mar 2012 20:40:02 +0000 (07:40 +1100)]
lsusd: add missing unlock of disable file.

We shouldn't hold the disable file locked while
alerting watchers.  The comment said that we didn't,
but we did.
So unlock it.

Signed-off-by: NeilBrown <neilb@suse.de>
14 years agorequest_suspend: change check for suspend-is-disabled.
NeilBrown [Thu, 15 Mar 2012 20:40:00 +0000 (07:40 +1100)]
request_suspend: change check for suspend-is-disabled.

Both request_suspend and lsusd try to abort the request if suspend is
disabled.  However as they use the same mechanism they can trip over
each other and produce the wrong result.

So leave the primary checking to lsusd.  It will remove  the 'request'
file if needed, so request_suspend will notice.  It can then check
if a suspend actually happened by examining the 'watching' file.

Also: change request_suspend to exit(2) on strange error, and exit(1)
only if suspend was blocked.

Signed-off-by: NeilBrown <neilb@suse.de>
14 years agolsusd - a Linux SUSpend Daemon
NeilBrown [Fri, 21 Oct 2011 04:49:17 +0000 (15:49 +1100)]
lsusd - a Linux SUSpend Daemon

Initial commit.

Signed-off-by: NeilBrown <neilb@suse.de>