delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2011/08/22/05:25:37

X-Recipient: archive-cygwin AT delorie DOT com
X-SWARE-Spam-Status: No, hits=0.2 required=5.0 tests=AWL,BAYES_00,DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED,RCVD_NUMERIC_HELO,RP_MATCHES_RCVD,SPF_HELO_PASS,T_TO_NO_BRKTS_FREEMAIL
X-Spam-Check-By: sourceware.org
To: cygwin AT cygwin DOT com
From: jojelino <jojelino AT gmail DOT com>
Subject: _mcleanup is called twice in forkee!
Date: Mon, 22 Aug 2011 18:27:54 +0900
Lines: 7
Message-ID: <j2t790$mev$1@dough.gmane.org>
Mime-Version: 1.0
User-Agent: Mozilla/5.0 (Windows NT 5.2; rv:8.0a2) Gecko/20110819 Thunderbird/8.0a2
X-IsSubscribed: yes
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.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

When a program is compiled with -pg, it causes invocation of _monstartup 
and it calls atexit, the problem is, _mcleanup is called twice in forkee!
That's because of _GLOBAL_REENT is copied when a process is forked.
Then we have two _mcleanup. (_monstartup is with __constructor__ 
attribute.) and this is not we wanted.
the same thing can be applied to any atexit call in cygwin which doesn't 
cares about forkee.


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

- Raw text -


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