From: Collin Vandyck Date: 2007-09-12T22:41:30+09:00 Subject: Re: How to prevent child process from receiving INT signal? I created a small code example that reproduces this: #!/usr/bin/env ruby def start(server) return if not server pwd = Dir.pwd command = "/usr/bin/java " command+= "-Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager " command+= "-Djava.util.logging.config.file=#{pwd}/#{server}/conf/logging.properties " command+= "-Djava.endorsed.dirs=#{pwd}/#{server}/common/endorsed " command+= "-Dcatalina.base=#{pwd}/#{server} " command+= "-Dcatalina.home=#{pwd}/#{server} " command+= "-Djava.io.tmpdir=#{pwd}/#{server}/temp " command+= "-classpath :#{pwd}/#{server}/bin/bootstrap.jar:#{pwd}/#{server}/bin/commons-logging-api.jar " command+= "-Xmx300m " command+= "org.apache.catalina.startup.Bootstrap " command+= "start " command+= ">> #{pwd}/#{server}/logs/catalina.out 2>&1 & " puts command pid = fork do Signal.trap('HUP', 'IGNORE') Signal.trap('INT', 'IGNORE') exec command end Process.detach(pid) end start 8080 loop do puts "hi" sleep 1 end After Tomcat is started, the console starts outputting "hi" every second. A CTRL-C will kill the loop and the tomcat process. Is it possible that the Tomcat process is also reading from STDIN? I have also tried trapping the INT signal on the parent process with no luck (the Tomcat process quits, but the main process does not) -- Posted via http://www.ruby-forum.com/.