This is a discussion on Problems with shutting down server on Red Hat reboot - Linux ; I have TCP server that accepts client and then receives data from them. Server has SIGTERM handler, on which all sockets are closed and server exits. If server has several clients connected and I manually send it kill -TERM everything ...
I have TCP server that accepts client and then receives data from them.
Server has SIGTERM handler, on which all sockets are closed and server
exits.
If server has several clients connected and I manually send it kill
-TERMeverything goes correct: client application's
sockets are disconnected and server shuts down the right way. But if I
reboot machine some strange behavior occur: client application's
sockets still think they are connected, and after server receives
SIGTERM all semaphores that were in blocked state become unblocked.
Can someone explain me what's going on?