summaryrefslogtreecommitdiff
path: root/daemonize.go
diff options
context:
space:
mode:
authorJakob Unterwurzacher2018-06-08 00:47:48 +0200
committerJakob Unterwurzacher2018-06-08 00:47:48 +0200
commitbde7ba57b06eb46f8901454e12524a74a8c3b6e8 (patch)
tree96b1a729897fcb6df14052a199a91543cc2f8a87 /daemonize.go
parent5ad26495fc86527bbfe75ac6b46528d49a373676 (diff)
darwin does not have PATH_MAX
Define our own, with the value from Linux.
Diffstat (limited to 'daemonize.go')
-rw-r--r--daemonize.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/daemonize.go b/daemonize.go
index 5215b2c..40d9b64 100644
--- a/daemonize.go
+++ b/daemonize.go
@@ -29,7 +29,7 @@ func exitOnUsr1() {
func forkChild() int {
name := os.Args[0]
// Use the full path to our executable if we can get if from /proc.
- buf := make([]byte, syscall.PathMax)
+ buf := make([]byte, syscallcompat.PATH_MAX)
n, err := syscall.Readlink("/proc/self/exe", buf)
if err == nil {
name = string(buf[:n])