<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Java Process.destroy() of DCL script not killing process in Operating System - OpenVMS</title>
    <link>https://community.hpe.com/t5/operating-system-openvms/java-process-destroy-of-dcl-script-not-killing-process/m-p/4185621#M43863</link>
    <description>I'd be happy to create a test case.&lt;BR /&gt;&lt;BR /&gt;However, where should I report it?&lt;BR /&gt;&lt;BR /&gt;I'm not working for a company with a support contract ...</description>
    <pubDate>Mon, 28 Apr 2008 21:19:41 GMT</pubDate>
    <dc:creator>Sebastian Bazley</dc:creator>
    <dc:date>2008-04-28T21:19:41Z</dc:date>
    <item>
      <title>Java Process.destroy() of DCL script not killing process</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/java-process-destroy-of-dcl-script-not-killing-process/m-p/4185612#M43854</link>
      <description>The following code:&lt;BR /&gt;&lt;BR /&gt;Process p = Runtime.getRuntime().exec("cmd");&lt;BR /&gt;p.destroy();&lt;BR /&gt;p.waitFor();&lt;BR /&gt;&lt;BR /&gt;works fine if the "cmd" is an executable file.&lt;BR /&gt;However, if the "cmd" is a DCL script, then the destroy() method does not seem to work - the script just carries on as if the destroy() had not been called.&lt;BR /&gt;&lt;BR /&gt;Is there a (Java) solution to this?</description>
      <pubDate>Wed, 23 Apr 2008 18:01:43 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/java-process-destroy-of-dcl-script-not-killing-process/m-p/4185612#M43854</guid>
      <dc:creator>Sebastian Bazley</dc:creator>
      <dc:date>2008-04-23T18:01:43Z</dc:date>
    </item>
    <item>
      <title>Re: Java Process.destroy() of DCL script not killing process</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/java-process-destroy-of-dcl-script-not-killing-process/m-p/4185613#M43855</link>
      <description>I believe Java (used to) uses SYS$FORCEX to run down an image, not SYS$DELPRC to kill the process.&lt;BR /&gt;&lt;BR /&gt;See for example an old c.o.v entry by Kerry Main:&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://unix.derkeiler.com/Newsgroups/comp.os.vms/2003-09/2210.html" target="_blank"&gt;http://unix.derkeiler.com/Newsgroups/comp.os.vms/2003-09/2210.html&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;The exact Java/JVM/OpenVMS version used may well be critical to understand what is happening. What versions are used?&lt;BR /&gt;&lt;BR /&gt;google: openvms destroy forcex java&lt;BR /&gt;&lt;BR /&gt;fwiw,&lt;BR /&gt;&lt;BR /&gt;Hein.&lt;BR /&gt;</description>
      <pubDate>Wed, 23 Apr 2008 19:16:16 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/java-process-destroy-of-dcl-script-not-killing-process/m-p/4185613#M43855</guid>
      <dc:creator>Hein van den Heuvel</dc:creator>
      <dc:date>2008-04-23T19:16:16Z</dc:date>
    </item>
    <item>
      <title>Re: Java Process.destroy() of DCL script not killing process</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/java-process-destroy-of-dcl-script-not-killing-process/m-p/4185614#M43856</link>
      <description>Sebastian,&lt;BR /&gt;&lt;BR /&gt;  This should be easy to check. Build an image that sleeps for a short period then returns status 1. Write a procedure:&lt;BR /&gt;&lt;BR /&gt;$ loop: RUN sleeper&lt;BR /&gt;$   SHOW SYM $STATUS&lt;BR /&gt;$ GOTO loop&lt;BR /&gt;&lt;BR /&gt;and test your destroy script. A $FORCEX from another process should change the value of $STATUS returned.&lt;BR /&gt;&lt;BR /&gt;You may also want to experiment with different ON settings. Perhaps try "ON WARNING THEN EXIT". However, the behaviour is likely to depend on exactly what your procedure is doing at the time. If it's not running a user mode image, the $FORCEX might be lost.&lt;BR /&gt;&lt;BR /&gt;Perhaps there's a Process.kill (or similar) which uses $DELPRC instead of $FORCEX?&lt;BR /&gt;</description>
      <pubDate>Wed, 23 Apr 2008 20:55:40 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/java-process-destroy-of-dcl-script-not-killing-process/m-p/4185614#M43856</guid>
      <dc:creator>John Gillings</dc:creator>
      <dc:date>2008-04-23T20:55:40Z</dc:date>
    </item>
    <item>
      <title>Re: Java Process.destroy() of DCL script not killing process</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/java-process-destroy-of-dcl-script-not-killing-process/m-p/4185615#M43857</link>
      <description>The Java version I'm using is:&lt;BR /&gt;&lt;BR /&gt;java version "1.4.2"&lt;BR /&gt;Java(TM) 2 Runtime Environment, Standard Edition&lt;BR /&gt;Java HotSpot(TM) Server VM (build 1.4.2-2 11/03/2005-08:43 IA64, mixed mode)&lt;BR /&gt;&lt;BR /&gt;I've also tried:&lt;BR /&gt;&lt;BR /&gt;java version "1.5.0"&lt;BR /&gt;Java(TM) 2 Runtime Environment, Standard Edition&lt;BR /&gt;Classic VM (build 1.5.0-3, 03/01/2007-14:39, native threads, jit)&lt;BR /&gt;</description>
      <pubDate>Wed, 23 Apr 2008 22:15:12 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/java-process-destroy-of-dcl-script-not-killing-process/m-p/4185615#M43857</guid>
      <dc:creator>Sebastian Bazley</dc:creator>
      <dc:date>2008-04-23T22:15:12Z</dc:date>
    </item>
    <item>
      <title>Re: Java Process.destroy() of DCL script not killing process</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/java-process-destroy-of-dcl-script-not-killing-process/m-p/4185616#M43858</link>
      <description>Oops, forgot VMS versions:&lt;BR /&gt;&lt;BR /&gt;Java 1.4.2 is running on:&lt;BR /&gt;an HP rx2600  (1.40GHz/1.5MB) running OpenVMS V8.3&lt;BR /&gt;&lt;BR /&gt;Java 1.5 is running on:&lt;BR /&gt;a DEC 3000 Model 400 running OpenVMS V7.3-2&lt;BR /&gt;(actually it's Personal Alpha ;-)</description>
      <pubDate>Wed, 23 Apr 2008 22:18:51 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/java-process-destroy-of-dcl-script-not-killing-process/m-p/4185616#M43858</guid>
      <dc:creator>Sebastian Bazley</dc:creator>
      <dc:date>2008-04-23T22:18:51Z</dc:date>
    </item>
    <item>
      <title>Re: Java Process.destroy() of DCL script not killing process</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/java-process-destroy-of-dcl-script-not-killing-process/m-p/4185617#M43859</link>
      <description>Further to Hein's c.o.v. reference:&lt;BR /&gt;&lt;BR /&gt;I've tried replacing the WAIT command in the DCL test script with a C program that does a sleep - and destroy() works fine if the C program is running when the destroy() is issued. Not yet tried it between program invocations. This was on 1.4.2.&lt;BR /&gt;&lt;BR /&gt;The behaviour of destroy() is very odd ;-)&lt;BR /&gt;</description>
      <pubDate>Wed, 23 Apr 2008 22:42:08 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/java-process-destroy-of-dcl-script-not-killing-process/m-p/4185617#M43859</guid>
      <dc:creator>Sebastian Bazley</dc:creator>
      <dc:date>2008-04-23T22:42:08Z</dc:date>
    </item>
    <item>
      <title>Re: Java Process.destroy() of DCL script not killing process</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/java-process-destroy-of-dcl-script-not-killing-process/m-p/4185618#M43860</link>
      <description>Sebastian,&lt;BR /&gt;&lt;BR /&gt;&amp;gt;The behaviour of destroy() is very odd ;-)&lt;BR /&gt;&lt;BR /&gt;  Yes and no. It makes perfect sense when you understand the underlying mechanisms. The difference between $FORCEX and $DELPRC, and the operating modes of processes.&lt;BR /&gt;&lt;BR /&gt;  $DELPRC is potentially dangerous because it doesn't give the process an opportunity to clean up. $FORCEX is preferable because the process exit handlers can run. BUT if the exit handlers don't terminate, or the process is running in an inner mode, it has no effect.&lt;BR /&gt;&lt;BR /&gt; The "usual" way of implementing a soft process kill is to issue a $FORCEX, wait a short while, and if the process is still alive issue a $DELPRC. I guess whoever implemented destroy chose not to do it that way.&lt;BR /&gt;&lt;BR /&gt;  A big hammer which will get around your problem would be to write a program which accepts a command as a parameter then executes it as a "system()" command (ie: a subprocess). That way the your process "p" is always running user mode image. It will have subprocess executing your DCL script. The parent is therefore killable with destroy(), and it takes the child with it. &lt;BR /&gt;&lt;BR /&gt;  It costs you an extra process creation and the resources associated with an additional process but will reliably do what you want.&lt;BR /&gt;&lt;BR /&gt;(Hext's rule - one further level of indirection solves all problems ;-)</description>
      <pubDate>Wed, 23 Apr 2008 23:51:59 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/java-process-destroy-of-dcl-script-not-killing-process/m-p/4185618#M43860</guid>
      <dc:creator>John Gillings</dc:creator>
      <dc:date>2008-04-23T23:51:59Z</dc:date>
    </item>
    <item>
      <title>Re: Java Process.destroy() of DCL script not killing process</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/java-process-destroy-of-dcl-script-not-killing-process/m-p/4185619#M43861</link>
      <description>OK. Further experiments show that the DCL script only exits if the destroy() is received by an external program AND the script does not use SET NOON.&lt;BR /&gt;&lt;BR /&gt;However, the Javadoc for Process.destroy() (Sun 1.4) says:&lt;BR /&gt;&lt;BR /&gt;"Kills the subprocess. The subprocess represented by this Process object is forcibly terminated."&lt;BR /&gt;&lt;BR /&gt;Seems to me that the VMS implementation does not obey the Javadoc and is therefore faulty...</description>
      <pubDate>Thu, 24 Apr 2008 00:36:23 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/java-process-destroy-of-dcl-script-not-killing-process/m-p/4185619#M43861</guid>
      <dc:creator>Sebastian Bazley</dc:creator>
      <dc:date>2008-04-24T00:36:23Z</dc:date>
    </item>
    <item>
      <title>Re: Java Process.destroy() of DCL script not killing process</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/java-process-destroy-of-dcl-script-not-killing-process/m-p/4185620#M43862</link>
      <description>&amp;gt;Seems to me that the VMS implementation &lt;BR /&gt;&amp;gt;does not obey the Javadoc and is therefore &lt;BR /&gt;&amp;gt;faulty...&lt;BR /&gt;&lt;BR /&gt;Sebastian,&lt;BR /&gt;&lt;BR /&gt;  I agree! Please make a formal report, with a complete example (write a self contained command procedure which generates all the necessary files and executes a failing case).&lt;BR /&gt;&lt;BR /&gt;  Sometimes problems reported in this forum make their way into engineering, but more often than not they don't. In these days of "management by metrics", engineers are evaluated by how many beans the counters can see. If the report doesn't come in by the "right" door, it's invisible. ITRC points don't translate into anything HP management care about.</description>
      <pubDate>Mon, 28 Apr 2008 20:16:29 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/java-process-destroy-of-dcl-script-not-killing-process/m-p/4185620#M43862</guid>
      <dc:creator>John Gillings</dc:creator>
      <dc:date>2008-04-28T20:16:29Z</dc:date>
    </item>
    <item>
      <title>Re: Java Process.destroy() of DCL script not killing process</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/java-process-destroy-of-dcl-script-not-killing-process/m-p/4185621#M43863</link>
      <description>I'd be happy to create a test case.&lt;BR /&gt;&lt;BR /&gt;However, where should I report it?&lt;BR /&gt;&lt;BR /&gt;I'm not working for a company with a support contract ...</description>
      <pubDate>Mon, 28 Apr 2008 21:19:41 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/java-process-destroy-of-dcl-script-not-killing-process/m-p/4185621#M43863</guid>
      <dc:creator>Sebastian Bazley</dc:creator>
      <dc:date>2008-04-28T21:19:41Z</dc:date>
    </item>
  </channel>
</rss>

