[Bug 1767097] Re: ftok() returns different result for same (path, id) pair if the inode of the file is changed

2018-04-30 Thread Mattias Säteri
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

[Bug 1767097] Re: ftok() returns different result for same (path, id) pair if the inode of the file is changed

2018-04-29 Thread Mattias Säteri
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, sin

[Bug 1767097] [NEW] ftok() returns different result for same (path, id) pair if the inode of the file is changed

2018-04-26 Thread Mattias Säteri
Public bug reported: Release: Ubuntu 16.04.2 LTS Package: libc6: Installed: 2.23-0ubuntu7 The ftok man page states that: "The resulting value is the same for all pathnames that name the same file, when the same value of proj_id is used". However, if you call ftok() twice with the same path an