File tree Expand file tree Collapse file tree 2 files changed +6
-4
lines changed
Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -19,7 +19,7 @@ const (
1919 ContainerNotPaused
2020
2121 // Process errors
22- ProcessNotExecuted
22+ NoProcessOps
2323
2424 // Common errors
2525 ConfigInvalid
@@ -49,6 +49,8 @@ func (c ErrorCode) String() string {
4949 return "Console exists for process"
5050 case ContainerNotPaused :
5151 return "Container is not paused"
52+ case NoProcessOps :
53+ return "No process operations"
5254 default :
5355 return "Unknown error"
5456 }
Original file line number Diff line number Diff line change @@ -55,7 +55,7 @@ type Process struct {
5555// Wait releases any resources associated with the Process
5656func (p Process ) Wait () (* os.ProcessState , error ) {
5757 if p .ops == nil {
58- return nil , newGenericError (fmt .Errorf ("invalid process" ), ProcessNotExecuted )
58+ return nil , newGenericError (fmt .Errorf ("invalid process" ), NoProcessOps )
5959 }
6060 return p .ops .wait ()
6161}
@@ -65,15 +65,15 @@ func (p Process) Pid() (int, error) {
6565 // math.MinInt32 is returned here, because it's invalid value
6666 // for the kill() system call.
6767 if p .ops == nil {
68- return math .MinInt32 , newGenericError (fmt .Errorf ("invalid process" ), ProcessNotExecuted )
68+ return math .MinInt32 , newGenericError (fmt .Errorf ("invalid process" ), NoProcessOps )
6969 }
7070 return p .ops .pid (), nil
7171}
7272
7373// Signal sends a signal to the Process.
7474func (p Process ) Signal (sig os.Signal ) error {
7575 if p .ops == nil {
76- return newGenericError (fmt .Errorf ("invalid process" ), ProcessNotExecuted )
76+ return newGenericError (fmt .Errorf ("invalid process" ), NoProcessOps )
7777 }
7878 return p .ops .signal (sig )
7979}
You can’t perform that action at this time.
0 commit comments