develooper Front page | perl.perl5.porters | Postings from May 2012

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

Thread Previous | Thread Next
From:
Chris 'BinGOs' Williams
Date:
May 12, 2012 02:23
Subject:
Re: [perl #112760] mkdir in Perl 5.8.8 Fails to Set the Sticky Biton FreeBSD 7.1
Message ID:
20120512092242.GA18892@klanker.bingosnet.co.uk
On Thu, May 10, 2012 at 09:37:21AM +0100, Nicholas Clark wrote:
> On Tue, May 08, 2012 at 11:12:39AM -0700, Steve Siano wrote:
> > Thanks?Tony?for tracking down the root cause and thanks?Chris?for confirming it.
> > 
> > Since it is a BSD bug and not a Perl bug, I've updated my code accordingly:
> > 
> > if (mkdir($dir, $mode)) {
> > ? ? chomp(my $OS = `uname`);
> > 
> > ? ? if ($OS eq 'FreeBSD' && $mode & 01000) {
> > ? ? ? ? if (chmod($mode, $dir)) {
> > 
> 
> You might want to use $^O instead of `uname`, as it saves some work.
> (Although it's 'freebsd', not 'FreeBSD' in $^O)
> 

Confirmed it on DragonflyBSD 3.0.2 now as well.

-- 
Chris Williams
aka BinGOs
PGP ID 0x4658671F
http://www.gumbynet.org.uk
==========================


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