link(2) and EFAULT

Simon 'corecode' Schubert corecode at fs.ei.tum.de
Thu Jul 26 13:01:44 PDT 2007


Dave Hayes wrote:
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?
Like any other error:  abort or do something else sensible.  Do not check for this error message, that doesn't make much sense.

cheers
 simon




More information about the Kernel mailing list