There appears to be a bunch of utterly useless (and perhaps even
time wasting) code in script.c, and specifically within the
In that function there is a loop that reaps all child processes that
are immediately available for reaping. But this must be a leftover
from an earlier time when script.c was implemented with -two- child
processes. Nowadays, it uses only one child process, i.e. the
child shell process. So it makes no sense to loop while trying to
reap multiple child processes, because there is at most only one,
the child shell process (and so it isn't even necessary or useful
to call wait3() because a simple call to wait() should do.)
Furthermore, if the idea is to reap the one and only child process,
then before the reaping attempt even begins something positive
should be done to cause the child to understand that it should exit
now, i.e. calling close() on the "master" pty fd, i.e. just prior to
all places in the code where the finish() function (or the done()
function) is about to be called. That should cause the child (shell)
process to receive EOF on stdin/stdout/stderr, and that will probably
cause it to figure out that it is time to go bye bye (if it hasn't
done so already).
How-To-Repeat: Look at the code.
For bugs matching the following criteria:
Status: In Progress Changed: (is less than) 2014-06-01
Reset to default assignee and clear in-progress tags.
Mail being skipped