This is the mail archive of the cygwin-xfree@cygwin.com mailing list for the Cygwin XFree86 project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Cannot close XTERM with ALT+F4 when using TCSH


On Thu, 17 Jun 2004, "Else Böse" wrote:

> Hi Igor,
>
> Thanks for the quick reply.
>
> > On Thu, 17 Jun 2004, bse2000 wrote:
> >
> > > Hi,
> > >
> > > I just updated to the latest Cygwin packages and experience problems
> > > when using an XTERM with the TCSH shell (so far my preferred
> > > combination):
> > >
> > > After the command 'xterm -e /bin/tcsh', everything looks good. I can
> > > enter any command and it works fine. However, I'm not able to close
> > > the window, neither with ALT-F4 nor by clicking the close
> > > button/item on the window title.
> > >
> > > The strange thing is that as soon as I tried to close the window, no
> > > further command can be executed from the TCSH's command line (e.g.
> > > ls, xlock etc.). They are just ignored. The only way to close that
> > > window is to use CTRL-D.
> > >
> > > However, executing with the BASH shell using 'xterm -e /bin/bash'
> > > and entering tcsh on the BASH command line afterwards works fine.
> > > Also rxvt gives no problem.
> > >
> > > The described problem occurs no matter whether I use XWin with
> > > -multiwindow or with xinit using fvwm2. In order to check whether
> > > perhaps my TCSH or X configuration is guilty, I switched already
> > > ~/.cshrc and ~/.Xdefaults off. No success.
> > >
> > > Please find below the output of 'cygcheck -c'.
> > >
> > > Thanks a lot in advance for any hints or ideas.
> > >
> > > Best regards
> > > BSE
> >
> > The first thing to do is check whether it's due to xterm or tcsh.  Does
> > running tcsh in rxvt produce the same symptoms?
>
> NO, rxvt works fine when called with tcsh, e.g. 'rxvt -e /bin/tcsh'.

So it lets you close the window, and the tcsh process doesn't linger on?

> > The next is to try attaching to tcsh with a debugger and seeing if it
> > gets any signals from the xterm as it gets closed (it should get at
> > least a SIGHUP).
>
> Good idea!
> I also thought that it must have to do with this, at least from looking at
> the strace output after doing ALT+F4 :
>
> 43394846 44791043 [main] xterm 4000 kill_pgrp: pid 3824, signal 1
>  1670 44792713 [main] xterm 4000 kill_pgrp: killing pid 3824, pgrp 3824, p->ctty 16, myself->ctty 0
>    58 44792771 [main] xterm 4000 sig_send: sendsig 0x524, pid 3824, signal 1, its_me 0
>    31 44792802 [main] xterm 4000 sig_send: Not waiting for sigcomplete.  its_me 0 signal 1
> 15466960 43593591 [sig] -csh 3824 sigpacket::process: signal 1 processing
>    58 43593649 [sig] -csh 3824 sigpacket::process: signal 1 blocked
>    18 43593667 [sig] -csh 3824 sigpacket::process: returning -1
>   121 44792923 [main] xterm 4000 sig_send: returning 0x0 from sending signal 1
>
> From this it seems that tcsh does not accept signal 1 (SIGHUP).
> Any ideas why?

Nope.  But the same signal should have been sent from both rxvt and a
console window (if you run tcsh in those).  One thing to do would be to
strace both of those, and compare the relevant chunks of the output.

> Thanks for any further hints.
>
> BSE

Another thing I thought of is trying to send the signal to tcsh
explicitly, using the "kill -1" command.  See if that works, and if it
does, see how the strace output differs.
HTH,
	Igor
-- 
				http://cs.nyu.edu/~pechtcha/
      |\      _,,,---,,_		pechtcha@cs.nyu.edu
ZZZzz /,`.-'`'    -.  ;-;;,_		igor@watson.ibm.com
     |,4-  ) )-,_. ,\ (  `'-'		Igor Pechtchanski, Ph.D.
    '---''(_/--'  `-'\_) fL	a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!

"I have since come to realize that being between your mentor and his route
to the bathroom is a major career booster."  -- Patrick Naughton


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]