mirror of
https://github.com/checkpoint-restore/criu.git
synced 2026-07-18 00:58:31 +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> Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
This commit is contained in:
parent
f89aa7f35b
commit
3b71b95a19
1 changed files with 8 additions and 1 deletions
|
|
@ -40,8 +40,10 @@ int kdat_can_map_vdso(void)
|
|||
* it for criu accidentally.
|
||||
*/
|
||||
child = fork();
|
||||
if (child < 0)
|
||||
if (child < 0) {
|
||||
pr_perror("%s(): failed to fork()", __func__);
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (child == 0) {
|
||||
int ret;
|
||||
|
|
@ -150,6 +152,11 @@ static int has_32bit_mmap_bug(void)
|
|||
pid_t child = fork();
|
||||
int stat;
|
||||
|
||||
if (child < 0) {
|
||||
pr_perror("%s(): failed to fork()", __func__);
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (child == 0)
|
||||
mmap_bug_test();
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue