`fcntl` module provides no access to F_GETLK operation
まだ誰も着手していません。
- 主要言語
- Python
- スター
- 77.2k
- フォーク
- 36k
- 平均マージ
- 1日 9時間
- マージ済み PR(30日)
- 558
説明
Wrapper/access for fcntl(fd, F_GETLK, …)
The fcntl module currently exposes the F_GETLK constant itself, but unfortunately because the types in struct flock are OS and CFLAGS dependent (off_t, pid_t), the operation is hard to work-around with struct.unpack.
Pitch
Exposing F_GETLK is particularly useful to determine if a process that created a lock file or pid file is actually still alive, vs. whether the lock/pid file was left uncleaned from a previous exit/crash/etc. The l_pid field is the most useful, but if wrapping the call anyway it might make more sense to just expose all values.
I've already implemented this, a PR is following shortly.
Linked PRs
- gh-112372
- gh-96695
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
fcntl モジュールに既存の F_GETLK 定数から始め、issue に記載されているプラットフォーム依存の struct flock 型を確認してください。開始する前に、リンクされている PR gh-112372 と gh-96695 を確認してください。要求された実装はすでに完了したと報告されているためです。完了とは、呼び出し側が OS と CFLAGS に依存するレイアウトを推測しなくても F_GETLK にアクセスできるようにすることです。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- python
- 領域
- operating-systems
- issue の種類
- 機能追加
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 20/100