containerd/sys
Wei Fu 6ee8577e54 sys/reaper: avoid leaky goroutine when exec timeout
The channel is created with no capacity that it needs receiver when
sending data. Otherwise, the sending-data goroutine will be blocked
forever. For the #6166 pr, the exec command timeout will return and
no receiver for the data. It will cause goroutine leaky.

This commit allocates buffered channel for the command status and closes
the channel after sending. And also use time.Timer with Stop for
performance concern.

Signed-off-by: Wei Fu <fuweid89@gmail.com>
2021-10-31 23:04:04 +08:00
..
reaper sys/reaper: avoid leaky goroutine when exec timeout 2021-10-31 23:04:04 +08:00
epoll.go Run go fmt with Go 1.17 2021-08-22 09:31:50 +09:00
fds.go refactor: move from io/ioutil to io and os package 2021-09-21 09:50:38 +08:00
filesys_unix.go Run go fmt with Go 1.17 2021-08-22 09:31:50 +09:00
filesys_windows.go Windows: Cleanup rm- prefixed layers 2021-09-29 12:46:35 -07:00
oom_linux_test.go replace uses of os/exec with golang.org/x/sys/execabs 2021-08-25 18:11:09 +02:00
oom_linux.go refactor: move from io/ioutil to io and os package 2021-09-21 09:50:38 +08:00
oom_unsupported.go Run go fmt with Go 1.17 2021-08-22 09:31:50 +09:00
socket_unix.go Run go fmt with Go 1.17 2021-08-22 09:31:50 +09:00
socket_windows.go Remove redundant build tags 2021-08-05 22:27:46 -07:00
userns_deprecated.go Move RunningInUserNS() to its own package 2021-03-23 11:29:53 +01:00