Optimize Darwin process finder

This commit is contained in:
世界
2026-03-23 16:49:01 +08:00
parent 3f05a37f65
commit d2a933784c
4 changed files with 330 additions and 116 deletions

View File

@@ -29,7 +29,7 @@ func FindProcessInfo(searcher Searcher, ctx context.Context, network string, sou
if err != nil {
return nil, err
}
if info.UserId != -1 {
if info.UserId != -1 && info.UserName == "" {
osUser, _ := user.LookupId(F.ToString(info.UserId))
if osUser != nil {
info.UserName = osUser.Username