Re: bash doesn't send SIGHUP to children

2008-09-04 Thread Chet Ramey
> Description:
>   Regradless of the huponexit setting ('shopt -s huponexit' doesn't
> help) bash does not send SIGHUP to its children when it receives one
> itself. Previous version of bash 3.1.17 was behaving properly
> even with huponexit set to off
> 
> Repeat-By:
>   launch rxvt, launch mc then close the rxvt window -> 
>   mc is still running with CPU to 100% (this is because 
> mc tries to read from stdin while receiving EOF)
>   Closing rxvt sends SIGHUP to bash but bash doesn't send
>   SIGHUP to its children

Can you verify using a system call tracer that bash is not sending the SIGHUP?
The default bash SIGHUP signal handler resends SIGHUP to all jobs, running or
stopped, before exiting.

Chet

-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer

Chet Ramey, ITS, CWRU[EMAIL PROTECTED]http://tiswww.tis.case.edu/~chet/




patch for bash-3.2 to compile under Debian GNU/Linux 4.0 with DietLibc

2008-09-04 Thread Antonio Gallo

Here you are:

mercurius:/usr/src/BadPenguin# cat bash-3.2-dietlibc.unified-patch
--- build/bash-3.2/lib/sh/winsize.c.orig2006-07-28 
05:57:45.0 +0200

+++ build/bash-3.2/lib/sh/winsize.c 2008-09-03 14:56:46.0 +0200
@@ -43,6 +43,11 @@

#include 

+/* Antonio Gallo , Dietlibc under Debian GNU/Linux declare winsize 
inside termios.h */

+#if !defined(winsize)
+#include 
+#endif
+
/* Return the fd from which we are actually getting input. */
#define input_tty() (shell_tty != -1) ? shell_tty : fileno (stderr)