From cf89b3457feaa7f7695fc992d25473f773423008 Mon Sep 17 00:00:00 2001 From: "Alex Xu (Hello71)" Date: Wed, 16 Aug 2017 20:36:09 -0400 Subject: Initial commit --- example.bash | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100755 example.bash (limited to 'example.bash') diff --git a/example.bash b/example.bash new file mode 100755 index 0000000..970b095 --- /dev/null +++ b/example.bash @@ -0,0 +1,14 @@ +#!/bin/bash + +# acquire the inhibition +exec 9> >(./inhibit-screensaver bash-inhibitor-example testing) + +# do work +echo Working... +sleep 10 + +# still works if we die +kill -9 $$ + +# otherwise, uninhibit like so (or just exit) +exec 9>&- -- cgit v1.2.3-54-g00ecf