Date: Sat, 30 Nov 2002 14:53:12 -0800 From: Terry Lambert <tlambert2@mindspring.com> To: Daniel Eischen <eischen@pcnet1.pcnet.com> Cc: Brian Smith <dbsoft@technologist.com>, "current@FreeBSD.ORG" <current@FreeBSD.ORG> Subject: Re: Are SysV semaphores thread-safe on CURRENT? Message-ID: <3DE94158.142E1B67@mindspring.com> References: <Pine.GSO.4.10.10211301204290.27919-100000@pcnet1.pcnet.com>
next in thread | previous in thread | raw e-mail | index | archive | help
Daniel Eischen wrote: > > No, libc_r doesn't properly handle flock. Usually, all syscalls > > that take file descriptors as arguments honor the non-blocking > > mode of the file if set. I guess flock(2) doesn't and has its > > own option to the operation argument (LOCK_NB). > > > > I hacked libc_r to periodically check (every 100msecs) the > > flock. See if this fixes things: Same thing I suggested, only I think he was really using fcntl(), not flock()? My patch wasn't integral to the library (it was more of a hack), and my default time was 1S, not 100uS. Same non-FIFO request ordering, too. 8-(. I guess the real question is what is an fcntl()/flock() supposed to do on a blocking call against a non-blocking fd? I could not tell, so I punted. -- Terry To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3DE94158.142E1B67>