Configurable timeout in rlm_exec

Philipp Hug philipp at hug.cx
Mon Sep 24 10:24:31 CEST 2012


Hi list,

Currently rlm_exec has a hardcoded timeout of 10s when waiting for
termination of the executed command.
We have a case where this is is not enough and I'd like to have it
configurable.

I changed the following:
A new timeout argument is added to exec_program:

 int radius_exec_program(const char *cmd, REQUEST *request,
                        int exec_wait,
+                       int timeout,
                        ...);

In all other invocations of radius_exe_program where there's no
configuration option the following constant is used:
+#define RADIUS_EXEC_DEFAULT_TIMEOUT 10

I could have also renamed the exec_wait to timeout and use a special value
(e.g. 0) as a timeout to create the same behavior.

Any comments?

btw: I'll send the patch as a separate mail.

Philipp
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freeradius.org/pipermail/freeradius-devel/attachments/20120924/337653d9/attachment.html>


More information about the Freeradius-Devel mailing list