Christopher Faylor wrote: > On Fri, Aug 15, 2003 at 09:10:12PM -0400, Rolf Campbell wrote: > >>Christopher Faylor wrote: >> >>>On Mon, Sep 08, 2003 at 04:44:58PM -0400, Rolf Campbell wrote: >>> >>>>I started a large build, then hit ^Z. Then "fg", and this is what >>>>happened: >>> >>>A large build shouldn't even recognize the ^Z if you are running this from >>>the console. Your TERM=xterm below. Are you running this under X? >> >>I am using RXVT. Does RXVT set TERM=xterm? That's my only guess, I >>don't set that variable myself. > > > Huh. I guess so. It does so for me, as well. > > This problem sounded familiar so I did a little archive diving. It was > reported before and I investigated it before. I remember thinking that > this would be hard to fix owing to a race condition with signals in tty > code. I can make this fail in various interesting ways even outside of > the pty/tty code, though. So, I'm investigating why now. > > cgf > I have a reproducable (at least on my machine) of some ^C handling issues. #!/bin/python import sys, os, select if(int(sys.argv[1]) > 0): os.system(sys.argv[0] + " %d" % (int(sys.argv[1])-1)) else: select.select([], [], [], 10) Try running this as "./deep.py 0", and then, when it's waiting, hit ^C, it will terminate fine. Now try it as "./deep.py 1", and then hit ^C. Nothing happens. I see this when I try to cancel my build, but ^C doesn't work when the process tree is too deep.