diff options
author | Gabriel Russell <gabriel.russell@mongodb.com> | 2014-12-11 13:32:24 -0500 |
---|---|---|
committer | Gabriel Russell <gabriel.russell@mongodb.com> | 2014-12-18 14:58:50 -0500 |
commit | d153c362670bf5d2f0a121f4c70da45355b02cd7 (patch) | |
tree | 8311d60601f6482b6b3dc75dc2408cdc7388f015 /mongofiles/main | |
parent | 633eb21e02a3d0faa9fdd574cd96e1e30eede238 (diff) | |
download | mongo-d153c362670bf5d2f0a121f4c70da45355b02cd7.tar.gz |
TOOLS-488: exit with a unique exit code for common "termination" signals
Former-commit-id: 8116c570d59431a49b60407edc63f66bf6a59ce5
Diffstat (limited to 'mongofiles/main')
-rw-r--r-- | mongofiles/main/mongofiles.go | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/mongofiles/main/mongofiles.go b/mongofiles/main/mongofiles.go index e7eee44aee3..bafd0cf927d 100644 --- a/mongofiles/main/mongofiles.go +++ b/mongofiles/main/mongofiles.go @@ -5,6 +5,7 @@ import ( "github.com/mongodb/mongo-tools/common/db" "github.com/mongodb/mongo-tools/common/log" "github.com/mongodb/mongo-tools/common/options" + "github.com/mongodb/mongo-tools/common/signals" "github.com/mongodb/mongo-tools/common/util" "github.com/mongodb/mongo-tools/mongofiles" "os" @@ -25,6 +26,7 @@ const ( ) func main() { + go signals.Handle() // initialize command-line opts opts := options.New("mongofiles", Usage, options.EnabledOptions{Auth: true, Connection: true, Namespace: false}) |