summaryrefslogtreecommitdiff
path: root/debian/patches/40_enable_term.patch
diff options
context:
space:
mode:
Diffstat (limited to 'debian/patches/40_enable_term.patch')
-rw-r--r--debian/patches/40_enable_term.patch55
1 files changed, 55 insertions, 0 deletions
diff --git a/debian/patches/40_enable_term.patch b/debian/patches/40_enable_term.patch
new file mode 100644
index 0000000..e8b1563
--- /dev/null
+++ b/debian/patches/40_enable_term.patch
@@ -0,0 +1,55 @@
+When a ripper is killed with ctrl-c, it is properly marked as "DAE failed
+with status 15, wav removed". However, afterwards pressing any key
+does precisely nothing, e.g. cursor keys or ctrl-l. ctrl-c does work,
+but messes up the display.
+
+The reason for that is that jack_term.disable() is called in the signal
+handler, but nobody calls jack_term.enable()... adding this works.
+
+In addition, let's ignore ctrl-c in the signal handler function because
+otherwise people could press ctrl-c again within the signal handler (e.g.
+while jack is waiting for the user to press enter when --wait is on), and
+then we get the display problem again because jack_term.enable() is not
+called.
+
+Debian #352755
+
+P.S. I'm not quite sure whether this fix (and 56_ctrl_c_termset.patch,
+which is related) are correct. Basically, according to the code, pressing
+Ctrl-C should clean up and then exit the program. However, for some reason
+jack never exits; all that happens is that the helpers are killed off. The
+sig variable seems to indicate whether we're really exiting or not...
+unfortunately, I have no idea why jack doesn't exit all the time or what
+the correct behaviour should be. See http://bugs.debian.org/196429 for
+some discussion about this.
+
+
+Depends on 21_fallback_ripper.patch
+
+
+diff -urN jack-3.1.1+cvs20050801~/jack_display.py jack-3.1.1+cvs20050801/jack_display.py
+--- jack-3.1.1+cvs20050801~/jack_display.py 2006-02-21 00:38:12.000000000 +0000
++++ jack-3.1.1+cvs20050801/jack_display.py 2006-02-21 00:38:34.000000000 +0000
+@@ -74,6 +74,10 @@
+ else:
+ exit_code = 0
+
++ # Ignore Ctrl-C while we disable and enable curses, otherwise there may
++ # be display problems.
++ sigint_handler = signal.getsignal(signal.SIGINT)
++ signal.signal(signal.SIGINT, signal.SIG_IGN)
+ jack_term.disable()
+
+ if sig:
+@@ -93,6 +97,10 @@
+ if cf['_wait_on_quit']:
+ raw_input("press ENTER to exit")
+
++ if sig:
++ jack_term.enable()
++ signal.signal(signal.SIGINT, sigint_handler)
++
+ sys.exit(exit_code)
+
+ #/ end of sig_handler /#
+