From owner-freebsd-hackers@FreeBSD.ORG  Fri Aug 12 19:51:35 2005
Return-Path: <owner-freebsd-hackers@FreeBSD.ORG>
X-Original-To: hackers@freebsd.org
Delivered-To: freebsd-hackers@FreeBSD.ORG
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 3D3E916A41F
	for <hackers@freebsd.org>; Fri, 12 Aug 2005 19:51:35 +0000 (GMT)
	(envelope-from igor@doom.homeunix.org)
Received: from voodoo.oberon.net (voodoo.oberon.net [212.118.165.100])
	by mx1.FreeBSD.org (Postfix) with ESMTP id B563D43D46
	for <hackers@freebsd.org>; Fri, 12 Aug 2005 19:51:34 +0000 (GMT)
	(envelope-from igor@doom.homeunix.org)
Received: from dialup84123-222.ip.peterstar.net ([84.204.123.222]
	helo=doom.homeunix.org)
	by voodoo.oberon.net with esmtps (TLSv1:AES256-SHA:256)
	(Exim 4.52 (FreeBSD)) id 1E3fYj-000AVR-NS
	for hackers@freebsd.org; Fri, 12 Aug 2005 21:51:30 +0200
Received: from doom.homeunix.org (localhost [127.0.0.1])
	by doom.homeunix.org (8.13.3/8.13.3) with ESMTP id j7CJo1Qm074080
	for <hackers@freebsd.org>; Fri, 12 Aug 2005 23:50:32 +0400 (MSD)
	(envelope-from igor@doom.homeunix.org)
Received: (from igor@localhost)
	by doom.homeunix.org (8.13.3/8.13.3/Submit) id j7CJnWJm074079
	for hackers@freebsd.org; Fri, 12 Aug 2005 23:49:32 +0400 (MSD)
	(envelope-from igor)
Date: Fri, 12 Aug 2005 23:49:27 +0400
From: Igor Pokrovsky <ip@doom.homeunix.org>
To: hackers@freebsd.org
Message-ID: <20050812194927.GA74052@doom.homeunix.org>
Mail-Followup-To: hackers@freebsd.org
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
User-Agent: Mutt/1.4.2.1i
Cc: 
Subject: perl's tie problem
X-BeenThere: freebsd-hackers@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: Technical Discussions relating to FreeBSD
	<freebsd-hackers.freebsd.org>
List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-hackers>, 
	<mailto:freebsd-hackers-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/freebsd-hackers>
List-Post: <mailto:freebsd-hackers@freebsd.org>
List-Help: <mailto:freebsd-hackers-request@freebsd.org?subject=help>
List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-hackers>,
	<mailto:freebsd-hackers-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Fri, 12 Aug 2005 19:51:35 -0000

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.