-
Type: Bug
-
Resolution: Done
-
Priority: Major - P3
-
Affects Version/s: 3.0.4
-
Component/s: mongorestore
-
None
-
Environment:Amazon Linux 2015.03
-
Server Tools A (10/09/15)
mongorestore installs a signal handler for sighup (on 3.0.x: https://github.com/mongodb/mongo-tools/blob/r3.0.4/common/signals/signals_unix.go master: https://github.com/mongodb/mongo-tools/blob/master/mongorestore/mongorestore.go#L448) that among other things exits the mongorestore process.
This overwrites the what nohup does to mark the signal as ignorable and means that an invocation such as
nohup mongorestore path/to/dump
will be terminated if the SSH session is disconnection, which is annoying since this is an operation that frequently takes many hours. The 2.6 versions of the tools did not explicitly handle SIGHUP.
I have encountered this using mongorestore but I suspect it affects other tools too.