-
Notifications
You must be signed in to change notification settings - Fork 619
Commit
Here is a link to minor modifications to the source: kubernetes/kubernetes#43578 Signed-off-by: Vinothkumar Siddharth <[email protected]>
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ | |
This file is derived from the Kubernetes Project, Copyright 2016 The Kubernetes Authors. | ||
The original code may be found at: | ||
https://github.com/kubernetes/kubernetes/blob/c25c186ec544cf3501a31e77e8fbabce7b138b49/build/pause/pause.c | ||
https://github.com/kubernetes/kubernetes/blob/17b22cb01c647d50ed186c8a94f9c7aa2d9bcd2e/build/pause/pause.c | ||
Copyright 2016 The Kubernetes Authors. | ||
Licensed under the Apache License, Version 2.0 (the "License"); | ||
|
@@ -29,14 +29,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"); | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
vsiddharth
Author
Contributor
|
||
|
||
if (sigaction(SIGINT, &(struct sigaction){.sa_handler = sigdown}, NULL) < 0) | ||
return 1; | ||
|
Just deleting "in a pod" makes this warning confusing. Perhaps we should say "in a task" or "in a container group". It's certainly not the first process on the instance.