question about race:stream in glibc manual
Wed Nov 19 03:52:00 GMT 2014
On 11/18/2014 10:24 PM, MaShimiao wrote:
>> IMO that's a bug. The API contract for addmntent requires the structure
>> be written at the end of the open file fp. It should lock the stream,
>> seek to the end, write, and unlock.
> May I express my opinion?
You may :-)
> I'm not sure whether addmntent's target is working safely in multi-thread or not
> But if not, I think regarding it as a bug is not exactly appropriate.
> In single thread, addmntent can work safely.
> Just as API contract, Structure can be written at the end of the open file fp correctly.
> That's my own opinion.
My apologies, I now see that addmntent is not in POSIX, which means it doesn't
follow the normal MT-Safe requirement.
I agree it is not a bug for it to fail in an MT environment.
>>> I said I wouldn't install the patch that fixes this if there were
>>> objections by Tuesday. So now I'm gonna wait till I hear back from you
>>> before I check it in. Please let me know.
>> I'm feeling very dense. What patch?
> At 11/14/2014 04:26 PM UTC+8, I sent a patch to modify addmntent's mark from
> MT-Unsafe race:stream to MT-safe race:stream in the glibc manual.
I agree. MT-Safe race:stream is the best option.
More information about the Libc-help