mirror of
https://github.com/checkpoint-restore/criu.git
synced 2026-07-28 20:42:49 +00:00
test/libcriu: inlude all required headers
Reported-by: Mr Jenkins Signed-off-by: Andrew Vagin <avagin@openvz.org> Acked-by: Ruslan Kuprieiev <rkuprieiev@cloudlinux.com> Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
This commit is contained in:
parent
4eb0952c0e
commit
2fbf267bfe
4 changed files with 14 additions and 2 deletions
|
|
@ -5,6 +5,9 @@
|
|||
#include <fcntl.h>
|
||||
#include <errno.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <signal.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#define PID_MAX "/proc/sys/kernel/pid_max"
|
||||
|
||||
|
|
|
|||
|
|
@ -6,6 +6,8 @@
|
|||
#include <signal.h>
|
||||
#include <fcntl.h>
|
||||
#include <sys/stat.h>
|
||||
#include <sys/wait.h>
|
||||
#include <unistd.h>
|
||||
#include "lib.h"
|
||||
|
||||
static int wdir_fd, cur_iter = 1, cur_imgdir = -1;
|
||||
|
|
@ -115,7 +117,7 @@ int main(int argc, char **argv)
|
|||
}
|
||||
|
||||
printf(" `- Dump succeeded\n");
|
||||
wait(pid, NULL, 0);
|
||||
waitpid(pid, NULL, 0);
|
||||
|
||||
printf("--- Restore loop ---\n");
|
||||
criu_init_opts();
|
||||
|
|
|
|||
|
|
@ -4,6 +4,10 @@
|
|||
#include <errno.h>
|
||||
#include <stdlib.h>
|
||||
#include <signal.h>
|
||||
#include <unistd.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/wait.h>
|
||||
|
||||
#include "lib.h"
|
||||
|
||||
#define SUCC_ECODE 42
|
||||
|
|
|
|||
|
|
@ -4,6 +4,9 @@
|
|||
#include <errno.h>
|
||||
#include <stdlib.h>
|
||||
#include <signal.h>
|
||||
#include <unistd.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/wait.h>
|
||||
#include "lib.h"
|
||||
|
||||
static int stop = 0;
|
||||
|
|
@ -78,7 +81,7 @@ int main(int argc, char **argv)
|
|||
}
|
||||
|
||||
printf(" `- Dump succeeded\n");
|
||||
wait(pid, NULL, 0);
|
||||
waitpid(pid, NULL, 0);
|
||||
|
||||
printf("--- Restore loop ---\n");
|
||||
criu_init_opts();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue