[lkml]   [2000]   [Aug]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: ifconfig device down
    "Richard B. Johnson" <>:
    > Hello network gurus!
    > To make a clean reboot of a remote embedded system, I need to have
    > <somebody> send a FIN to every connected hosts. In an interactive
    > system, init usually kills all the tasks, which forces an exit().
    > The kernel then closes all the sockets/fd's, etc. This usually is
    > sufficient to have most of the connected hosts disconnect before
    > the server crashes. This seems to be more time-related than anything
    > else.
    > In this embedded system, my home-made init does a kill(-1, 9) before
    > it reboots, but this is not sufficient. No FINs are sent to connected
    > hosts even if I sleep() a second after this.
    > Also, the equivalent of `ifconfig eth0 down` does not close these
    > sockets. I haven't mucked with routing yet.
    > Does anybody know if there is a socket call (or any other way), to
    > tell the network to disconnect __everybody__ __now__?
    > The connected hosts do disconnect after the embedded system reboots.

    <not really a network guru - for what it's worth>

    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.

    The open connections get closed when a error packet is sent back from
    the rebooted system after the remote host sends a retry.

    Jesse I Pollard, II

    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
    Please read the FAQ at

     \ /
      Last update: 2005-03-22 13:58    [W:0.023 / U:6.432 seconds]
    ©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site