Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Posting-Version: version B 2.10.1 6/24/83; site ncoast.UUCP
Path: utzoo!watmath!clyde!burl!mgnetp!ihnp4!zehntel!dual!amd!decwrl!decvax!cwruecmp!atvax!ncoast!bsa
From: bsa@ncoast.UUCP (The WITNESS)
Newsgroups: net.unix-wizards,net.lang.c
Subject: Re: USG 5.0 r2: can my program tell if it is in background/nohup'd?
Message-ID: <253@ncoast.UUCP>
Date: Mon, 13-Aug-84 13:18:54 EDT
Article-I.D.: ncoast.253
Posted: Mon Aug 13 13:18:54 1984
Date-Received: Thu, 16-Aug-84 02:30:26 EDT
References: <522@burl.UUCP>
Organization: North Coast XENIX, Cleveland
Lines: 21

Unless a drastic change took place in /bin/sh in USG5.0, "nohup" is a shell
script.  All it does is traps SIGHUP and "exec"s $*.  Try grabbing a copy of
/bin/nohup and modifying it.  If all else fails, ours is (yank it & modify):
-----------------------
trap "" 1 15
if test -t 2>&1  ; then
	echo "Sending output to 'nohup.out'"
	exec nice -5 $* >>nohup.out 2>&1
else
	exec nice -5 $* 2>&1
fi
-----------------------
Have fun!

--bsa
-- 
      Brandon Allbery: decvax!cwruecmp{!atvax}!bsa: R0176@CSUOHIO.BITNET
					       ^ Note name change!
	 6504 Chestnut Road, Independence, OH 44131 <> (216) 524-1416

"The more they overthink the plumbin', the easier 'tis tae stop up the drain."