Mail Archives: cygwin/2001/09/06/06:33:48
When I start a Java app via:
nohup ${JAVA} -classpath ${POSEIDON_CLASSPATH} ... org.argouml.application.Main&
and then hit Ctrl-C in the bash window, the Java application terminates
(presumably because SIGINT is propagated to the background, asynchronous
job).
But it doesn't terminate if I hit Ctrl-D, exit.
How can I stop Control-C/interrupt/SIGINT being sent to the Java
application when typed into the bash shell?
Note: I have tried using "disown" already.
You can see from the following that the process groups are different and
according to the manual page, that means that SIGINT shouldn't be
propagated.
..
Thu Sep 6-11:29:26 ~/etc 501$ >/tmp/poseidon.log 2>&1 nohup ${JAVA}
-classpath ${POSEIDON_CLASSPATH} -Xms64m -Xmx96m -Dargo.compiler=javac -
Dsun.java2d.nodraw=true -Dargo.debug=false org.argouml.application.Main&
[1] 136
Thu Sep 6-11:29:29 ~/etc 502$ ps
PID PPID PGID WINPID TTY UID STIME COMMAND
96 1 96 96 con 11878 10:05:41 /usr/local/bin/mutt
198 96 96 243 con 11878 11:20:50 /usr/bin/sh
264 198 96 264 con 11878 11:20:50 /c/WINNT/system32/cmd
213 1 213 213 con 11878 11:28:36 /usr/bin/bash
136 213 136 250 con 11878 11:29:29 /d/jdk1.3/bin/java
255 213 255 226 con 11878 11:29:50 /usr/bin/ps
Thu Sep 6-11:29:50 ~/etc 503$ disown
Thu Sep 6-11:29:54 ~/etc 504$ ps
PID PPID PGID WINPID TTY UID STIME COMMAND
96 1 96 96 con 11878 10:05:41 /usr/local/bin/mutt
198 96 96 243 con 11878 11:20:50 /usr/bin/sh
264 198 96 264 con 11878 11:20:50 /c/WINNT/system32/cmd
213 1 213 213 con 11878 11:28:36 /usr/bin/bash
136 213 136 250 con 11878 11:29:29 /d/jdk1.3/bin/java
245 213 245 226 con 11878 11:29:55 /usr/bin/ps
Thu Sep 6-11:29:56 ~/etc 505$ jobs
Thu Sep 6-11:30:26 ~/etc 506$ jobs -l
Thu Sep 6-11:30:31 ~/etc 507$ jobs -p
Thu Sep 6-11:30:34 ~/etc 508$ ps
PID PPID PGID WINPID TTY UID STIME COMMAND
96 1 96 96 con 11878 10:05:41 /usr/local/bin/mutt
198 96 96 243 con 11878 11:20:50 /usr/bin/sh
264 198 96 264 con 11878 11:20:50 /c/WINNT/system32/cmd
213 1 213 213 con 11878 11:28:36 /usr/bin/bash
136 213 136 250 con 11878 11:29:29 /d/jdk1.3/bin/java
247 213 247 257 con 11878 11:30:41 /usr/bin/ps
Thu Sep 6-11:30:41 ~/etc 509$ exit
^^^^^^^ Typing Control-D does not
terminate the asynchronous process.
Thu 06/09/2001 11:30:45.41 E:\mcb\act\etc>bash
Thu Sep 6-11:30:47 ~/etc 501$ jobs
Thu Sep 6-11:30:49 ~/etc 502$ ps
PID PPID PGID WINPID TTY UID STIME COMMAND
96 1 96 96 con 11878 10:05:41 /usr/local/bin/mutt
198 96 96 243 con 11878 11:20:50 /usr/bin/sh
264 198 96 264 con 11878 11:20:50 /c/WINNT/system32/cmd
136 1 136 250 con 11878 11:29:29 /d/jdk1.3/bin/java
222 1 222 222 con 11878 11:30:47 /usr/bin/bash
269 222 269 247 con 11878 11:30:53 /usr/bin/ps
Thu Sep 6-11:30:53 ~/etc 503$
Thu Sep 6-11:30:54 ~/etc 503$
^^^^^^^^ Typing Control-C terminates
poseidon Java app.
***********************************************************************
This message has been checked for all known viruses by the
E-mail Virus Protection service, powered by MessageLabs.
***********************************************************************
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/
- Raw text -