From: Arran Cudbard-Bell Date: Mon, 7 Dec 2020 15:36:23 +0000 (-0700) Subject: Deal with failed fork X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=5d685f89334624652c0f0bdd87506d4fbc1bec3b;p=thirdparty%2Ffreeradius-server.git Deal with failed fork --- diff --git a/scripts/jlibtool.c b/scripts/jlibtool.c index 69733787122..a122dd2beb7 100644 --- a/scripts/jlibtool.c +++ b/scripts/jlibtool.c @@ -611,6 +611,10 @@ static int external_spawn(command_t *cmd, char const *file, char const **argv) if (spawn_pid == 0) { return execvp(argv[0], (char**)argv); } + else if (spawn_pid < 0) { + fprintf(stderr, "Failed fork: %s\n", strerror(errno)); + return -1; + } else { int status;