This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: chmod() converts local domain socket file to regular file


On Apr 27 12:58, Andrey Simonenko wrote:
> Greetings,
> 
> Has Cygwin 1.5.24-2 and XP.
> 
> A program creates local domain socket.  If S_IRUSR bit is
> removed from the socket file, then this file is converted to a
> regular file.

This is a chicken-egg problem, sort of.  The fact that the file
represents an AF_LOCAL socket is coded into the content of the file
itself.  If you remove the S_IRxxx flags, the file can't be read anymore
and Cygwin can't figure out that this is a socket file.

It's arguably a bug in Cygwin that it's possible to remove the read
flags entirely from a socket file, but so far I'm not quite sure what
the best solution to this problem is.  I'm looking into fixing that but
for now the answer is just "don't do that".


Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader          cygwin AT cygwin DOT com
Red Hat

--
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/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]