diff --git a/src/pkg/syscall/exec_unix.go b/src/pkg/syscall/exec_unix.go index 93670daeed..890bfdc227 100644 --- a/src/pkg/syscall/exec_unix.go +++ b/src/pkg/syscall/exec_unix.go @@ -158,7 +158,7 @@ func forkExec(argv0 string, argv []string, attr *ProcAttr) (pid int, err error) return 0, err } - if runtime.GOOS == "freebsd" && len(argv[0]) > len(argv0) { + if (runtime.GOOS == "freebsd" || runtime.GOOS == "dragonfly") && len(argv[0]) > len(argv0) { argvp[0] = argv0p }