xinetd or any other suggestion
dsr at tao.merseine.nu
dsr at tao.merseine.nu
Mon Apr 11 09:04:48 EDT 2005
On Sun, Apr 10, 2005 at 03:28:00PM -0400, Anand Rao wrote:
> hi ,
> I have a text based interactive application that I need to run on a
> port.
>
> I had read some articles regarding the usage of xinet or inetd for
> this purpose .. any Good pointers or suggestions to start on this ?
Since you have the application already, the easiest thing to do
is to use something which will translate from stdio to TCP
sockets.
One such is tcpserver, part of the ucspi-tcp package.
http://cr.yp.to/ucspi-tcp/tcpserver.html
Another is netcat: http://netcat.sourceforge.net/
As you have mentioned, inetd can also do this. For inetd, add a
line to inetd.conf in this format:
<service_name> <sock_type> <proto> <flags> <user> <server_path> <args>
service_name is a port number defined in /etc/services. You can
add your own to this; I recommend a number over 1024.
sock_type is almost certainly stream
proto will almost certainly be tcp
the only flag you will want is "nowait"
user is the user who will run the program
server_path is the complete path to the executable
args are any arguments you need to pass.
Don't run anything as root.
-dsr-
More information about the Discuss
mailing list