Skip to content

Commit

Permalink
dvtm-status: cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
martanne committed Feb 24, 2015
1 parent f32db56 commit 7460625
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions dvtm-status
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,15 @@

FIFO="/tmp/dvtm-status.$$"

[ -e "$FIFO" ] || mkfifo "$FIFO"
chmod 600 $FIFO
[ -p "$FIFO" ] || mkfifo -m 600 "$FIFO" || exit 1

while true; do
date +%H:%M
sleep 60
done > $FIFO &
done > "$FIFO" &

STATUS_PID=$!
dvtm -s $FIFO "$@" 2> /dev/null
dvtm -s "$FIFO" "$@" 2> /dev/null
kill $STATUS_PID
wait $STATUS_PID 2> /dev/null
rm $FIFO
rm -f "$FIFO"

0 comments on commit 7460625

Please sign in to comment.