Skip to content

Commit

Permalink
merge branch 'pr-3536' into release-1.1
Browse files Browse the repository at this point in the history
guodong (1):
  [1.1] libct/nsenter: switch to sane_kill()

LGTMs: AkihiroSuda cyphar
Closes #3536
  • Loading branch information
cyphar committed Jul 28, 2022
2 parents f4aaf0d + d614445 commit 69734b9
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions libcontainer/nsenter/nsexec.c
Original file line number Diff line number Diff line change
Expand Up @@ -1068,7 +1068,7 @@ void nsexec(void)

s = SYNC_MOUNTSOURCES_ACK;
if (write(syncfd, &s, sizeof(s)) != sizeof(s)) {
kill(stage1_pid, SIGKILL);
sane_kill(stage1_pid, SIGKILL);
bail("failed to sync with child: write(SYNC_MOUNTSOURCES_ACK)");
}
break;
Expand Down Expand Up @@ -1230,7 +1230,7 @@ void nsexec(void)
if (config.mountsources) {
s = SYNC_MOUNTSOURCES_PLS;
if (write(syncfd, &s, sizeof(s)) != sizeof(s)) {
kill(stage2_pid, SIGKILL);
sane_kill(stage2_pid, SIGKILL);
bail("failed to sync with parent: write(SYNC_MOUNTSOURCES_PLS)");
}

Expand All @@ -1239,11 +1239,11 @@ void nsexec(void)

/* Parent finished to send the mount sources fds. */
if (read(syncfd, &s, sizeof(s)) != sizeof(s)) {
kill(stage2_pid, SIGKILL);
sane_kill(stage2_pid, SIGKILL);
bail("failed to sync with parent: read(SYNC_MOUNTSOURCES_ACK)");
}
if (s != SYNC_MOUNTSOURCES_ACK) {
kill(stage2_pid, SIGKILL);
sane_kill(stage2_pid, SIGKILL);
bail("failed to sync with parent: SYNC_MOUNTSOURCES_ACK: got %u", s);
}
}
Expand Down

0 comments on commit 69734b9

Please sign in to comment.