X-Recipient: archive-cygwin@delorie.com
X-SWARE-Spam-Status: No, hits=-3.6 required=5.0 	tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW,SPF_HELO_PASS,SPF_PASS
X-Spam-Check-By: sourceware.org
To: cygwin@cygwin.com
From: Eric Blake <ebb9@byu.net>
Subject:  Re: fun? with libsigsegv
Date: Fri, 17 Jul 2009 22:50:17 +0000 (UTC)
Lines: 32
Message-ID:  <loom.20090717T224758-877@post.gmane.org>
References:  <loom.20090717T213846-627@post.gmane.org>
Mime-Version:  1.0
Content-Type:  text/plain; charset=us-ascii
Content-Transfer-Encoding:  7bit
User-Agent: Loom/3.14 (http://gmane.org/)
X-IsSubscribed: yes
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com

Eric Blake <ebb9 <at> byu.net> writes:

> Now, upgrade to the latest snapshot, 20090717.
> 
> Without libsigsegv, things operate as before.  But with libsigsegv, I now 
see...

Aargh.  I spoke too soon.  For my previous mail, I fat-fingered my command 
line, and ended up compiling with:
$ gcc -o foo foo.c -lsigsegv -Dsigsegv
instead of the intended
$ gcc -o foo foo.c -lsigsegv -Dlibsigsegv

Of course, given the code, that meant I wasn't using libsigsegv like I thought 
I was.  So, with my typo corrected, I'm (unfortunately) still seeing libsigsegv 
interference:

$ ./foo
fclose -1, errno 9
Aborted (core dumped)

> Meanwhile, I am considering working on a newlib patch that changes fflush to 
> immediately die with EBADF rather than trying to _flockfile(fp) if fp->_flags 
> is 0, if for no other reason than to be more like Linux in returning EBADF 
> instead of success on my unspecified STC.

But this front may still have hope.

-- 
Eric Blake




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

