about summary refs log tree commit homepage
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2015-11-29 02:48:38 +0000
committerEric Wong <e@80x24.org>2015-12-13 12:54:19 +0000
commitfc00838faa4480a03e8a33fedc80c4648817bb93 (patch)
treeff2bbd9ccf07d8e7ad7b97bc6a752c8f510f56f9
parentd628e9bd3c5ef42e44c8e14f8eaf9a85dd541a4c (diff)
downloaddtas-fc00838faa4480a03e8a33fedc80c4648817bb93.tar.gz
This makes interrupting the potentially long output of
"dtas-mlib dump" less ugly.  Perhaps it makes sense for our
other scripts to follow suit.
-rwxr-xr-xbin/dtas-mlib2
1 files changed, 2 insertions, 0 deletions
diff --git a/bin/dtas-mlib b/bin/dtas-mlib
index d897d83..16876a2 100755
--- a/bin/dtas-mlib
+++ b/bin/dtas-mlib
@@ -3,6 +3,8 @@
 # License: GPLv3 or later (https://www.gnu.org/licenses/gpl-3.0.txt)
 usage = "#$0 [-d DATABASE-URI] ACTION [ARGS]"
 Thread.abort_on_exception = $stderr.sync = $stdout.sync = true
+trap(:INT, 'SYSTEM_DEFAULT')
+trap(:PIPE, 'SYSTEM_DEFAULT')
 require 'dtas/mlib'
 require 'optparse'
 path = '~/.dtas/mlib.sqlite'