[comp.sys.apollo] Creating user processes that continue after logout

kent@HUMU.NOSC.MIL (Kent K. Kuriyama) (03/16/89)

I am running Domain/IX under 9.7.  After logging into the display 
manager I start a program using:

  % background_prog &
  %

If I logout of the display manager my program gets blown away.  
Is there any way to prevent this from happening?  I realize that 
it is possible for the DM to spawn programs that continue to run 
as long as the node is on but that is not quite what we want.


Kent Kuriyama
Naval Ocean Systems Center
Hawaii Laboratory
kent@nosc.mil

kent@HUMU.NOSC.MIL (Kent K. Kuriyama) (03/21/89)

In article <8903152255.AA16493@humu.nosc.mil> I described a 
problem in which when I entered:

  % background_prog &

My program gets blown away when I log out of the display manager.

I received the advice concerning my problem:

>Date: Fri, 17 Mar 89 18:08:37 est
>From: twv@rayssdap1.RAY.COM (Vrankar)
>Message-Id: <8903172308.AA00621@rayssdap1.RAY.COM>
>To: kent
>Subject: continue after logout
>
>If you are running from a Bourne shell (/bin/sh), you'll need to do:
>% nohup background_prog &
>The C shell (/bin/csh) is supposed to do this automatically.
>
>If this doesn't get you where you want to go, slime it:
>% /com/crp -on $NODEID -me -cps /com/sh '/bin/sh -c background_prog'
>That ought to run until it is through; if it never finishes, it'll
>run as long as the node doesn't crash.
>                                           twv@rayssdap10


Although he says that /bin/csh is supposed to do the 'nohup' 
automatically I had to explicitly specify it.  Works great!  
Thanks to all of you that responded.


Kent Kuriyama
Naval Ocean Systems Center
Hawaii Laboratory
kent@nosc.mil

avenger@runx.ips.oz (Troy Rollo ) (03/23/89)

	Yes it is possible - simply mask out all signals, close streams 1,
2 and 3, fork, and let the parent die..... the last step may not be
necessary. Perhaps a cpo wouldn't hurt either. If the DM doesn't talk to
your process, it won't kill it.

	----------------------------------------------------------------
Internet: avenger@runx.ips.oz.au              ________________________
UUCP: uunet!runx.ips.oz.au!avenger           /\                       \
					     \_|                       |
Watch out for gobbledocks -		       |   Core Publications   |
They'll steal all your silicon Chippies	       | Electronic Publishing |
					       |   ____________________|_
						\_/_____________________/