<?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 detach a process from the assigned tty? in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-detach-a-process-from-the-assigned-tty/m-p/2995963#M913645</link>
    <description>Laurent,&lt;BR /&gt;&lt;BR /&gt;I know this to do programmatically.  Normally when daemons are created they will detach themselves from the tty which started it for they can run in the background, free from any signals from the tty, etc.&lt;BR /&gt;&lt;BR /&gt;HTH,&lt;BR /&gt;Umapathy</description>
    <pubDate>Thu, 12 Jun 2003 14:25:02 GMT</pubDate>
    <dc:creator>Umapathy S</dc:creator>
    <dc:date>2003-06-12T14:25:02Z</dc:date>
    <item>
      <title>how to detach a process from the assigned tty?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-detach-a-process-from-the-assigned-tty/m-p/2995959#M913641</link>
      <description>Hello,&lt;BR /&gt;&lt;BR /&gt;Does anybody know how I can detach a process from its tty?&lt;BR /&gt;&lt;BR /&gt;I can't find a way!&lt;BR /&gt;&lt;BR /&gt;Laurent</description>
      <pubDate>Thu, 12 Jun 2003 14:07:38 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-detach-a-process-from-the-assigned-tty/m-p/2995959#M913641</guid>
      <dc:creator>Laurent Laperrousaz</dc:creator>
      <dc:date>2003-06-12T14:07:38Z</dc:date>
    </item>
    <item>
      <title>Re: how to detach a process from the assigned tty?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-detach-a-process-from-the-assigned-tty/m-p/2995960#M913642</link>
      <description>could you give an example of what you mean?</description>
      <pubDate>Thu, 12 Jun 2003 14:13:34 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-detach-a-process-from-the-assigned-tty/m-p/2995960#M913642</guid>
      <dc:creator>John Meissner</dc:creator>
      <dc:date>2003-06-12T14:13:34Z</dc:date>
    </item>
    <item>
      <title>Re: how to detach a process from the assigned tty?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-detach-a-process-from-the-assigned-tty/m-p/2995961#M913643</link>
      <description>Sorry, not possible.&lt;BR /&gt;You could try the kill -HUP function, but please be carefull.&lt;BR /&gt;&lt;BR /&gt;Regs David</description>
      <pubDate>Thu, 12 Jun 2003 14:14:39 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-detach-a-process-from-the-assigned-tty/m-p/2995961#M913643</guid>
      <dc:creator>David_246</dc:creator>
      <dc:date>2003-06-12T14:14:39Z</dc:date>
    </item>
    <item>
      <title>Re: how to detach a process from the assigned tty?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-detach-a-process-from-the-assigned-tty/m-p/2995962#M913644</link>
      <description>If you are trying to output to a different tty you could use the write command&lt;BR /&gt;&lt;BR /&gt;write 'message' tty</description>
      <pubDate>Thu, 12 Jun 2003 14:15:32 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-detach-a-process-from-the-assigned-tty/m-p/2995962#M913644</guid>
      <dc:creator>John Meissner</dc:creator>
      <dc:date>2003-06-12T14:15:32Z</dc:date>
    </item>
    <item>
      <title>Re: how to detach a process from the assigned tty?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-detach-a-process-from-the-assigned-tty/m-p/2995963#M913645</link>
      <description>Laurent,&lt;BR /&gt;&lt;BR /&gt;I know this to do programmatically.  Normally when daemons are created they will detach themselves from the tty which started it for they can run in the background, free from any signals from the tty, etc.&lt;BR /&gt;&lt;BR /&gt;HTH,&lt;BR /&gt;Umapathy</description>
      <pubDate>Thu, 12 Jun 2003 14:25:02 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-detach-a-process-from-the-assigned-tty/m-p/2995963#M913645</guid>
      <dc:creator>Umapathy S</dc:creator>
      <dc:date>2003-06-12T14:25:02Z</dc:date>
    </item>
    <item>
      <title>Re: how to detach a process from the assigned tty?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-detach-a-process-from-the-assigned-tty/m-p/2995964#M913646</link>
      <description>If you mean, can you detach stdin, stdout, and stderr from a running process and somehow recoonect to another device - possibly /dev/null - then no this can't be done. &lt;BR /&gt;&lt;BR /&gt;It is easy from the programming level. You use setsid(); it's one of the basic things you do to "daemonize" a process in C or Perl.&lt;BR /&gt;&lt;BR /&gt;You can also look into the nohup command but all of these assume that you do this "on the front end" not after the process has been started.&lt;BR /&gt;</description>
      <pubDate>Thu, 12 Jun 2003 14:25:53 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-detach-a-process-from-the-assigned-tty/m-p/2995964#M913646</guid>
      <dc:creator>A. Clay Stephenson</dc:creator>
      <dc:date>2003-06-12T14:25:53Z</dc:date>
    </item>
    <item>
      <title>Re: how to detach a process from the assigned tty?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-detach-a-process-from-the-assigned-tty/m-p/2995965#M913647</link>
      <description>Hi,&lt;BR /&gt;depending on what do you want to do, you have two solution:&lt;BR /&gt;&lt;BR /&gt;- if unattended: start your job with a "nohup" at the beginning and an "&amp;amp;" at the end. This ways it will continue to work even if the tty is closed.&lt;BR /&gt;&lt;BR /&gt;- if attended: install a tool like "screen", it can attach and detach from its sessions.&lt;BR /&gt;ctrl-a,d detach from current session&lt;BR /&gt;&lt;BR /&gt;screen -l reattach to a detached session.&lt;BR /&gt;&lt;BR /&gt;see the man for more details...&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Downloadable free from&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://hpux.connect.org.uk/" target="_blank"&gt;http://hpux.connect.org.uk/&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;HTH,&lt;BR /&gt;&lt;BR /&gt;  Massimo&lt;BR /&gt;</description>
      <pubDate>Thu, 12 Jun 2003 14:50:52 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-detach-a-process-from-the-assigned-tty/m-p/2995965#M913647</guid>
      <dc:creator>Massimo Bianchi</dc:creator>
      <dc:date>2003-06-12T14:50:52Z</dc:date>
    </item>
    <item>
      <title>Re: how to detach a process from the assigned tty?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-detach-a-process-from-the-assigned-tty/m-p/2995966#M913648</link>
      <description>Direct link:&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://hpux.connect.org.uk/hppd/hpux/Sysadmin/screen-3.9.11/" target="_blank"&gt;http://hpux.connect.org.uk/hppd/hpux/Sysadmin/screen-3.9.11/&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;HTH,&lt;BR /&gt;  Massimo&lt;BR /&gt;</description>
      <pubDate>Thu, 12 Jun 2003 14:52:00 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-detach-a-process-from-the-assigned-tty/m-p/2995966#M913648</guid>
      <dc:creator>Massimo Bianchi</dc:creator>
      <dc:date>2003-06-12T14:52:00Z</dc:date>
    </item>
    <item>
      <title>Re: how to detach a process from the assigned tty?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-detach-a-process-from-the-assigned-tty/m-p/2995967#M913649</link>
      <description>thanks everybody!&lt;BR /&gt;&lt;BR /&gt;In fact what I want is to demonize a process launched at startup through /sbin/init.d/myprocess&lt;BR /&gt;&lt;BR /&gt;It appeared that it starts but fails later because of inittab getty console init.&lt;BR /&gt;&lt;BR /&gt;myprocess appears to be attached to the system console and it forks a lot of processes (all are then attached to the console). When getty init the console (that happens after init.d due to inittab sequence) all my processes stop!&lt;BR /&gt;&lt;BR /&gt;I think the setsid() is the solution I will try to use it in a perl script and let you know how it works!</description>
      <pubDate>Thu, 12 Jun 2003 15:35:15 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-detach-a-process-from-the-assigned-tty/m-p/2995967#M913649</guid>
      <dc:creator>Laurent Laperrousaz</dc:creator>
      <dc:date>2003-06-12T15:35:15Z</dc:date>
    </item>
    <item>
      <title>Re: how to detach a process from the assigned tty?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-detach-a-process-from-the-assigned-tty/m-p/2995968#M913650</link>
      <description>Okay Laurent, now that I know what you are trying to do, I specnt about 2 minutes chopping up one of my Perl daemons. It has pretty much all the steps including a signal handler to exit when it receives a SIGTERM (kill -15).&lt;BR /&gt;</description>
      <pubDate>Thu, 12 Jun 2003 15:51:54 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-detach-a-process-from-the-assigned-tty/m-p/2995968#M913650</guid>
      <dc:creator>A. Clay Stephenson</dc:creator>
      <dc:date>2003-06-12T15:51:54Z</dc:date>
    </item>
  </channel>
</rss>

