[Ilugc] when does kernel send SIGHUP

  • From: kumaresanchandran@xxxxxxxxx (kumaresan chandran)
  • Date: Fri, 17 Feb 2012 16:44:48 +0530

On Fri, Feb 17, 2012 at 3:11 PM, kumaresan chandran <
kumaresanchandran at gmail.com> wrote:



On Fri, Feb 17, 2012 at 2:50 PM, Natarajan V <rajanvn at gmail.com> wrote:

On Fri, Feb 17, 2012 at 2:27 PM, kumaresan chandran
<kumaresanchandran at gmail.com> wrote:
Actually i am not running in Terminal mode. I have script running in
back
ground mode.


SIGHUP stands for SIGnal HangUP. It means that the connection between
the terminal and the server has been disconnected. It could also mean
that the terminal that you have running is closed (explicit / timeout/
something else)
Ref: http://en.wikipedia.org/wiki/SIGHUP

You get the signal, if your process is "tied" to a particular terminal
and the terminal is terminated (pun intended). This happens even if
the process is in the BG. To avoid this, you can try one or more of
the following:

<Option 1: Neat solution>
$ nohup hello.sh &

<option 1.1: if you forget the &>
$ nohup hello.sh
^z
$ bg


HTH,
--
Natarajan
_______________________________________________
ILUGC Mailing List:
http://www.ae.iitm.ac.in/mailman/listinfo/ilugc



How to find out which terminal the back ground process is attached to?



--
Thanks & Regards
KUMARESAN C


HI,

Another question:
*********************
 if my script is running TTY ?. then what does it mean ? will it also
receive the SIGHUP


-- 
Thanks & Regards
KUMARESAN C

Other related posts: