summaryrefslogtreecommitdiff
path: root/rc/tools/python
diff options
context:
space:
mode:
authorJohannes Altmanninger <aclopte@gmail.com>2024-03-29 17:27:27 +0100
committerMaxime Coste <mawww@kakoune.org>2024-03-31 20:13:35 +1100
commit7b93567bb18629a0e61362821223e759b8598149 (patch)
tree7833aa802712f192409fe79257fb13e1939de84b /rc/tools/python
parent5d00b80d1a0c9176ada79a1a0118d77bb8645302 (diff)
Reset SIGINT handler in background processes
In a noninteractive shell, asynchronous commands ignore SIGINT and SIGQUIT. We typically use such shells to feed fifo buffers which we do want to cancel them on Control-C. Make it so. Same for SIGQUIT; that one is not typically used but I expect that along the Kakoune server it kills any child processes that (haven't been daemonized). Note that for unknown reasons, Bash already doesn't ignore SIGINT in async processes that use "eval". Note that Dash has a bug that prevents this from working; proposed fix is at https://lore.kernel.org/dash/20240329153905.154792-2-aclopte@gmail.com/ (While at it balance out some parens, to help the m command)
Diffstat (limited to 'rc/tools/python')
-rw-r--r--rc/tools/python/jedi.kak1
1 files changed, 1 insertions, 0 deletions
diff --git a/rc/tools/python/jedi.kak b/rc/tools/python/jedi.kak
index 14c05124..82d799a6 100644
--- a/rc/tools/python/jedi.kak
+++ b/rc/tools/python/jedi.kak
@@ -20,6 +20,7 @@ define-command jedi-complete -docstring "Complete the current selection" %{
dir=${kak_opt_jedi_tmp_dir}
printf %s\\n "evaluate-commands -draft %{ edit! -fifo ${dir}/fifo *jedi-output* }"
((
+ trap - INT QUIT
cd $(dirname ${kak_buffile})
export PYTHONPATH="$kak_opt_jedi_python_path:$PYTHONPATH"