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