in reply to Re^2: Creating a Server daemon in Socket Prograaming
in thread [SOLVED]Creating a Server daemon in Socket Programming

the port 7890 i am using is not being elsewhere. The port is free.
Are you sure? It seems your system thinks otherwise. How do you know what the port is free? Have you checked netstat -a |grep 7890?

Generally useful error messages are... useful. If it says the port is in use, it probably is.
  • Comment on Re^3: Creating a Server daemon in Socket Prograaming

Replies are listed 'Best First'.
Re^4: Creating a Server daemon in Socket Prograaming
by sajanagr (Acolyte) on Jul 12, 2010 at 11:57 UTC
    Hi

    Thanks for the reply.

    The port is free. The code server.pl works fine when i run perl server.pl and close the service name "sajan".

    netstat -a |grep 7890 -> resulted nothing,means its free.

    The main deal i am trying here is the server to continuously run the server.pl code as daemon. Any alternatives than xinetd or any points where I should proceed ?

      If it is linux, I would look into inetd/xinetd. If it's Solaris, I'd recommend using an SMF service. There are probably plenty of daemon modules around, but I've never used any of them. As always in Perl, there is more than one way to do it.