about summary refs log tree commit homepage
path: root/bin
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2013-09-01 22:13:41 +0000
committerEric Wong <normalperson@yhbt.net>2013-09-01 22:13:41 +0000
commita3fe4eabd4b3f1eaefb2589061e09787c000690d (patch)
treee29067c66b31d5d67e512c05cb649faa52291063 /bin
parent4edc13592f71e54d4ef620fc67080733d88c53d0 (diff)
downloaddtas-a3fe4eabd4b3f1eaefb2589061e09787c000690d.tar.gz
This allows me to hit Ctrl-C on a dtas-player(1) process, wait on
termination of the player, and immediately restart it without
worrying about sink conflicts upon restart.

Before this change, sinks would continue running for a bit
(depending on buffer sizes).
Diffstat (limited to 'bin')
-rwxr-xr-xbin/dtas-player5
1 files changed, 4 insertions, 1 deletions
diff --git a/bin/dtas-player b/bin/dtas-player
index 640d31c..401a500 100755
--- a/bin/dtas-player
+++ b/bin/dtas-player
@@ -26,7 +26,10 @@ else
   player.socket = sock
 end
 
-at_exit { player.close }
+at_exit do
+  player.close
+  Process.waitall
+end
 player.bind
 trap(:INT) { exit }
 trap(:TERM) { exit }