summaryrefslogtreecommitdiff
path: root/radsecproxy.c
diff options
context:
space:
mode:
authorvenaas <venaas>2008-06-02 13:56:29 +0000
committervenaas <venaas@e88ac4ed-0b26-0410-9574-a7f39faa03bf>2008-06-02 13:56:29 +0000
commit82b55cc05184e96d968788fbbcfc6e9326099ba5 (patch)
treeafb37335a6e1ccd6f34fff6b4e0ecec2df4f9918 /radsecproxy.c
parent990387e14440d988aab1850e756bdc84626b3a45 (diff)
checking exit code from dynsrvlookup
git-svn-id: https://svn.testnett.uninett.no/radsecproxy/trunk@272 e88ac4ed-0b26-0410-9574-a7f39faa03bf
Diffstat (limited to 'radsecproxy.c')
-rw-r--r--radsecproxy.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/radsecproxy.c b/radsecproxy.c
index 5802b1f..a503439 100644
--- a/radsecproxy.c
+++ b/radsecproxy.c
@@ -2901,7 +2901,7 @@ void adddynamicrealmserver(struct realm *realm, struct clsrvconf *conf, char *id
}
void dynamicconfig(struct server *server) {
- int ok, fd[2];
+ int ok, fd[2], status;
pid_t pid;
struct clsrvconf *conf = server->conf;
struct gconffile *cf = NULL;
@@ -2937,10 +2937,15 @@ void dynamicconfig(struct server *server) {
);
freegconf(&cf);
- if (waitpid(pid, NULL, 0) < 0) {
+ if (waitpid(pid, &status, 0) < 0) {
debug(DBG_ERR, "dynamicconfig: wait error");
goto errexit;
}
+
+ if (status) {
+ debug(DBG_INFO, "dynamicconfig: command exited with status %d", WEXITSTATUS(status));
+ goto errexit;
+ }
if (ok)
return;