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

x
?
Solved

call a program as an inetd service

Posted on 2003-12-09
5
Medium Priority
?
364 Views
Last Modified: 2010-04-21
Hi,
   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.

   Regards,
     Teo.
0
Comment
Question by:ttsenis
[X]
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
5 Comments
 
LVL 51

Expert Comment

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

Author Comment

by:ttsenis
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.
0
 
LVL 51

Expert Comment

by:ahoffmann
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?
yes

>  are it calls it at boot time.
depends, see above
0
 
LVL 1

Expert Comment

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

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

Accepted Solution

by:
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.
0

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