Skip to content

Commit

Permalink
PID locking does no longer uses /var/run (unix) as it requires admin …
Browse files Browse the repository at this point in the history
…permnissions. Fixes #35
  • Loading branch information
luskaner committed Aug 31, 2024
1 parent 7dd720a commit f545951
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions common/process/process.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,12 @@ import (
"os"
"os/exec"
"path/filepath"
"runtime"
"strconv"
"time"
)

func getPidPaths(exePath string) (paths []string) {
name := common.Name + "-" + filepath.Base(exePath) + ".pid"
if runtime.GOOS != "windows" {
if d, e := os.Stat("/var/run"); e == nil && d.IsDir() {
paths = append(paths, filepath.Join("/var/run", name))
}
}
tmp := os.TempDir()
if tmp != "" {
if d, e := os.Stat(tmp); e == nil && d.IsDir() {
Expand Down

0 comments on commit f545951

Please sign in to comment.