Github user kiszk commented on a diff in the pull request:
https://github.com/apache/spark/pull/19998#discussion_r157334828
--- Diff: dev/run-tests.py ---
@@ -253,9 +253,11 @@ def kill_zinc_on_port(zinc_port):
"""
Kill the Zinc process running on the given port, if one exists.
"""
- cmd = ("/usr/sbin/lsof -P |grep %s | grep LISTEN "
- "| awk '{ print $2; }' | xargs kill") % zinc_port
- subprocess.check_call(cmd, shell=True)
+ cmd = "%s -P |grep %s | grep LISTEN | awk '{ print $2; }' | xargs kill"
--- End diff --
Great catch, I also check it.
```
>>> print(which("lsof"))
/usr/bin/lsof
>>>
% ls /usr/bin/lsof /usr/sbin/lsof
ls: cannot access '/usr/sbin/lsof': No such file or directory
/usr/bin/lsof
```
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]