[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Email with Mint, again



In <m0s8fIg-0000gPC@sdf.lonestar.org>, ekl@sdf.lonestar.org (Evan Langlois) wrote:

> > Use fcntl() locking, /not/ flock().
> 
> OK, I'll byte (grin).  What is the difference?

>From the mintlib's do_lock.c:

	...
	case F_LOCK:
		lock.l_type = F_WRLCK;
		...
  
Won't work if the file was opened with O_RDONLY. Setting
lock.l_type = F_RDLCK, and calling fcntl() directly will.


Waldi