Re: How to close a Process and having shutdown hooks called ?

2014-03-10 Thread Jonathan Yu
The referenced question discusses how to handle the *current* process receiving certain signals. The original question was how to portably send signals to *other* processes via the Process abstraction. The comment was that terminate process sends a kill 9 signal which cannot be caught by the targe

RE: How to close a Process and having shutdown hooks called ?

2014-03-04 Thread LE PICARD NICOLAS
al Mok Cc : core-libs-dev@openjdk.java.net Objet : Re: How to close a Process and having shutdown hooks called ? On 03/04/2014 02:09 PM, LE PICARD NICOLAS wrote: > I didn't know for jdk8 functions destroy and the new one destroyForcibly... > > And Jonathan was right in his prev

Re: How to close a Process and having shutdown hooks called ?

2014-03-04 Thread Peter Levart
stal Mok Cc : LE PICARD NICOLAS; core-libs-dev@openjdk.java.net Objet : Re: How to close a Process and having shutdown hooks called ? On 04/03/2014 11:51, Krystal Mok wrote: Hi Nicolas, Looks like a well discussed question. On Posix systems, SIGTERM should work for you. That's the default

RE: How to close a Process and having shutdown hooks called ?

2014-03-04 Thread LE PICARD NICOLAS
acle.com] Envoyé : mardi 4 mars 2014 13:12 À : Krystal Mok Cc : LE PICARD NICOLAS; core-libs-dev@openjdk.java.net Objet : Re: How to close a Process and having shutdown hooks called ? On 04/03/2014 11:51, Krystal Mok wrote: > Hi Nicolas, > > Looks like a well discussed question. On Posix syste

Re: How to close a Process and having shutdown hooks called ?

2014-03-04 Thread Alan Bateman
On 04/03/2014 11:51, Krystal Mok wrote: Hi Nicolas, Looks like a well discussed question. On Posix systems, SIGTERM should work for you. That's the default signal sent by the 'kill' command on Linux. e.g. please take a look here: http://stackoverflow.com/questions/2541597/how-to-gracefully-handl

Re: How to close a Process and having shutdown hooks called ?

2014-03-04 Thread Krystal Mok
Hi Nicolas, Looks like a well discussed question. On Posix systems, SIGTERM should work for you. That's the default signal sent by the 'kill' command on Linux. e.g. please take a look here: http://stackoverflow.com/questions/2541597/how-to-gracefully-handle-the-sigkill-signal-in-java - Kris On

How to close a Process and having shutdown hooks called ?

2014-03-04 Thread LE PICARD NICOLAS
Hello everyone ! I looked for the answer in this list and did not find anything relevant. I don't know it it's possible to close a Process et call shutdown hooks automatically. I looked into the code and found it was not possible (in jdk7). When we call destroy() on a Process, it will call termi