Summary

file-lock/blocking failing

Metadata

Description

On OSX 10.14 getting the following problem. Unknown if it occurs on other platforms.

 (import (chicken file posix))
 (let ((p (open-output-file "test"))) (file-lock/blocking p))

13:21:51 < zbigniew> works ok on c4; on c5 I get "Error: (file-lock/blocking) cannot lock file - Bad file descriptor"

Preventing chicken-doc-admin from being ported to c5.

Changes and comments

[2018-11-30 22:12:55 UTC] zbigniew wrote:

C-Keen and I found this was due to slot 1 of ports changing from a boolean (#t == input) to a fixnum bitmask (1 == input, 2 == output, ...). The C_flock_setup call was not updated and always considers the port an input port. This leads to EBADF when a read lock is requested on an output port.

[2019-07-24 09:47:29 UTC] evhan changed status from new to closed

[2019-07-24 09:47:29 UTC] evhan set resolution to fixed

[2019-07-24 09:47:29 UTC] evhan wrote:

This was fixed by 7729e511.