Subject: B20, on NT4.0: Bash crashes when background process ends
From: [email-masked] (Robert Kieffer)

19 Nov 1998 21:43:25 -0800
Message-ID: <[email-masked]>
Mime-Version: 1.0
Content-Type: multipart/alternative;
 boundary="------------1E6B3AE681D8B990B86983E8"
To: [email-masked]

--------------1E6B3AE681D8B990B86983E8
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

[My apologies for not including a fix with this.  I haven't figured out
where the Bash source is located, not to mention not really having the
time.]

This is a repeatable bug.

- Launch bash.
- Start a background process that does not immediately exit (e.g. "tail
-f somefile &")
- In the task manager, kill that process
- Now click the bash window
- * crash * ... The bash window goes away.

If you do the same thing with the process in the foreground (no '&' on
the command line), bash does not go away.

If you look really carefully at the bash window in the milliseconds
between when you click on it and when it disappears, you can see the
word "exit" displayed.

My conjecture is that some process cleanup code is failing to recognize
the fact that the background process has already gone away.  When you
return to Bash, it tries to "clean up" the background processes by
popping the most recent process "off the stack", which in this case
happens to be the main Bash process.

--------------1E6B3AE681D8B990B86983E8
Content-Type: text/html; charset=us-ascii
Content-Transfer-Encoding: 7bit

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
[My apologies for not including a fix with this.&nbsp; I haven't figured
out where the Bash source is located, not to mention not really having
the time.]
<P>This is a repeatable bug.
<P>- Launch bash.
<BR>- Start a background process that does not immediately exit (e.g. "tail
-f somefile &amp;")
<BR>- In the task manager, kill that process
<BR>- Now click the bash window
<BR>- * crash * ... The bash window goes away.
<P>If you do the same thing with the process in the foreground (no '&amp;'
on the command line), bash does not go away.
<P>If you look really carefully at the bash window in the milliseconds
between when you click on it and when it disappears, you can see the word
"exit" displayed.
<P>My conjecture is that some process cleanup code is failing to recognize
the fact that the background process has already gone away.&nbsp; When
you return to Bash, it tries to "clean up" the background processes by
popping the most recent process "off the stack", which in this case happens
to be the main Bash process.
<BR>&nbsp;</HTML>

--------------1E6B3AE681D8B990B86983E8--

-
For help on using this list (especially unsubscribing), send a message to
"[email-masked]" with one line of text: "help".