<?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: How to know when a background task is complete? in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-know-when-a-background-task-is-complete/m-p/3231432#M172196</link>
    <description>Plan B.&lt;BR /&gt;&lt;BR /&gt;Have the child send a signal via kill to the parent process (using ${PPID}) just before the child terminates. The parent script, in turn, has a trap for the chosen signal. This is probably a better method because you no longer have to loop inside the parent checking on the status of the child.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
    <pubDate>Fri, 26 Mar 2004 17:15:09 GMT</pubDate>
    <dc:creator>A. Clay Stephenson</dc:creator>
    <dc:date>2004-03-26T17:15:09Z</dc:date>
    <item>
      <title>How to know when a background task is complete?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-know-when-a-background-task-is-complete/m-p/3231430#M172194</link>
      <description>Hello,&lt;BR /&gt;&lt;BR /&gt;Inside a script, I start a another script in the background so I can continue processing. Is there a way besides ps to find out when this command has finished?&lt;BR /&gt;&lt;BR /&gt;Thanks,&lt;BR /&gt;John&lt;BR /&gt;</description>
      <pubDate>Fri, 26 Mar 2004 17:08:34 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-know-when-a-background-task-is-complete/m-p/3231430#M172194</guid>
      <dc:creator>John Chaff</dc:creator>
      <dc:date>2004-03-26T17:08:34Z</dc:date>
    </item>
    <item>
      <title>Re: How to know when a background task is complete?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-know-when-a-background-task-is-complete/m-p/3231431#M172195</link>
      <description>This is pretty much Duck Soup.&lt;BR /&gt;&lt;BR /&gt;mybackground.sh &amp;amp;&lt;BR /&gt;CHILDPID=${!}&lt;BR /&gt;&lt;BR /&gt;Now all you have to do is periodically:&lt;BR /&gt;kill -0 ${CHILDPID}&lt;BR /&gt;STAT=${?}&lt;BR /&gt;if [[ ${STAT} -eq 0 ]]&lt;BR /&gt;then&lt;BR /&gt;  echo "Kid is still going"&lt;BR /&gt;else&lt;BR /&gt;  echo "Kid is dead"&lt;BR /&gt;fi&lt;BR /&gt;&lt;BR /&gt;Man 1 kill for details.&lt;BR /&gt;</description>
      <pubDate>Fri, 26 Mar 2004 17:12:21 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-know-when-a-background-task-is-complete/m-p/3231431#M172195</guid>
      <dc:creator>A. Clay Stephenson</dc:creator>
      <dc:date>2004-03-26T17:12:21Z</dc:date>
    </item>
    <item>
      <title>Re: How to know when a background task is complete?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-know-when-a-background-task-is-complete/m-p/3231432#M172196</link>
      <description>Plan B.&lt;BR /&gt;&lt;BR /&gt;Have the child send a signal via kill to the parent process (using ${PPID}) just before the child terminates. The parent script, in turn, has a trap for the chosen signal. This is probably a better method because you no longer have to loop inside the parent checking on the status of the child.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Fri, 26 Mar 2004 17:15:09 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-know-when-a-background-task-is-complete/m-p/3231432#M172196</guid>
      <dc:creator>A. Clay Stephenson</dc:creator>
      <dc:date>2004-03-26T17:15:09Z</dc:date>
    </item>
    <item>
      <title>Re: How to know when a background task is complete?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-know-when-a-background-task-is-complete/m-p/3231433#M172197</link>
      <description>Hi John,&lt;BR /&gt;&lt;BR /&gt;   Alternatively, at some point of time, if you have to just wait on the background process you started to end, then you can use the wait command.&lt;BR /&gt;&lt;BR /&gt;   man wait for details&lt;BR /&gt;&lt;BR /&gt;Sundar.</description>
      <pubDate>Fri, 26 Mar 2004 17:16:55 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-know-when-a-background-task-is-complete/m-p/3231433#M172197</guid>
      <dc:creator>Sundar_7</dc:creator>
      <dc:date>2004-03-26T17:16:55Z</dc:date>
    </item>
    <item>
      <title>Re: How to know when a background task is complete?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-know-when-a-background-task-is-complete/m-p/3231434#M172198</link>
      <description>Thanks.  The kill -0 was just what I needed.&lt;BR /&gt;&lt;BR /&gt;John</description>
      <pubDate>Fri, 26 Mar 2004 17:33:13 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-know-when-a-background-task-is-complete/m-p/3231434#M172198</guid>
      <dc:creator>John Chaff</dc:creator>
      <dc:date>2004-03-26T17:33:13Z</dc:date>
    </item>
  </channel>
</rss>

