screen: Crashes the kernel!

Barton E. Schaefer schaefer at ogccse.ogc.edu
Mon Feb 20 07:14:10 AEST 1989


In article <105 at melba.oz>  writes:
}
} [I]f you exit from screen by exiting the shells in turn,
} rather than by using ^A^\, then there is a screen process left
} running and connected to the socket $HOME/.screen/`hostname`.`tty`.
} The next time you log in (I think it has to be straight away), you
} get a message saying there is a screen program running, use "screen
} -r" to reattach.  If you the do a screen -r, it hangs.  If you then
} attempt to kill the screen, using ^\, the kernel panics with a kernel
} mode bus error.

There is a bug in the code to handle "screen -r", that is, to reattach
to a previously detached screen process.  The crash results from an
ioctl(TIOCNOTTY) call on an invalid file descriptor.

I have communicated with the author (Oliver Laumann) about this, and he
has urged me to post my patch.  I will do so later today, when I have
a chance to extract the code specific to this bug from some other local
modifications I have made.

I have no explanation for the failure of screen to exit when the shells
are exited one by one, but the patch should take care of the panic.
Look for it soon.
-- 
Bart Schaefer       "Dogs are the animal byproducts in the wienie of life."
                                                                -- Garfield
CSNET / Internet                schaefer at cse.ogc.edu
UUCP                            ...{sun,tektronix,verdix}!ogccse!schaefer



More information about the Comp.sources.bugs mailing list