Start a program with inetd

Hello,

I have a smal problem getting started my own program by the inetd.

To test I made a smal “Hello World” program to test.

I inserted in the /etc/services file : gsm 1280/tcp
I inserted in the /etc/inetd.conf file : gsm stream tcp wait root
/executable/inetd_test in.inetd_test

I started the inetd with the debug option (-d).
If I now try to connetct to port 1280 from another computer the console
window shows me :

someone wants gsm
spawn (/executable/inetd_test): pid 15101991
15101991 reaped
restored gsm, fd8

But there is no “Hello World” output on the screen.
The same happen if i start a program which works as server waiting for a
socket connection.
In this program i use “listen” and “accept”. If I start manualy this program
it works flawless.

I hope someone can help me.

Thank You

“Cipriano Patrik” <pciprian@bluewin.ch> wrote in message
news:ah3m2n$73r$1@inn.qnx.com

Hello,

I have a smal problem getting started my own program by the inetd.

To test I made a smal “Hello World” program to test.

I inserted in the /etc/services file : gsm 1280/tcp
I inserted in the /etc/inetd.conf file : gsm stream tcp wait root
/executable/inetd_test in.inetd_test

I started the inetd with the debug option (-d).
If I now try to connetct to port 1280 from another computer the console
window shows me :

someone wants gsm
spawn (/executable/inetd_test): pid 15101991
15101991 reaped
restored gsm, fd8

But there is no “Hello World” output on the screen.

That’s to be expected. Program started by inetd normaly have their
stdin and stdout used as the socket pass down by inetd. Hence
your Hello World is most probably sent on the socket connection.
Try using telnet to connect to the 1280 port and I bet you will
see Hello World in telnet.

The same happen if i start a program which works as server waiting for a
socket connection.
In this program i use “listen” and “accept”. If I start manualy this
program
it works flawless.

I hope someone can help me.

Thank You

This didn’t help. No display on the Telnet screen and still the same
message on
the QNX computer.



“Mario Charest” postmaster@127.0.0.1 wrote in message
news:ah3ppg$a9a$3@inn.qnx.com

“Cipriano Patrik” <> pciprian@bluewin.ch> > wrote in message
news:ah3m2n$73r$> 1@inn.qnx.com> …
Hello,

I have a smal problem getting started my own program by the inetd.

To test I made a smal “Hello World” program to test.

I inserted in the /etc/services file : gsm 1280/tcp
I inserted in the /etc/inetd.conf file : gsm stream tcp wait root
/executable/inetd_test in.inetd_test

I started the inetd with the debug option (-d).
If I now try to connetct to port 1280 from another computer the console
window shows me :

someone wants gsm
spawn (/executable/inetd_test): pid 15101991
15101991 reaped
restored gsm, fd8

But there is no “Hello World” output on the screen.

That’s to be expected. Program started by inetd normaly have their
stdin and stdout used as the socket pass down by inetd. Hence
your Hello World is most probably sent on the socket connection.
Try using telnet to connect to the 1280 port and I bet you will
see Hello World in telnet.

The same happen if i start a program which works as server waiting for a
socket connection.
In this program i use “listen” and “accept”. If I start manualy this
program
it works flawless.

I hope someone can help me.

Thank You
\