File tree 1 file changed +9
-0
lines changed
1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ import (
10
10
"os/exec"
11
11
"path/filepath"
12
12
"strconv"
13
+ "strings"
13
14
"sync"
14
15
"syscall"
15
16
"time"
@@ -351,11 +352,19 @@ func (r *remote) runContainerdDaemon() error {
351
352
}
352
353
logrus .Debugf ("runContainerdDaemon: runtimeArgs: %s" , args )
353
354
}
355
+
354
356
cmd := exec .Command (containerdBinary , args ... )
355
357
// redirect containerd logs to docker logs
356
358
cmd .Stdout = os .Stdout
357
359
cmd .Stderr = os .Stderr
358
360
cmd .SysProcAttr = & syscall.SysProcAttr {Setsid : true }
361
+ cmd .Env = nil
362
+ // clear the NOTIFY_SOCKET from the env when starting containerd
363
+ for _ , e := range os .Environ () {
364
+ if ! strings .HasPrefix (e , "NOTIFY_SOCKET" ) {
365
+ cmd .Env = append (cmd .Env , e )
366
+ }
367
+ }
359
368
if err := cmd .Start (); err != nil {
360
369
return err
361
370
}
You can’t perform that action at this time.
0 commit comments