Regarding Hard Link

前端 未结 5 1952
谎友^
谎友^ 2021-02-14 09:50

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:14

    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.

提交回复
热议问题