delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2004/12/31/15:02:45

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Date: Fri, 31 Dec 2004 12:02:40 -0800
From: Yitzchak Scott-Thoennes <sthoenna AT efn DOT org>
To: cygwin AT cygwin DOT com
Subject: Re: 20041225 and 20041227 snapshots not creating files with correct permissions
Message-ID: <20041231200240.GA532@efn.org>
References: <20041231093413 DOT GA3504 AT efn DOT org>
Mime-Version: 1.0
In-Reply-To: <20041231093413.GA3504@efn.org>
User-Agent: Mutt/1.4.1i
Organization: bs"d
X-IsSubscribed: yes

On Fri, Dec 31, 2004 at 01:34:14AM -0800, Yitzchak Scott-Thoennes wrote:
> With the 20041225 and 20041227 snapshots, the following program erroneously
> shows mode: 0100644.  20041224 and earlier correctly show mode: 0100640.
> 
> #include <stdio.h>
> #include <fcntl.h>
> #include <unistd.h>
> #include <sys/stat.h>
> 
> int main(int argc, char **argv)
> {
>   int fd;
>   struct stat s;
> 
>   (void)umask(0);
>   fd = open("foo", O_RDWR|O_CREAT|O_EXCL, 0640);
>   if (fd < 0) { perror("open failed"); }
>   if (close(fd)) { perror("close failed"); }
> 
>   if (stat("foo", &s)) { perror("stat failed"); }
>   printf("mode: 0%o\n", s.st_mode);
> 
>   if (unlink("foo")) { perror("unlink failed"); }
>   return 0;
> }

Seems to be corrected in the 20041231 snapshot, thanks.

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019