Re: file locking problem

2007-09-20 Thread Corinna Vinschen
On Sep 19 19:30, BJ wrote: I have a file locking problem that is solved under Mac and Linux using fcntl: int lockRepFile (int fd, char lock, size_t from, size_t length) { struct flock fl; fl.l_start = from; fl.l_len = length; fl.l_pid = 0; if (lock == 'r

file locking problem

2007-09-19 Thread BJ
I have a file locking problem that is solved under Mac and Linux using fcntl: int lockRepFile (int fd, char lock, size_t from, size_t length) { struct flock fl; fl.l_start = from; fl.l_len = length; fl.l_pid = 0; if (lock == 'r') fl.l_type = F_RDLCK; else if (lock