GetProcessWorkingDirectory returns the current working directory of a process.
(pid int)
| 93 | |
| 94 | // GetProcessWorkingDirectory returns the current working directory of a process. |
| 95 | func GetProcessWorkingDirectory(pid int) (string, error) { |
| 96 | return os.Readlink(fmt.Sprintf("/proc/%d/cwd", pid)) |
| 97 | } |
| 98 | |
| 99 | // Ttyname returns the TTY name of a given file descriptor. |
| 100 | func Ttyname(fd uintptr) (string, error) { |
no outgoing calls