Re: ifconfig device down

From: Jesse Pollard (pollard@tomcat.admin.navo.hpc.mil)
Date: Fri Aug 04 2000 - 15:31:56 EST


"Richard B. Johnson" <root@chaos.analogic.com>:
> On Fri, 4 Aug 2000, Jesse Pollard wrote:
> >
> > What a normal shutdown does is to issue a kill(-1,15) first, then
> > wait 3-5 seconds (or when it finishes other stuff) before sending
> > the kill(-1,9). It also doesn't kill itself. The signal 15 gives
> > the daemons time to close the connections and exit. If they are not
> > finished by the time the signal 9 occurs, then they are forced out, and the
> > connections left open.
>
> Yes. That's what Sys-V init does. The signal 9 should have caused the
> children to have their fd's closed. This does not happen for sockets.
>
> The SIGTERM (15) can be trapped. SIGKILL (9) can't, but it doesn't get
> sent to pid 1 (init) so init doesn't get killed.
>
> >
> > The open connections get closed when a error packet is sent back from
> > the rebooted system after the remote host sends a retry.
> >
>
> Correct. I need them to be closed during the shutdown. There should
> be some way so I don't have to insert a signal handler into software
> I don't have the source for.

The daemons should already have that included. As long as the process
is sent through the "exit" system call (which kill 9 doesn't) the sockets
should be closed. The default behaviour for 15 is to exit, unless the
daemon establishes a signal handler for it.

-------------------------------------------------------------------------
Jesse I Pollard, II
Email: pollard@navo.hpc.mil

Any opinions expressed are solely my own.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Mon Aug 07 2000 - 21:00:13 EST