From: Alan T. DeKok Date: Tue, 24 Mar 2020 17:42:18 +0000 (-0400) Subject: remove rad_fork(). It's no longer used X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=60beea2afdc10f3ec583e15baa135d0ab2e5ddc2;p=thirdparty%2Ffreeradius-server.git remove rad_fork(). It's no longer used --- diff --git a/src/lib/server/exec.c b/src/lib/server/exec.c index 63cbd05178c..0e772da6b62 100644 --- a/src/lib/server/exec.c +++ b/src/lib/server/exec.c @@ -59,7 +59,6 @@ static pid_t waitpid_wrapper(pid_t pid, int *status) return waitpid(pid, status, 0); } -pid_t (*rad_fork)(void) = fork; pid_t (*rad_waitpid)(pid_t pid, int *status) = waitpid_wrapper; typedef struct { @@ -242,12 +241,7 @@ pid_t radius_start_program(char const *cmd, REQUEST *request, bool exec_wait, } } - if (exec_wait) { - pid = rad_fork(); /* remember PID */ - } else { - pid = fork(); /* don't wait */ - } - + pid = fork(); if (pid == 0) { int devnull; diff --git a/src/lib/server/exec.h b/src/lib/server/exec.h index 6b5709ed9dd..ba1c1ce9eb1 100644 --- a/src/lib/server/exec.h +++ b/src/lib/server/exec.h @@ -33,7 +33,6 @@ extern "C" { #define EXEC_TIMEOUT 10 //!< Default wait time for exec calls (in seconds). -extern pid_t (*rad_fork)(void); extern pid_t (*rad_waitpid)(pid_t pid, int *status); #ifdef __cplusplus