On Mon, 01 Feb 2010 01:26:23 -0600, Alvaro Mantilla Gimenez wrote:
>  I need to create a perl daemon that split in two process (each has
> different data input) and then they split in as many child
> (fork)/threads as need it.
> 
>                 Daemon
>                    |
>            -----------------
>            |               |
>         Process 1       Process 2
>            |               |
>     --------------    ---------------
>     |      |     |     |      |      |
> child1 child2 childn child1 child2  childn
> 
>  I would like to know which is the best approach for create the daemon
> (Proc::Simple, Proc::Daemon, etc...) and some recommendation about the
> fork/thread question (which one: forks or threads? why? some example?).

I've been using Working::Daemon lately; it does the proper double fork/
setsid method of daemonization.  As to processes vs threads, that really 
depends on how many children, how long they will live, what sort of 
communication they need to do with parents or each other.

Describe your application in more detail, please.

-- 
Peter Scott
http://www.perlmedic.com/
http://www.perldebugged.com/
http://www.informit.com/store/product.aspx?isbn=0137001274

-- 
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/


Reply via email to