perl's tie problem

Igor Pokrovsky ip at doom.homeunix.org
Fri Aug 12 19:51:35 GMT 2005


Hi all,

Consider the following except from a perl program:

tie(%foodb, 'MLDBM', $BAR_FILE, O_CREAT | O_RDWR, 0666)                    
  or die("Cannot open $BAR_FILE: $!\n");

I expect it to create a new $BAR_FILE, if none existed, with 0666
permissions. But it doesn't. It creates a file with default umask 
specified permissions - 0644. So I have to manually do chmod on that
file afterwards. Is there anything I don't understand?

%uname -a
FreeBSD doom.homeunix.org 4.11-STABLE FreeBSD 4.11-STABLE #0: 
Tue Jul  5 21:05:20 MSD 2005 [...] i386

Perl version is 5.8.7

Thanks,

-ip

-- 
Ignorance should be painful.


More information about the freebsd-hackers mailing list