Opened 3 years ago

Closed 15 months ago

#382 closed defect (duplicate)

multiple files with same indoe are created

Reported by: KO Myung-Hun 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 KO Myung-Hun 3 years ago.
patch for same inodes

Download all attachments as: .zip

Change History (2)

Changed 3 years ago by KO Myung-Hun

Attachment: fs.diff added

patch for same inodes

comment:1 Changed 15 months ago by KO Myung-Hun

Resolution: duplicate
Status: newclosed

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.