Regarding Hard Link

前端 未结 5 1781
自闭症患者
自闭症患者 2021-02-14 09:52

Can somebody please explain me why the kernel doesn\'t allow us to make a hard link to a directory. Whether it is because it breaks the rule of directed acyclic graph structure

5条回答
  •  北荒
    北荒 (楼主)
    2021-02-14 10:05

    Cyclic references will break garbage collection by reference counting. Wikipedia describes the problem:

    There are a variety of ways of handling the problem of detecting and collecting reference cycles. One is that a system may explicitly forbid reference cycles.

    That it the way Linux does it.

提交回复
热议问题