This is the mail archive of the cygwin mailing list for the Cygwin 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]

Troubles with bash/sh and ctrl-break


I recently upgraded from cygwin 1.36 to the latest version, and it looks
like bash is causing some troubles for me.  I am using a windows batch
file to start up a shell script which in turn starts up java.


My startserver.bat is as so...

SETLOCAL
SET _dir=%~dp0
sh.exe "%_dir%\startserver.sh" %*
ENDLOCAL

My startserver.sh file is as so...

#!/bin/sh

echo JAVA_HOME=$JAVA_HOME

JAVACMD="$JAVA_HOME"/bin/java
CLASSPATH=.

exec "$JAVACMD" com.interlacesystems.server.ServerMain  "$@"


The problem is when I do a CTRL-BREAK in the console.  I get the java
stack trace, but then the java process is killed.  I'll get something
like...

2006-04-20 22:55:07,743 ServerReady INFO  -
************************************
************************************
Full thread dump Java HotSpot(TM) Server VM (1.4.2_10-b03 mixed mode):
...
"VM Thread" prio=5 tid=0x0095df08 nid=0x228 runnable

"VM Periodic Task Thread" prio=10 tid=0x00965d10 nid=0xd2c waiting on
condition

"Suspend Checker Thread" prio=10 tid=0x009610b0 nid=0xdcc runnable
Terminate batch job (Y/N)?



If I hit CTRL-C in the console, I see something like the following...

2006-04-20 23:12:50,955 ServerReady INFO  -
************************************
************************************
Terminate batch job (Y/N)? 2006-04-20 23:12:55,705 LogManager INFO  -
Shutting down logger
^C

Where it looks like the bash shell exits first leaving the java process
to die afterwards.

This behavior is different than before.  Anyone else encountered this
issue recently?  I've looked everywhere for some answers, but I haven't
been able to find any.

Thanks,
Anil

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


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