<?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: nohup problem in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/nohup-problem/m-p/4866902#M397757</link>
    <description>Tom provided the solution and Geoff confirmed it.</description>
    <pubDate>Fri, 22 Oct 2004 14:55:57 GMT</pubDate>
    <dc:creator>Gary L. Paveza, Jr.</dc:creator>
    <dc:date>2004-10-22T14:55:57Z</dc:date>
    <item>
      <title>nohup problem</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/nohup-problem/m-p/4866889#M397744</link>
      <description>I'm trying to capture the PID of a process started via nohup.  According to the man page for nohup, I should be able to do the following:&lt;BR /&gt;&lt;BR /&gt;nohup (command1; command2)&lt;BR /&gt;&lt;BR /&gt;However, when I try the following:&lt;BR /&gt;&lt;BR /&gt;nohup (sleep 10; echo $!) &amp;amp;&lt;BR /&gt;&lt;BR /&gt;I get the following error:&lt;BR /&gt;&lt;BR /&gt;ksh: syntax error: '(' unexpected&lt;BR /&gt;&lt;BR /&gt;Anyone know how I can get the PID for the first command?</description>
      <pubDate>Fri, 22 Oct 2004 13:49:26 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/nohup-problem/m-p/4866889#M397744</guid>
      <dc:creator>Gary L. Paveza, Jr.</dc:creator>
      <dc:date>2004-10-22T13:49:26Z</dc:date>
    </item>
    <item>
      <title>Re: nohup problem</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/nohup-problem/m-p/4866890#M397745</link>
      <description>PID=$$&lt;BR /&gt;&lt;BR /&gt;echo "Process ID: $PID:&lt;BR /&gt;&lt;BR /&gt;Try command witout the parenthesis.&lt;BR /&gt;&lt;BR /&gt;sEP</description>
      <pubDate>Fri, 22 Oct 2004 13:52:26 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/nohup-problem/m-p/4866890#M397745</guid>
      <dc:creator>Steven E. Protter</dc:creator>
      <dc:date>2004-10-22T13:52:26Z</dc:date>
    </item>
    <item>
      <title>Re: nohup problem</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/nohup-problem/m-p/4866891#M397746</link>
      <description>without the parens it only nohups the first command, then executes the second.  The variable $! returns the PID of the nohup command.  I need the PID of the command started by nohup.</description>
      <pubDate>Fri, 22 Oct 2004 13:56:16 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/nohup-problem/m-p/4866891#M397746</guid>
      <dc:creator>Gary L. Paveza, Jr.</dc:creator>
      <dc:date>2004-10-22T13:56:16Z</dc:date>
    </item>
    <item>
      <title>Re: nohup problem</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/nohup-problem/m-p/4866892#M397747</link>
      <description>how bout this:&lt;BR /&gt;&lt;BR /&gt;nohup `sleep 10; echo $!` &amp;amp;&lt;BR /&gt;</description>
      <pubDate>Fri, 22 Oct 2004 13:57:13 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/nohup-problem/m-p/4866892#M397747</guid>
      <dc:creator>Ken Penland_1</dc:creator>
      <dc:date>2004-10-22T13:57:13Z</dc:date>
    </item>
    <item>
      <title>Re: nohup problem</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/nohup-problem/m-p/4866893#M397748</link>
      <description>Try without brackets&lt;BR /&gt;&lt;BR /&gt;nohup sleep; echo $!) &amp;amp;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;USA..&lt;BR /&gt;</description>
      <pubDate>Fri, 22 Oct 2004 14:01:13 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/nohup-problem/m-p/4866893#M397748</guid>
      <dc:creator>Uday_S_Ankolekar</dc:creator>
      <dc:date>2004-10-22T14:01:13Z</dc:date>
    </item>
    <item>
      <title>Re: nohup problem</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/nohup-problem/m-p/4866894#M397749</link>
      <description>naw, I see what his problem is, the echo $! returns the pid of the nohup, and not the sleep...hrm....I cant figure it out either.</description>
      <pubDate>Fri, 22 Oct 2004 14:02:18 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/nohup-problem/m-p/4866894#M397749</guid>
      <dc:creator>Ken Penland_1</dc:creator>
      <dc:date>2004-10-22T14:02:18Z</dc:date>
    </item>
    <item>
      <title>Re: nohup problem</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/nohup-problem/m-p/4866895#M397750</link>
      <description>Ignore my previous post!&lt;BR /&gt;&lt;BR /&gt;Try this instead:&lt;BR /&gt;&lt;BR /&gt;nohup `(sleep 10; echo $!)` &amp;amp;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Fri, 22 Oct 2004 14:09:14 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/nohup-problem/m-p/4866895#M397750</guid>
      <dc:creator>Uday_S_Ankolekar</dc:creator>
      <dc:date>2004-10-22T14:09:14Z</dc:date>
    </item>
    <item>
      <title>Re: nohup problem</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/nohup-problem/m-p/4866896#M397751</link>
      <description>nohup `(sleep 10; echo $!)` &amp;amp;&lt;BR /&gt;&lt;BR /&gt;That won't work - as ; seperates cmmands - serially - that is, nohup will do first command, after done, the second...&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Only way I see is:&lt;BR /&gt;&lt;BR /&gt;nohup command &amp;amp;&lt;BR /&gt;ps -ef |grep command |awk '{print $2}`&lt;BR /&gt;&lt;BR /&gt;Rgds...Geoff</description>
      <pubDate>Fri, 22 Oct 2004 14:14:12 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/nohup-problem/m-p/4866896#M397751</guid>
      <dc:creator>Geoff Wild</dc:creator>
      <dc:date>2004-10-22T14:14:12Z</dc:date>
    </item>
    <item>
      <title>Re: nohup problem</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/nohup-problem/m-p/4866897#M397752</link>
      <description>why do you need to nohup it?&lt;BR /&gt;&lt;BR /&gt;just typing:&lt;BR /&gt;&lt;BR /&gt;sleep 10 &amp;amp;&lt;BR /&gt;&lt;BR /&gt;then echo $! returns the correct number... when ya start including nohup it starts getting messy cause THAT is considered the last job that ran in the background</description>
      <pubDate>Fri, 22 Oct 2004 14:22:40 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/nohup-problem/m-p/4866897#M397752</guid>
      <dc:creator>Ken Penland_1</dc:creator>
      <dc:date>2004-10-22T14:22:40Z</dc:date>
    </item>
    <item>
      <title>Re: nohup problem</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/nohup-problem/m-p/4866898#M397753</link>
      <description>If all you want is the pid of the nohup'ed process, it is stored in $!&lt;BR /&gt;&lt;BR /&gt;i.e.&lt;BR /&gt;&lt;BR /&gt;# nohup sleep 60 &amp;amp;&lt;BR /&gt;[1]     11187&lt;BR /&gt;# Sending output to nohup.out&lt;BR /&gt;&lt;BR /&gt;# echo $!&lt;BR /&gt;11187</description>
      <pubDate>Fri, 22 Oct 2004 14:24:32 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/nohup-problem/m-p/4866898#M397753</guid>
      <dc:creator>Tom Danzig</dc:creator>
      <dc:date>2004-10-22T14:24:32Z</dc:date>
    </item>
    <item>
      <title>Re: nohup problem</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/nohup-problem/m-p/4866899#M397754</link>
      <description>thats not what he wants Tom, that gives you the pid of the nohup, not the pid of the SLEEP</description>
      <pubDate>Fri, 22 Oct 2004 14:27:00 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/nohup-problem/m-p/4866899#M397754</guid>
      <dc:creator>Ken Penland_1</dc:creator>
      <dc:date>2004-10-22T14:27:00Z</dc:date>
    </item>
    <item>
      <title>Re: nohup problem</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/nohup-problem/m-p/4866900#M397755</link>
      <description>actually, it does:&lt;BR /&gt;&lt;BR /&gt;sha1:root:/ # nohup sleep 20 &amp;amp;&lt;BR /&gt;[1]     19692&lt;BR /&gt;sha1:root:/ # Sending output to nohup.out&lt;BR /&gt;&lt;BR /&gt;sha1:root:/ # echo $!&lt;BR /&gt;19692&lt;BR /&gt;sha1:root:/ # ps -ef |grep 19692&lt;BR /&gt;root     19692 23610  0 13:30:13 pts/8       00:00 sleep 20&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Rgds...Geoff</description>
      <pubDate>Fri, 22 Oct 2004 14:30:42 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/nohup-problem/m-p/4866900#M397755</guid>
      <dc:creator>Geoff Wild</dc:creator>
      <dc:date>2004-10-22T14:30:42Z</dc:date>
    </item>
    <item>
      <title>Re: nohup problem</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/nohup-problem/m-p/4866901#M397756</link>
      <description>Geoff,&lt;BR /&gt;&lt;BR /&gt;That's exactly what I need.  Thanks.</description>
      <pubDate>Fri, 22 Oct 2004 14:46:23 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/nohup-problem/m-p/4866901#M397756</guid>
      <dc:creator>Gary L. Paveza, Jr.</dc:creator>
      <dc:date>2004-10-22T14:46:23Z</dc:date>
    </item>
    <item>
      <title>Re: nohup problem</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/nohup-problem/m-p/4866902#M397757</link>
      <description>Tom provided the solution and Geoff confirmed it.</description>
      <pubDate>Fri, 22 Oct 2004 14:55:57 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/nohup-problem/m-p/4866902#M397757</guid>
      <dc:creator>Gary L. Paveza, Jr.</dc:creator>
      <dc:date>2004-10-22T14:55:57Z</dc:date>
    </item>
  </channel>
</rss>

