Opened 2 years ago

Closed 5 months ago

#382 closed defect (duplicate)

multiple files with same indoe are created

Reported by: komh Owned by:
Priority: normal Milestone: new
Component: libc Version: 0.6.6
Severity: normal Keywords:



When heavily fork()ed, multiple files with same inode are created. Because sometimes forked() child processes have the same seed value.

Some programs checking inodes such as mv, cp, install of coreutils, fails because they treat files with same inodes as the same files.

This always occurs when running 'bootstrap' script in coreutils git repo. mv fails with complaining ./m4/.gitignore.bak and ./m4/.gitignore are the same file.

Attachments (1)

fs.diff (502 bytes) - added by komh 2 years ago.
patch for same inodes

Download all attachments as: .zip

Change History (2)

Changed 2 years ago by komh

patch for same inodes

comment:1 Changed 5 months ago by komh

  • Resolution set to duplicate
  • Status changed from new to closed

There are another cases that the files with the same inode are generated. It's simple. Just 'copy' with non-kLIBC programs such as CMD or 4OS2.

So the above patch is not a proper solution. Instead, calculating inode whenever stat()'ed is more proper solution.

And I close this ticket because ticket #74 reports similar problems and it is more general.

I'll attach improved patch at ticket #74.

Note: See TracTickets for help on using tickets.