Hello, I stumbled across Poe while asking how to accomplish something in comp.lang.perl.misc and from what I read so far this is one great project (now if I can get my basic perl skills around how it works). >From what I have read so far I think Poe will work for what I want to do ( i have read over the cookbook process management examples). What I have is a program I built with net-snmp and dbi/mysql that will discover/inventory a network. The scheduler program checks the queue in the mysql database for nodes that are either new or need to be checked again (new cam table info, arpcache and validate ifIDx mappings etc) and if such nodes are found calls the poller program. When the poller gets the request it will poll the node and update the database tables. For nodes that have not been discovered, it loops through community strings to try in hopes of getting a match which takes 5 seconds * N (communities) per node. Due to the way I am calling the poller from the scheduler I can only poll sequentially until the poller finishes and it returns a value of success or fail to the scheduler. What I would like to be able to do is setup a variable in the scheduler, say $max_pollers, that will allow me to make $max_pollers simultaneous calls to reduce discovery/update time. I could go the cheesy route and call the poller like so $retval = `poller --args &` but then I do not see how I can get that return value for a given child process. Looking at http://poe.perl.org/?POE_Cookbook/Child_Processes_3, I think this is exactly what will help me with this. But I am having trouble trying to modify the example to work. I have modified it to try and do two calls of /bin/ls at once and once that works I can modify it further, I am trying to keep it simple while I learn POE.
my @tasks = qw(one two three four five six seven eight nine ten); to my @tasks = ( '/bin/ls /home','/bin/ls -l /home'); In the do_stuff sub, there is a section that displays a bogus result. How do I get the result back that will tell me the exit status of the child program? thanks Greg
