change flag from RDONLY to RDWR and close the fifo correct

Signed-off-by: Zhiyu Li <payall4u@qq.com>
This commit is contained in:
payall4u
2021-01-31 12:43:40 +08:00
parent 20346607b9
commit 957fa3379d
3 changed files with 15 additions and 4 deletions

View File

@@ -30,7 +30,7 @@ import (
)
func openShimLog(ctx context.Context, bundle *Bundle, _ func(string, time.Duration) (net.Conn, error)) (io.ReadCloser, error) {
return fifo.OpenFifo(ctx, filepath.Join(bundle.Path, "log"), unix.O_RDONLY|unix.O_CREAT|unix.O_NONBLOCK, 0700)
return fifo.OpenFifo(ctx, filepath.Join(bundle.Path, "log"), unix.O_RDWR|unix.O_CREAT|unix.O_NONBLOCK, 0700)
}
func checkCopyShimLogError(ctx context.Context, err error) error {