[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

es signal handling bug on recent Linuces



I added a little bit of debugging code to es, which prints the state of
the infamous blocked variable before it calls parse.

Here's the behavior I get:

  ; exec es
  /* blocked = 0 */
  ; sleep 100
  /* blocked = 0 */
  /* blocked = 0 */
  /* blocked = 0 */
  ^C/* blocked = 1 */
  wait: No child processes

  /* blocked = 1 */
  /* blocked = 0 */
  ; sleep 100
  ^C/* blocked = 0 */
  ;

At the first ^C, the program gets interrupted.  The second ^C gets
ignored.

I don't think it's a problem with es's internal state, but rather with
how it sets the signal handling bits for the process.  Because, once
it's in the hose state, I can do:

  ; exec es
  /* blocked = 0 */
  ; sleep 10
  ^C/* blocked = 0 */
  ;

and the control-C is again ignored.

This is running es without readline, inside an emacs shell buffer.

This problem didn't occur with RedHat 5.x releases, and does occur with
RedHat 6.x.  I suspect there was a change between the 2.0.x and 2.2.x
kernels, but I haven't expended the effort to track down what the
difference is.  Yet.

--p