Revert "commands: Remove the rlimit tweaking on macOS"

This reverts commit bcd32f1086.

See #3582
This commit is contained in:
Bjørn Erik Pedersen 2017-06-12 20:29:47 +02:00
parent 52a0cea65d
commit 26aa06a3db
3 changed files with 122 additions and 0 deletions

View file

@ -25,6 +25,7 @@ import (
"net/http"
"os"
"path/filepath"
"runtime"
"strings"
"sync"
"time"
@ -758,6 +759,10 @@ func (c *commandeer) rebuildSites(events []fsnotify.Event) error {
// newWatcher creates a new watcher to watch filesystem events.
func (c *commandeer) newWatcher(port int) error {
if runtime.GOOS == "darwin" {
tweakLimit()
}
watcher, err := watcher.New(1 * time.Second)
var wg sync.WaitGroup