forkfd/linux: handle failure from sys_clone
Pick-to: 5.15 Change-Id: I98a28a816fdc089cefcbf8f42053ddffedc10cdf Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>bb10
parent
5dc4004afc
commit
b7bdd854cb
|
|
@ -151,6 +151,8 @@ int system_forkfd(int flags, pid_t *ppid, int *system)
|
|||
if (flags & FFD_VFORK_SEMANTICS)
|
||||
cloneflags |= CLONE_VFORK;
|
||||
pid = sys_clone(cloneflags, &pidfd);
|
||||
if (pid < 0)
|
||||
return pid;
|
||||
if (ppid)
|
||||
*ppid = pid;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue