tech-kern archive

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

Re: procfs files vs symlink



    Date:        Tue, 11 Jan 2022 22:20:15 +0100
    From:        Manuel Bouyer <bouyer%antioche.eu.org@localhost>
    Message-ID:  <Yd30j9FPEMeBoV3W%antioche.eu.org@localhost>

  | > What causes that EINVAL?
  |
  |
  | I'm not sure (somneone suggested that the file descriptor has been closed
  | when ls tries to fstat() it, but I can't confirm this).

That should generate EBADF not EINVAL.  Attempting readlink()
on something that is not a symlink, and various other possibilities
like that would be more probable.  EINVAL isn't listed as a possible
error return from [f]stat ... not that that guarantees that it cannot
happen, particularly from within emulation code.

kre


Home | Main Index | Thread Index | Old Index