Skip to content

[JENKINS-43825] Improve propagation of issues in ProcessTree.Windows #22043

Closed

Description

@jenkins-infra-bot

This is a requirement for better error handling in JENKINS-30782.

Build termination uses environment variables to determine which processes need to be aborted. OSProcess API provides getEnvironmentVariables(), which does not support propagating exceptions to upper levels. But we need it for issues which may happen in WinP. hasMatchingEnvVars() is final on the OSProcess level, hence there is no way to reliably propagate issues.

New API needs to be implemented in order to allow propagating exceptions, at least for Windows processes


Originally reported by oleg_nenashev, imported from: Improve propagation of issues in ProcessTree.Windows
  • assignee: oleg_nenashev
  • status: Resolved
  • priority: Minor
  • component(s): core
  • label(s): process, process-killer, windows, winp
  • resolution: Fixed
  • resolved: 2017-05-01T20:06:12+00:00
  • votes: 0
  • watchers: 1
  • imported: 2025-11-24
Raw content of original issue

This is a requirement for better error handling in JENKINS-30782.

Build termination uses environment variables to determine which processes need to be aborted. OSProcess API provides getEnvironmentVariables(), which does not support propagating exceptions to upper levels. But we need it for issues which may happen in WinP. hasMatchingEnvVars() is final on the OSProcess level, hence there is no way to reliably propagate issues.

New API needs to be implemented in order to allow propagating exceptions, at least for Windows processes

Activity

  1. jenkins-infra-bot commented on Apr 25, 2017

    @jenkins-infra-bot
    Author
  2. jenkins-infra-bot commented on Apr 28, 2017

    @jenkins-infra-bot
    Author
    scm_issue_link:

    Code changed in jenkins
    User: Oleg Nenashev
    Path:
    core/src/main/java/hudson/util/ProcessTree.java
    http://jenkins-ci.org/commit/jenkins/1899f36bfc372ec9b2ee536d3630ea5246e4570f
    Log:
    JENKINS-43825 - Refactor ProcessTree.Windows logic to propagate errors correctly (#2859)

    • JENKINS-43825 - Refactor WindowsProcess to a separate class and optimize logging
    • JENKINS-43825 - Refactor the code to properly propagate WindowsProcessException in ProcessTree to the top level
    • JENKINS-43825 - Next time I will try to compile the code before submitting
  3. jenkins-infra-bot commented on May 1, 2017

    @jenkins-infra-bot
    Author
    danielbeck:
    • Original comment link
    • Raw content of original comment:

      In 2.58.

    In 2.58.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions