diff --git a/process/process_freebsd.go b/process/process_freebsd.go index 779f8126a..a123ccf9b 100644 --- a/process/process_freebsd.go +++ b/process/process_freebsd.go @@ -69,7 +69,13 @@ func (p *Process) CwdWithContext(ctx context.Context) (string, error) { } func (p *Process) ExeWithContext(ctx context.Context) (string, error) { - return "", common.ErrNotImplementedError + mib := []int32{CTLKern, KernProc, KernProcPathname, p.Pid} + buf, _, err := common.CallSyscall(mib) + if err != nil { + return "", err + } + + return strings.Trim(string(buf), "\x00"), nil } func (p *Process) CmdlineWithContext(ctx context.Context) (string, error) {