Mailing-List: contact cygwin-developers-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-developers-owner AT cygwin DOT com Delivered-To: mailing list cygwin-developers AT cygwin DOT com Date: Fri, 21 Feb 2003 16:03:27 +0100 From: Corinna Vinschen To: cygwin-developers AT cygwin DOT com Subject: Heads up: Changed stat/fstat for sockets Message-ID: <20030221150327.GM1403@cygbert.vinschen.de> Reply-To: cygwin-developers AT cygwin DOT com Mail-Followup-To: cygwin-developers AT cygwin DOT com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4i Hi, just so that nobody is surprised. I've changed stat/fstat on sockets to return values which are more similar to what Linux returns. It's a bit difficult to explain. Basically it's now working like that: - fstat() on an open socket returns the current owner and group in the st_uid/st_gid fields and 0777 permissions in st_mode (see below). - stat() on AF_UNIX/AF_LOCAL sockets returns owner and group of the actual socket file in st_uid/st_gid. It returns the same st_ino value as the actual socket file on the disk, the actual file permissions in st_mode and the same st_dev value which would have been returned if the socket file would have been just a regular file on disk. Other fields like st_rdev, st_blocks and st_size are appropriately tweaked (mostly set to 0). The device special files /dev/dgsocket, /dev/streamsocket, /dev/tcp and /dev/udp are now correctly designated as character special files with distinct minor device numbers. Corinna -- Corinna Vinschen Please, send mails regarding Cygwin to Cygwin Developer mailto:cygwin AT cygwin DOT com Red Hat, Inc.