public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* _mcleanup is called twice in forkee!
@ 2011-08-22  9:25 jojelino
  2011-08-22  9:57 ` jojelino
  0 siblings, 1 reply; 3+ messages in thread
From: jojelino @ 2011-08-22  9:25 UTC (permalink / raw)
  To: cygwin

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: _mcleanup is called twice in forkee!
  2011-08-22  9:25 _mcleanup is called twice in forkee! jojelino
@ 2011-08-22  9:57 ` jojelino
  2011-08-22 14:21   ` Christopher Faylor
  0 siblings, 1 reply; 3+ messages in thread
From: jojelino @ 2011-08-22  9:57 UTC (permalink / raw)
  To: cygwin

On 2011-08-22 PM 6:27, jojelino wrote:
> 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!
oh it was wrong. _monstartup is not called twice


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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: _mcleanup is called twice in forkee!
  2011-08-22  9:57 ` jojelino
@ 2011-08-22 14:21   ` Christopher Faylor
  0 siblings, 0 replies; 3+ messages in thread
From: Christopher Faylor @ 2011-08-22 14:21 UTC (permalink / raw)
  To: cygwin

On Mon, Aug 22, 2011 at 07:00:23PM +0900, jojelino wrote:
>On 2011-08-22 PM 6:27, jojelino wrote:
>> 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!
>oh it was wrong. _monstartup is not called twice

Why are you talking about this here when Corinna asked you questions in
cygwin-developers?

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2011-08-22 14:21 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-08-22  9:25 _mcleanup is called twice in forkee! jojelino
2011-08-22  9:57 ` jojelino
2011-08-22 14:21   ` Christopher Faylor

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).