Path: utzoo!utgpu!news-server.csri.toronto.edu!bonnie.concordia.ca!thunder.mcrcim.mcgill.edu!mouse From: mouse@thunder.mcrcim.mcgill.edu (der Mouse) Newsgroups: comp.unix.questions Subject: Re: Create an inetd sub-server Keywords: inetd, service, server Message-ID: <1991Jul1.005555.11519@thunder.mcrcim.mcgill.edu> Date: 1 Jul 91 00:55:55 GMT References: <1991Jun25.071855.20102@grasp1.univ-lyon1.fr> Organization: McGill Research Centre for Intelligent Machines Lines: 40 In article <1991Jun25.071855.20102@grasp1.univ-lyon1.fr>, wolf@grasp1.univ-lyon1.fr (Christophe Wolfhugel) writes: > I wish to create a new service working under inetd that, as with > telnet,ftp does stdio with the peer. > So I created a small program that does nothing except printf a text + > fflush(stdout). > [This works.] > I added a service in /etc/services similar to telnet, with a new name > and a new port number (I tried unused priviledges and non priviledged > port nulmbers). > I added a line in /etc/inetd.conf pointing to my program for the new > defined service and refreshed inetd. Some inetds don't do the right thing with SIGHUP; try killing and restarting inetd. Also, if you did this too soon after killing off the old daemon, there may be a stray socket lying around that hasn't timed out yet. > telnet host new_service hangs, as if inetd could not start the > application (the connection is established). If inetd can't start the daemon, you will normally see the connection succeed and then close instantly. Something else is probably hanging. > Did I miss an important step? Did you remember to fix the daemon so it expects the connection to be already established on file descriptor 0 instead of trying to do the dance with socket, bind, accept, etc? der Mouse old: mcgill-vision!mouse new: mouse@larry.mcrcim.mcgill.edu