Description
Whether there's a clean shutdown or not, the network listener thread will return and this is treated as a network error by the mongos main method.
So there is a race condition between the signal processing thread and the return from the main method as to which thread will call dbexit first. If the signal processing thread calls it first (which happens most of the time), it will result in zero return code. However, if the main method calls it first, this will return into exit code 48.