[Bug 1767097] Re: ftok() returns different result for same (path, id) pair if the inode of the file is changed
So I see. I just don't see how this is meant to be useful, since you can't know how the function will behave. Any file you choose can always be changed by someone outside of the program's control, so you can never know if you will get the same result every time or a different one. -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1767097 Title: ftok() returns different result for same (path, id) pair if the inode of the file is changed To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/glibc/+bug/1767097/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1767097] Re: ftok() returns different result for same (path, id) pair if the inode of the file is changed
I believe the expectations actually is that the function result depends on file system contents. -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1767097 Title: ftok() returns different result for same (path, id) pair if the inode of the file is changed To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/glibc/+bug/1767097/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1767097] Re: ftok() returns different result for same (path, id) pair if the inode of the file is changed
Thanks for your response. So, if this is the case then the behavior of the function is essentially this: given a set of inputs it returns a number. Given the same set of inputs again, it may return the same number or it may return a completely different number. It is basically undeterministic, since it is impossible to guarantee that nobody outside of my control will change the files on the file system. Why would you want it to behave this way instead of returning the same value every time for the same (path, id) pair? -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1767097 Title: ftok() returns different result for same (path, id) pair if the inode of the file is changed To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/glibc/+bug/1767097/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1767097] Re: ftok() returns different result for same (path, id) pair if the inode of the file is changed
You misunderstood what the manpage intends to say. Over time, two pathnames can refer to different files. Essentially, the return value depends on the file, not on the pathname. If you delete a file and recreate the file, it is no longer the same file. -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1767097 Title: ftok() returns different result for same (path, id) pair if the inode of the file is changed To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/glibc/+bug/1767097/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs