Make whats-in-port and clear-port agree on what is in a port
まだ誰も着手していません。
評価
調査の方向性
bin/clear-port と bin/whats-in-port から始め、それぞれの lsof コマンドと、listening 接続と established 接続について説明されている動作を比較します。両方のスクリプトが listening プロセスのみを報告すべきなのか、それとも意図的に異なるべきなのかを maintainer に確認します。完了とは、その判断が両方のスクリプトに実装または文書化され、出力が意図せず誤解を招くものではなくなっていることを意味します。
索引モデルが issue の本文から書いたものです。
説明
bin/clear-port and bin/whats-in-port are a pair. Since #789 they no longer
agree on what "in the port" means.
$ grep lsof bin/clear-port
lsof -ti4TCP:"$1" -sTCP:LISTEN | xargs -r kill
$ grep lsof bin/whats-in-port
lsof -ni4TCP:"$1"
clear-port now looks only at the listening process. whats-in-port still
lists every socket on that port, so it includes established connections. A
browser with the page open shows up there.
The result is that whats-in-port 3000 can list processes that clear-port 3000 will not touch. Someone reads the first, runs the second, and the thing
they saw is still running.
#789 was right to narrow clear-port. Killing a browser because it had the
page open was the bug. The question is whether whats-in-port should narrow
to match.
Two ways to settle it:
- Add
-sTCP:LISTENtowhats-in-port, so both answer the same question.
Simple, and the pair stays honest. - Leave it wide on purpose, because seeing every holder of a port is useful
when you are working out what is going on. If we choose this, say so in a
comment in both scripts, so the difference reads as deliberate.
Either is defensible. Having it happen by accident is not.
- 主要言語
- Shell
- スター
- 8.2k
- フォーク
- 1.7k
- PR マージ指標
- 30日以内にマージされた PR はありません
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
thoughtbot/dotfiles のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
thoughtbot/dotfiles#793 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 45/100
thoughtbot/dotfiles#795 ·
-
難易度 5/5 1週間以上 初心者へのやさしさ 35/100
thoughtbot/dotfiles#794 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 48/100
thoughtbot/dotfiles#792 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 38/100
thoughtbot/dotfiles#742 · コメント 2 件 ·
thoughtbot/dotfiles の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
-
難易度 1/5 1〜3時間 初心者へのやさしさ 83/100
msitarzewski/agency-agents#1278 ·
メンテナーはふだん 2 日以内に返信
-
Review comment: Clarify MTE’s coverage and software responsibility for S-mode accesses to U pagesオープン
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
riscv/riscv-memory-tagging#129 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
ready-for-pr
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
kunchenguid/firstmate#8332 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
fullsend-ai/agents#1932 ·
メンテナーはふだん 1 日以内に返信