How should wasi-libc handle `POLLPRI`?
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 初心者へのやさしさ
- 25/100
- issue の種類
- 機能追加
- 明瞭さ
- 説明が足りない
- 活発さ
- 停滞
- 技術スタック
- c, wasm
- 領域
- api, operating-systems
調査の方向性
まず PR #754 と、POLLPRI に対する select、pselect、poll の処理についての issue の説明を確認します。POLLPRI を export すべきか、また poll がそれを無視するか ENOSYS を返すべきかについて意見を集めます。プロジェクトが明確な動作の決定に至り、それを文書化した時点で作業は完了です。
索引モデルが issue の本文から書いたものです。
説明
In https://github.com/WebAssembly/wasi-libc/pull/754 it was discovered that there are applications, such as vim, which set the exceptfds argument to the select and pselect functions. The man pages for these functions indicate that this argument corresponds to the POLLPRI argument to the poll function. Prior to #754 wasi-libc didn't define POLLPRI as a constant and also returned an ENOSYS error if exceptfds was set for either select or pselect. In #754 this behavior has now changed where POLLPRI is defined, select and pselect thread fds to poll with POLLPRI set, and poll has some handling now. Specifically in poll it effectively ignores POLLPRI unless everything is exclusively waiting on that event in which case ENOSYS is returned.
I'm opening this issue to have some further discussion of this and see if anyone else has thoughts on this as well. Specific questions I would have are:
-
Is anyone opposed to exposing
POLLPRIin wasi-libc? Personally I feel this is justified because we already can't statically rule out settingexceptfdsarguments inselectandpselect. We've also found additionally over time that it's easier to provide constants/functions than to not provide them at all and ask applications to work around the lack of posix/unix/etc functionality. (at least in some cases, not necessarily all). Nevertheless I wanted to pose the question here: does anyone feel strongly thatPOLLPRIshould not be exported by wasi-libc? -
Regardless of whether
POLLPRIis publicly exported or not, what should the behavior ofexceptfdsbe withselectandpselect? I still frame this in my head asPOLLPRIsinceselectandpselectare effectively justpollin a different veneer personally. In my opinion we should interpretPOLLPRIas effectively an event that never happens right now in wasi-libc since it's not hooked up to anything. The man page forPOLLPRIsays it's for things like TCP out-of-band data and some ioctl/tty things I don't know about, but nevertheless WASI has no concept of either of these. Given that I'd personally say that we should consider this as an event that basically never fires. -
If others agree with me that we should interpret
POLLPRIas an event that never fires (yet, there's an orthogonal open question of whether WASI should provide functionality to support this), then do others disagree with changing the behavior ofpoll? I'd say thatpollshould probably just ignorePOLLPRIentirely and it turns into a glorified version ofsleepif you happen to wait exclusively on things withPOLLPRI. Otherwise if you wait on a mixture ofPOLLPRIand other things it's just as-if thePOLLPRIthing never fired.
cc @paralin as the author of #754, and cc @sunfishcode as you might have thoughts on API-side of things here too.
- 主要言語
- C
- スター
- 1k
- フォーク
- 268
- 平均マージ
- 1日 3時間
- マージ済み PR(30日)
- 20
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
WebAssembly/wasi-libc のほかの issue
-
wasip2: enabling O_APPEND with fcntl reuses the old positional output stream and overwrites the fileオープン
難易度 3/5 1〜2日 初心者へのやさしさ 70/100
WebAssembly/wasi-libc#919 ·
メンテナーはふだん 1 日以内に返信
-
wasip2/wasip3: reads never see data appended to a file after reaching EOF対応中かも @libsmol が 25 日前に担当しました。 オープン
難易度 3/5 1〜2日 初心者へのやさしさ 61/100
WebAssembly/wasi-libc#889 ·
メンテナーはふだん 1 日以内に返信
-
Contradicting `SOL_TCP` and `SOL_UDP` definition for p1再び着手できるかも このイシューのプルリクエストはマージされずにクローズされました。 オープン
難易度 3/5 1〜2日 初心者へのやさしさ 45/100
WebAssembly/wasi-libc#855 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 55/100
WebAssembly/wasi-libc#815 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 4/5 3〜5日 初心者へのやさしさ 45/100
WebAssembly/wasi-libc#809 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
WebAssembly/wasi-libc の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
OpenPrinting/cups#1826 ·
メンテナーはふだん 1 日以内に返信
-
Backport to 3.0 advertises a suffix that does not exist対応中かも このイシューにリンクされたプルリクエストがオープン中、またはマージ済みです。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
389ds/389-ds-base#8152 ·
メンテナーはふだん 2 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
RetroAchievements/rcheevos#580 · コメント 1 件 ·
メンテナーはふだん 5 日以内に返信
-
meta:feature-request
難易度 2/5 1〜3時間 初心者へのやさしさ 66/100
mpv-player/mpv#18855 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信