Keep It Simple, Stupid | |
PerlMonks |
threads and Net::OpenSSHby rastoboy (Monk) |
on Mar 15, 2012 at 15:50 UTC ( [id://959804]=perlquestion: print w/replies, xml ) | Need Help?? |
rastoboy has asked for the wisdom of the Perl Monks concerning the following question:
Hi there friends, So I'm writing my first perl program using threads, and it's actually doing what I want it to do, but I don't understand why :-) Basically it's a testing program that wget's a file off a web server while tailing various logs: So basically what happens is when the wget is finished, the tail -f going on stops. This is convenient for me at the moment, but the more I think about it I don't understand why. One thing that is interesting is that if I attempt to use the $sensor_ssh connection again, it will warn in this code: In the dump of the Net::OpenSSH object I see this bit: So I guess my question is, how is the master ssh connection being broken? And is there a better way to do this? It's convenient for me right now (as the join() does return the data) but I'm not to comfortable not understanding what's going on here, as I'm sure in the future it will come back and bite me :-) Any input would be greatly appreciated!ls
Back to
Seekers of Perl Wisdom
|
|