mirror of
https://gitea.com/gitea/runner.git
synced 2026-11-06 15:20:29 +00:00
chore(deps): update dependencies (#1288)
Co-authored-by: bircni <[email protected]> Co-authored-by: silverwind <[email protected]> Reviewed-on: https://gitea.com/gitea/runner/pulls/1288 Reviewed-by: bircni <[email protected]> Co-authored-by: Renovate Bot <[email protected]>
This commit is contained in:
1 parent
436d0d2942
commit
711b72735b
4 files changed
+9
-10
No files matched your search
@@ -36,9 +36,8 @@ func processAlive(pid int) bool {
|
||||
if b, readErr := os.ReadFile(fmt.Sprintf("/proc/%d/stat", pid)); readErr == nil {
|
||||
// Format: "pid (comm) state ..." — state follows the closing ')' of the
|
||||
// command name (which may itself contain spaces and parens).
|
||||
rest := string(b)
|
||||
if idx := strings.LastIndex(rest, ") "); idx >= 0 {
|
||||
fields := strings.Fields(rest[idx+2:])
|
||||
if _, after, found := strings.CutLast(string(b), ") "); found {
|
||||
fields := strings.Fields(after)
|
||||
if len(fields) > 0 && fields[0] == "Z" {
|
||||
return false // zombie: terminated but not yet reaped
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user