in reply to Using Sockets
It is fairly simple to make your server run as a daemon. See Super Search on 'daemon' for examples. The basic steps are to fork, exit the parent, and in the child close unneeded file handles, become session leader with &POSIX::setsid, change directory to /, and adjust umask to zero.
Such a daemon should select or use IO::Select to wait for its socket to become readable. The effect is to make the daemon sleep until there is work for it to do.
After Compline,
Zaxo
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Using Sockets
by grep (Monsignor) on Oct 28, 2002 at 02:57 UTC |