I found a good example using both threads and forks to accomplish a basic script that I thought I&#39;d pass along.<div><br></div><div><a href="https://wiki.bc.net/atl-conf/pages/viewpage.action?pageId=20548191">https://wiki.bc.net/atl-conf/pages/viewpage.action?pageId=20548191</a></div>
<div><br></div><div>Greg<br><br><div class="gmail_quote">On Fri, Mar 11, 2011 at 12:11 PM, Michael Peters <span dir="ltr">&lt;<a href="mailto:mpeters@plusthree.com">mpeters@plusthree.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class="im">On 03/11/2011 10:00 AM, Brian Weaver wrote:<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
I don&#39;t know about using threads, but if you want multiple instances with each working on a single device then why not use a master-child process model? Have the master fork off N children and maintain a link using anonymous pipes, unix sockets, or some other IPC mechanism. The master can inform each child on what system to query and then receive a status back from the child when it&#39;s done.<br>

</blockquote>
<br></div>
I agree that you should use processes instead of threads. Threads are ok in Perl but processes are better and since processes are COW in Linux you end up having about the same amount of overhead.<br>
<br>
But instead of writing your own from scratch, I&#39;d look to CPAN (Perl&#39;s biggest weapon) to find something to handle all of the gory bits for you. I like Parallel::ForkManager<br><font color="#888888">
<br>
-- <br>
Michael Peters<br>
Plus Three, LP</font><div><div></div><div class="h5"><br>
_______________________________________________<br>
Trilug-ontopic mailing list<br>
<a href="mailto:Trilug-ontopic@trilug.org" target="_blank">Trilug-ontopic@trilug.org</a><br>
<a href="http://www.trilug.org/mailman/listinfo/trilug-ontopic" target="_blank">http://www.trilug.org/mailman/listinfo/trilug-ontopic</a><br>
</div></div></blockquote></div><br></div>