Solved

call a program as an inetd service

Posted on 2003-12-09
5
351 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
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 50 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
change time in cron 4 65
LINUX CENTOS + APACHE 9 61
Linux  Script File Attributes 5 52
Video Streaming 6 56
Little introduction about CP: CP is a command on linux that use to copy files and folder from one location to another location. Example usage of CP as follow: cp /myfoder /pathto/destination/folder/ cp abc.tar.gz /pathto/destination/folder/ab…
Fine Tune your automatic Updates for Ubuntu / Debian
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
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.:

911 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

Need Help in Real-Time?

Connect with top rated Experts

24 Experts available now in Live!

Get 1:1 Help Now