mirror of
https://github.com/checkpoint-restore/criu
synced 2025-08-29 13:28:27 +00:00
x86/crtools: Add fork() err-path handle
Error-path for failed fork(). Looks originally forgotten, oops! Also print a message on failed fork(). Signed-off-by: Dmitry Safonov <dima@arista.com>
This commit is contained in:
parent
5a7248bda2
commit
8dcc764b86
@ -40,8 +40,10 @@ int kdat_can_map_vdso(void)
|
|||||||
* it for criu accidentally.
|
* it for criu accidentally.
|
||||||
*/
|
*/
|
||||||
child = fork();
|
child = fork();
|
||||||
if (child < 0)
|
if (child < 0) {
|
||||||
|
pr_perror("%s(): failed to fork()", __func__);
|
||||||
return -1;
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
if (child == 0) {
|
if (child == 0) {
|
||||||
int ret;
|
int ret;
|
||||||
@ -150,6 +152,11 @@ static int has_32bit_mmap_bug(void)
|
|||||||
pid_t child = fork();
|
pid_t child = fork();
|
||||||
int stat;
|
int stat;
|
||||||
|
|
||||||
|
if (child < 0) {
|
||||||
|
pr_perror("%s(): failed to fork()", __func__);
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
if (child == 0)
|
if (child == 0)
|
||||||
mmap_bug_test();
|
mmap_bug_test();
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user