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

Re: flock, FAGAIN, and FWOULDBLOCK



On Sun, Feb 22, 2009 at 10:52:44PM +0100, Stefan Fritsch wrote:
> Hi,
> 
> according to the flock(2) man page, flock should return EWOULDBLOCK 
> when a file is locked and the LOCK_NB flag was selected. But on hppa, 
> it seems to return EAGAIN which is not the same. Where is the bug 
> here? In the kernel, glibc, or manpages-dev?
> 
> This causes problems in apr since it only checks for EWOULDBLOCK.
> 

Ugh. Fail.

EWOULDBLOCK is defined to be EAGAIN on every architecture but parisc,
since HPUX has different errno values for EAGAIN and EWOULDBLOCK.

Definitely a kernel bug, if posix says it should return EWOULDBLOCK...

regards, Kyle


Reply to: