On 8/13/14, 4:40 PM, Chet Ramey wrote: >> Make it executable, and type >> >> ./foo & >> >> at an interactive shell. You get your shell prompt back. You can press >> Enter as many times as you like. But if you press any key other than >> Enter, the entire terminal window goes away. > > I haven't looked at this yet, but here's what I bet is happening: turning > on job control with set -m causes several things to happen: the shell > creates a new process group and becomes the process group leader, sets the > terminal's process group to its own process group, and creates children in > their own process group. > > Now that the terminal is no longer in the parent shell's process group, > reads return EOF (or -1/EIO), and the parent shell exits.
It was something very similar to this. The shell needs to note whether or not it is running in the foreground before modifying the terminal's process group. I will make those changes for the next version. Chet -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, ITS, CWRU c...@case.edu http://cnswww.cns.cwru.edu/~chet/