At Mon, 23 May 2011 20:28:20 -0600, Matthew Flatt wrote: > [... problems with `port-try-file-lock?' under Solaris] > > I don't see an easy way around the problem. Your patch to make file > locks unsupported looks like the right one for now.
We have a use for `port-try-file-lock?' that needs to work on all platforms, including Solaris, so I took another look this problem. I found a solution that involves forking a process under Solaris for each file lock, so there's no issue of other file descriptors being closed for the same file within the same process. There's another problem, though, which is that fcntl(...,F_SETLK,...) allows exclusive locks only on writable file descriptors, and it allows shared locks only on readable file descriptors. So, `port-try-file-lock?' now requires an output port for an 'exclusive lock, and it requires an input port for a 'shared lock. _________________________________________________ For list-related administrative tasks: http://lists.racket-lang.org/listinfo/users