There was an error while loading. Please reload this page.
1 parent 51a2839 commit 721f91fCopy full SHA for 721f91f
1 file changed
scripts/ctest-background.sh
@@ -24,15 +24,15 @@ if [ -z "${SAI_LIST_PORT}" ] ; then
24
sleep 1
25
fi
26
else
27
- if [ "${VENDOR}" = "apple" ] ; then
28
- while [ -z "`netstat -an | grep LISTEN | tr -s ' ' | cut -d' ' -f4| grep "\.${SAI_LIST_PORT}\$"`" ] ; do
29
- sleep 0.5
30
- done
31
- else
32
- while [ -z "`netstat -ltn4 | grep LISTEN | tr -s ' ' | grep ":${SAI_LIST_PORT}\ "`" ] ; do
33
34
35
- fi
+ if [ "${VENDOR}" = "apple" ] ; then
+ while [ -z "`lsof -iTCP -sTCP:LISTEN -P -n | grep -- ':${SAI_LIST_PORT}'`" ] ; do
+ sleep 0.5
+ done
+ else
+ while [ -z "`netstat -ltn4 | grep LISTEN | tr -s ' ' | grep ":${SAI_LIST_PORT}\ "`" ] ; do
+ fi
36
37
38
0 commit comments