radiusd.c (1.16) question...

Victor Muslin (vmuslin@wp.prodigy.com)
Mon, 16 Oct 1995 20:58:25 -0400 (EDT)

I am reading through radiusd.c (v1.16) by Livingston and I am confused
by rad_spawn_child()...

Seems the function forks a child for each authetnication request and
at the same time puts the request structure on the queue in order to
(a) discard duplicate packets and (b) track hung child processes...

Ok, when removing the old request, why check the second time around:

if (curreq->child_pid == -1 &&
curreq->timestamp + CLEANUP_DELAY <= curtime) {
...
}

Why not just:

if (curreq->child_pid == -1) {
...
}

If curreq->child_pid is -1, then does this not automatically mean that
the request aged more than MAX_REQUEST_TIME, which is greater than
CLEANUP_DELAY?

Why call no-op function sig_hup()?

Thanks.

+---------------------------------------------------------------+
| Victor Muslin | |
| Prodigy Services Company | Voice: (914) 448-4737 |
| 445 Hamilton Avenue, H11A | Fax: (914) 448-8133 |
| Whilte Plains, NY 10601 | Internet: vmuslin@prodigy.com |
+-----------------------------+---------------------------------+