mirror of
https://github.com/ceph/ceph-csi.git
synced 2025-06-14 18:53:35 +00:00
vendor updates
This commit is contained in:
21
vendor/k8s.io/kubernetes/build/pause/pause.c
generated
vendored
21
vendor/k8s.io/kubernetes/build/pause/pause.c
generated
vendored
@ -17,20 +17,37 @@ limitations under the License.
|
||||
#include <signal.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/wait.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#define STRINGIFY(x) #x
|
||||
#define VERSION_STRING(x) STRINGIFY(x)
|
||||
|
||||
#ifndef VERSION
|
||||
#define VERSION HEAD
|
||||
#endif
|
||||
|
||||
static void sigdown(int signo) {
|
||||
psignal(signo, "Shutting down, got signal");
|
||||
exit(0);
|
||||
}
|
||||
|
||||
static void sigreap(int signo) {
|
||||
while (waitpid(-1, NULL, WNOHANG) > 0);
|
||||
while (waitpid(-1, NULL, WNOHANG) > 0)
|
||||
;
|
||||
}
|
||||
|
||||
int main() {
|
||||
int main(int argc, char **argv) {
|
||||
int i;
|
||||
for (i = 1; i < argc; ++i) {
|
||||
if (!strcasecmp(argv[i], "-v")) {
|
||||
printf("pause.c %s\n", VERSION_STRING(VERSION));
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
if (getpid() != 1)
|
||||
/* Not an error because pause sees use outside of infra containers. */
|
||||
fprintf(stderr, "Warning: pause should be the first process\n");
|
||||
|
Reference in New Issue
Block a user