From 8f3291f805c641a6fcf043eb8c4e1a2f4174b579 Mon Sep 17 00:00:00 2001 From: wujibin Date: Wed, 14 Aug 2019 17:18:24 +0800 Subject: [PATCH] containerd: change tmpfile directory when exec reason: tmp file stored /tmp before change, if mountain of containers are runing, the diretory will exist too many tmp file Change-Id: I1879ba9d09dca41a7571131d7447bf67356ea79c --- vendor/github.com/containerd/go-runc/runc.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vendor/github.com/containerd/go-runc/runc.go b/vendor/github.com/containerd/go-runc/runc.go index 6323bf21..7a2a8c4d 100644 --- a/vendor/github.com/containerd/go-runc/runc.go +++ b/vendor/github.com/containerd/go-runc/runc.go @@ -229,7 +229,7 @@ func (o *ExecOpts) args() (out []string, err error) { // Exec executres and additional process inside the container based on a full // OCI Process specification func (r *Runc) Exec(context context.Context, id string, spec specs.Process, opts *ExecOpts) error { - f, err := ioutil.TempFile(os.Getenv("XDG_RUNTIME_DIR"), "runc-process") + f, err := ioutil.TempFile(".", "runc-process") if err != nil { return err } -- 2.19.0