From a3fe4eabd4b3f1eaefb2589061e09787c000690d Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Sun, 1 Sep 2013 22:13:41 +0000 Subject: player: explicitly stop+wait for sink death at_exit 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). --- bin/dtas-player | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'bin/dtas-player') 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 } -- cgit v1.2.3-24-ge0c7