[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: rfc: fcntl() error reporting
On Fri, Aug 22, 2008 at 08:06:15PM +0300, Andy Shevchenko wrote:
> > Your test program exhibits undefined behavior because it asks the
> > kernel to dereference an invalid pointer. EFAULT is therefore a
> > perfectly legitimate result.
> For what function?
> I could agree if the called function is <a function with a pointer as
> main arg>, f.e.
> (I think the main argument for fcntl() may be file descriptor, or FD
> and command pair.)
What's a "main argument"?
> > (Although I'd argue that the process should also receive SIGSEGV.)
> As you see no crash was there.
Yes, but it did return EFAULT.
Whether returning EFAULT should also post SIGSEGV is a separate
question, and also one that tends to lead to flamewars.
David A. Holland
Main Index |
Thread Index |