Skip to content

Process.exitCode returns 0 when called again on POSIX #114

Closed

Description

@dimensionscape

After the first successful waitpid, later exitCode() calls get ECHILD and return 0, so polling with exitCode(false) and then calling exitCode() loses the exit code (sh -c "exit 3" reports 3, then 0; Windows reports 3 both times). kill() and close() also act on a pid that may already have been reaped and reused. The status should be kept after the first reap.

Activity

  1. added this to the 6.0.0 milestone on Oct 15, 2026
  2. added a commit that references this issue on Oct 15, 2026
    7860b90
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions