inetd confusion
- From: CptDondo <yan@xxxxxxxxxxxxxxxx>
- Date: Tue, 28 Nov 2006 15:51:38 -0800
I am trying to implement a simple daemon that sits behind inetd.
It is fed a single string of chars, spits back an answer, and then exits.
The inted.conf line reads:
502 stream tcp wait /bin/mbtcpgw mbtcpgw
If I understand this correctly, inetd should only allow a single connection to port 502 at a time. It should also close the connection (generate an EOF?) when the client disconnects.
My daemon is using fgets(buffer, 512, stdin) to read the string.
I am seeing two problems:
1. When I connect and disconnect, the daemon never sees a EOF, so it hangs, and never exits.
2. Inetd is not issuing any 'connection refused' messages; AFAICT it still allows new connections to port 502, but doesn't start any new instances of mbtcpgw.
Before I go reinventing the wheel, is my understanding of inetd function faulty?
--Yan
.
- Prev by Date: Re: Which OS/Webserver do most ISPs use?
- Next by Date: A new reader? Welcome to comp.os.linux.misc, read this first if you're new here (FAQ)
- Previous by thread: Happy 21'st "Interface Manager"
- Index(es):
Relevant Pages
|