Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-pages.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Thomas <nick@gitlab.com>2017-02-23 17:20:11 +0300
committerNick Thomas <nick@gitlab.com>2017-02-23 17:20:11 +0300
commit2f97f06ef577cca15c129bcad59aa8d21489b35e (patch)
treed3ecd6a1cdc697fcf432a4453239b17d4b7539d5
parentc13e845ac88cea6a2e01fc301e741b0be09d7ed1 (diff)
parent8b38fc78111da99783f5b18987ea380665a9400c (diff)
Merge branch 'fix-zero-fd' into 'master'
Only pass a metrics fd to the daemon child if a metrics address was specified Closes gitlab-ce#28581 See merge request !18
-rw-r--r--daemon.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/daemon.go b/daemon.go
index 84ca7c15..8d68bb44 100644
--- a/daemon.go
+++ b/daemon.go
@@ -205,7 +205,9 @@ func daemonize(config appConfig, uid, gid uint) {
daemonUpdateFds(cmd, config.ListenHTTP)
daemonUpdateFds(cmd, config.ListenHTTPS)
daemonUpdateFds(cmd, config.ListenProxy)
- config.ListenMetrics = daemonUpdateFd(cmd, config.ListenMetrics)
+ if config.ListenMetrics != 0 {
+ config.ListenMetrics = daemonUpdateFd(cmd, config.ListenMetrics)
+ }
// Start the process
if err = cmd.Start(); err != nil {