Solved

call a program as an inetd service

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

Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

Question has a verified solution.

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

Suggested Solutions

I am a long time windows user and for me it is normal to have spaces in directory and file names. Changing to Linux I found myself frustrated when I moved my windows data over to my new Linux computer. The problem occurs when at the command line.…
SSH (Secure Shell) - Tips and Tricks As you all know SSH(Secure Shell) is a network protocol, which we use to access/transfer files securely between two networked devices. SSH was actually designed as a replacement for insecure protocols that sen…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
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

732 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