Better lsof to find process

Summary:
The previous recommendation doesn't always holds true. There are reported cases in which a process is listening to the specified port yet is not being listed by the lsof command as advised.

The command below seems to work better.

    sudo lsof -i :52342

Reviewed By: antonk52

Differential Revision: D47989269

fbshipit-source-id: ea216de00ef6edc90de58e9d3fe3a0579a171fea
This commit is contained in:
Lorenzo Blasa
2023-08-02 07:56:17 -07:00
committed by Facebook GitHub Bot
parent 2c24ec9f5d
commit a21f730c2d
2 changed files with 2 additions and 2 deletions

View File

@@ -50,7 +50,7 @@ export function createFlipperServerWithSocket(
new Error(
`Failed to connect to the server in a timely manner.
It may be unresponsive. Run the following from the terminal
'lsof -nP -iTCP -sTCP:LISTEN | grep 52342' and kill the listed process, if any.`,
'sudo lsof -i :52342' and kill the listed process, if any.`,
),
);
}, CONNECTION_TIMEOUT);

View File

@@ -433,7 +433,7 @@ class SettingsSheet extends Component<Props, State> {
</span>
<br />
<code>
sudo lsof -i -P | grep LISTEN | grep <b>52342</b>
sudo lsof -i :52342
<br />
sudo kill &lt;PID&gt;
</code>