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

Re: Too many levels of symbolic links



On Wed, Jan 20, 2021 at 10:49:08AM +0100, steve wrote:
> Thanks Mike and Thomas for the answers.
> 
> Le 20-01-2021, à 10:15:09 +0100, tomas@tuxteam.de a écrit :
> 
> >On Wed, Jan 20, 2021 at 09:40:46AM +0100, steve wrote:
> >>Question. What does the following mean?
> >>
> >># find /dev -follow -printf ""
> >>find: '/dev/fd/4': No such file or directory
> >
> >This is funny. At first I thought I could reproduce it by tricking `find'
> >into following a broken symlink, but with a "static" setup I couldn't.
> >
> >Still, /dev/fd is bound to be highly dynamic: it's a link to /proc/self/fd,
> >i.e. a view on the current process's open file descriptors. It's quite
> >probable that `find' checks some directory entry, and at the time it tries
> >to do something with it, it has disappeared, leading to that error
> >message.
> 
> What is strange is that it is always /dev/fd/4 that is missing, even
> after a reboot.

As I said -- this is the own process's set of open file descriptors.
This process in this case is the one running `find' itself. At the
point it is looking for that /proc/fd/4, it is bound to be in some
semi-deterministic state. It's dancing a strange ballet with itself.

I'm sure one could find out exactly what's going on given enough
patience :-)

Cheers
 - t

Attachment: signature.asc
Description: Digital signature


Reply to: