Re: flock, FAGAIN, and FWOULDBLOCK

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

 



On Sun, Feb 22, 2009 at 9:54 PM, Kyle McMartin <kyle@xxxxxxxxxxxxx> wrote:
>> A more robust solution would be?
>>
>> if ((ret == -EAGAIN) || (ret == -EWOULDBLOK))
>>         ret = -EWOULDBLOCK
>>
>> This covers our ass since POSIX says that EAGAIN and EWOULDBLOCK *may*
>> be the same.
>>
>
> I have no idea what you're on about here, this is a parisc specific
> file, where we know they aren't. I don't want to pollute generic linux
> code with workarounds for moronic HPUX "let's be different for
> difference sake" crap.

If sys_flock can return one of -EAGAIN or -WOULDBLOCK, perhaps because
the generic code uses them interchangeably, then a more robust
solution is to check for both, and *then* return the expected value to
userspace.

Would this be a possible solution:
1) Make EAGAIN and EWOULDBLOCK the same for the kernel.
2) Leave the values the same for userspace.
3) Add wrappers in the parisc specific kernel code when a syscall need
to return one of EAGAIN or EWOULDBLOCK to userspace?

Cheers,
Carlos.
--
To unsubscribe from this list: send the line "unsubscribe linux-arch" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel]     [Kernel Newbies]     [x86 Platform Driver]     [Netdev]     [Linux Wireless]     [Netfilter]     [Bugtraq]     [Linux Filesystems]     [Yosemite Discussion]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Device Mapper]

  Powered by Linux