Doesn't close in presence of grandchildren processes
On master, after the recent changes related to child-exit and eof handling:
Launch something in the background (e.g. gimp &
) then exit from the shell. The terminal stays open. Instead, it should close.
(It even stays open after gimp quits, and only closes on a resize. This will be a non-issue if the actual issue is fixed.)
The background process keeps a file descriptor or two to the terminal, that's why we don't get EOF.
The desired behavior is probably: after a child-exit we should keep reading from the tty line as long as we do get data, but disconnect from it as soon as we get the first non-blocking "no data yet" response (which guarantees that the entire output of the immediate child has been consumed).
Alternatively, two different strategies (wait until a real EOF vs. disconnect from that tty immediately) could be implemented, according to the "When command exits" gnome-terminal setting.