<?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 properly use nohup? in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-properly-use-nohup/m-p/3071783#M808946</link>
    <description>Any chance you could post the complete import.sh script.  Everything looks OK otherwise.</description>
    <pubDate>Tue, 16 Sep 2003 04:03:40 GMT</pubDate>
    <dc:creator>Mark Grant</dc:creator>
    <dc:date>2003-09-16T04:03:40Z</dc:date>
    <item>
      <title>How to properly use nohup?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-properly-use-nohup/m-p/3071779#M808937</link>
      <description>Hello all,&lt;BR /&gt;&lt;BR /&gt;I'm trying to leave an oracle import running after-hours.  My import script (import.sh) contains:&lt;BR /&gt;&lt;BR /&gt;. /home/oracle/portal-env.sh&lt;BR /&gt;imp userid="'sys/our_password@portaldb as sysdba'" file=/oracle/export/portal.dmp gra&lt;BR /&gt;nts=y log=portal-imp.log full=y&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;I run the script as:&lt;BR /&gt;&lt;BR /&gt;nohup /home/oracle/import.sh &amp;amp;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;But as soon as I try to exit the shell...I get the message: "The are running jobs".  I quit..and then log back in and I can see the import stopped.  What is the proper way to use the nohup command?&lt;BR /&gt;&lt;BR /&gt;Thanks,&lt;BR /&gt;Jorge&lt;BR /&gt;</description>
      <pubDate>Mon, 15 Sep 2003 22:30:00 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-properly-use-nohup/m-p/3071779#M808937</guid>
      <dc:creator>Jorge Fabregas</dc:creator>
      <dc:date>2003-09-15T22:30:00Z</dc:date>
    </item>
    <item>
      <title>Re: How to properly use nohup?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-properly-use-nohup/m-p/3071780#M808939</link>
      <description>You use and the behavior of nohup is normal.&lt;BR /&gt;&lt;BR /&gt;You should note that a file called nohup.out is created with the nohup command.  Obviously runing the command twice in the same directory can result in some interesting results.&lt;BR /&gt;&lt;BR /&gt;You can actually omit the nohup command and still background jobs.&lt;BR /&gt;&lt;BR /&gt;/home/oracle/import.sh &amp;amp; &lt;BR /&gt;&lt;BR /&gt;Then hit enter&lt;BR /&gt;&lt;BR /&gt;jobs&lt;BR /&gt;&lt;BR /&gt;You will see those running jobs.  If you terminate your terminal session, say with the X if its running on Microsoft Windows, the job will continue to run in the background.&lt;BR /&gt;&lt;BR /&gt;SEP&lt;BR /&gt;</description>
      <pubDate>Mon, 15 Sep 2003 23:45:18 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-properly-use-nohup/m-p/3071780#M808939</guid>
      <dc:creator>Steven E. Protter</dc:creator>
      <dc:date>2003-09-15T23:45:18Z</dc:date>
    </item>
    <item>
      <title>Re: How to properly use nohup?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-properly-use-nohup/m-p/3071781#M808941</link>
      <description>Hi Jorge&lt;BR /&gt;&lt;BR /&gt;Your use of the nohup command is correct.&lt;BR /&gt;&lt;BR /&gt;Type "exit" at shell prompt &amp;amp; then exit again after the message about running jobs.  &lt;BR /&gt;Your shell script should still keep running.&lt;BR /&gt;&lt;BR /&gt;If not check there is not a problem with the script ie run it without nohup &amp;amp; see it continues running.&lt;BR /&gt;&lt;BR /&gt;Cheers&lt;BR /&gt;Con</description>
      <pubDate>Mon, 15 Sep 2003 23:49:13 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-properly-use-nohup/m-p/3071781#M808941</guid>
      <dc:creator>Con O'Kelly</dc:creator>
      <dc:date>2003-09-15T23:49:13Z</dc:date>
    </item>
    <item>
      <title>Re: How to properly use nohup?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-properly-use-nohup/m-p/3071782#M808943</link>
      <description>Hello all,&lt;BR /&gt;&lt;BR /&gt;Thanks for your replies.  I know it's weird. The thing is that the import stops.  If I run it manually it works fine. If I exit after running it with nohup (and putting it in the background) ...the only way to make sure if it's working (with nohup) is to logout..then log back in and check if it's  there.&lt;BR /&gt;&lt;BR /&gt;If I do (after login back) a ps -ef | grep imp...the import is there in memory but it is not working.  I can notice this because I look at the nohup.out and the import log.&lt;BR /&gt;&lt;BR /&gt;Maybe the first line of the script (the one that sources the environment script) is causing some side effect.  I'll check again.  If you have any more ideas please let me know.&lt;BR /&gt;&lt;BR /&gt;Thanks,&lt;BR /&gt;JOrge</description>
      <pubDate>Tue, 16 Sep 2003 01:49:21 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-properly-use-nohup/m-p/3071782#M808943</guid>
      <dc:creator>Jorge Fabregas</dc:creator>
      <dc:date>2003-09-16T01:49:21Z</dc:date>
    </item>
    <item>
      <title>Re: How to properly use nohup?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-properly-use-nohup/m-p/3071783#M808946</link>
      <description>Any chance you could post the complete import.sh script.  Everything looks OK otherwise.</description>
      <pubDate>Tue, 16 Sep 2003 04:03:40 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-properly-use-nohup/m-p/3071783#M808946</guid>
      <dc:creator>Mark Grant</dc:creator>
      <dc:date>2003-09-16T04:03:40Z</dc:date>
    </item>
    <item>
      <title>Re: How to properly use nohup?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-properly-use-nohup/m-p/3071784#M808948</link>
      <description>Hi!&lt;BR /&gt;I thing your syntaksis is right.&lt;BR /&gt;So I had such problem /with un-normal&lt;BR /&gt;behavior of nohup a year ago with hp-ux 10.20/.&lt;BR /&gt;So, as far as remember the problem was &lt;BR /&gt;solved after patch-upgrade.&lt;BR /&gt;So please try to run this on another mashine&lt;BR /&gt;/with different level os or patches/.&lt;BR /&gt;You could compare behavior and take&lt;BR /&gt;the solution.&lt;BR /&gt;&lt;BR /&gt;Regards,Stan</description>
      <pubDate>Tue, 16 Sep 2003 05:44:13 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-properly-use-nohup/m-p/3071784#M808948</guid>
      <dc:creator>Stanimir</dc:creator>
      <dc:date>2003-09-16T05:44:13Z</dc:date>
    </item>
    <item>
      <title>Re: How to properly use nohup?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-properly-use-nohup/m-p/3071785#M808950</link>
      <description>Looks like more than one thing may be wrong...&lt;BR /&gt;&lt;BR /&gt;Submit your job with "at now" instead of nohup.  If results are identical, it's not a problem with "nohup".&lt;BR /&gt;&lt;BR /&gt;I suspect it's an "import" problem.&lt;BR /&gt;&lt;BR /&gt;Is your userid password correct?&lt;BR /&gt;Your import file has proper permissions etc?&lt;BR /&gt;You are doing import FULL.  Does your target database layout match the source database? &lt;BR /&gt;&lt;BR /&gt; &lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 16 Sep 2003 12:31:51 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-properly-use-nohup/m-p/3071785#M808950</guid>
      <dc:creator>Raynald Boucher</dc:creator>
      <dc:date>2003-09-16T12:31:51Z</dc:date>
    </item>
    <item>
      <title>Re: How to properly use nohup?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-properly-use-nohup/m-p/3071786#M808952</link>
      <description>have you tried putting the nohup in your script like &lt;BR /&gt;...&lt;BR /&gt;nohup imp userid="'sys/our_password@portaldb as sysdba'" file=/oracle/export/portal.dmp gra &lt;BR /&gt;nts=y log=portal-imp.log full=y &lt;BR /&gt;...&lt;BR /&gt;&lt;BR /&gt;then run your script like&lt;BR /&gt;/home/oracle/import.sh &amp;amp; &lt;BR /&gt;&lt;BR /&gt;when you log out and back in you should then you should see your script with a ppid of 1 and not your old terminal ppid.&lt;BR /&gt;&lt;BR /&gt;john</description>
      <pubDate>Tue, 16 Sep 2003 12:59:42 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-properly-use-nohup/m-p/3071786#M808952</guid>
      <dc:creator>jbjbjb</dc:creator>
      <dc:date>2003-09-16T12:59:42Z</dc:date>
    </item>
    <item>
      <title>Re: How to properly use nohup?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-properly-use-nohup/m-p/3071787#M808953</link>
      <description>Jorge,&lt;BR /&gt;&lt;BR /&gt;as others already confirmed your usage of nohup should be ok.&lt;BR /&gt;Since I'm not a dba I don't do db imports.&lt;BR /&gt;Thus, I don't know the behavior of the Oracle imp command either.&lt;BR /&gt;Could it be that somehow the command (or your script) is expecting any input?&lt;BR /&gt;Then you should consider redirecting stdin as well.&lt;BR /&gt;Maybe if no such input is required an explicit closing of stdin or some strange looking redirection like "0&lt;BR /&gt;SEP,&lt;BR /&gt;&lt;BR /&gt;though it doesn't suit to object a pharao, I don't believe that the closing of the terminal where you simply backgrounded a job by appending an ampersand without prepending the nohup command won't kill all such backgrounded jobs as well.&lt;BR /&gt;Afaik, when you exit the shell (i.e. the session leader) it will send all backgrounded jobs a SIGHUP which should terminate them in order not to leave orphans behind.&lt;BR /&gt;</description>
      <pubDate>Tue, 16 Sep 2003 13:28:14 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-properly-use-nohup/m-p/3071787#M808953</guid>
      <dc:creator>Ralph Grothe</dc:creator>
      <dc:date>2003-09-16T13:28:14Z</dc:date>
    </item>
    <item>
      <title>Re: How to properly use nohup?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-properly-use-nohup/m-p/3071788#M808954</link>
      <description>The whole point of nohup is to prevent it from killing all your tasks when you disconnect.&lt;BR /&gt;&lt;BR /&gt;Maybe its blocked on writing to standard error. Have you tried adding a 2&amp;gt;&amp;amp;1 to the end? For our exports we have to use&lt;BR /&gt;&lt;BR /&gt;nohup dbexport dbname &amp;gt; txtfile 2&amp;gt;&amp;amp;1 &amp;amp;&lt;BR /&gt;&lt;BR /&gt;which works fine and carries on running when I log out, which I do by typing exit twice.&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 16 Sep 2003 13:40:26 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-properly-use-nohup/m-p/3071788#M808954</guid>
      <dc:creator>Steve Lewis</dc:creator>
      <dc:date>2003-09-16T13:40:26Z</dc:date>
    </item>
    <item>
      <title>Re: How to properly use nohup?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-properly-use-nohup/m-p/3071789#M808955</link>
      <description>Jorge,&lt;BR /&gt;&lt;BR /&gt;We had problems identical to yours earlier this  year and we opened an issue with HP about it.  I was even able to duplicate the issue with sar.  (This was on HPUX 11.0, by the way.)  The issue got escalated back to the lab, and they said they would have to do a defect fix for nohup.  We haven't seen it yet.&lt;BR /&gt;&lt;BR /&gt;I found that if you invoked another shell, then ran the nohup script, then exited your child shell, the nohup would continue to run properly.&lt;BR /&gt;&lt;BR /&gt;sh&lt;BR /&gt;nohup sar -v 5 5 &amp;amp;&lt;BR /&gt;exit&lt;BR /&gt;&lt;BR /&gt;This would always make nohup work properly.  We modified the script we were having trouble with, and haven't really thought about it for months.  Is it possible for you to do something like that?&lt;BR /&gt;&lt;BR /&gt;Hope it helps&lt;BR /&gt;&lt;BR /&gt;John</description>
      <pubDate>Tue, 16 Sep 2003 13:46:05 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-properly-use-nohup/m-p/3071789#M808955</guid>
      <dc:creator>John Payne_2</dc:creator>
      <dc:date>2003-09-16T13:46:05Z</dc:date>
    </item>
    <item>
      <title>Re: How to properly use nohup?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-properly-use-nohup/m-p/3071790#M808956</link>
      <description>Hello everyone,&lt;BR /&gt;&lt;BR /&gt;Thanks for your help.&lt;BR /&gt;&lt;BR /&gt;Steve! THANKS! That was it! Redirecting stderr!!!&lt;BR /&gt;&lt;BR /&gt;It seems that nohup will only redirect stdout (to nohup.out) but it doesn't redirect stderr.&lt;BR /&gt;&lt;BR /&gt;I ran the script as:&lt;BR /&gt;&lt;BR /&gt;nohup /home/oracle/import.sh 1&amp;gt; out.log 2&amp;gt; out.err&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;and it worked!  Thanks a lot!</description>
      <pubDate>Tue, 16 Sep 2003 14:09:23 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-properly-use-nohup/m-p/3071790#M808956</guid>
      <dc:creator>Jorge Fabregas</dc:creator>
      <dc:date>2003-09-16T14:09:23Z</dc:date>
    </item>
    <item>
      <title>Re: How to properly use nohup?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-properly-use-nohup/m-p/3071791#M808957</link>
      <description>Hello everyone,&lt;BR /&gt;&lt;BR /&gt;Thanks for your help.&lt;BR /&gt;&lt;BR /&gt;Steve! THANKS! That was it! Redirecting stderr!!!&lt;BR /&gt;&lt;BR /&gt;It seems that nohup will only redirect stdout (to nohup.out) but it doesn't redirect stderr.&lt;BR /&gt;&lt;BR /&gt;I run the script as:&lt;BR /&gt;&lt;BR /&gt;nohup /home/oracle/import.sh 1&amp;gt; out.log 2&amp;gt; out.err&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;and it worked!  Thanks a lot!</description>
      <pubDate>Tue, 16 Sep 2003 14:09:55 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-properly-use-nohup/m-p/3071791#M808957</guid>
      <dc:creator>Jorge Fabregas</dc:creator>
      <dc:date>2003-09-16T14:09:55Z</dc:date>
    </item>
    <item>
      <title>Re: How to properly use nohup?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-properly-use-nohup/m-p/3071792#M808958</link>
      <description>One other problem caused by backgrounding jobs is when the process is attempting to talk directly to a psuedo tty device. A good demonstration of this is if you "nohup" the cu command. It will seem to keep running but the number of OS interrupts will go through the roof, as the process spirals out of control.&lt;BR /&gt;&lt;BR /&gt;Great care should always be excerised when backgrounding any interactive program, as the results can be quite spectacular, and in extreme cases can even crash your entire system.&lt;BR /&gt;</description>
      <pubDate>Thu, 18 Sep 2003 09:34:36 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-properly-use-nohup/m-p/3071792#M808958</guid>
      <dc:creator>Andrew Cowan</dc:creator>
      <dc:date>2003-09-18T09:34:36Z</dc:date>
    </item>
  </channel>
</rss>

