Project

General

Profile

Actions

Bug #6147

closed

should we check a result returned by fcntl?

Added by mame (Yusuke Endoh) about 12 years ago. Updated almost 12 years ago.

Status:
Closed
Target version:
-
ruby -v:
ruby 2.0.0dev (2012-03-14 trunk 35017) [i686-linux]
Backport:
[ruby-dev:45364]

Description

たぶん kosaki さん (それともささださん?)

thread_pthread.c の rb_thread_create_timer_thread で

fcntl(timer_thread_pipe[1], F_SETFL, oflags);

の返り値チェックしなくていいの?ほかの fcntl の呼び出しでは
全部チェックしてるよ?って Coverity Scan さんが言ってます。

ユーザランドの開発者的にはここで fcntl で失敗するとかどうしろ
というの。。。と思いそうですが、システムコールの返り値は全部
チェックしろよ派のカーネル開発者的にはどうでしょうか。

--
Yusuke Endoh

Actions #1

Updated by shyouhei (Shyouhei Urabe) about 12 years ago

  • Status changed from Open to Assigned

Updated by kosaki (Motohiro KOSAKI) about 12 years ago

単に失敗したら死ねばいいんじゃないですかね。

  • どうせ失敗しないだろう
  • 失敗しても動くようなコードかけないだろう
    の2つの意味で

時間見つけてやっときます

Actions #3

Updated by kosaki (Motohiro KOSAKI) almost 12 years ago

  • Status changed from Assigned to Closed
  • % Done changed from 0 to 100

This issue was solved with changeset r35696.
Yusuke, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.


  • thread_pthread.c (rb_thread_create_timer_thread): Added error
    check when failing fcntl(). [Bug #6147] [ruby-dev:45364]
Actions

Also available in: Atom PDF

Like0
Like0Like0Like0