Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win


call a program as an inetd service

Posted on 2003-12-09
Medium Priority
Last Modified: 2010-04-21
   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.

Question by:ttsenis
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
LVL 51

Expert Comment

ID: 9904671
any executable can be called from inetd, as long as it does not  access ttys and terminates succesfull

Author Comment

ID: 9905956
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.
LVL 51

Expert Comment

ID: 9906048
> .. 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

Expert Comment

ID: 9912365
"so in case of a program failure (program terminates) to restart it again. "

are the progam(s) to be restarted network apps?
LVL 40

Accepted Solution

jlevie earned 150 total points
ID: 9912377
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.

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Over the last ten+ years I have seen Linux configuration tools come and go. In the early days there was the tried-and-true, all-powerful linuxconf that many thought would remain the one and only Linux configuration tool until the end of times. Well,…
Linux users are sometimes dumbfounded by the severe lack of documentation on a topic. Sometimes, the documentation is copious, but other times, you end up with some obscure "it varies depending on your distribution" over and over when searching for …
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
Suggested Courses

618 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question