actually I already fixed the problem by changing child_pid <=0 to childpid < 0 since as far as I know usually child pid is 0 ? or at least that was why it was not waiting for checkrad because I put a logging line inside the most inner if clause and the child_pid was always 0 but now when I set <= to < I see that it stops when childpid==pid. Now it is working fine I guess...
/* * Parent - Wait for checkrad to terminate. * We timeout in 10 seconds. */ child_pid = -1; for (n = 0; n < 10; n++) { sleep(1); child_pid = rad_waitpid(pid, &status, WNOHANG); if ((child_pid <= 0) || (child_pid == pid)) { found = 1; break; } } About CVS. I dont usually track software with CVS since I believe the latest is not usually the most stable. But thanks for the advice =) Evren On Tue, 3 Dec 2002, Alan DeKok wrote: > Evren Yurtesen <[EMAIL PROTECTED]> wrote: > > Now checkrad is working but freeradius doesnt wait for the result of > > checkrad before authenticating! it passes it immediately almost in half a > > second even though checkrad takes about 1 second to complete... > > I think there's an issue related to checkrad in 0.8. If you're > familiar with CVS, try doing a checkout of the release_0_9_0 branch, > as that contains fixes. > > I think a 0.8.1 release would be useful pretty soon. > > Alan DeKok. > > - > List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html > - List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html