Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Windows fix #23

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion runner/settings.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import (
"github.com/pilu/config"
"os"
"path/filepath"
"runtime"
"strconv"
"strings"
"time"
Expand Down Expand Up @@ -113,7 +114,11 @@ func tmpPath() string {
}

func buildName() string {
return settings["build_name"]
n := settings["build_name"]
if runtime.GOOS == "windows" {
n += ".exe"
}
return n
}
func buildPath() string {
return filepath.Join(tmpPath(), buildName())
Expand Down
11 changes: 0 additions & 11 deletions runner/start.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import (
"os"
"runtime"
"strings"
"syscall"
"time"
)

Expand Down Expand Up @@ -88,16 +87,6 @@ func initLogFuncs() {
appLog = newLogFunc("app")
}

func initLimit() {
var rLimit syscall.Rlimit
rLimit.Max = 10000
rLimit.Cur = 10000
err := syscall.Setrlimit(syscall.RLIMIT_NOFILE, &rLimit)
if err != nil {
fmt.Println("Error Setting Rlimit ", err)
}
}

func setEnvVars() {
os.Setenv("DEV_RUNNER", "1")
wd, err := os.Getwd()
Expand Down
18 changes: 18 additions & 0 deletions runner/start_unix.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
// +build !windows

package runner

import (
"fmt"
"syscall"
)

func initLimit() {
var rLimit syscall.Rlimit
rLimit.Max = 10000
rLimit.Cur = 10000
err := syscall.Setrlimit(syscall.RLIMIT_NOFILE, &rLimit)
if err != nil {
fmt.Println("Error Setting Rlimit ", err)
}
}
4 changes: 4 additions & 0 deletions runner/start_windows.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
package runner

func initLimit() {
}