[net.unix] shutdown

lmc@denelcor.UUCP (Lyle McElhaney) (11/15/84)

Several time now we have attempted to use shutdown to bring our 750 running
4.2 dow. This normally works as expected, but sometimes the shutdown just
seems to disappear. The task line is still in the ps -aux:

root   16954  0.0 0.4   53   21   co  I <  0:00 shutdown +5

but we never hear from it again. When we bring the system down with
/etc/halt, it finds that "some processes won't die". There is one
zombie in the ps listing...

Why does shutdown not?
-- 
		Lyle McElhaney
		(hao,brl-bmd,nbires,csu-cs,scgvaxd)!denelcor!lmc

jim@haring.UUCP (11/16/84)

Shutdown attempts to write to everyone's terminal. Now, someone
can block that message (with a ^S or whatever) and the write
hangs. Shutdown has an alarm() round the write, to arrange to
catch such action. However, the alarm handling routine 'does
nothing', it is only to interrupt the write system call, but,
since on 4.2, the write system call is restartable, you go back
to where you were...

You need to have a setjmp/longjmp construct instead. Later versions
of 4.2 have this fixed.

Jim McKie    Centrum voor Wiskunde en Informatica, Amsterdam    mcvax!jim

chuqui@nsc.UUCP (Cheshire Chuqui) (11/19/84)

In article <592@denelcor.UUCP> lmc@denelcor.UUCP (Lyle McElhaney) writes:
>Several time now we have attempted to use shutdown to bring our 750 running
>4.2 dow. This normally works as expected, but sometimes the shutdown just
>seems to disappear.
>
>but we never hear from it again. When we bring the system down with
>/etc/halt, it finds that "some processes won't die". There is one
>zombie in the ps listing...

I've seen this on a 4.2 780 as well. It seems to be caused by shutdown 
attempting to output to a tty port that is hung, wedging the process
on an I/O wait. I haven't figured out why this happens-- it could be that
someone has left a terminal in a ^S state and the buffer fills up on 
shutdown and it waits forever for the terminal. perhaps a timeout in the
wall code will help, I haven't bothered to try to fix it.

chuq
-- 
From the Department of Bistromatics:                   Chuq Von Rospach
{cbosgd,decwrl,fortune,hplabs,ihnp4,seismo}!nsc!chuqui  nsc!chuqui@decwrl.ARPA

  This plane is equipped with 4 emergency exits, at the front and back of
  the plane and two above the wings. Please note that the plane will be
  travelling at an average altitude of 31,000 feet, so any use of these
  exits in an emergency situation will most likely be futile.