Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Block TTY control signals in processes started from subshells #6893

Closed
wants to merge 1 commit into from

Conversation

krobelus
Copy link
Member

Same for processes started from event handlers.

This is consistent with the bash equivalent: from
https://www.gnu.org/software/bash/manual/html_node/Signals.html

Commands run as a result of command substitution ignore the
keyboard-generated job control signals SIGTTIN, SIGTTOU, and SIGTSTP.

Fixes #6300 (caused by SIGTTOU from subshell)
Fixes #6624 (caused by SIGTTIN from subshell)
Probably also #6692 which shows very similar symptoms to #6624, but I
have't been able to reproduce that.

TODOs:

  • Changes to fish usage are reflected in user documentation/manpages.
  • Tests have been added for regressions fixed
  • User-visible changes noted in CHANGELOG.md

@krobelus krobelus requested a review from ridiculousfish April 13, 2020 19:20
@krobelus krobelus marked this pull request as draft April 13, 2020 23:46
Same for processes started from event handlers.

This is consistent with the bash equivalent: from
https://www.gnu.org/software/bash/manual/html_node/Signals.html

	Commands run as a result of command substitution ignore the
	keyboard-generated job control signals SIGTTIN, SIGTTOU, and SIGTSTP.

Fixes fish-shell#6300 (caused by SIGTTOU from subshell)
Fixes fish-shell#6624 (caused by SIGTTIN from subshell)
Probably also fish-shell#6692 which shows very similar symptoms to fish-shell#6624, but I
have't been able to reproduce that.
@krobelus krobelus force-pushed the block-tty-signals branch from c730894 to 334a125 Compare April 13, 2020 23:58
@krobelus
Copy link
Member Author

krobelus commented Apr 14, 2020

Ugh, this doesn't actually fix #6300, but now it always reproduces. I'll take another look.
Also bash seems to be doing something differently, fish_test_helper does not report blocked signals in bash.

@zanchey
Copy link
Member

zanchey commented Apr 14, 2020

See also #1362, where fish handled the issue in a different way to bash

@krobelus
Copy link
Member Author

OK this does definitely not work since the issue is not specific to subshells, see the example in #6624 (comment)

@krobelus krobelus closed this Apr 22, 2020
@krobelus krobelus removed the request for review from ridiculousfish April 22, 2020 20:14
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 21, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

fish 3.1.0: __z --list | fzy results in tcsetattr error Command substitution in pipe to less may stop job
2 participants