<?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: Process.destroy kills outer shell when killing inner in Operating System - Linux</title>
    <link>https://community.hpe.com/t5/operating-system-linux/process-destroy-kills-outer-shell-when-killing-inner/m-p/3411062#M71035</link>
    <description>Hi&lt;BR /&gt;&lt;BR /&gt;I see what you mean.  I have just written a test haness to test this (in isolation) and it would appear that the issue revolves around the linux implementation of KSH.&lt;BR /&gt;&lt;BR /&gt;I have run the same test on solaris and using ksh is OK, if I then try it on Linux it kills the parent processes.&lt;BR /&gt;&lt;BR /&gt;One other thing to note is that when I run on Solaris the parent PID is the java process, when I run in Linux the parent PID is a non-existent process.</description>
    <pubDate>Mon, 01 Nov 2004 08:40:11 GMT</pubDate>
    <dc:creator>Peter Suggitt</dc:creator>
    <dc:date>2004-11-01T08:40:11Z</dc:date>
    <item>
      <title>Process.destroy kills outer shell when killing inner</title>
      <link>https://community.hpe.com/t5/operating-system-linux/process-destroy-kills-outer-shell-when-killing-inner/m-p/3411059#M71032</link>
      <description>Hi&lt;BR /&gt;&lt;BR /&gt;I have a nice little problem when I use the Runtime.exec() method.  If I have a running C++ binary in a Process object and I want to kill it I issue a destroy at the Process object and the process picks up whatever signals are sent and it it terminates correctly.&lt;BR /&gt;&lt;BR /&gt;If I then use the same code to execute a shell script then the whole program terminates after picking up the sent signal.&lt;BR /&gt;&lt;BR /&gt;The script I am using is a csh script:&lt;BR /&gt;#!/bin/csh -f&lt;BR /&gt;while (1)&lt;BR /&gt;  echo help&lt;BR /&gt;  sleep 10&lt;BR /&gt;done&lt;BR /&gt;# this will not terminate until I need it to&lt;BR /&gt;&lt;BR /&gt;I am running this on Red Hat Linux and starting the process from a csh .. I have no idea why this is so .. has anyone else come across this before?&lt;BR /&gt;&lt;BR /&gt;When I run this with verbose I also get the following before it all terminates (the log4j comment is just from a shutdownhook):&lt;BR /&gt;...&lt;BR /&gt;[Loaded sun.misc.Signal$1 from /sbcimp/run/tp/sun/jre/v1.4.2_04/lib/rt.jar]&lt;BR /&gt;Shutting down log4j processses&lt;BR /&gt;[Loaded java.util.Vector$1 from /sbcimp/run/tp/sun/jre/v1.4.2_04/lib/rt.jar]&lt;BR /&gt;[Loaded org.apache.log4j.helpers.NullEnumeration]&lt;BR /&gt;suggitpe./home/suggitpe/test/MEMPHIS/TAX_TEST/bin.xldn1081dap --&amp;gt; &lt;BR /&gt;</description>
      <pubDate>Fri, 29 Oct 2004 12:56:24 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/process-destroy-kills-outer-shell-when-killing-inner/m-p/3411059#M71032</guid>
      <dc:creator>Peter Suggitt</dc:creator>
      <dc:date>2004-10-29T12:56:24Z</dc:date>
    </item>
    <item>
      <title>Re: Process.destroy kills outer shell when killing inner</title>
      <link>https://community.hpe.com/t5/operating-system-linux/process-destroy-kills-outer-shell-when-killing-inner/m-p/3411060#M71033</link>
      <description>Hi Peter,&lt;BR /&gt;&lt;BR /&gt;Got some time to write some test programs. I could not reproduce yours error. The program works just fine. I used yours code for the script (replacing done with end!). I have tested on RedHat 9 and yours same version of Java (1.4.2_04-b05).&lt;BR /&gt;&lt;BR /&gt;Bojan</description>
      <pubDate>Sun, 31 Oct 2004 15:41:31 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/process-destroy-kills-outer-shell-when-killing-inner/m-p/3411060#M71033</guid>
      <dc:creator>Bojan Nemec</dc:creator>
      <dc:date>2004-10-31T15:41:31Z</dc:date>
    </item>
    <item>
      <title>Re: Process.destroy kills outer shell when killing inner</title>
      <link>https://community.hpe.com/t5/operating-system-linux/process-destroy-kills-outer-shell-when-killing-inner/m-p/3411061#M71034</link>
      <description>Sorry,&lt;BR /&gt;&lt;BR /&gt;After reading yours post in thread&lt;BR /&gt;&lt;A href="http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=717270" target="_blank"&gt;http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=717270&lt;/A&gt;&lt;BR /&gt;I see that you was trying in ksh. Now I can replicate your simptom. The simptom is only when the subprocess is in ksh, I try bash and csh and works OK.&lt;BR /&gt;&lt;BR /&gt;So, for me, ksh must be investigated.&lt;BR /&gt;&lt;BR /&gt;Bojan</description>
      <pubDate>Sun, 31 Oct 2004 16:17:19 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/process-destroy-kills-outer-shell-when-killing-inner/m-p/3411061#M71034</guid>
      <dc:creator>Bojan Nemec</dc:creator>
      <dc:date>2004-10-31T16:17:19Z</dc:date>
    </item>
    <item>
      <title>Re: Process.destroy kills outer shell when killing inner</title>
      <link>https://community.hpe.com/t5/operating-system-linux/process-destroy-kills-outer-shell-when-killing-inner/m-p/3411062#M71035</link>
      <description>Hi&lt;BR /&gt;&lt;BR /&gt;I see what you mean.  I have just written a test haness to test this (in isolation) and it would appear that the issue revolves around the linux implementation of KSH.&lt;BR /&gt;&lt;BR /&gt;I have run the same test on solaris and using ksh is OK, if I then try it on Linux it kills the parent processes.&lt;BR /&gt;&lt;BR /&gt;One other thing to note is that when I run on Solaris the parent PID is the java process, when I run in Linux the parent PID is a non-existent process.</description>
      <pubDate>Mon, 01 Nov 2004 08:40:11 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/process-destroy-kills-outer-shell-when-killing-inner/m-p/3411062#M71035</guid>
      <dc:creator>Peter Suggitt</dc:creator>
      <dc:date>2004-11-01T08:40:11Z</dc:date>
    </item>
  </channel>
</rss>

