Problems in shutting down a Sun

Greg Limes limes at sun.uucp
Thu Apr 21 12:10:09 AEST 1988


In article <8558 at oberon.USC.EDU>, mcooper at acamar.usc.edu (Michael A. Cooper) writes:
> 
> [ We are running SunOS 3.2 and 3.4 on Sun-3's. ]
> 
[lots of stuff hacked out]

> If I change my program to:
> 
> 	kill(1, SIGTERM);
> 
> all processes (including my process) except system processes get
> SIGTERM and everything works fine, including when I'm running
> Suntools.  This is the way the 4.3BSD shutdown does it.  This way
> works, except I can't do anything after I do this since my own process
> gets killed.

DISCLAIMER: While I work at SUN, I have not (yet) examined the sources
to shutdown, so I do not have any idea precisely what it does.

But, Mike, you can always simply catch the signal ... try
	signal (SIGTERM, SIG_IGN)
before the kill; your program will quietly burp as it eats the SIGTERM
and continues executing.

> Michael A. Cooper, University Computing Services, U of Southern California
>   UUCP: {sdcrdcf, cit-vax}!oberon!mcooper   BITNET: mcooper at kylara
>   ARPA: mcooper at oberon.USC.EDU              PHONE: (213) 743-2957


-- Greg Limes [limes at sun.com]			frames to /dev/fb
   I do not speak for Sun. I barely speak for myself.



More information about the Comp.unix.wizards mailing list