Commit e7b18148 authored by Kubernetes Submit Queue's avatar Kubernetes Submit Queue Committed by GitHub

Merge pull request #43578 from vsiddharth/pause-container

Automatic merge from submit-queue Improve pause-container warning message Signed-off-by: 's avatarVinothkumar Siddharth <sidvin@amazon.com> **What this PR does / why we need it**: This just improves the warning message currently emitted by pause **Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes # **Special notes for your reviewer**: **Release note**: ```release-note ```
parents 7f27cebe 9fa5e857
......@@ -27,14 +27,13 @@ static void sigdown(int signo) {
}
static void sigreap(int signo) {
while (waitpid(-1, NULL, WNOHANG) > 0)
;
while (waitpid(-1, NULL, WNOHANG) > 0);
}
int main() {
if (getpid() != 1)
/* Not an error because pause sees use outside of infra containers. */
fprintf(stderr, "Warning: pause should be the first process in a pod\n");
fprintf(stderr, "Warning: pause should be the first process\n");
if (sigaction(SIGINT, &(struct sigaction){.sa_handler = sigdown}, NULL) < 0)
return 1;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment