os.writev() behaviour unpredictable when hitting file system full (28)
未關閉
還沒有人認領這個 Issue。
docs
type-bug
- 主要語言
- Python
- 星號
- 77.2k
- 分支
- 36k
- PR 合併指標
- PR 指標待擷取
描述
Bug report
os.writev() has an unpredictable behaviour when writing on a file system that becomes full:
For example:
try:
fd=os.open(file, os.O_WRONLY|os.O_CREAT|os.O_APPEND)
result = os.writev(fd,iovtable[0:MAXIOV])
except OSError as e:
...
# at this point result might return some bytes written (not necessarly corresponding to iov lengths, or even not be defined at all.
Your environment
centos 7.
Python 3.9 (but probably the same on 3.11)
This can easily be worked around by specifying in the documentation that os.writev() returns the actual number of bytes written in case of success, but the contents of the return value are unpredicatbale in case of errors.
貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
研究方向
從 os.writev() 的文件開始,檢視其中目前如何描述回傳值和 OSError 行為。將這些措辭與回報的檔案系統已滿情況進行比較;完成的標準是文件明確說明呼叫端在成功後和發生錯誤後可以依賴什麼。
由索引模型根據 Issue 內容生成。
評估
- 技術堆疊
- python
- 領域
- documentation
- Issue 類型
- 缺陷
- 難度
- 2/5
- 預估耗時
- 1-3 小時
- 活躍度
- 停滯
- 描述清晰度
- 基本清楚
- 新手友好度
- 38/100