<?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 getting SIGHUP in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/process-getting-sighup/m-p/2602744#M853210</link>
    <description>Deepak,&lt;BR /&gt;&lt;BR /&gt;   If you want to start the scripts as a part&lt;BR /&gt;of bootup process, it should be a run-level&lt;BR /&gt;startup script under /sbin/init.d directory&lt;BR /&gt;with a link to /sbin/rc3.d/Snnn&amp;lt;script&amp;gt; .&lt;BR /&gt;&lt;BR /&gt;There should be a template file in the&lt;BR /&gt;/sbin/init.d directory.  Make a copy of&lt;BR /&gt;it and modify the contents under "start"&lt;BR /&gt;case option to include the command&lt;BR /&gt;"su xx -c "...."  .   &lt;BR /&gt;&lt;BR /&gt;   /etc/rc is not the correct location&lt;BR /&gt;to start off user-defined scripts, since&lt;BR /&gt;the system is not completed its booting&lt;BR /&gt;process.&lt;BR /&gt;&lt;BR /&gt;-R</description>
    <pubDate>Sat, 27 Oct 2001 12:15:23 GMT</pubDate>
    <dc:creator>Roger Baptiste</dc:creator>
    <dc:date>2001-10-27T12:15:23Z</dc:date>
    <item>
      <title>Process getting SIGHUP</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/process-getting-sighup/m-p/2602743#M853209</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;I have this script, say start_procs.sh, that starts up some executables in the background with &lt;BR /&gt;' su - &lt;USER-NAME&gt; -c "nohup &lt;EXE-NAME&gt; &lt;PARAMETERS&gt; &amp;amp;" '&lt;BR /&gt;When I invoke this script from the command-prompt, all is well - the processes start, and continue to run in the background till they are explicitly 'kill'ed.&lt;BR /&gt;&lt;BR /&gt;Funny thing is, when I invoke start_procs.sh from the startup file /etc/rc, the processes get a SIGHUP as soon as start_procs.sh exits. &lt;BR /&gt;&lt;BR /&gt;Where am I goofing up?&lt;/PARAMETERS&gt;&lt;/EXE-NAME&gt;&lt;/USER-NAME&gt;</description>
      <pubDate>Sat, 27 Oct 2001 11:38:51 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/process-getting-sighup/m-p/2602743#M853209</guid>
      <dc:creator>Deepak Extross</dc:creator>
      <dc:date>2001-10-27T11:38:51Z</dc:date>
    </item>
    <item>
      <title>Re: Process getting SIGHUP</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/process-getting-sighup/m-p/2602744#M853210</link>
      <description>Deepak,&lt;BR /&gt;&lt;BR /&gt;   If you want to start the scripts as a part&lt;BR /&gt;of bootup process, it should be a run-level&lt;BR /&gt;startup script under /sbin/init.d directory&lt;BR /&gt;with a link to /sbin/rc3.d/Snnn&amp;lt;script&amp;gt; .&lt;BR /&gt;&lt;BR /&gt;There should be a template file in the&lt;BR /&gt;/sbin/init.d directory.  Make a copy of&lt;BR /&gt;it and modify the contents under "start"&lt;BR /&gt;case option to include the command&lt;BR /&gt;"su xx -c "...."  .   &lt;BR /&gt;&lt;BR /&gt;   /etc/rc is not the correct location&lt;BR /&gt;to start off user-defined scripts, since&lt;BR /&gt;the system is not completed its booting&lt;BR /&gt;process.&lt;BR /&gt;&lt;BR /&gt;-R</description>
      <pubDate>Sat, 27 Oct 2001 12:15:23 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/process-getting-sighup/m-p/2602744#M853210</guid>
      <dc:creator>Roger Baptiste</dc:creator>
      <dc:date>2001-10-27T12:15:23Z</dc:date>
    </item>
    <item>
      <title>Re: Process getting SIGHUP</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/process-getting-sighup/m-p/2602745#M853211</link>
      <description>R,&lt;BR /&gt;Tried that too. But the problem remains - the processes start up, but get signal 1 when my script exits.&lt;BR /&gt;&lt;BR /&gt;-deepak.</description>
      <pubDate>Sat, 27 Oct 2001 12:41:53 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/process-getting-sighup/m-p/2602745#M853211</guid>
      <dc:creator>Deepak Extross</dc:creator>
      <dc:date>2001-10-27T12:41:53Z</dc:date>
    </item>
    <item>
      <title>Re: Process getting SIGHUP</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/process-getting-sighup/m-p/2602746#M853212</link>
      <description>Hi,&lt;BR /&gt;Try with:&lt;BR /&gt;&lt;BR /&gt;su - &lt;USER-NAME&gt; -c "nohup &lt;EXE-NAME&gt; &lt;PARAMETERS&gt; 1&amp;gt;/dev/null &amp;amp;"&lt;BR /&gt;&lt;BR /&gt;E.&lt;BR /&gt;&lt;/PARAMETERS&gt;&lt;/EXE-NAME&gt;&lt;/USER-NAME&gt;</description>
      <pubDate>Sat, 27 Oct 2001 16:36:29 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/process-getting-sighup/m-p/2602746#M853212</guid>
      <dc:creator>Eugen Cocalea</dc:creator>
      <dc:date>2001-10-27T16:36:29Z</dc:date>
    </item>
    <item>
      <title>Re: Process getting SIGHUP</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/process-getting-sighup/m-p/2602747#M853213</link>
      <description>during boot, rc will kill all child pocesses on exit.&lt;BR /&gt;&lt;BR /&gt;Instead of:&lt;BR /&gt;&lt;BR /&gt; su - &lt;USER-NAME&gt; -c "nohup &lt;EXE-NAME&gt; &lt;PARAMETERS&gt; &amp;amp;"&lt;BR /&gt;&lt;BR /&gt;Try "nohup'ing" your "su"&lt;BR /&gt;&lt;BR /&gt;nohup su - &lt;USERNAME&gt; -c "&lt;EXE-NAME&gt; &lt;PARAMS&gt;" &amp;amp;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;live free or die&lt;BR /&gt;&lt;BR /&gt;harry&lt;/PARAMS&gt;&lt;/EXE-NAME&gt;&lt;/USERNAME&gt;&lt;/PARAMETERS&gt;&lt;/EXE-NAME&gt;&lt;/USER-NAME&gt;</description>
      <pubDate>Sat, 27 Oct 2001 16:38:53 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/process-getting-sighup/m-p/2602747#M853213</guid>
      <dc:creator>harry d brown jr</dc:creator>
      <dc:date>2001-10-27T16:38:53Z</dc:date>
    </item>
    <item>
      <title>Re: Process getting SIGHUP</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/process-getting-sighup/m-p/2602748#M853214</link>
      <description>Hi again,&lt;BR /&gt;&lt;BR /&gt;Oops, I should have seen that :) given the fact that I tried several times to get the SIGHUP and didn't succeed (worked as you wanted).&lt;BR /&gt;&lt;BR /&gt;E.</description>
      <pubDate>Sat, 27 Oct 2001 16:53:55 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/process-getting-sighup/m-p/2602748#M853214</guid>
      <dc:creator>Eugen Cocalea</dc:creator>
      <dc:date>2001-10-27T16:53:55Z</dc:date>
    </item>
    <item>
      <title>Re: Process getting SIGHUP</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/process-getting-sighup/m-p/2602749#M853215</link>
      <description>nohup(1) takes some time to startup and do its work. Because of the "&amp;amp;", the nohup command is started in the background and the calling script continues. If the calling script terminates quickly, it will terminate before nohup has had the chance doing its work and hence the nohup-ed command will still get a SIGHUP signal.&lt;BR /&gt;&lt;BR /&gt;A hack workaround for this is to put a small (few second) sleep command after the "... nohup ...&amp;amp;" to allow nohup to do its work.&lt;BR /&gt;&lt;BR /&gt;A better method is to check (with ps(1)) in a loop if the nohup-ed command has actually started. If not, loop. If so, exit from the loop.</description>
      <pubDate>Tue, 30 Oct 2001 13:55:42 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/process-getting-sighup/m-p/2602749#M853215</guid>
      <dc:creator>Frank Slootweg</dc:creator>
      <dc:date>2001-10-30T13:55:42Z</dc:date>
    </item>
    <item>
      <title>Re: Process getting SIGHUP</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/process-getting-sighup/m-p/2602750#M853216</link>
      <description>Thanks to all who chipped in.&lt;BR /&gt;Harry gets full marks for cracking this one!</description>
      <pubDate>Wed, 31 Oct 2001 03:09:34 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/process-getting-sighup/m-p/2602750#M853216</guid>
      <dc:creator>Deepak Extross</dc:creator>
      <dc:date>2001-10-31T03:09:34Z</dc:date>
    </item>
  </channel>
</rss>

