Skip to content
This repository was archived by the owner on Feb 8, 2021. It is now read-only.

Commit feedb08

Browse files
committed
Merge pull request #35 from gao-feng/close
do not close pipe in write side
2 parents bfa1af2 + c14737f commit feedb08

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/init.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -409,8 +409,9 @@ static int hyper_container_stage0(void *data)
409409
close(pidns);
410410
close(utsns);
411411
close(ipcns);
412-
close(arg->ctl_pipe[0]);
413-
close(arg->ctl_pipe[1]);
412+
/* hyper_container_stage0 shares fd table with init, let init closes pipe. */
413+
//close(arg->ctl_pipe[0]);
414+
//close(arg->ctl_pipe[1]);
414415

415416
_exit(ret);
416417
}
@@ -427,7 +428,6 @@ int hyper_start_container_stage0(struct hyper_container *c, struct hyper_pod *po
427428
int ret = -1, pid;
428429
uint32_t type;
429430

430-
431431
if (pipe2(arg.ctl_pipe, O_CLOEXEC) < 0) {
432432
perror("create pipe between hyper init and pod init failed");
433433
goto out;

0 commit comments

Comments
 (0)