From 8233cd9bf1da9203d3ad5664be3864e4fdaeff55 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Wed, 21 Mar 2018 13:47:08 -0400 Subject: wmiirc: make the wmiirc action work with systemd MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Because the new wmiirc won't be a direct child of `systemd --user` (why isn't it a subreaper!?), it won't notice if wmiirc crashes. But we don't expect it to do that. ¯\_(ツ)_/¯ --- .config/wmii-hg/util.sh | 2 +- .config/wmii-hg/wmiirc | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.config/wmii-hg/util.sh b/.config/wmii-hg/util.sh index f80b871..49095b2 100644 --- a/.config/wmii-hg/util.sh +++ b/.config/wmii-hg/util.sh @@ -131,7 +131,7 @@ if (. /etc/profile.d/plan9.sh || true; type 9pfuse) &>/dev/null; then while ! [[ -f "$2/event" ]]; do :; done } umount.9p() { - fusermount -u "$1" + fusermount -u -z "$1" } elif type 9mount &>/dev/null; then mount.9p() { diff --git a/.config/wmii-hg/wmiirc b/.config/wmii-hg/wmiirc index f96642b..a71b6d2 100755 --- a/.config/wmii-hg/wmiirc +++ b/.config/wmii-hg/wmiirc @@ -8,6 +8,7 @@ fi . include.sh +systemd-notify --pid || true wmiir xwrite /event WmiircQuit # close any existing wmiirc's Event WmiircStart @@ -16,4 +17,4 @@ trap "Event Quit" EXIT while read -r event; do Event $event <&- -done < <(wmiir read /event 2>/dev/null) +done < "$WMII_DIR/event" -- cgit v1.1-4-g5e80