mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-30 06:54:01 +00:00
Merge pull request #43578 from vsiddharth/pause-container
Automatic merge from submit-queue Improve pause-container warning message Signed-off-by: Vinothkumar 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 ```
This commit is contained in:
commit
e7b1814863
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user