Package hudson.util
Class ProcessKillingVeto
- java.lang.Object
-
- hudson.util.ProcessKillingVeto
-
- All Implemented Interfaces:
ExtensionPoint
public abstract class ProcessKillingVeto extends Object implements ExtensionPoint
Allows extensions to veto killing processes. If at least one extension vetoes the killing of a process, it will not be killed. This can be useful to keep daemon processes alive. An example is mspdbsrv.exe used by Microsoft compilers. See JENKINS-9104- Since:
- 1.619
- Author:
- Daniel Weber
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ProcessKillingVeto.VetoCause
Describes the cause for a process killing veto.-
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson
-
-
Constructor Summary
Constructors Constructor Description ProcessKillingVeto()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description static List<ProcessKillingVeto>
all()
abstract ProcessKillingVeto.VetoCause
vetoProcessKilling(ProcessTreeRemoting.IOSProcess p)
Ask the extension whether it vetoes killing of the given process
-
-
-
Method Detail
-
all
public static List<ProcessKillingVeto> all()
- Returns:
- All ProcessKillingVeto extensions currently registered. An empty list if Jenkins is not available, never null.
-
vetoProcessKilling
@CheckForNull public abstract ProcessKillingVeto.VetoCause vetoProcessKilling(@NonNull ProcessTreeRemoting.IOSProcess p)
Ask the extension whether it vetoes killing of the given process- Parameters:
p
- The process that is about to be killed- Returns:
- a
ProcessKillingVeto.VetoCause
if the process should not be killed, null else.
-
-