launching freeradius from another program

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

launching freeradius from another program

Bill Schoolfield
Maybe the wrong forum for this. Has anyone ever gotten freeradius to
launch from another executable successfully? I have a cgi written in C
that starts and stops radius (as well as populates tables, etc.). I can
get it to work but no matter what I do I can't seem to keep it from
generating a zombie process for the cgi (when starting; stopping is OK)

The cgi does a fork and exec of a process and that child process does in
turn a fork and exec of a radius launch script. Overly complicated but
that's the nature of our system (cgi handles general form processing,
first child does various tasks for freeradius; one of which is starting
and stopping the server). If I substitute another process I don't get
the zombie.

Bill

-
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
Reply | Threaded
Open this post in threaded view
|

Re: launching freeradius from another program

Eugene Grosbein
20.05.2017 5:29, Bill Schoolfield пишет:
> Maybe the wrong forum for this. Has anyone ever gotten freeradius to launch from another executable successfully? I have a cgi written in C that starts and stops radius (as well as populates tables, etc.). I can get it to work but no matter what I do I can't seem to keep it from generating a zombie process for the cgi (when starting; stopping is OK)
>
> The cgi does a fork and exec of a process and that child process does in turn a fork and exec of a radius launch script. Overly complicated but that's the nature of our system (cgi handles general form processing, first child does various tasks for freeradius; one of which is starting and stopping the server). If I substitute another process I don't get the zombie.

Zombies hanging aroung generally means that parent process of the zombie is guilty:
it does not call any of wait*() family functions to reap zombie.
It is solely parent's responsibility to do so.

Generally, if parent dies without call for wait() for its child,
an operating system cleans for it. But not before that.

You should fix parent process.



-
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html