Skip to content

Commit 69225fa

Browse files
authored
Merge pull request #3724 from kinvolk/rata/nsexec-fixes
nsexec: Remove bogus kill to stage_2_pid
2 parents 58c192a + 2adeb6f commit 69225fa

File tree

1 file changed

+3
-10
lines changed

1 file changed

+3
-10
lines changed

libcontainer/nsenter/nsexec.c

+3-10
Original file line numberDiff line numberDiff line change
@@ -1035,7 +1035,6 @@ void nsexec(void)
10351035
/* Get the stage-2 pid. */
10361036
if (read(syncfd, &stage2_pid, sizeof(stage2_pid)) != sizeof(stage2_pid)) {
10371037
sane_kill(stage1_pid, SIGKILL);
1038-
sane_kill(stage2_pid, SIGKILL);
10391038
bail("failed to sync with stage-1: read(stage2_pid)");
10401039
}
10411040

@@ -1234,23 +1233,17 @@ void nsexec(void)
12341233
if (config.mountsources) {
12351234
write_log(DEBUG, "request stage-0 to send mount sources");
12361235
s = SYNC_MOUNTSOURCES_PLS;
1237-
if (write(syncfd, &s, sizeof(s)) != sizeof(s)) {
1238-
sane_kill(stage2_pid, SIGKILL);
1236+
if (write(syncfd, &s, sizeof(s)) != sizeof(s))
12391237
bail("failed to sync with parent: write(SYNC_MOUNTSOURCES_PLS)");
1240-
}
12411238

12421239
/* Receive and install all mount sources fds. */
12431240
receive_mountsources(syncfd);
12441241

12451242
/* Parent finished to send the mount sources fds. */
1246-
if (read(syncfd, &s, sizeof(s)) != sizeof(s)) {
1247-
sane_kill(stage2_pid, SIGKILL);
1243+
if (read(syncfd, &s, sizeof(s)) != sizeof(s))
12481244
bail("failed to sync with parent: read(SYNC_MOUNTSOURCES_ACK)");
1249-
}
1250-
if (s != SYNC_MOUNTSOURCES_ACK) {
1251-
sane_kill(stage2_pid, SIGKILL);
1245+
if (s != SYNC_MOUNTSOURCES_ACK)
12521246
bail("failed to sync with parent: SYNC_MOUNTSOURCES_ACK: got %u", s);
1253-
}
12541247
}
12551248

12561249
/*

0 commit comments

Comments
 (0)