Skip to content

Commit

Permalink
RSDK-2551 Swallow 143 errors when stopping modules for now (viamrobot…
Browse files Browse the repository at this point in the history
  • Loading branch information
benjirewis authored Apr 13, 2023
1 parent 10be1ad commit a6d8f17
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion module/modmanager/manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import (
"io/fs"
"os"
"path/filepath"
"strings"
"sync"
"time"

Expand Down Expand Up @@ -34,6 +35,7 @@ import (

var (
validateConfigTimeout = 5 * time.Second
errMessageExitStatus143 = "exit status 143"
errModularResourcesDisabled = errors.New("modular resources disabled in untrusted environment")
)

Expand Down Expand Up @@ -462,7 +464,10 @@ func (m *module) stopProcess() error {
return nil
})

if err := m.process.Stop(); err != nil {
// TODO(RSDK-2551): stop ignoring exit status 143 once Python modules handle
// SIGTERM correctly.
if err := m.process.Stop(); err != nil &&
!strings.Contains(err.Error(), errMessageExitStatus143) {
return err
}
return nil
Expand Down

0 comments on commit a6d8f17

Please sign in to comment.