Newsgroups: comp.unix.questions Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!caen!irie.ais.org!mjo From: mjo@irie.ais.org (Mike O'Connor) Subject: onintr, trap, etc. Message-ID: <1991Apr1.201415.5305@engin.umich.edu> Sender: news@engin.umich.edu (CAEN Netnews) Reply-To: mjo@ais.org Organization: Artificial Intelligence Society Date: Mon, 1 Apr 1991 20:14:15 GMT I am trying to write a script that will only run when I receive a hangup signal (i.e. when I am forcibly disconnected). How do I determine that I am indeed HUPped? So far, I have: #!/bin/sh #deathtrap -- will run these commands if I get HUPped trap hangupscript 0 When I run this interactively with: % nohup deathtrap & The script wants to run immediately. What am I doing wrong? What I really want to do is have my .logout run from tcsh in the event that I am lorcibly logged out. Currently, it only runs if I type "logout". HELP! ____ Mike O'Connor