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


... snip ...

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

Mmmmh, seems not to be the case. I just checked my process list and saw lots
of "I" marked processes, e.g.

I     504       1     504       4012   15 11369 22:41:02 /usr/bin/tcsh

This one remained after I closed my last rxvt.
What does this mean?

> > > 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.
>

Here comes the strace using kill -1

45779212 55756681 [sig] -csh 5064 sigpacket::process: signal 1 processing
   87 55756768 [sig] -csh 5064 sigpacket::process: signal 1 blocked
   18 55756786 [sig] -csh 5064 sigpacket::process: returning -1
   58 55756844 [sig] -csh 5064 sigpacket::process: signal 19 processing
   35 55756879 [sig] -csh 5064 sigpacket::process: default signal 19 ignored
   17 55756896 [sig] -csh 5064 sigpacket::process: returning 1

Looks pretty similar to the above, or?
Seems you're right. It has to do with tcsh not accepting SIGHUPs.

But how could I change this?
I looked into /etc/csh.login and /etc/csh.cshrc and removed also my
~/.cshrc. No evidence except that in /etc/csh.cshrc the interrupts are
disabled by default using 'onintr -'. I removed that but have still the same
problem.

Further ideas?

Thanks again for your quick support!!

BR
BSE

 

-- 
+++ Jetzt WLAN-Router für alle DSL-Einsteiger und Wechsler +++
GMX DSL-Powertarife zudem 3 Monate gratis* http://www.gmx.net/dsl


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