Subject: RE: Control-c not working in rxvt (for exiting jboss server)
From: Chuck Irvine <[email-masked]>
To: "'David Rothenberger'" <[email-masked]>
Cc: [email-masked]
Date: Sat, 28 Feb 2004 13:08:13 -0600

Dave,

I tried changing the jboss startup script to use "/usr/bin/bash" instead
of "/bin/sh" and that worked pretty well. When I hit control-c, the
jboss server does shut down. However, the normal logging sent to
standard out showing the progress of the shutdown does not come through.
Not sure what to make of that - maybe it's doing a "kill -9"? Still,
right now, I deem this an improvement.

I'm a little hesitant to go to the latest snapshot since I rely on
cygwin for many things. Do you think it is as safe as the current
version?

Jboss comes with a shutdown script. I just wanted the convenience of
shutting down via control-c. 

Thanks for your help.

Chuck

> -----Original Message-----
> From: David Rothenberger [mailto:[email-masked]] 
> Sent: Saturday, February 28, 2004 12:41 PM
> To: Chuck Irvine
> Cc: [email-masked]
> Subject: Re: Control-c not working in rxvt (for exiting jboss server)
> 
> 
> Chuck Irvine wrote:
> > When I start Jboss server from rxvt, I cannot exit, that 
> is, shutdown 
> > the server, using Control-c. If I start the server from the normal 
> > cygwin bash prompt, that is, cywin.bat, control-c shuts down the 
> > server. Control-c from rxvt in other contexts does seem to 
> work, for 
> > example, if I invoke "ping -n 100 localhost" control-c does 
> cause an 
> > exit. Cygcheck output attached. Thanks
> > 
> > Chuck
> 
> Chuck,
> 
> I would start by trying the latest snapshot.  Cygwin 1.5.7 has some 
> problems with signal handling.
> 
> If you start JBoss with a script, you could also try changing it from 
> /bin/sh to /bin/bash or vice versa, since I seem to recall 
> the two shells 
> handling signals differently in 1.5.7.  That might not be 
> true any longer, 
> though, with the latest ash.
> 
> Finally, you can try to explicitly kill the Jboss (Java?) 
> process using 
> something like the following.
> 
> ---------------------------
> #!/bin/bash
> 
> enTrapSIGINT () {
>    kill $child_pid;
>    exit;
> }
> 
> trap enTrapSIGINT 2
> 
> startJboss &
> child_pid = $!
> wait
> ----------------------------
> 
> Dave
> 
> 
> 

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/