<?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: will process die if started without nohup command after exiting terminal in Operating System - Linux</title>
    <link>https://community.hpe.com/t5/operating-system-linux/will-process-die-if-started-without-nohup-command-after-exiting/m-p/3983541#M95763</link>
    <description>It really depends how the process you start from an interactive shell is written.&lt;BR /&gt;If it was written like a daemon it usually would use a technique accordingly termed daemonization.&lt;BR /&gt;This means that it would fork and exit the parent process.&lt;BR /&gt;The fork provided an exact child copy.&lt;BR /&gt;It would also do a chdir to / (or some chroot if provided), close any from the parent inherited file descriptors or redirect them (at leeast the first three), and finally become session leader (e.g. setsid()) to totally dissociate from the shell it was started from.&lt;BR /&gt;So processes that do this kind of daemonization would not require a nohup.&lt;BR /&gt;Process that lack this behaviour are better started with a nohup (or maybe as a batch job).&lt;BR /&gt;</description>
    <pubDate>Wed, 18 Apr 2007 03:28:20 GMT</pubDate>
    <dc:creator>Ralph Grothe</dc:creator>
    <dc:date>2007-04-18T03:28:20Z</dc:date>
    <item>
      <title>will process die if started without nohup command after exiting terminal</title>
      <link>https://community.hpe.com/t5/operating-system-linux/will-process-die-if-started-without-nohup-command-after-exiting/m-p/3983539#M95761</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;Generally, Software applications or tools running on Unix are being started by a startup script.&lt;BR /&gt;This startup script which starts the unix process usually uses nohup or if nohup is not provided we start the processes by appending nohup command exclusively before the process startup script.&lt;BR /&gt;&lt;BR /&gt;My question:&lt;BR /&gt;If script do not have nohup command inside it and if someone start the process and logs out of the terminal; will the process die ?&lt;BR /&gt;Are running prcesses adopt shell process as their parent process if started without nohup command ?&lt;BR /&gt;&lt;BR /&gt;Thanks,&lt;BR /&gt;Shiv</description>
      <pubDate>Wed, 18 Apr 2007 00:59:55 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/will-process-die-if-started-without-nohup-command-after-exiting/m-p/3983539#M95761</guid>
      <dc:creator>Shivkumar</dc:creator>
      <dc:date>2007-04-18T00:59:55Z</dc:date>
    </item>
    <item>
      <title>Re: will process die if started without nohup command after exiting terminal</title>
      <link>https://community.hpe.com/t5/operating-system-linux/will-process-die-if-started-without-nohup-command-after-exiting/m-p/3983540#M95762</link>
      <description>Usually the answer would be yes: when exiting your shell, a SIGHUP signal is sent to all child processes, which normally kills them. The nohup command makes a process ignore this SIGHUP signal (and the SIGQUIT signal).&lt;BR /&gt;&lt;BR /&gt;Cheers,&lt;BR /&gt;Wout</description>
      <pubDate>Wed, 18 Apr 2007 02:11:34 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/will-process-die-if-started-without-nohup-command-after-exiting/m-p/3983540#M95762</guid>
      <dc:creator>Wouter Jagers</dc:creator>
      <dc:date>2007-04-18T02:11:34Z</dc:date>
    </item>
    <item>
      <title>Re: will process die if started without nohup command after exiting terminal</title>
      <link>https://community.hpe.com/t5/operating-system-linux/will-process-die-if-started-without-nohup-command-after-exiting/m-p/3983541#M95763</link>
      <description>It really depends how the process you start from an interactive shell is written.&lt;BR /&gt;If it was written like a daemon it usually would use a technique accordingly termed daemonization.&lt;BR /&gt;This means that it would fork and exit the parent process.&lt;BR /&gt;The fork provided an exact child copy.&lt;BR /&gt;It would also do a chdir to / (or some chroot if provided), close any from the parent inherited file descriptors or redirect them (at leeast the first three), and finally become session leader (e.g. setsid()) to totally dissociate from the shell it was started from.&lt;BR /&gt;So processes that do this kind of daemonization would not require a nohup.&lt;BR /&gt;Process that lack this behaviour are better started with a nohup (or maybe as a batch job).&lt;BR /&gt;</description>
      <pubDate>Wed, 18 Apr 2007 03:28:20 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/will-process-die-if-started-without-nohup-command-after-exiting/m-p/3983541#M95763</guid>
      <dc:creator>Ralph Grothe</dc:creator>
      <dc:date>2007-04-18T03:28:20Z</dc:date>
    </item>
    <item>
      <title>Re: will process die if started without nohup command after exiting terminal</title>
      <link>https://community.hpe.com/t5/operating-system-linux/will-process-die-if-started-without-nohup-command-after-exiting/m-p/3983542#M95764</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;The normal answer is yes. &lt;BR /&gt;&lt;BR /&gt;In your case, if you are in doubt about it (deamons, etc) you can do a simple test.&lt;BR /&gt;&lt;BR /&gt;Open two terminal sessions and just fireup your above script on the first one.&lt;BR /&gt;&lt;BR /&gt;Do a  ps on the processes started by script and note it.&lt;BR /&gt;&lt;BR /&gt;Exit the terminal from you fired the script and check the processes from the second one.&lt;BR /&gt;&lt;BR /&gt;You are done.&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;Rasheed Tamton.</description>
      <pubDate>Wed, 18 Apr 2007 05:21:36 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/will-process-die-if-started-without-nohup-command-after-exiting/m-p/3983542#M95764</guid>
      <dc:creator>Rasheed Tamton</dc:creator>
      <dc:date>2007-04-18T05:21:36Z</dc:date>
    </item>
    <item>
      <title>Re: will process die if started without nohup command after exiting terminal</title>
      <link>https://community.hpe.com/t5/operating-system-linux/will-process-die-if-started-without-nohup-command-after-exiting/m-p/3983543#M95765</link>
      <description>When using nohup I found that it did not work reliably unless the output was not directed to a location other than a tty device.&lt;BR /&gt;&lt;BR /&gt;Eg: &lt;BR /&gt;&lt;BR /&gt;nohup SomeCommand &amp;gt; /dev/null 2&amp;gt;&amp;amp;1 &amp;amp;&lt;BR /&gt;&lt;BR /&gt;My assumption was that if the parent went away the child process had nowhere to send its output so it died anyway.  (Somebody please correct me if this assumption is incorrect.)&lt;BR /&gt;&lt;BR /&gt;Other flavours of Unix can behave differently.</description>
      <pubDate>Wed, 18 Apr 2007 21:57:41 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/will-process-die-if-started-without-nohup-command-after-exiting/m-p/3983543#M95765</guid>
      <dc:creator>Daavid Turnbull</dc:creator>
      <dc:date>2007-04-18T21:57:41Z</dc:date>
    </item>
    <item>
      <title>Re: will process die if started without nohup command after exiting terminal</title>
      <link>https://community.hpe.com/t5/operating-system-linux/will-process-die-if-started-without-nohup-command-after-exiting/m-p/3983544#M95766</link>
      <description>&amp;gt;When using nohup I found that it did not work reliably unless the output was not directed to a location other than a tty device.&lt;BR /&gt;&lt;BR /&gt;Well, unless you are doing &amp;gt; /dev/tty, nohup(1) says it automatically redirects to nohup.out.  And it also says if redirected to terminal, it sends to nohup.out.  So it seems everything is covered.&lt;BR /&gt;&lt;BR /&gt;&amp;gt;Other flavours of Unix can behave differently.&lt;BR /&gt;&lt;BR /&gt;Unfortunately, that is probably true. :-(</description>
      <pubDate>Wed, 18 Apr 2007 22:17:41 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/will-process-die-if-started-without-nohup-command-after-exiting/m-p/3983544#M95766</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2007-04-18T22:17:41Z</dc:date>
    </item>
    <item>
      <title>Re: will process die if started without nohup command after exiting terminal</title>
      <link>https://community.hpe.com/t5/operating-system-linux/will-process-die-if-started-without-nohup-command-after-exiting/m-p/3983545#M95767</link>
      <description>Are there more opinions from Unix Gurus ?&lt;BR /&gt;&lt;BR /&gt;Thanks,&lt;BR /&gt;Shiv</description>
      <pubDate>Thu, 19 Apr 2007 12:21:40 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/will-process-die-if-started-without-nohup-command-after-exiting/m-p/3983545#M95767</guid>
      <dc:creator>Shivkumar</dc:creator>
      <dc:date>2007-04-19T12:21:40Z</dc:date>
    </item>
    <item>
      <title>Re: will process die if started without nohup command after exiting terminal</title>
      <link>https://community.hpe.com/t5/operating-system-linux/will-process-die-if-started-without-nohup-command-after-exiting/m-p/3983546#M95768</link>
      <description>If the program does no terminal I/O and input and output streams are redirected, and it can get past possibly getting hit with a ctrl-c as you exit, some programs stay up fine, some don't - depending on how the program was written.</description>
      <pubDate>Thu, 19 Apr 2007 13:06:52 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/will-process-die-if-started-without-nohup-command-after-exiting/m-p/3983546#M95768</guid>
      <dc:creator>TwoProc</dc:creator>
      <dc:date>2007-04-19T13:06:52Z</dc:date>
    </item>
  </channel>
</rss>

