/
githubmirror
/
client
Обзор
Документация
Войти
/
githubmirror
/
client
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
go/kbfs/sysutils/pid_path_linux.go
15 строк
379 B
John Zila
setup the base read tree
14 дек 2018, 03:11
14 дек 2018, 03:11
3fb26e9
Код
Авторство
О чём код?
// Copyright 2017 Keybase Inc. All rights reserved. // Use of this source code is governed by a BSD // license that can be found in the LICENSE file. package sysutils import ( "fmt" "os" ) // GetExecPathFromPID returns the process's executable path for given PID. func GetExecPathFromPID(pid uint32) (string, error) { return os.Readlink(fmt.Sprintf("/proc/%d/exe", pid)) }