diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2022-04-28 19:07:01 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2022-04-28 19:07:01 -0700 |
commit | 4f616b1d8f97bf141d96dfdf225d09ef1172271d (patch) | |
tree | 16a1710aae8d5f1691404d145d3a08cba046158c /tests/018/forkflush.expected | |
parent | 96a5d7816b280b11718d9c354d491cf87db1a70c (diff) | |
download | txr-4f616b1d8f97bf141d96dfdf225d09ef1172271d.tar.gz txr-4f616b1d8f97bf141d96dfdf225d09ef1172271d.tar.bz2 txr-4f616b1d8f97bf141d96dfdf225d09ef1172271d.zip |
linenoise: Ctrl-Z: send SIGTSTP to group, not self.
I realized this issue while implementing Ctrl-Z for the pw
(Pipe Watch) program. Sending the SIGTSTP signal just to the
calling process is not enough. Only that process gets
suspended, which results in a weird behavior. It can be
tested like this, for instance:
txr | tee file
Ctrl-Z must be issued twice: once to sort of suspend txr, and
then again to send it to the tee program. Then the job
actually suspends and the shell prompt appears. With this fix,
the above situation requires only one Ctrl-Z, as expected.
* linenoise/linenoise.c (history_search, show_help, edit):
Don't raise(SIGTSTP), but kill(0, SIGTSTP) to send the suspend
signal to all processes in the process group.
Diffstat (limited to 'tests/018/forkflush.expected')
0 files changed, 0 insertions, 0 deletions