From: "堀川 久" Date: 2001-02-20T00:33:43+09:00 Subject: [ruby-list:28065] Re: flock がエラー こんにちは。 matz@zetabits.com (Yukihiro Matsumoto) wrote in the message <982505966.169273.26648.nullmailer@ev.netlab.zetabits.com>: >使う順番については了解しました。Linuxなどではlockf()は純粋に >fcntl()のラッパーなのですが、AIXでは挙動がそれぞれ異なるんで >すね。  SUSv2だと The fildes argument is an open file descriptor. The file descriptor must have been opened with write-only permission (O_WRONLY) or with read/write permission (O_RDWR) to establish a lock with this function. となっているので,lockf()を使うと"r"で開いたファイルにLOCK_SHでロック できません。  flock()がないときはfcntl()でエミュレーションし,fcntl()がないときは ,不完全なものを提供するより,未実装エラーにする方がいいような気がして きました。どうでしょう? -- HORIKAWA Hisashi (堀川 久) http://www2.airnet.ne.jp/pak04955/ mailto:vzw00011@nifty.ne.jp