[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

RE: [patch] Support modern network utilities for finding free ports for tests

From: Bert Huijben <bert_at_qqmail.nl>
Date: Wed, 10 Jun 2015 14:13:39 +0200

> -----Original Message-----
> From: Philip Martin [mailto:philip.martin_at_wandisco.com]
> Sent: woensdag 10 juni 2015 14:05
> To: Andreas Stieger
> Cc: dev_at_subversion.apache.org
> Subject: Re: [patch] Support modern network utilities for finding free
ports for
> tests
>
> Andreas Stieger <andreas.stieger_at_gmx.de> writes:
>
> > HTTPD_PORT=3691
> > -while netstat -an | grep $HTTPD_PORT | grep 'LISTEN' >/dev/null; do
> > +while \
> > + (ss -ltn sport = :$HTTP_PORT 2>&1 | grep :$HTTP_PORT > /dev/null ) \
> > + || \
> > + (netstat -an 2>&1 | grep $HTTP_PORT | grep 'LISTEN' > /dev/null ) \
> > + do
>
> You have HTTP_PORT where it should be HTTPD_PORT. I fixed that and
> committed r1684649. Thanks!

Shouldn't the default be the other way around?... Stick to using netstat
unless it doesn't exist?

I don't think 'ss' is nearly available as widely as netstat. It might even
be Linux specific. Netstat is available on FreeBSD and even on Windows,
while 'ss' is available on neither.

        Bert
Received on 2015-06-10 14:14:43 CEST

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.