public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* Avoid sending SIGINT to native child process?
@ 2017-04-30 13:12 David Rothenberger
  2017-04-30 17:30 ` Thomas Wolff
  0 siblings, 1 reply; 2+ messages in thread
From: David Rothenberger @ 2017-04-30 13:12 UTC (permalink / raw)
  To: cygwin

Is there any way to prevent a SIGINT signal from propagating to a 
background child Windows process?

I'm trying to write a script to start a Java application server. I want 
the script to trap Ctrl-C and send the app server a command to shutdown 
cleanly, but it appears the Ctrl-C is immediately propagated to the Java 
process, even though the script traps it.

-- 
David Rothenberger  ----  daveroth@acm.org

Academy:
         A modern school where football is taught.
Institute:
         An archaic school where football is not taught.

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Avoid sending SIGINT to native child process?
  2017-04-30 13:12 Avoid sending SIGINT to native child process? David Rothenberger
@ 2017-04-30 17:30 ` Thomas Wolff
  0 siblings, 0 replies; 2+ messages in thread
From: Thomas Wolff @ 2017-04-30 17:30 UTC (permalink / raw)
  To: cygwin

Am 29.04.2017 um 04:33 schrieb David Rothenberger:
> Is there any way to prevent a SIGINT signal from propagating to a 
> background child Windows process?
>
> I'm trying to write a script to start a Java application server. I 
> want the script to trap Ctrl-C and send the app server a command to 
> shutdown cleanly, but it appears the Ctrl-C is immediately propagated 
> to the Java process, even though the script traps it.
Signal handling interoperability is lacking more generally.
Even SIGTSTP is propagated in such a way that the Windows application is 
terminated.
(Try running notepad from bash, then type Ctrl-Z.)
Thomas

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-04-29  6:19 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-04-30 13:12 Avoid sending SIGINT to native child process? David Rothenberger
2017-04-30 17:30 ` Thomas Wolff

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).