<?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: rc scripts starting background processes? in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/rc-scripts-starting-background-processes/m-p/2609034#M35673</link>
    <description>Is the nohup required in the init/rc scripts?&lt;BR /&gt;&lt;BR /&gt;I have 2 processes currently that according to the rc.log attempt to start but not actually start.  Both of these are shell scripts, one running a disk archive ever 5 seconds, and the other is used to launch BigBrother.  Neither of these start up.  But the ones I have added that actually launch a daemon application work just fine.&lt;BR /&gt;&lt;BR /&gt;Thanks</description>
    <pubDate>Wed, 07 Nov 2001 14:58:57 GMT</pubDate>
    <dc:creator>Eric Buckner</dc:creator>
    <dc:date>2001-11-07T14:58:57Z</dc:date>
    <item>
      <title>rc scripts starting background processes?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/rc-scripts-starting-background-processes/m-p/2609031#M35670</link>
      <description>Hi everyone.  I think I know the answer to this but can not find anything online about it.  Is it possible or needed to have an RC script to launch a program in the background.  I currently have a shell script that I want to start and stop w/ rc.  Of course I don't want it hold the current session if I stop/start it via /sbin/init.d/myscript.  On system startup doesn't the rc/init in a sense put everything in the background?  And if my start section in my init script does a myscript.sh &amp;amp;  Is that going to be an issue and cause the job not to run?&lt;BR /&gt;&lt;BR /&gt;Thanks,&lt;BR /&gt;Eric</description>
      <pubDate>Wed, 07 Nov 2001 14:52:01 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/rc-scripts-starting-background-processes/m-p/2609031#M35670</guid>
      <dc:creator>Eric Buckner</dc:creator>
      <dc:date>2001-11-07T14:52:01Z</dc:date>
    </item>
    <item>
      <title>Re: rc scripts starting background processes?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/rc-scripts-starting-background-processes/m-p/2609032#M35671</link>
      <description>Yes you can. I used nohup with &amp;amp;.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;live free or die&lt;BR /&gt;harry</description>
      <pubDate>Wed, 07 Nov 2001 14:54:47 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/rc-scripts-starting-background-processes/m-p/2609032#M35671</guid>
      <dc:creator>harry d brown jr</dc:creator>
      <dc:date>2001-11-07T14:54:47Z</dc:date>
    </item>
    <item>
      <title>Re: rc scripts starting background processes?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/rc-scripts-starting-background-processes/m-p/2609033#M35672</link>
      <description>Hi Eric,&lt;BR /&gt;&lt;BR /&gt;A number of startup scripts run commands in the background, e.g. omni,cmcluster.  Try typing:&lt;BR /&gt;&lt;BR /&gt;grep ' &amp;amp;$' /sbin/init.d/*&lt;BR /&gt;&lt;BR /&gt;to see examples.  As long as your scripts are not interactive or need to be attached to a device, you should be OK.&lt;BR /&gt;&lt;BR /&gt;Rgds, Robin.</description>
      <pubDate>Wed, 07 Nov 2001 14:57:38 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/rc-scripts-starting-background-processes/m-p/2609033#M35672</guid>
      <dc:creator>Robin Wakefield</dc:creator>
      <dc:date>2001-11-07T14:57:38Z</dc:date>
    </item>
    <item>
      <title>Re: rc scripts starting background processes?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/rc-scripts-starting-background-processes/m-p/2609034#M35673</link>
      <description>Is the nohup required in the init/rc scripts?&lt;BR /&gt;&lt;BR /&gt;I have 2 processes currently that according to the rc.log attempt to start but not actually start.  Both of these are shell scripts, one running a disk archive ever 5 seconds, and the other is used to launch BigBrother.  Neither of these start up.  But the ones I have added that actually launch a daemon application work just fine.&lt;BR /&gt;&lt;BR /&gt;Thanks</description>
      <pubDate>Wed, 07 Nov 2001 14:58:57 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/rc-scripts-starting-background-processes/m-p/2609034#M35673</guid>
      <dc:creator>Eric Buckner</dc:creator>
      <dc:date>2001-11-07T14:58:57Z</dc:date>
    </item>
    <item>
      <title>Re: rc scripts starting background processes?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/rc-scripts-starting-background-processes/m-p/2609035#M35674</link>
      <description>Hi Eric:&lt;BR /&gt;&lt;BR /&gt;Launch your script like this:&lt;BR /&gt;&lt;BR /&gt;# nohup $MY.SH &amp;gt; ${MY.SH}.nohup 2&amp;gt;&amp;amp;1 &amp;amp; &lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Wed, 07 Nov 2001 15:00:50 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/rc-scripts-starting-background-processes/m-p/2609035#M35674</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2001-11-07T15:00:50Z</dc:date>
    </item>
    <item>
      <title>Re: rc scripts starting background processes?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/rc-scripts-starting-background-processes/m-p/2609036#M35675</link>
      <description>If the daemon can spawn a process without nohup, then that is better. Cron does it even from the command line. You could also put it into inittab.&lt;BR /&gt;&lt;BR /&gt;live free or die&lt;BR /&gt;harry</description>
      <pubDate>Wed, 07 Nov 2001 15:02:15 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/rc-scripts-starting-background-processes/m-p/2609036#M35675</guid>
      <dc:creator>harry d brown jr</dc:creator>
      <dc:date>2001-11-07T15:02:15Z</dc:date>
    </item>
    <item>
      <title>Re: rc scripts starting background processes?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/rc-scripts-starting-background-processes/m-p/2609037#M35676</link>
      <description>Hi Eric:&lt;BR /&gt;&lt;BR /&gt;If your script runs to completion and then exits there is no need to '&amp;amp;' or nohup it.&lt;BR /&gt;You do need to make certain that no interactive input is expected. You also need to make certain that you handle stdout and stderr correctly and return expected status to rc. However, if you are setting up a daemon, then you probably need to put in trap statements to ignore or properly handle signals. e.g. what do you want your daemon to do when it receives a kill -1? Die or reread some configuration file.&lt;BR /&gt;</description>
      <pubDate>Wed, 07 Nov 2001 15:05:01 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/rc-scripts-starting-background-processes/m-p/2609037#M35676</guid>
      <dc:creator>A. Clay Stephenson</dc:creator>
      <dc:date>2001-11-07T15:05:01Z</dc:date>
    </item>
    <item>
      <title>Re: rc scripts starting background processes?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/rc-scripts-starting-background-processes/m-p/2609038#M35677</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;  yes, you can start rc&lt;BR /&gt;scripts as backgroupd processes.  For an example&lt;BR /&gt;here are couple of scripts&lt;BR /&gt;in the /sbin/init.d which&lt;BR /&gt;use nohup and &amp;amp;  for&lt;BR /&gt;doing it:&lt;BR /&gt;*****&lt;BR /&gt;hparamgr: &lt;BR /&gt;nohup ${ARRAY_STARTUP_FILE} &amp;gt;&amp;gt; ${HPARAMGR_OUTPUT}  2&amp;gt;&amp;amp;1 &amp;amp;&lt;BR /&gt;hparray:      &lt;BR /&gt;nohup ${ARRAY_STARTUP_FILE} &amp;gt;&amp;gt; ${ARRAYSCAN_OUTPUT}  2&amp;gt;&amp;amp;1 &amp;amp;&lt;BR /&gt;slsd:                   nohup /usr/bin/X11/SLSd_daemon 1&amp;gt; /dev/null 2&amp;gt;&amp;amp;1 &amp;amp;&lt;BR /&gt;spa:    #    Use nohup so getkinfo is allowed to keep running after the&lt;BR /&gt;spa:    nice -5 nohup /usr/sam/lbin/getkinfo -b &amp;gt;/dev/null 2&amp;gt;&amp;amp;1 &amp;amp;&lt;BR /&gt;*****************&lt;BR /&gt;&lt;BR /&gt;   So, yes you can use&lt;BR /&gt;the same format as above&lt;BR /&gt;for running your script.&lt;BR /&gt;&lt;BR /&gt;  Regarding your other question, whether the rc scripts start off in background automatically -&lt;BR /&gt;No, it basically depends on the commands. For instance most of the rc scripts either do immediate tasks (mount fs ..) or start of daemons (nfs ..) .  So, they didnt&lt;BR /&gt;need nohup or &amp;amp; .   Whereas&lt;BR /&gt;if you want to some script as a background which should not die, you need to set it up&lt;BR /&gt;as a nohup bg process. &lt;BR /&gt;&lt;BR /&gt;HTH&lt;BR /&gt;raj</description>
      <pubDate>Wed, 07 Nov 2001 15:18:14 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/rc-scripts-starting-background-processes/m-p/2609038#M35677</guid>
      <dc:creator>Roger Baptiste</dc:creator>
      <dc:date>2001-11-07T15:18:14Z</dc:date>
    </item>
    <item>
      <title>Re: rc scripts starting background processes?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/rc-scripts-starting-background-processes/m-p/2609039#M35678</link>
      <description>Thanks everyone for the rapid replies.  One script was running to completion and did not need to be launched in the background.  However, the other is a shell script daemon and I have added the nohup and will see how that goes next reboot.&lt;BR /&gt;&lt;BR /&gt;Again thanks for the assistance!</description>
      <pubDate>Wed, 07 Nov 2001 15:21:39 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/rc-scripts-starting-background-processes/m-p/2609039#M35678</guid>
      <dc:creator>Eric Buckner</dc:creator>
      <dc:date>2001-11-07T15:21:39Z</dc:date>
    </item>
  </channel>
</rss>

