]> git.neil.brown.name Git - susman.git/log
susman.git
12 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>
12 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>
12 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>
12 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>