>> open() executed once. but while we failed to get lock at first try, >> close(outfd) executed and all the subsequent attempts to lock file >> fails >> >> i comment line 293 out.
> I don't understand why this helps. We open the file at the beginning > of the do..while() loop, so it should be fine. err. sorry. source of snapshot are like to freeradius-1.1.2 (rlm_detail.c,v1.37.2.1.2.1 2006/04/19). i miss that open() was moved inside loop :( > BTW if you remove the close() line 293 you're leaking one file descriptor > each time the lock fails. i use stable 1.1.2, not snapshot. there open() called before do-while loop in this version. close() executed every iteration. so i have to comment close() in block if (rad_lockfd_nonblock(outfd, 0) < 0) { close(outfd); tv.tv_sec = 0; tv.tv_usec = 25000; select(0, NULL, NULL, NULL, &tv); lock_count++; } for correct work. sorry again. Mike. - List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html