delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2003/02/20/02:02:57

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/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
From: "Paul Swartz" <z3p AT twistedmatrix DOT com>
To: cygwin AT cygwin DOT com
Date: Thu, 20 Feb 2003 02:02:40 -0500
MIME-Version: 1.0
Subject: stat/fstat incompatibility w/ unix sockets
Message-ID: <3E543740.15115.880198B@localhost>
Note-from-DJ: This may be spam

--Message-Boundary-8648
Content-type: text/plain; charset=US-ASCII
Content-transfer-encoding: 7BIT
Content-description: Mail message body

The man page for stat/fstat says that the results 
returned should be the same.  However, when asking 
for the fstat on a unix socket, the result is not 
the same.  The attached python code demonstrates 
this problem.  Is this an already known issue with 
a solution already?  Are there plans to resolve 
it?

TIA,

-p
-- 
     Paul Swartz
(o_  http://twistedmatrix.com/users/z3p.twistd/
//\  z3p AT twistedmatrix DOT com
V_/_ AIM: Z3Penguin


--Message-Boundary-8648
Content-type: text/plain; charset=US-ASCII
Content-disposition: inline
Content-description: Attachment information.

The following section of this message contains a file attachment
prepared for transmission using the Internet MIME message format.
If you are using Pegasus Mail, or any another MIME-compliant system,
you should be able to save it or view it from within your mailer.
If you cannot, please ask your system administrator for assistance.

   ---- File information -----------
     File:  unixtest3.py
     Date:  20 Feb 2003, 1:55
     Size:  278 bytes.
     Type:  Text

--Message-Boundary-8648
Content-type: Application/Octet-stream; name="unixtest3.py"; type=Text
Content-disposition: attachment; filename="unixtest3.py"

import socket, tempfile, os
filename = tempfile.mktemp()
listen_sock = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM)
listen_sock.bind(filename)
os.chmod(filename, 0600)
print "stat from filename", os.stat(filename)
print "state from fileno ", os.fstat(listen_sock.fileno())


--Message-Boundary-8648
Content-Type: text/plain; charset=us-ascii

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/
--Message-Boundary-8648--

- Raw text -


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