Description of problem: Service script shutdown functions have sleep statements - check status instead I noticed this while debugging SElinux policy issues and was stopping/starting the riccis service. The shutdown seemed to stall and I thought there might be another problem. The cause was an 8 second sleep statement in the shutdown function of the ricci service script. (The ricci process is killed and then the script sleeps before deleting the PID files to make sure that all threads have stopped.) It's probably safe to reduce the sleep to 3-4 seconds, but why not remove it altogether and replace it with a loop that sleeps for a second, checks if the process is running, and then deletes the PID files. Version-Release number of selected component (if applicable): ricci-0.8-23.el5 How reproducible: 100% Steps to Reproduce: 1. Stop the service. Actual results: Sleeps for 8 seconds Expected results: It could vary depending on system speed/load. Additional info:
TCP, by RFC, keeps server socket open until TCP timeout elapses (couple seconds), so it can handle astrayed incoming messages. Restarts were failing because of it (it was not enough to check if daemon was still running - new daemon wasn't able to bind a socket even after old daemon has exited). SO_REUSEADDR allows port to be reused before timeout has elapsed. Since that has been fixed long time ago, timeouts can go as well (except for threads to exit, which can be checked in status loop).
This request is being deferred until the next version. It is a low priority fix. Things are working ok the way they are.