mirror of
https://github.com/shtorm-7/sing-box-extended.git
synced 2026-12-01 14:18:36 +00:00
Fix process path of replaced executables on Linux
This commit is contained in:
@@ -186,6 +186,7 @@ func buildProcessPaths(uid uint32) (map[uint32]string, error) {
|
||||
}
|
||||
return nil, err
|
||||
}
|
||||
exePath = strings.TrimSuffix(exePath, " (deleted)")
|
||||
fds, err := os.ReadDir(fdPath)
|
||||
if err != nil {
|
||||
continue
|
||||
|
||||
@@ -125,7 +125,7 @@ func (t *resolve1Manager) createMetadata(sender dbus.Sender) adapter.InboundCont
|
||||
|
||||
processPath, err := os.Readlink(F.ToString("/proc/", senderPid, "/exe"))
|
||||
if err == nil {
|
||||
processInfo.ProcessPath = processPath
|
||||
processInfo.ProcessPath = strings.TrimSuffix(processPath, " (deleted)")
|
||||
} else {
|
||||
processName, readErr := os.ReadFile(F.ToString("/proc/", senderPid, "/comm"))
|
||||
if readErr == nil {
|
||||
|
||||
Reference in New Issue
Block a user