Deamon for Linux, in Python

Jp Calderone exarkun at intarweb.us
Wed Feb 26 13:31:14 EST 2003


On Wed, Feb 26, 2003 at 06:40:16PM +0100, Benne wrote:
> Well - I looked at the sites you gave me, but it didn't make any sence to
> me (or am I just tiered?) What I have to do, is to make a small daemon,
> which fetch som data from a website (using httplib), and listen for some
> incoming TCP-connections. I got that right, but the daemon-part is really
> hard to swollow... It has to be without any extention-libs, cause it has
> to run on different machines, so if I can get some sourcecode or examples,
> it would be really great :o)

  Daemonization in Python is the same as daemonization in C, basically just
make calls to fork(), setpgid(), close(), and exit().  Twisted's "twistd"
daemon does this, so you could look at the source for it to see how, or
*use* twistd, as it is meant for exactly this purpose, daemonizing
applications.

  Jp

-- 
C/C++/Java/Perl/Python/Smalltalk/PHP/ASP/XML/Linux (User+Admin)
Genetic Algorithms/Genetic Programming/Neural Networks
Networking/Multithreading/Legacy Code Maintenance/OpenGL
See my complete resume at http://intarweb.us:8080/
-- 
 up 17 days, 22:29, 1 user, load average: 0.13, 0.13, 0.15
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 196 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/python-list/attachments/20030226/fe5731ae/attachment.sig>


More information about the Python-list mailing list