X-Git-Url: https://git.madduck.net/code/pulserecorder.git/blobdiff_plain/7cd55a11575980fba5232c781b41fab469d00ec7..537d0106ab8f4562db5d70a6103077d68f1db16e:/pulserecorder diff --git a/pulserecorder b/pulserecorder index a9f4cdc..5eb3bc6 100755 --- a/pulserecorder +++ b/pulserecorder @@ -44,6 +44,10 @@ export TMPDIR TMPDIR=$(mktemp -dp "$TMPDIR" parec.XXXXXXXXXX) cleanup_hook rm -r $TMPDIR +if command -v systemd-inhibit >/dev/null; then + systemd-inhibit --who=pulserecorder --why=recording sleep 99d 2>/dev/null & + cleanup_hook kill $! +fi state= outfile= index= clobber=0 for arg in "$@"; do @@ -68,7 +72,7 @@ pa_wait_for_event() { type="${1:-*}" event="${2:-*}" id="${3:-*}" pa_subscribe | ( read pid - #echo >&2 pa_subscribe started with PID $pid + #echo >&2 pa_subscribe started with PID $pid, waiting for $type/$event/$id while read lead xevent on xtype xid; do xid=${xid#\#} #echo >&2 "pa_subscribe: $xtype/$xevent/$xid ($type/$event/$id)"