From: Mark Wooding Date: Thu, 21 Sep 2017 07:51:50 +0000 (+0100) Subject: with-authinfo-kludge: Do job-control to make interrupt characters work. X-Git-Tag: 0.1.1~1 X-Git-Url: https://git.distorted.org.uk/~mdw/with-authinfo-kludge/commitdiff_plain/8956a632bf1ee65e0af794c4ba0486bf849db339?hp=8956a632bf1ee65e0af794c4ba0486bf849db339 with-authinfo-kludge: Do job-control to make interrupt characters work. Terminal-based newsreaders use terminal interrupt characters for their own purposes, i.e. slrn(1) arranges that C-g is the `VINTR' character (i.e., it sends `SIGINT' to the foreground process group). This is bad unless we take evasive action: it makes `slrn' go ding and cancel some UI action, but it also wipes out `with-authinfo-kludge' and its various helper processes, and brings the parent shell back into the foreground where it fights `slrn' over the terminal. Avoid this by running the client in a separate process group, pushing it into the foreground, and proxying signals and foregroundness back and forth to keep the shell happy. It's all a bit ugly and desperate, but it works well in practice and doesn't involve ignoring signals everywhere (which was my first attempt at solving this bug). ---