From d311345aa5db10b9ffb0ade887e75a1222283b8d Mon Sep 17 00:00:00 2001 From: Matthew Holt Date: Thu, 21 May 2015 11:21:08 -0600 Subject: [PATCH] Fix for running ulimit check --- main.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.go b/main.go index 84d817454..a0f7afd8a 100644 --- a/main.go +++ b/main.go @@ -98,7 +98,7 @@ func main() { // Warn if ulimit is too low for production sites if (runtime.GOOS == "linux" || runtime.GOOS == "darwin") && !addr.IP.IsLoopback() && !checkedFdLimit { - out, err := exec.Command("ulimit", "-n").Output() + out, err := exec.Command("sh", "-c", "ulimit -n").Output() // use sh because ulimit isn't in Linux $PATH if err == nil { // Note that an error here need not be reported lim, err := strconv.Atoi(string(bytes.TrimSpace(out)))