<?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 scripting a background process in Operating System - Linux</title>
    <link>https://community.hpe.com/t5/operating-system-linux/scripting-a-background-process/m-p/5055593#M93767</link>
    <description>Hello everyone,&lt;BR /&gt;&lt;BR /&gt;I am writing a script that works perfectly in the fore ground. The script starts a background process that monitors the parent process so that it knows when it is done. The background process writes time updates to the screen so that the user knows that the parent process is still running. The problem I am having is that if I try to run the parent script in the background I get a SIGTTOU message and the script stops until I bring it back into the fore ground.&lt;BR /&gt;&lt;BR /&gt;I know the problem is with the script trying to write to the crontroling tty and it can't but I am not sure if there is a way around it. Does any one have any ideas?&lt;BR /&gt;&lt;BR /&gt;I hope this all made sense!!&lt;BR /&gt;&lt;BR /&gt;Thanks,&lt;BR /&gt;Tim</description>
    <pubDate>Thu, 28 Jun 2007 19:17:54 GMT</pubDate>
    <dc:creator>Timothy P. Jackson</dc:creator>
    <dc:date>2007-06-28T19:17:54Z</dc:date>
    <item>
      <title>scripting a background process</title>
      <link>https://community.hpe.com/t5/operating-system-linux/scripting-a-background-process/m-p/5055593#M93767</link>
      <description>Hello everyone,&lt;BR /&gt;&lt;BR /&gt;I am writing a script that works perfectly in the fore ground. The script starts a background process that monitors the parent process so that it knows when it is done. The background process writes time updates to the screen so that the user knows that the parent process is still running. The problem I am having is that if I try to run the parent script in the background I get a SIGTTOU message and the script stops until I bring it back into the fore ground.&lt;BR /&gt;&lt;BR /&gt;I know the problem is with the script trying to write to the crontroling tty and it can't but I am not sure if there is a way around it. Does any one have any ideas?&lt;BR /&gt;&lt;BR /&gt;I hope this all made sense!!&lt;BR /&gt;&lt;BR /&gt;Thanks,&lt;BR /&gt;Tim</description>
      <pubDate>Thu, 28 Jun 2007 19:17:54 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/scripting-a-background-process/m-p/5055593#M93767</guid>
      <dc:creator>Timothy P. Jackson</dc:creator>
      <dc:date>2007-06-28T19:17:54Z</dc:date>
    </item>
    <item>
      <title>Re: scripting a background process</title>
      <link>https://community.hpe.com/t5/operating-system-linux/scripting-a-background-process/m-p/5055594#M93768</link>
      <description>Add a trap to the writing process telling it to ignore SIGTTOU. &lt;BR /&gt;&lt;BR /&gt;bear in mind that there is another better way to determine if a background process is still running.&lt;BR /&gt;&lt;BR /&gt;child_proc.sh &amp;amp;&lt;BR /&gt;CHILD_PID=${!}&lt;BR /&gt;&lt;BR /&gt;Now periodically do &lt;BR /&gt;kill -0 ${CHILD_PID}&lt;BR /&gt;CHILD_STAT=${?}&lt;BR /&gt;if [[ ${CHILD_STAT} -eq 0 ]]&lt;BR /&gt;  then&lt;BR /&gt;    echo "The kid is still running"&lt;BR /&gt;  fi</description>
      <pubDate>Thu, 28 Jun 2007 20:12:18 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/scripting-a-background-process/m-p/5055594#M93768</guid>
      <dc:creator>A. Clay Stephenson</dc:creator>
      <dc:date>2007-06-28T20:12:18Z</dc:date>
    </item>
    <item>
      <title>Re: scripting a background process</title>
      <link>https://community.hpe.com/t5/operating-system-linux/scripting-a-background-process/m-p/5055595#M93769</link>
      <description>Thanks Clay!&lt;BR /&gt;&lt;BR /&gt;This makes total sense and probably more efficient.&lt;BR /&gt;&lt;BR /&gt;Tim</description>
      <pubDate>Thu, 28 Jun 2007 20:15:40 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/scripting-a-background-process/m-p/5055595#M93769</guid>
      <dc:creator>Timothy P. Jackson</dc:creator>
      <dc:date>2007-06-28T20:15:40Z</dc:date>
    </item>
  </channel>
</rss>

