develooper Front page | | Postings from April 2015

Re: Communicating between processes in test suite run

Thread Previous | Thread Next
Cosimo Streppone
April 25, 2015 19:19
Re: Communicating between processes in test suite run
Message ID:
Il 24/04/2015 18:12, Michael Kiwala ha scritto:
> On Thu, Apr 23, 2015 at 2:53 PM, Tim Bunce <
> <>> wrote:
>     That approach only applies to your perl statsd, right?  For the nodejs
>     or C statsd's you don't have an easy[*] a way to find the port.
> I was about to suggest running `lsof -i -sTCP:LISTEN -p $PID_OF_STATSD`
> in the parent after the server has been spawned, when I noticed that Tim
> already mentioned the lsof option in his footnote.
> Why not use lsof to query the port that was assigned?

I'm often a bit reluctant to use system commands as that
makes the whole process more OS dependent.

Even considering Win32 out of the picture, is lsof working
in the same way for every OS where perl is running?

I guess that is my only argument against it, but thanks for
suggesting it, it's certainly a valid strategy.


Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About