link(2) and EFAULT

Dave Hayes dave at
Thu Jul 26 12:34:19 PDT 2007

Under what conditions does link() return EFAULT? The man
page says:

  [EFAULT]  One of the pathnames specified is outside the
            process's allocated address space.

However I would think that if I had a (char *) pointing
outside the address space that I would get a segfault
somewhere before getting this error. How would you even
handle this error, should your code get it?

In short, I'm confused. :)
Dave Hayes - Consultant - Altadena CA, USA - dave at 
>>> The opinions expressed above are entirely my own <<<

We tend to scoff at the beliefs of the ancients. But we
can't scoff at them personally, to their faces, and this is
what annoys me.

More information about the Kernel mailing list