From 0208f3bfd132d58c31d5db06db6378277fa71c7b Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Sun, 1 Sep 2013 02:06:51 +0000 Subject: player: add "state dump" command to serialize state This helps in case dtas-player is hit with SIGKILL or the system crashes. This does not fsync(2) as that could introduce delays on slow filesystems. Users should open the file manually and fsync themselves if they need to. --- lib/dtas/player.rb | 2 ++ 1 file changed, 2 insertions(+) (limited to 'lib/dtas/player.rb') diff --git a/lib/dtas/player.rb b/lib/dtas/player.rb index ba42490..3571a7f 100644 --- a/lib/dtas/player.rb +++ b/lib/dtas/player.rb @@ -212,6 +212,8 @@ class DTAS::Player # :nodoc: io.emit("OK") when "source" source_handler(io, msg) + when "state" + state_file_handler(io, msg) when "cd" chdir_handler(io, msg) when "pwd" -- cgit v1.2.3-24-ge0c7