call a program as an inetd service

   i am searching a way to call a program through inetd. I do not know if  i can use a script so that the inetd calls as service the correspond script and the script then calls the program. Nevertheless i would appreciate a help on this puzzle.

Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

any executable can be called from inetd, as long as it does not  access ttys and terminates succesfull
ttsenisAuthor Commented:
Well to be more precise my main interest is to run the program through an inetd script so in case of a program failure (program terminates) to restart it again. So the main interest is to run a script as a daemon and the script to call the program. In a case descriped above do i still have the limitation of not accessing the ttys. Also a second matter is the port. Does inetd calls the script in case a demand appears at the specified port, are it calls it at boot time.

   Regards Teo.
> .. program failure (program terminates) to restart it again.
that's what inetd is for !

> Does inetd calls the script in case a demand appears at the specified port?

>  are it calls it at boot time.
depends, see above
"so in case of a program failure (program terminates) to restart it again. "

are the progam(s) to be restarted network apps?
Hmmm, inetd only runs a program when a connection is opened to the port associated with the service. So if the program is managed by inetd it will only be started when someone connects to the port. If the program exits for some reason inetd will not re-start it until the next incoming connection. If your goal is just to always have this program running you need to look into running it from inittab.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.