containerd/sys/reaper
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_unix.go sys/reaper: avoid leaky goroutine when exec timeout 2021-10-31 23:04:04 +08:00
reaper_utils_linux.go Integrate sys.SetSubreaper, sys.GetSubreaper in sys/reaper package 2020-05-04 08:44:02 +02:00