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

Variant of the `No TTY for interactive shell` #4178

Closed
ghost opened this Issue Jul 2, 2017 · 10 comments

Comments

Projects
None yet
7 participants
@ghost
Copy link

ghost commented Jul 2, 2017

I've been experiencing a persistent variant of the No TTY for interactive shell error trying to install oh-my-fish on fish v2.6.0:

≻ curl -L https://get.oh-my.fish | fish
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   194  100   194    0     0    426      0 --:--:-- --:--:-- --:--:--   427
100 16622  100 16622    0     0  25023      0 --:--:-- --:--:-- --:--:-- 25023
Existing installation detected at /Users/patrick.bohan/.local/share/omf
Would you like to remove the existing installation? (y/N): <W> fish: No TTY for interactive shell (tcgetpgrp failed)
setpgid: Inappropriate ioctl for device

Requested ticket information:

≻ fish --version
fish, version 2.6.0
≻ echo $version
2.6.0
≻ uname -a
Darwin patrickbohanwerallyin.local 16.6.0 Darwin Kernel Version 16.6.0: Fri Apr 14 16:21:16 PDT 2017; root:xnu-3789.60.24~6/RELEASE_X86_64 x86_64
≻ echo $TERM
xterm-256color

It does indeed when I run without customizations, i.e. sh -c 'env HOME=$(mktemp -d) fish'.
I'm rather new to fish -- I've mostly stuck to customizing my fish_prompt -- but I'm at a loss for what change might have done this. I'm happy to narrow this down on my own but I'm not entirely sure the best way to do that. (I tried fish --debug-level=3 but I'm not sure exactly what I might be looking for.)

I tried the alternate install and the first read succeeded but a second one failed. I got a stack trace that might (hopefully) is useful:

[patrick.bohan|~]0≻ curl -L https://get.oh-my.fish > install
                    fish install --path=~/.local/share/omf --config=~/.config/omf
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   194  100   194    0     0    384      0 --:--:-- --:--:-- --:--:--   385
100 16622  100 16622    0     0  24041      0 --:--:-- --:--:-- --:--:-- 24041
Existing installation detected at /Users/patrick.bohan/.local/share/omf
Would you like to remove the existing installation? (y/N): ⏎                                                                                                                                                                                                                  read> y
This will uninstall Oh My Fish and all plugins and themes from
/Users/patrick.bohan/.local/share/omf.
Are you sure you want to continue? (y/N): <E> fish: src/reader.cpp:1559: failed assertion: input_initialized
<E> fish: Backtrace:
<E> fish: 0   reader_push(wchar_t const*) + 1056
<E> fish: 1   builtin_read(parser_t&, io_streams_t&, wchar_t**) + 1482
<E> fish: 2   builtin_run(parser_t&, wchar_t const* const*, io_streams_t&) + 334
<E> fish: 3   exec_job(parser_t&, job_t*) + 3736
<E> fish: 4   parse_execution_context_t::run_1_job(parse_node_t const&, block_t const*) + 1204
<E> fish: 5   parse_execution_context_t::run_job_list(parse_node_t const&, block_t const*) + 117
<E> fish: 6   parse_execution_context_t::eval_node_at_offset(unsigned int, block_t const*, io_chain_t const&) + 403
<E> fish: 7   parser_t::eval_block_node(unsigned int, io_chain_t const&, block_type_t) + 140
<E> fish: 8   parser_t::eval(std::__1::basic_string<wchar_t, std::__1::char_traits<wchar_t>, std::__1::allocator<wchar_t> > const&, io_chain_t const&, block_type_t, parse_node_tree_t) + 230
<E> fish: 9   parser_t::eval(std::__1::basic_string<wchar_t, std::__1::char_traits<wchar_t>, std::__1::allocator<wchar_t> > const&, io_chain_t const&, block_type_t) + 134
<E> fish: 10  internal_exec_helper(parser_t&, std::__1::basic_string<wchar_t, std::__1::char_traits<wchar_t>, std::__1::allocator<wchar_t> > const&, unsigned int, block_type_t, io_chain_t const&) + 1017
<E> fish: 11  exec_job(parser_t&, job_t*) + 2885
<E> fish: 12  parse_execution_context_t::run_1_job(parse_node_t const&, block_t const*) + 1204
<E> fish: 13  parse_execution_context_t::run_job_list(parse_node_t const&, block_t const*) + 117
<E> fish: 14  parse_execution_context_t::eval_node_at_offset(unsigned int, block_t const*, io_chain_t const&) + 403
<E> fish: 15  parser_t::eval_block_node(unsigned int, io_chain_t const&, block_type_t) + 140
<E> fish: 16  parser_t::eval(std::__1::basic_string<wchar_t, std::__1::char_traits<wchar_t>, std::__1::allocator<wchar_t> > const&, io_chain_t const&, block_type_t, parse_node_tree_t) + 230
<E> fish: 17  parser_t::eval(std::__1::basic_string<wchar_t, std::__1::char_traits<wchar_t>, std::__1::allocator<wchar_t> > const&, io_chain_t const&, block_type_t) + 134
<E> fish: 18  internal_exec_helper(parser_t&, std::__1::basic_string<wchar_t, std::__1::char_traits<wchar_t>, std::__1::allocator<wchar_t> > const&, unsigned int, block_type_t, io_chain_t const&) + 1017
<E> fish: 19  exec_job(parser_t&, job_t*) + 2885
<E> fish: 20  parse_execution_context_t::run_1_job(parse_node_t const&, block_t const*) + 1204
<E> fish: 21  parse_execution_context_t::run_job_list(parse_node_t const&, block_t const*) + 117
<E> fish: 22  parse_execution_context_t::eval_node_at_offset(unsigned int, block_t const*, io_chain_t const&) + 403
<E> fish: 23  parser_t::eval_block_node(unsigned int, io_chain_t const&, block_type_t) + 140
<E> fish: 24  parser_t::eval(std::__1::basic_string<wchar_t, std::__1::char_traits<wchar_t>, std::__1::allocator<wchar_t> > const&, io_chain_t const&, block_type_t, parse_node_tree_t) + 230
<E> fish: 25  parser_t::eval(std::__1::basic_string<wchar_t, std::__1::char_traits<wchar_t>, std::__1::allocator<wchar_t> > const&, io_chain_t const&, block_type_t) + 134
<E> fish: 26  internal_exec_helper(parser_t&, std::__1::basic_string<wchar_t, std::__1::char_traits<wchar_t>, std::__1::allocator<wchar_t> > const&, unsigned int, block_type_t, io_chain_t const&) + 1017
<E> fish: 27  exec_job(parser_t&, job_t*) + 2885
<E> fish: 28  parse_execution_context_t::run_1_job(parse_node_t const&, block_t const*) + 1204
<E> fish: 29  parse_execution_context_t::run_job_list(parse_node_t const&, block_t const*) + 117
<E> fish: 30  parse_execution_context_t::run_if_statement(parse_node_t const&) + 461
<E> fish: 31  parse_execution_context_t::run_1_job(parse_node_t const&, block_t const*) + 529
<E> fish: 32  parse_execution_context_t::run_job_list(parse_node_t const&, block_t const*) + 117
<E> fish: 33  parse_execution_context_t::run_if_statement(parse_node_t const&) + 461
<E> fish: 34  parse_execution_context_t::run_1_job(parse_node_t const&, block_t const*) + 529
<E> fish: 35  parse_execution_context_t::run_job_list(parse_node_t const&, block_t const*) + 117
<E> fish: 36  parse_execution_context_t::eval_node_at_offset(unsigned int, block_t const*, io_chain_t const&) + 403
<E> fish: 37  parser_t::eval_block_node(unsigned int, io_chain_t const&, block_type_t) + 140
<E> fish: 38  parser_t::eval(std::__1::basic_string<wchar_t, std::__1::char_traits<wchar_t>, std::__1::allocator<wchar_t> > const&, io_chain_t const&, block_type_t, parse_node_tree_t) + 230
<E> fish: 39  parser_t::eval(std::__1::basic_string<wchar_t, std::__1::char_traits<wchar_t>, std::__1::allocator<wchar_t> > const&, io_chain_t const&, block_type_t) + 134
<E> fish: 40  internal_exec_helper(parser_t&, std::__1::basic_string<wchar_t, std::__1::char_traits<wchar_t>, std::__1::allocator<wchar_t> > const&, unsigned int, block_type_t, io_chain_t const&) + 1017
<E> fish: 41  exec_job(parser_t&, job_t*) + 2885
<E> fish: 42  parse_execution_context_t::run_1_job(parse_node_t const&, block_t const*) + 1204
<E> fish: 43  parse_execution_context_t::run_job_list(parse_node_t const&, block_t const*) + 117
<E> fish: 44  parse_execution_context_t::eval_node_at_offset(unsigned int, block_t const*, io_chain_t const&) + 403
<E> fish: 45  parser_t::eval_block_node(unsigned int, io_chain_t const&, block_type_t) + 140
<E> fish: 46  parser_t::eval(std::__1::basic_string<wchar_t, std::__1::char_traits<wchar_t>, std::__1::allocator<wchar_t> > const&, io_chain_t const&, block_type_t, parse_node_tree_t) + 230
<E> fish: 47  reader_read(int, io_chain_t const&) + 1877
<E> fish: 48  main + 3118
<E> fish: 49  start + 1
<E> fish: 50  53  ???                                 0x0000000000000004 0x0 + 4
fish: 'fish install --path=~/.local/sh…' terminated by signal SIGABRT (Abort)
[patrick.bohan|~]134≻

Unfortunately I haven't found any work around for this problem. I've looked at several seemingly related tickets ( #3805 , #3345 , #2980, #1844 ) but none appeared to be helpful for my situation.

Any help would be greatly appreciated.

@krader1961

This comment has been minimized.

Copy link
Contributor

krader1961 commented Jul 2, 2017

I had no problem using either installation method:

> fish install --path=~/.local/share/omf --config=~/.config/omf
Installing Oh My Fish to /Users/krader/.local/share/omf...
Using release channel "stable".
Cloning master from https://github.com/oh-my-fish/oh-my-fish.git...
Writing bootstrap to /Users/krader/.config/fish/conf.d/omf.fish...
Existent fish_prompt.fish found at /Users/krader/.config/fish/functions
↳ Moving to /Users/krader/.config/fish/functions/fish_prompt.1499027438.copy
Setting up Oh My Fish configuration...
Updating https://github.com/oh-my-fish/packages-main master... Done!
Installing package default
✔ default successfully installed.
Installation successful!

I do, however, see both failure modes when I attempt to reinstall OMF. So you can solve your immediate problem by first uninstalling OMF before installing it again:

> rm -rf ~/.local/share/omf
> rm ~/.config/fish/conf.d/omf.fish

You don't need OMF to reproduce this problem. Create a file named read-bug containing this:

function confirm
    read -l answer < /dev/tty
    echo "answer=|$answer|"
end

confirm

Now type echo yes | fish read-bug. This is probably another manifestation of problems caused by fish trying to put itself into its own process group at startup.

@tomsmeding

This comment has been minimized.

Copy link
Contributor

tomsmeding commented Jul 8, 2017

The testcase mentioned here, with the read-bug file, first throws an error after commit 5809608. The testcase mentioned in #4199 first crashes on an assertion after commit 6d02bec. These are quite some commits apart.

@tomsmeding

This comment has been minimized.

Copy link
Contributor

tomsmeding commented Jul 8, 2017

In particular, the config.fish testcase in #4199 still works in 5809608, and the tty read bug here is still present in 6d02bec.

@mqudsi

This comment has been minimized.

Copy link
Contributor

mqudsi commented Sep 10, 2017

This is probably another manifestation of problems caused by fish trying to put itself into its own process group at startup.

No, I think this is more about the problem with functions that try to take control of the terminal when called as part of a pipeline, à la #3952

In all cases, it still reproduces after 55b3c45, which disabled the new process group on startup code.

@pcascio

This comment has been minimized.

Copy link

pcascio commented Sep 12, 2017

I also have this problem when trying to run this script for cleaning up my unused Homebrew formulae: https://github.com/connorworley/dotfiles/blob/master/.bin/brew-autoremove

fish --version
fish, version 2.6.0
echo $version
2.6.0
uname -a
Darwin Cascio-MBP 16.7.0 Darwin Kernel Version 16.7.0: Thu Jun 15 17:36:27 PDT 2017; root:xnu-3789.70.16~2/RELEASE_X86_64 x86_64
echo $TERM
ansi

My stack:

./brew-autoremove.sh
Searching for formulas not depended on by other formulas...
activemq is not depended on by other formulas. Remove? [Y/n] n
fish: src/reader.cpp:1559: failed assertion: input_initialized
fish: Backtrace:
fish: 0 reader_push(wchar_t const*) + 1056
fish: 1 builtin_read(parser_t&, io_streams_t&, wchar_t**) + 1482
fish: 2 builtin_run(parser_t&, wchar_t const* const*, io_streams_t&) + 334
fish: 3 exec_job(parser_t&, job_t*) + 3736
fish: 4 parse_execution_context_t::run_1_job(parse_node_t const&, block_t const*) + 1204
fish: 5 parse_execution_context_t::run_job_list(parse_node_t const&, block_t const*) + 117
fish: 6 parse_execution_context_t::run_if_statement(parse_node_t const&) + 461
fish: 7 parse_execution_context_t::run_1_job(parse_node_t const&, block_t const*) + 529
fish: 8 parse_execution_context_t::run_job_list(parse_node_t const&, block_t const*) + 117
fish: 9 parse_execution_context_t::run_for_statement(parse_node_t const&, parse_node_t const&) + 378
fish: 10 parse_execution_context_t::run_1_job(parse_node_t const&, block_t const*) + 357
fish: 11 parse_execution_context_t::run_job_list(parse_node_t const&, block_t const*) + 117
fish: 12 parse_execution_context_t::eval_node_at_offset(unsigned int, block_t const*, io_chain_t const&) + 403
fish: 13 parser_t::eval_block_node(unsigned int, io_chain_t const&, block_type_t) + 140
fish: 14 parser_t::eval(std::__1::basic_string<wchar_t, std::__1::char_traits<wchar_t>, std::__1::allocator<wchar_t> > const&, io_chain_t const&, block_type_t, parse_node_tree_t) + 230
fish: 15 parser_t::eval(std::__1::basic_string<wchar_t, std::__1::char_traits<wchar_t>, std::__1::allocator<wchar_t> > const&, io_chain_t const&, block_type_t) + 134
fish: 16 internal_exec_helper(parser_t&, std::__1::basic_string<wchar_t, std::__1::char_traits<wchar_t>, std::__1::allocator<wchar_t> > const&, unsigned int, block_type_t, io_chain_t const&) + 1017
fish: 17 exec_job(parser_t&, job_t*) + 2885
fish: 18 parse_execution_context_t::run_1_job(parse_node_t const&, block_t const*) + 1204
fish: 19 parse_execution_context_t::run_job_list(parse_node_t const&, block_t const*) + 117
fish: 20 parse_execution_context_t::eval_node_at_offset(unsigned int, block_t const*, io_chain_t const&) + 403
fish: 21 parser_t::eval_block_node(unsigned int, io_chain_t const&, block_type_t) + 140
fish: 22 parser_t::eval(std::__1::basic_string<wchar_t, std::__1::char_traits<wchar_t>, std::__1::allocator<wchar_t> > const&, io_chain_t const&, block_type_t, parse_node_tree_t) + 230
fish: 23 reader_read(int, io_chain_t const&) + 1877
fish: 24 main + 3118
fish: 25 start + 1
fish: './brew-autoremove.sh' terminated by signal SIGABRT (Abort)

@mqudsi

This comment has been minimized.

Copy link
Contributor

mqudsi commented Sep 15, 2017

The assertion failed issue should be tracked here: #4199

There are two distinct bugs here, though there is some correlation between the two.

@tastyminerals

This comment has been minimized.

Copy link

tastyminerals commented Oct 3, 2017

Experiencing the same behaviour after installing fish and trying to install oh-my-fish via sudo fish install --path=~/.local/share/omf --config=~/.config/omf or simply running ./bin/install from git cloned oh-my-fish dir. Any updates?

@boxed

This comment has been minimized.

Copy link

boxed commented Nov 11, 2017

I just ran into this same problem, also with omf. The workaround above worked fine.

@mqudsi

This comment has been minimized.

Copy link
Contributor

mqudsi commented Sep 29, 2018

fwiw, fish no longer crashes on this case. Instead, the following message is printed:

mqudsi@freebsd ~/fish-shell> echo yes | fish read-bug
<W> fish: I appear to be an orphaned process, so I am quitting politely. My pid is 67738.

mqudsi added a commit to mqudsi/fish-shell that referenced this issue Sep 29, 2018

Handle tcgetpgrp() zero result
When `tcgetpgrp()` returns 0, attempt to set the controlling process
group directly. When forking a builtin and not running interactively, do
not set terminal attributes (nor restore them).

Fixes fish-shell#4178 (at least connected to FreeBSD over SSH).

mqudsi added a commit to mqudsi/fish-shell that referenced this issue Sep 29, 2018

mqudsi added a commit to mqudsi/fish-shell that referenced this issue Oct 2, 2018

Overhaul job and terminal control
* Instead of reaping all child processes when we receive a SIGCHLD, try
reaping only processes belonging to process groups from fully-
constructed jobs, which should elimante the need for the keepalive
process entirely (WSL's lack of zombies not withstanding) as now
completed processes are not reaped until the job has been fully
constructed (i.e.  all processes launched), which means their process
group should still be around for new processes to join.

* When `tcgetpgrp()` calls return 0, attempt to `tcsetpgrp()` before
invoking failure handling code.

* When forking a builtin and not running interactively, do not bail if
unable to set/restore terminal attributes.

Fixes fish-shell#4178. Fixes fish-shell#3805. Fixes fish-shell#5210.

mqudsi added a commit to mqudsi/fish-shell that referenced this issue Oct 8, 2018

Overhaul job and terminal control
* Instead of reaping all child processes when we receive a SIGCHLD, try
reaping only processes belonging to process groups from fully-
constructed jobs, which should elimante the need for the keepalive
process entirely (WSL's lack of zombies not withstanding) as now
completed processes are not reaped until the job has been fully
constructed (i.e.  all processes launched), which means their process
group should still be around for new processes to join.

* When `tcgetpgrp()` calls return 0, attempt to `tcsetpgrp()` before
invoking failure handling code.

* When forking a builtin and not running interactively, do not bail if
unable to set/restore terminal attributes.

Fixes fish-shell#4178. Fixes fish-shell#3805. Fixes fish-shell#5210.

mqudsi added a commit to mqudsi/fish-shell that referenced this issue Oct 8, 2018

Overhaul job and terminal control
* Instead of reaping all child processes when we receive a SIGCHLD, try
reaping only processes belonging to process groups from fully-
constructed jobs, which should elimante the need for the keepalive
process entirely (WSL's lack of zombies not withstanding) as now
completed processes are not reaped until the job has been fully
constructed (i.e.  all processes launched), which means their process
group should still be around for new processes to join.

* When `tcgetpgrp()` calls return 0, attempt to `tcsetpgrp()` before
invoking failure handling code.

* When forking a builtin and not running interactively, do not bail if
unable to set/restore terminal attributes.

Fixes fish-shell#4178. Fixes fish-shell#3805. Fixes fish-shell#5210.

mqudsi added a commit to mqudsi/fish-shell that referenced this issue Oct 8, 2018

Overhaul job and terminal control
* Instead of reaping all child processes when we receive a SIGCHLD, try
reaping only processes belonging to process groups from fully-
constructed jobs, which should eliminate the need for the keepalive
process entirely (WSL's lack of zombies not withstanding) as now
completed processes are not reaped until the job has been fully
constructed (i.e.  all processes launched), which means their process
group should still be around for new processes to join.

* When `tcgetpgrp()` calls return 0, attempt to `tcsetpgrp()` before
invoking failure handling code.

* When forking a builtin and not running interactively, do not bail if
unable to set/restore terminal attributes.

Fixes fish-shell#4178. Fixes fish-shell#3805. Fixes fish-shell#5210.

mqudsi added a commit to mqudsi/fish-shell that referenced this issue Oct 8, 2018

Overhaul job and terminal control
* Instead of reaping all child processes when we receive a SIGCHLD, try
reaping only processes belonging to process groups from fully-
constructed jobs, which should eliminate the need for the keepalive
process entirely (WSL's lack of zombies not withstanding) as now
completed processes are not reaped until the job has been fully
constructed (i.e.  all processes launched), which means their process
group should still be around for new processes to join.

* When `tcgetpgrp()` calls return 0, attempt to `tcsetpgrp()` before
invoking failure handling code.

* When forking a builtin and not running interactively, do not bail if
unable to set/restore terminal attributes.

Fixes fish-shell#4178. Fixes fish-shell#3805. Fixes fish-shell#5210.
@sadlerdavid

This comment has been minimized.

Copy link

sadlerdavid commented Oct 8, 2018

I was able to solve this on OSX with:
sudo rm -rf /Users/myname/.local/share/omf
curl -L https://get.oh-my.fish | fish

--encase it helps anyone..

mqudsi added a commit to mqudsi/fish-shell that referenced this issue Oct 9, 2018

Overhaul job and terminal control
* Instead of reaping all child processes when we receive a SIGCHLD, try
reaping only processes belonging to process groups from fully-
constructed jobs, which should eliminate the need for the keepalive
process entirely (WSL's lack of zombies not withstanding) as now
completed processes are not reaped until the job has been fully
constructed (i.e.  all processes launched), which means their process
group should still be around for new processes to join.

* When `tcgetpgrp()` calls return 0, attempt to `tcsetpgrp()` before
invoking failure handling code.

* When forking a builtin and not running interactively, do not bail if
unable to set/restore terminal attributes.

Fixes fish-shell#4178. Fixes fish-shell#3805. Fixes fish-shell#5210.

mqudsi added a commit to mqudsi/fish-shell that referenced this issue Oct 10, 2018

Overhaul job and terminal control
* Instead of reaping all child processes when we receive a SIGCHLD, try
reaping only processes belonging to process groups from fully-
constructed jobs, which should eliminate the need for the keepalive
process entirely (WSL's lack of zombies not withstanding) as now
completed processes are not reaped until the job has been fully
constructed (i.e.  all processes launched), which means their process
group should still be around for new processes to join.

* When `tcgetpgrp()` calls return 0, attempt to `tcsetpgrp()` before
invoking failure handling code.

* When forking a builtin and not running interactively, do not bail if
unable to set/restore terminal attributes.

Fixes fish-shell#4178. Fixes fish-shell#3805. Fixes fish-shell#5210.

mqudsi added a commit to mqudsi/fish-shell that referenced this issue Oct 10, 2018

Overhaul job and terminal control
* Instead of reaping all child processes when we receive a SIGCHLD, try
reaping only processes belonging to process groups from fully-
constructed jobs, which should eliminate the need for the keepalive
process entirely (WSL's lack of zombies not withstanding) as now
completed processes are not reaped until the job has been fully
constructed (i.e.  all processes launched), which means their process
group should still be around for new processes to join.

* When `tcgetpgrp()` calls return 0, attempt to `tcsetpgrp()` before
invoking failure handling code.

* When forking a builtin and not running interactively, do not bail if
unable to set/restore terminal attributes.

Fixes fish-shell#4178. Fixes fish-shell#3805. Fixes fish-shell#5210.

mqudsi added a commit to mqudsi/fish-shell that referenced this issue Oct 11, 2018

Overhaul job and terminal control
* Instead of reaping all child processes when we receive a SIGCHLD, try
reaping only processes belonging to process groups from fully-
constructed jobs, which should eliminate the need for the keepalive
process entirely (WSL's lack of zombies not withstanding) as now
completed processes are not reaped until the job has been fully
constructed (i.e.  all processes launched), which means their process
group should still be around for new processes to join.

* When `tcgetpgrp()` calls return 0, attempt to `tcsetpgrp()` before
invoking failure handling code.

* When forking a builtin and not running interactively, do not bail if
unable to set/restore terminal attributes.

Fixes fish-shell#4178. Fixes fish-shell#3805. Fixes fish-shell#5210.

mqudsi added a commit to mqudsi/fish-shell that referenced this issue Oct 13, 2018

Overhaul job and terminal control
* Instead of reaping all child processes when we receive a SIGCHLD, try
reaping only processes belonging to process groups from fully-
constructed jobs, which should eliminate the need for the keepalive
process entirely (WSL's lack of zombies not withstanding) as now
completed processes are not reaped until the job has been fully
constructed (i.e.  all processes launched), which means their process
group should still be around for new processes to join.

* When `tcgetpgrp()` calls return 0, attempt to `tcsetpgrp()` before
invoking failure handling code.

* When forking a builtin and not running interactively, do not bail if
unable to set/restore terminal attributes.

Fixes fish-shell#4178. Fixes fish-shell#3805. Fixes fish-shell#5210.

mqudsi added a commit to mqudsi/fish-shell that referenced this issue Oct 15, 2018

Overhaul job and terminal control
* Instead of reaping all child processes when we receive a SIGCHLD, try
reaping only processes belonging to process groups from fully-
constructed jobs, which should eliminate the need for the keepalive
process entirely (WSL's lack of zombies not withstanding) as now
completed processes are not reaped until the job has been fully
constructed (i.e.  all processes launched), which means their process
group should still be around for new processes to join.

* When `tcgetpgrp()` calls return 0, attempt to `tcsetpgrp()` before
invoking failure handling code.

* When forking a builtin and not running interactively, do not bail if
unable to set/restore terminal attributes.

Fixes fish-shell#4178. Fixes fish-shell#3805. Fixes fish-shell#5210.

mqudsi added a commit to mqudsi/fish-shell that referenced this issue Oct 18, 2018

Overhaul job and terminal control
* Instead of reaping all child processes when we receive a SIGCHLD, try
reaping only processes belonging to process groups from fully-
constructed jobs, which should eliminate the need for the keepalive
process entirely (WSL's lack of zombies not withstanding) as now
completed processes are not reaped until the job has been fully
constructed (i.e.  all processes launched), which means their process
group should still be around for new processes to join.

* When `tcgetpgrp()` calls return 0, attempt to `tcsetpgrp()` before
invoking failure handling code.

* When forking a builtin and not running interactively, do not bail if
unable to set/restore terminal attributes.

Fixes fish-shell#4178. Fixes fish-shell#3805. Fixes fish-shell#5210.

mqudsi added a commit to mqudsi/fish-shell that referenced this issue Oct 19, 2018

Overhaul job and terminal control
* Instead of reaping all child processes when we receive a SIGCHLD, try
reaping only processes belonging to process groups from fully-
constructed jobs, which should eliminate the need for the keepalive
process entirely (WSL's lack of zombies not withstanding) as now
completed processes are not reaped until the job has been fully
constructed (i.e.  all processes launched), which means their process
group should still be around for new processes to join.

* When `tcgetpgrp()` calls return 0, attempt to `tcsetpgrp()` before
invoking failure handling code.

* When forking a builtin and not running interactively, do not bail if
unable to set/restore terminal attributes.

Fixes fish-shell#4178. Fixes fish-shell#3805. Fixes fish-shell#5210.

mqudsi added a commit to mqudsi/fish-shell that referenced this issue Oct 20, 2018

Overhaul job and terminal control
* Instead of reaping all child processes when we receive a SIGCHLD, try
reaping only processes belonging to process groups from fully-
constructed jobs, which should eliminate the need for the keepalive
process entirely (WSL's lack of zombies not withstanding) as now
completed processes are not reaped until the job has been fully
constructed (i.e.  all processes launched), which means their process
group should still be around for new processes to join.

* When `tcgetpgrp()` calls return 0, attempt to `tcsetpgrp()` before
invoking failure handling code.

* When forking a builtin and not running interactively, do not bail if
unable to set/restore terminal attributes.

Fixes fish-shell#4178. Fixes fish-shell#3805. Fixes fish-shell#5210.

mqudsi added a commit to mqudsi/fish-shell that referenced this issue Oct 22, 2018

Overhaul job and terminal control
* Instead of reaping all child processes when we receive a SIGCHLD, try
reaping only processes belonging to process groups from fully-
constructed jobs, which should eliminate the need for the keepalive
process entirely (WSL's lack of zombies not withstanding) as now
completed processes are not reaped until the job has been fully
constructed (i.e.  all processes launched), which means their process
group should still be around for new processes to join.

* When `tcgetpgrp()` calls return 0, attempt to `tcsetpgrp()` before
invoking failure handling code.

* When forking a builtin and not running interactively, do not bail if
unable to set/restore terminal attributes.

Fixes fish-shell#4178. Fixes fish-shell#3805. Fixes fish-shell#5210.

mqudsi added a commit to mqudsi/fish-shell that referenced this issue Oct 24, 2018

Overhaul job and terminal control
* Instead of reaping all child processes when we receive a SIGCHLD, try
reaping only processes belonging to process groups from fully-
constructed jobs, which should eliminate the need for the keepalive
process entirely (WSL's lack of zombies not withstanding) as now
completed processes are not reaped until the job has been fully
constructed (i.e.  all processes launched), which means their process
group should still be around for new processes to join.

* When `tcgetpgrp()` calls return 0, attempt to `tcsetpgrp()` before
invoking failure handling code.

* When forking a builtin and not running interactively, do not bail if
unable to set/restore terminal attributes.

Fixes fish-shell#4178. Fixes fish-shell#3805. Fixes fish-shell#5210.

mqudsi added a commit to mqudsi/fish-shell that referenced this issue Oct 27, 2018

Overhaul job and terminal control
* Instead of reaping all child processes when we receive a SIGCHLD, try
reaping only processes belonging to process groups from fully-
constructed jobs, which should eliminate the need for the keepalive
process entirely (WSL's lack of zombies not withstanding) as now
completed processes are not reaped until the job has been fully
constructed (i.e.  all processes launched), which means their process
group should still be around for new processes to join.

* When `tcgetpgrp()` calls return 0, attempt to `tcsetpgrp()` before
invoking failure handling code.

* When forking a builtin and not running interactively, do not bail if
unable to set/restore terminal attributes.

Fixes fish-shell#4178. Fixes fish-shell#3805. Fixes fish-shell#5210.

mqudsi added a commit to mqudsi/fish-shell that referenced this issue Oct 27, 2018

Overhaul job and terminal control
* Instead of reaping all child processes when we receive a SIGCHLD, try
reaping only processes belonging to process groups from fully-
constructed jobs, which should eliminate the need for the keepalive
process entirely (WSL's lack of zombies not withstanding) as now
completed processes are not reaped until the job has been fully
constructed (i.e.  all processes launched), which means their process
group should still be around for new processes to join.

* When `tcgetpgrp()` calls return 0, attempt to `tcsetpgrp()` before
invoking failure handling code.

* When forking a builtin and not running interactively, do not bail if
unable to set/restore terminal attributes.

Fixes fish-shell#4178. Fixes fish-shell#3805. Fixes fish-shell#5210.

@mqudsi mqudsi modified the milestones: fish-future, fish-3.0 Oct 27, 2018

@mqudsi mqudsi closed this in #5219 Oct 27, 2018

mqudsi added a commit that referenced this issue Oct 27, 2018

Overhaul job and terminal control
* Instead of reaping all child processes when we receive a SIGCHLD, try
reaping only processes belonging to process groups from fully-
constructed jobs, which should eliminate the need for the keepalive
process entirely (WSL's lack of zombies not withstanding) as now
completed processes are not reaped until the job has been fully
constructed (i.e.  all processes launched), which means their process
group should still be around for new processes to join.

* When `tcgetpgrp()` calls return 0, attempt to `tcsetpgrp()` before
invoking failure handling code.

* When forking a builtin and not running interactively, do not bail if
unable to set/restore terminal attributes.

Fixes #4178. Fixes #3805. Fixes #5210.

ridiculousfish added a commit to ridiculousfish/fish-shell that referenced this issue Nov 24, 2018

Overhaul job and terminal control
* Instead of reaping all child processes when we receive a SIGCHLD, try
reaping only processes belonging to process groups from fully-
constructed jobs, which should eliminate the need for the keepalive
process entirely (WSL's lack of zombies not withstanding) as now
completed processes are not reaped until the job has been fully
constructed (i.e.  all processes launched), which means their process
group should still be around for new processes to join.

* When `tcgetpgrp()` calls return 0, attempt to `tcsetpgrp()` before
invoking failure handling code.

* When forking a builtin and not running interactively, do not bail if
unable to set/restore terminal attributes.

Fixes fish-shell#4178. Fixes fish-shell#3805. Fixes fish-shell#5210.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment