in reply to Re: Address Bind issue reincarnation
in thread Address Bind issue reincarnation

Hi almut,

Thanks a lot for your reply. I did reconfirm my daemon process and then realized I had used the daemon manually once using " /tmp/server.pl & ".

Also, by the mean time i read in detail about xinetd and socket programming and came to knw what u mentioned abt communication via stdin/stdout. So, my error is very obvious.

You had mentioned about inetd. I have started reading about it. But, will it help me make a daemon process for my script. I will be experimenting with that today and let you know.

Replies are listed 'Best First'.
Re^3: Address Bind issue reincarnation
by almut (Canon) on Jul 16, 2010 at 06:25 UTC
    You had mentioned about inetd. I have started reading about it. But, will it help me make a daemon process for my script.

    Just to avoid misunderstandings: don't use inetd if you have xinetd.  Essentially, they serve the same purpose, but xinetd is the more modern, more secure incarnation. — I just linked to inetd, because the respective wikipedia page for xinetd didn't have the crucial bit of info about stdin/stdout...

    P.S.: in case you want to run your script persistently as a regular standalone daemon (not managed by xinetd, thus doing networking itself), you might be interested in daemontools.  In this case, you'd have to add an accept loop to your script, though.

      Hi almut,

      I wished to use xinetd first, but since my server code i wrote is using socket functions, so the communication is not through stdin/stdout which brings me to the 'Address bind' issue

      I am trying another approach of making a standalone daemon. The goal is to make a server daemon listening to a port continuously.

      I read the links you sent me, thanks a lot. I am thinking now to make a script in /etc/init.d/ and define a run level for it. What do you say?

        I am thinking now to make a script in /etc/init.d/ and define a run level for it.

        Sounds like a good plan :)   (in case you don't want to use daemontools for some reason, that is)

        See runlevel if you need ideas on which one to choose.