Opened 8 months ago

Last modified 8 months ago

#1565 new defect

file-lock/blocking failing

Reported by: zbigniew Owned by:
Priority: major Milestone: someday
Component: core libraries Version: 5.0.0
Keywords: Cc:
Estimated difficulty:


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.

Change History (1)

comment:1 Changed 8 months ago by zbigniew

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.

Note: See TracTickets for help on using tickets.