develooper Front page | perl.perl5.porters | Postings from December 2011

Why can't open() do an exclusive open?

Thread Next
From:
Leon Timmermans
Date:
December 5, 2011 04:38
Subject:
Why can't open() do an exclusive open?
Message ID:
CAHhgV8hHv5ga_mS2XDs-od+t5WUtL1YkNr_iVZbNcJ3ZL_9gPQ@mail.gmail.com
Is there any reason why can't open do an exclusive open? Of course
that's possible with sysopen and O_EXCL, but that's plain ugly and
hard to explain to newcomers. I'm having the impression that the only
reason we don't have it is that stdio doesn't have it, which is not a
particularly good reason anymore IMNSHO. Is there anything opposed to
adding something like «open my $fh, '>!', $filename»?

Leon

Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About