summaryrefslogtreecommitdiffstats
path: root/src/3rdparty
diff options
context:
space:
mode:
authorAndreas Schwab <schwab@suse.de>2020-06-19 10:49:17 +0200
committerThiago Macieira <thiago.macieira@intel.com>2020-06-23 23:44:14 +0000
commitb7bdd854cbca47398e081a788eb339a21a684ead (patch)
tree6fdb706ecfd6d97b10b4937a0f77c7c90e430d15 /src/3rdparty
parent5dc4004afc05f2ccfda3421a61b9f91c5cbcc640 (diff)
forkfd/linux: handle failure from sys_clone
Pick-to: 5.15 Change-Id: I98a28a816fdc089cefcbf8f42053ddffedc10cdf Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/3rdparty')
-rw-r--r--src/3rdparty/forkfd/forkfd_linux.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/3rdparty/forkfd/forkfd_linux.c b/src/3rdparty/forkfd/forkfd_linux.c
index c4f723343f..f29b7c4262 100644
--- a/src/3rdparty/forkfd/forkfd_linux.c
+++ b/src/3rdparty/forkfd/forkfd_linux.c
@@ -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;