John L Fjellstad wrote:
> Dirk <[EMAIL PROTECTED]> writes:
> 
> 
>>I know inetd forwards a programms (servers) stdout to the client... but
>>where does it forward the requests from a client to? It's not stdin..
>>
>>
>>It there any simple example server available that was written to work
>>with inetd?
> 
> 
> There is Stephens' UNIX Network Prgramming, vol 1, 2nd edition.
> 
> To summarize:
> inetd listen to some given port (given by /etc/inetd.conf).
> When a connection happens, inetd forks the server. The child process
> closes all the file descriptos except for the new socket connection. It
> call dup2() three times, duplicating 0, 1, 2 (stdin, stout,
> stderr). Closes the socket.  Child exec() the server.  The server
> therefore uses stdin, stdout, and stderr to communicate with the other
> side. 
> At the parent, the parent (inetd) closes the socket.
> 
> I think proftpd can work with inetd.
> 

that's exactly how i do it... but somehow my server does not get an
eof() from stdin :-(

he reads the http request from stdin but continues forever trying to get
more stuff from it...

Dirk


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to