delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2008/01/17/13:30:34

X-Recipient: archive-cygwin AT delorie DOT com
X-Spam-Check-By: sourceware.org
Subject: Re: Defect report: ENOTSOCK on close
From: Krzysztof =?UTF-8?Q?=C5=BBelechowski?= <program DOT spe AT home DOT pl>
To: cygwin AT cygwin DOT com
In-Reply-To: <20080115101528.GE5097@calimero.vinschen.de>
References: <3A24DEEFA60C4684AE726A3A06A09738 AT SPE DOT COM DOT PL> <20080115101528 DOT GE5097 AT calimero DOT vinschen DOT de>
Date: Thu, 17 Jan 2008 19:29:47 +0100
Message-Id: <1200594588.6508.18.camel@a1dmin.vola.spe.com.pl>
Mime-Version: 1.0
X-Mailer: Evolution 2.12.1
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT com>
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

Dnia 15-01-2008, Wt o godzinie 11:15 +0100, Corinna Vinschen pisze:
> On Jan 15 09:19, Christopher Yeleigton wrote:
> > Summary:
> > Unexpected error ENOTSOCK upon closing filedes[0] obtained via socketpair
> >
> > Test case:
> >
> > #include <stdio.h>
> > #include <stdlib.h>
> > #include <sys/socket.h>
> >
> > int main(int argc, char *argv[])
> > {
> > auto int a_fd[02];
> > if(socketpair(AF_LOCAL, SOCK_STREAM, 0, a_fd))
> > perror("socketpair");
> > else
> > {
> > auto int an_ix = 0;
> > for(; an_ix < 02; ++an_ix)
> > if(close(a_fd[an_ix]))
> >   { enum BufLen { BUF_LEN = 040 };
> > auto char a_buf[BUF_LEN];
> > perror(snprintf(a_buf, BUF_LEN, "close %d", an_ix) > 0? a_buf:
> > "sprintf"); }}
> > return EXIT_SUCCESS; }
> >
> > Error message:
> > close 0: Socket operation on non-socket
> >
> > (Note it occurs with filedes[0] only, even if close is called for 
> > filedes[1]
> > first).
> >
> > OpenBSD does not exhibit this malfunction.
> 
> I tried your test application multiple times on XP SP2, 2003 Server x64,
> as well as on 2008 Server RC1.  I can not reproduce the above problem.
> On all three machines (all running Cygwin 1.5.25-7), the sockets are
> closed without failure every time.  Maybe that's a bad interaction with
> a third party product?  Did you check the FAQ?

The FAQ does not mention any of the products I have, namely, Panda
Internet Security and nVidia ForceWare.  The problem went away when I
uninstalled Panda and I hope it will not return even though I am going
to reinstall it, albeit without the firewall component.  (Having two
firewalls is a bad thing, of course; I thought the installer would be
smart enough not to install its firewall on top of the other.).

> 
>   http://cygwin.com/faq/faq.using.html#faq.using.bloda
> 
> 
> Corinna
> 

Thanks,
Chris


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