chiark / gitweb /
Add -f option, to fork after a successful locking.
authorSimon Tatham <anakin@pobox.com>
Sat, 7 May 2016 15:58:07 +0000 (16:58 +0100)
committerMatthew Vernon <matthew@debian.org>
Sat, 21 May 2016 18:03:35 +0000 (19:03 +0100)
commiteb50973552a62e49274cfeeddf31245739c8f47e
tree3a9579994403c216d446836eb6fb3835a1e013fc
parent7331fbf2792a5ace5fab0ff6cff4390e05a82961
Add -f option, to fork after a successful locking.

This permits a chain of commands of the form 'xtrlock -f && suspend',
where 'suspend' is whatever CLI command suspends your particular
laptop environment, so that when you unsuspend you then have to unlock
the xtrlock.

Without this option, you have to run xtrlock in the background, and
then either include a bodgy sleep to try to avoid the suspend command
winning the race, or else find a way to test by some X-related means
that the locking has happened.

Signed-off-by: Simon Tatham <anakin@pobox.com>
xtrlock.c
xtrlock.man