This may be hasty. https://linux.die.net/man/2/flock does not perform any unsafe operation, even for invalid arguments. -- Andrei

On 2/7/17 11:44 AM, Walter Bright via phobos wrote:


On 2/7/2017 6:00 AM, Jakub Łabaj via phobos wrote:
Ok, so I have doubts whether these functions can be @trusted. On the
one hand
they get just FILE* as an argument which (as I see it) makes it safe
interface.
On the other hand FGETC is unlocked version of fgetc and requires
explicit lock
to be used safely; FLOCK and FUNLOCK invocations should match,
therefore there
is also possibility to use it incorrectly. Personally I would not mark
them
@trusted then, is it correct?

I'd say you're right.
_______________________________________________
phobos mailing list
phobos@puremagic.com
http://lists.puremagic.com/mailman/listinfo/phobos
_______________________________________________
phobos mailing list
phobos@puremagic.com
http://lists.puremagic.com/mailman/listinfo/phobos

Reply via email to