From: Mark Wooding Date: Tue, 2 Jun 2020 09:58:48 +0000 (+0100) Subject: bin/disorder-notify: Don't fork on an explicit `watch' request. X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~mdw/git/profile/commitdiff_plain/a9e2532bb55d26e5064ed5060599cff0fe7b2493?ds=sidebyside bin/disorder-notify: Don't fork on an explicit `watch' request. --- diff --git a/bin/disorder-notify b/bin/disorder-notify index b2967e2..c68e50c 100755 --- a/bin/disorder-notify +++ b/bin/disorder-notify @@ -222,7 +222,6 @@ sub watch_and_notify0 ($) { sub watch_and_notify ($) { my ($now_playing) = @_; - fork and exit 0; claim_lock or exit 1; for (;;) { @@ -290,7 +289,10 @@ $OP{"notify-now-playing"} = sub { my $info = get_now_playing $sk; close $sk; notify "$TITLE: Now playing", format_now_playing %$info; - defined locked_by or watch_and_notify 0; + unless (defined locked_by) { + fork and exit 0; + watch_and_notify 0; + } }; $OP{"next-config"} = sub {