develooper Front page | perl.perl5.porters | Postings from September 2013

Re: [perl #112760] mkdir in Perl 5.8.8 Fails to Set the Sticky Bit onFreeBSD 7.1

Thread Previous | Thread Next
From:
Leon Timmermans
Date:
September 22, 2013 15:04
Subject:
Re: [perl #112760] mkdir in Perl 5.8.8 Fails to Set the Sticky Bit onFreeBSD 7.1
Message ID:
CAHhgV8iTODkG-Ey_u4jck5Y0v=GnyXg11qF9ZnKS5Sju3Q1Miw@mail.gmail.com
On Sat, May 12, 2012 at 9:17 AM, Aristotle Pagaltzis <pagaltzis@gmx.de>wrote:

> To me it would seem that it is. Dealing with this limitation in Perl
> code requires monkey code to be added to every user program, and for it
> to get added requires toes getting stubbed on this bug first. Working
> around it at the interpreter level would allow user code to pretend that
> all is right in the world.
>

To quote POSIX: "When bits in *mode* other than the file permission bits
are set, the meaning of these additional bits is implementation-defined."
So the BSDs are entirely conformant even if they desire other (equally
conformant) semantics. This is not really a bug.


> At the perl level it can be fixed with an #ifdef protecting a chmod
> guarded by a bit check. So the workaround is extremely cheap and even
> then incurs a penalty only for those who need it; and it can easily be
> dropped if and when FreeBSD is ever fixed, but at the same time breaks
> nothing if it isn’t removed promptly – so maintenance burden is minimal.
>
> There seems to be essentially zero downside to adding the workaround.
>
> At the same time I can’t see any upside in not adding it and thereby
> pushing the complexity out into Perl programs. Did I miss any benefit
> here? Does what I missed outweigh the above benefits of doing it at the
> interpreter level?
>

Sticky bits are uncommon enough that I think it's not worth the maintenence
costs.

Leon

Thread Previous | 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