<?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: Back ground process killed on using Ctrl-C in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/back-ground-process-killed-on-using-ctrl-c/m-p/4448951#M680613</link>
    <description>&amp;gt;I have written on bash shell.&lt;BR /&gt;&lt;BR /&gt;Have you tried using a real shell?&lt;BR /&gt;&lt;BR /&gt;&amp;gt;But the moment I press Control-C, these background processes get killed.&lt;BR /&gt;&lt;BR /&gt;I suppose you could write a SIGINT handler.&lt;BR /&gt;&lt;BR /&gt;&amp;gt;I have tried a lots of option like nohup&lt;BR /&gt;&lt;BR /&gt;I guess that only handles SIGHUP.&lt;BR /&gt;&lt;BR /&gt;If you look at termio(7), it says:&lt;BR /&gt;Generates a SIGINT signal which is sent to all processes in the foreground process group for which the terminal is the controlling terminal.&lt;BR /&gt;&lt;BR /&gt;I would have thought that excluded your background processes.  But you may have to change them to demons so they aren't affected by the control-C.</description>
    <pubDate>Mon, 29 Jun 2009 10:11:43 GMT</pubDate>
    <dc:creator>Dennis Handly</dc:creator>
    <dc:date>2009-06-29T10:11:43Z</dc:date>
    <item>
      <title>Back ground process killed on using Ctrl-C</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/back-ground-process-killed-on-using-ctrl-c/m-p/4448949#M680611</link>
      <description>&lt;!--!*#--&gt;Hi,&lt;BR /&gt;I have this menu driven script of mine,which i have written on bash shell.There is this option on my menu where i start 2 set of process in the background.Now when i choose the proper exit option from my menu,i dont encounter any problems.But the moment i press Ctrl-C , these background processes get killed.I have tried a lots of option like nohup,onintr,trap,and even tried wrapping my  executable call in csh so that the background process does not get the interrupt signal.I  also ran through the HP UX manual ,but that dint help me much.Kindly help me in solving this issue.....</description>
      <pubDate>Mon, 29 Jun 2009 09:25:30 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/back-ground-process-killed-on-using-ctrl-c/m-p/4448949#M680611</guid>
      <dc:creator>Jason bourne_2</dc:creator>
      <dc:date>2009-06-29T09:25:30Z</dc:date>
    </item>
    <item>
      <title>Re: Back ground process killed on using Ctrl-C</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/back-ground-process-killed-on-using-ctrl-c/m-p/4448950#M680612</link>
      <description>Shalom,&lt;BR /&gt;&lt;BR /&gt;Process management in Posix/HP-UX is different than bash.&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://docs.hp.com/en/5965-4642/5965-4642.pdf" target="_blank"&gt;http://docs.hp.com/en/5965-4642/5965-4642.pdf&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Posix asynchronous I/O (maybe not related.&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://docs.hp.com/en/B9106-90012/ix01.html" target="_blank"&gt;http://docs.hp.com/en/B9106-90012/ix01.html&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;SEP</description>
      <pubDate>Mon, 29 Jun 2009 09:40:58 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/back-ground-process-killed-on-using-ctrl-c/m-p/4448950#M680612</guid>
      <dc:creator>Steven E. Protter</dc:creator>
      <dc:date>2009-06-29T09:40:58Z</dc:date>
    </item>
    <item>
      <title>Re: Back ground process killed on using Ctrl-C</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/back-ground-process-killed-on-using-ctrl-c/m-p/4448951#M680613</link>
      <description>&amp;gt;I have written on bash shell.&lt;BR /&gt;&lt;BR /&gt;Have you tried using a real shell?&lt;BR /&gt;&lt;BR /&gt;&amp;gt;But the moment I press Control-C, these background processes get killed.&lt;BR /&gt;&lt;BR /&gt;I suppose you could write a SIGINT handler.&lt;BR /&gt;&lt;BR /&gt;&amp;gt;I have tried a lots of option like nohup&lt;BR /&gt;&lt;BR /&gt;I guess that only handles SIGHUP.&lt;BR /&gt;&lt;BR /&gt;If you look at termio(7), it says:&lt;BR /&gt;Generates a SIGINT signal which is sent to all processes in the foreground process group for which the terminal is the controlling terminal.&lt;BR /&gt;&lt;BR /&gt;I would have thought that excluded your background processes.  But you may have to change them to demons so they aren't affected by the control-C.</description>
      <pubDate>Mon, 29 Jun 2009 10:11:43 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/back-ground-process-killed-on-using-ctrl-c/m-p/4448951#M680613</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2009-06-29T10:11:43Z</dc:date>
    </item>
    <item>
      <title>Re: Back ground process killed on using Ctrl-C</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/back-ground-process-killed-on-using-ctrl-c/m-p/4448952#M680614</link>
      <description>Hi Steven,&lt;BR /&gt;So what exaclty do u say i do to get this problem solved.I want this process to be started through my script itself.Should i change the shell that i am working on,would that help me ...</description>
      <pubDate>Mon, 29 Jun 2009 10:22:41 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/back-ground-process-killed-on-using-ctrl-c/m-p/4448952#M680614</guid>
      <dc:creator>Jason bourne_2</dc:creator>
      <dc:date>2009-06-29T10:22:41Z</dc:date>
    </item>
    <item>
      <title>Re: Back ground process killed on using Ctrl-C</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/back-ground-process-killed-on-using-ctrl-c/m-p/4448953#M680615</link>
      <description>Hi Jason:&lt;BR /&gt;&lt;BR /&gt;&amp;gt; So what exaclty do u say i do to get this problem solved&lt;BR /&gt;&lt;BR /&gt;I would change your script to use the Posix shell and verify that the behavior you want is achieved (it should be).  This may be the simplest solution and brings your script in line with HP-UX standards, too.&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Mon, 29 Jun 2009 10:37:43 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/back-ground-process-killed-on-using-ctrl-c/m-p/4448953#M680615</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2009-06-29T10:37:43Z</dc:date>
    </item>
    <item>
      <title>Re: Back ground process killed on using Ctrl-C</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/back-ground-process-killed-on-using-ctrl-c/m-p/4448954#M680616</link>
      <description>Hi (again) Jason:&lt;BR /&gt;&lt;BR /&gt;It might be helpful if you could decompose your script into a small one that fails in your hands and then post that here.  I cannot reproduce your problem on a Linux box (for what that's worth).&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Mon, 29 Jun 2009 11:07:21 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/back-ground-process-killed-on-using-ctrl-c/m-p/4448954#M680616</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2009-06-29T11:07:21Z</dc:date>
    </item>
    <item>
      <title>Re: Back ground process killed on using Ctrl-C</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/back-ground-process-killed-on-using-ctrl-c/m-p/4448955#M680617</link>
      <description>&amp;gt;where I start 2 set of process in the background.&lt;BR /&gt;&lt;BR /&gt;I assume you are redirecting stdout and stderr.  Are you redirecting stdin to /dev/null?</description>
      <pubDate>Mon, 29 Jun 2009 11:16:30 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/back-ground-process-killed-on-using-ctrl-c/m-p/4448955#M680617</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2009-06-29T11:16:30Z</dc:date>
    </item>
    <item>
      <title>Re: Back ground process killed on using Ctrl-C</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/back-ground-process-killed-on-using-ctrl-c/m-p/4448956#M680618</link>
      <description>This is the script that i call from my option ...</description>
      <pubDate>Mon, 29 Jun 2009 13:23:36 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/back-ground-process-killed-on-using-ctrl-c/m-p/4448956#M680618</guid>
      <dc:creator>Jason bourne_2</dc:creator>
      <dc:date>2009-06-29T13:23:36Z</dc:date>
    </item>
    <item>
      <title>Re: Back ground process killed on using Ctrl-C</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/back-ground-process-killed-on-using-ctrl-c/m-p/4448957#M680619</link>
      <description>Hi Jason:&lt;BR /&gt;&lt;BR /&gt;A simple test case is preferred.  That said, this statement:&lt;BR /&gt;&lt;BR /&gt;# nohup TradexLocMon trdxdev 2 2 &amp;amp; &amp;gt;&amp;gt;/dev/null&lt;BR /&gt;&lt;BR /&gt;...should probably be:&lt;BR /&gt;&lt;BR /&gt;# nohup TradexLocMon trdxdev 2 &amp;gt;/dev/null 2&amp;gt;&amp;amp;1 &amp;amp;&lt;BR /&gt;&lt;BR /&gt;...which says to run 'TradeexLocMon' as a hangup immune process in the background, passing two arguments ("trdxdev" and "2").  Redirect any STDOUT and STDERR to '/dev/null'.&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF... &lt;BR /&gt;</description>
      <pubDate>Mon, 29 Jun 2009 13:48:46 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/back-ground-process-killed-on-using-ctrl-c/m-p/4448957#M680619</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2009-06-29T13:48:46Z</dc:date>
    </item>
    <item>
      <title>Re: Back ground process killed on using Ctrl-C</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/back-ground-process-killed-on-using-ctrl-c/m-p/4448958#M680620</link>
      <description>Hi (again) Jason:&lt;BR /&gt;&lt;BR /&gt;Perhaps I misunderstood.  You said that your last attachment was ..."the script that i call from my option ...".&lt;BR /&gt;&lt;BR /&gt;To start _that_ script in the background you would want to call it as I showed; something like:&lt;BR /&gt;&lt;BR /&gt;# nohup /oath_to_script arg1 arg2 arg3 &amp;lt; /path_to_input &amp;gt; /path_to_output 2&amp;gt;&amp;amp;1 &amp;amp;&lt;BR /&gt;&lt;BR /&gt;The '/path_to_input' and/or '/&lt;BR /&gt;path_to_output' can be '/dev/null; if necessary.&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...&lt;BR /&gt;</description>
      <pubDate>Mon, 29 Jun 2009 15:15:52 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/back-ground-process-killed-on-using-ctrl-c/m-p/4448958#M680620</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2009-06-29T15:15:52Z</dc:date>
    </item>
    <item>
      <title>Re: Back ground process killed on using Ctrl-C</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/back-ground-process-killed-on-using-ctrl-c/m-p/4448959#M680621</link>
      <description>Shalom,&lt;BR /&gt;&lt;BR /&gt;From the links I posted for you.&lt;BR /&gt;&lt;BR /&gt;nohup script_name &amp;amp;&lt;BR /&gt;&lt;BR /&gt;That will background the processes run them in the background.&lt;BR /&gt;&lt;BR /&gt;Output will go to a nohup.out file&lt;BR /&gt;&lt;BR /&gt;You can with HP-UX use the equivalent of strace (fron Linux), called tusc to trace your process and get specific actions and error codes.&lt;BR /&gt;&lt;BR /&gt;tusc: &lt;A href="http://hpux.connect.org.uk/hppd/hpux/Sysadmin/tusc-7.10/" target="_blank"&gt;http://hpux.connect.org.uk/hppd/hpux/Sysadmin/tusc-7.10/&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;SEP</description>
      <pubDate>Mon, 29 Jun 2009 15:38:33 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/back-ground-process-killed-on-using-ctrl-c/m-p/4448959#M680621</guid>
      <dc:creator>Steven E. Protter</dc:creator>
      <dc:date>2009-06-29T15:38:33Z</dc:date>
    </item>
    <item>
      <title>Re: Back ground process killed on using Ctrl-C</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/back-ground-process-killed-on-using-ctrl-c/m-p/4448960#M680622</link>
      <description>hi james ... &lt;BR /&gt;yes i have 3 args bck here ....trdxdev,2,2&lt;BR /&gt;I tried the below part too...&lt;BR /&gt;#nohup TradexLocMon trdxdev 2 2 &amp;gt;/dev/null 2&amp;gt;&amp;amp;1 &amp;amp;&lt;BR /&gt;It doesnt seem to work ...could i use "onintr -" to ignore all signals ???&lt;BR /&gt;</description>
      <pubDate>Mon, 29 Jun 2009 15:46:35 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/back-ground-process-killed-on-using-ctrl-c/m-p/4448960#M680622</guid>
      <dc:creator>Jason bourne_2</dc:creator>
      <dc:date>2009-06-29T15:46:35Z</dc:date>
    </item>
    <item>
      <title>Re: Back ground process killed on using Ctrl-C</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/back-ground-process-killed-on-using-ctrl-c/m-p/4448961#M680623</link>
      <description>Hi Steven &lt;BR /&gt;...i dont have "tusc" installed on my server...Is ther any other way that i could track the process.</description>
      <pubDate>Mon, 29 Jun 2009 15:54:09 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/back-ground-process-killed-on-using-ctrl-c/m-p/4448961#M680623</guid>
      <dc:creator>Jason bourne_2</dc:creator>
      <dc:date>2009-06-29T15:54:09Z</dc:date>
    </item>
    <item>
      <title>Re: Back ground process killed on using Ctrl-C</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/back-ground-process-killed-on-using-ctrl-c/m-p/4448962#M680624</link>
      <description>&amp;gt;Is there any other way that I could track the process?&lt;BR /&gt;&lt;BR /&gt;No, you need to install tusc.&lt;BR /&gt;&lt;BR /&gt;(Have you tried redirecting stdin to /dev/null?)</description>
      <pubDate>Mon, 29 Jun 2009 18:23:58 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/back-ground-process-killed-on-using-ctrl-c/m-p/4448962#M680624</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2009-06-29T18:23:58Z</dc:date>
    </item>
    <item>
      <title>Re: Back ground process killed on using Ctrl-C</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/back-ground-process-killed-on-using-ctrl-c/m-p/4448963#M680625</link>
      <description>Sorry I can't resit.&lt;BR /&gt;With a (last)name like yours I would not have expected you to use bash. If you stuck to your name you would have ended up with the good old sh which is replaced by posix.</description>
      <pubDate>Mon, 29 Jun 2009 18:35:30 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/back-ground-process-killed-on-using-ctrl-c/m-p/4448963#M680625</guid>
      <dc:creator>TTr</dc:creator>
      <dc:date>2009-06-29T18:35:30Z</dc:date>
    </item>
    <item>
      <title>Re: Back ground process killed on using Ctrl-C</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/back-ground-process-killed-on-using-ctrl-c/m-p/4448964#M680626</link>
      <description>Shalom,&lt;BR /&gt;&lt;BR /&gt;I install tusc on all my servers.&lt;BR /&gt;&lt;BR /&gt;This is not Linux. You need to add many tools that you would find by default on Linux.&lt;BR /&gt;&lt;BR /&gt;tusc is a basic tool that you should install to track this process.&lt;BR /&gt;&lt;BR /&gt;I 100% back what Dennis says to you.&lt;BR /&gt;&lt;BR /&gt;SEP</description>
      <pubDate>Mon, 29 Jun 2009 18:50:34 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/back-ground-process-killed-on-using-ctrl-c/m-p/4448964#M680626</guid>
      <dc:creator>Steven E. Protter</dc:creator>
      <dc:date>2009-06-29T18:50:34Z</dc:date>
    </item>
    <item>
      <title>Re: Back ground process killed on using Ctrl-C</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/back-ground-process-killed-on-using-ctrl-c/m-p/4448965#M680627</link>
      <description>Hi, sorry for the late reply.Was busy with some other work.Havnt been able to crack this one yet though.&lt;BR /&gt;I have attached my script here below.Please help me on this.Is the shell that i am executing this script a major problem.</description>
      <pubDate>Mon, 31 Aug 2009 08:39:32 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/back-ground-process-killed-on-using-ctrl-c/m-p/4448965#M680627</guid>
      <dc:creator>Jason bourne_2</dc:creator>
      <dc:date>2009-08-31T08:39:32Z</dc:date>
    </item>
    <item>
      <title>Re: Back ground process killed on using Ctrl-C</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/back-ground-process-killed-on-using-ctrl-c/m-p/4448966#M680628</link>
      <description>Hi (again) Jason:&lt;BR /&gt;&lt;BR /&gt;&amp;gt; Havnt been able to crack this one yet though.&lt;BR /&gt;&lt;BR /&gt;As I originally said, it would be much better to decompose your failing script into it's simplest case.&lt;BR /&gt;&lt;BR /&gt;Did you try any of the changes suggested?  Did you try using a pure POSIX shell?  Why would you want to mix into this a crummy C-shell?&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Mon, 31 Aug 2009 11:28:32 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/back-ground-process-killed-on-using-ctrl-c/m-p/4448966#M680628</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2009-08-31T11:28:32Z</dc:date>
    </item>
    <item>
      <title>Re: Back ground process killed on using Ctrl-C</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/back-ground-process-killed-on-using-ctrl-c/m-p/4448967#M680629</link>
      <description>Hi James R. Ferguson,&lt;BR /&gt;Thnx for the reply.Yes i tried lots of things but nothing seems to work .&lt;BR /&gt;&lt;BR /&gt;&amp;gt;Did you try using a pure POSIX shell&lt;BR /&gt;Do u say i use sh shell instead of the bash shell.If so how will that differ.I have tried that too.Dint go thru...&lt;BR /&gt;&lt;BR /&gt;&amp;gt;Why would you want to mix into this a crummy C-shell?&lt;BR /&gt;Well we have two set of servers here.Linux and HP-UX.I was initially trying to crack this issue on the linux machine and happpend to find that my process was getting killed bcoz the bash shell had a drawback ,where in it is unable to handle an interrupt signal.Thereby killing the background process initiated within.Thus i used the Csh which handled the interrupt signal...&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 01 Sep 2009 06:04:14 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/back-ground-process-killed-on-using-ctrl-c/m-p/4448967#M680629</guid>
      <dc:creator>Jason bourne_2</dc:creator>
      <dc:date>2009-09-01T06:04:14Z</dc:date>
    </item>
    <item>
      <title>Re: Back ground process killed on using Ctrl-C</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/back-ground-process-killed-on-using-ctrl-c/m-p/4448968#M680630</link>
      <description>I have no problems using a real shell.  The SIGINT is only sent to the first shell:&lt;BR /&gt;&lt;BR /&gt;itrc_background.sh:&lt;BR /&gt;#!/usr/bin/sh&lt;BR /&gt;# start a background shell and try blocking Control-C&lt;BR /&gt;itrc_background.2.sh &amp;amp;&lt;BR /&gt;sleep 60&lt;BR /&gt;&lt;BR /&gt;itrc_background.2.sh:&lt;BR /&gt;#!/usr/bin/sh&lt;BR /&gt;echo "got to $0"&lt;BR /&gt;sleep 30&lt;BR /&gt;echo "finished with $0"&lt;BR /&gt;&lt;BR /&gt;When I invoke itrc_background.sh, it starts itrc_background.2.sh.  If I type Control-C, only itrc_background.sh is killed, itrc_background.2.sh keeps sleeping.</description>
      <pubDate>Tue, 01 Sep 2009 06:34:47 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/back-ground-process-killed-on-using-ctrl-c/m-p/4448968#M680630</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2009-09-01T06:34:47Z</dc:date>
    </item>
  </channel>
</rss>

