Skip to content

Commit 2db92c6

Browse files
backport of commit 9680de1 (#27826)
Co-authored-by: Michael Smithhisler <michael.smithhisler@hashicorp.com>
1 parent 1f10d25 commit 2db92c6

2 files changed

Lines changed: 13 additions & 1 deletion

File tree

.changelog/27825.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
```release-note:bug
2+
drivers: handle SIGPIPE in executor to handle possible write errors after client restart
3+
```

drivers/shared/executor/executor_linux_cgo.go

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,16 @@ func (l *LibcontainerExecutor) catchSignals() {
9090
defer signal.Stop(l.sigChan)
9191
defer close(l.sigChan)
9292

93-
signal.Notify(l.sigChan, syscall.SIGHUP, syscall.SIGQUIT, syscall.SIGTERM, syscall.SIGINT, syscall.SIGSEGV)
93+
signal.Notify(
94+
l.sigChan,
95+
syscall.SIGHUP,
96+
syscall.SIGQUIT,
97+
syscall.SIGTERM,
98+
syscall.SIGINT,
99+
syscall.SIGSEGV,
100+
syscall.SIGPIPE,
101+
)
102+
94103
for {
95104
signal := <-l.sigChan
96105
if signal == syscall.SIGTERM || signal == syscall.SIGINT {

0 commit comments

Comments
 (0)