Opened 10 months ago

Closed 2 months ago

#1565 closed defect (fixed)

file-lock/blocking failing

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

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.

Change History (2)

comment:1 Changed 10 months ago by Jim Ursetto

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.

comment:2 Changed 2 months ago by evhan

Resolution: fixed
Status: newclosed

This was fixed by 7729e511.

Note: See TracTickets for help on using tickets.