stderr is not likely to show up anywhere with a GUI program.
The standard practice in Windows is to use OutputDebugString.

https://msdn.microsoft.com/en-us/library/windows/desktop/aa363362%28v=vs.85%29.aspx


2015-04-22 14:15 GMT+03:00 LRN <lrn1...@gmail.com>:

> On 22.04.2015 14:02, Óscar Fuentes wrote:
> > LRN writes:
> >
> >> Here's a patch to fix this.
> >> It does solve the problem for the simple testcase, but i have no idea
> how it
> >> would behave in the wild, i didn't test it on anything else. One might
> notice
> >> that it is set to crash when certain things happen. I'm not sure
> whether these
> >> things would happen with correct real-life code. If they do, we'll have
> to find
> >> another way.
> >
> >> +  if (EPERM == pthread_spin_destroy (old))
> >> +    {
> >> +      fprintf(stderr, "Error cleaning up spin_keys for thread %lu\n",
> GetCurrentThreadId ());
> >> +      abort ();
> >> +    }
> >
> > Why is fprintf used for reporting critical errors? On a GUI application
> > running outside of a debugger that's a guarantee that the message will
> > be invisible.
>
> Probably true, but that's the easiest debug-message-spewing method i could
> think of at the time. Also, it calls abort() immediately after that, which
> terminates the application. Once debugger is hooked up, the message should
> be
> (hopefully) seen (unless the app eliminates stderr completely).
>
> Point is that this isn't supposed to happen at all, and right now eveyone's
> goal should be to figure out whether it actually happens or not. If it
> does,
> then this code won't go live anyway. If it doesn't, this debug message
> won't be
> relevant.
>
> --
> O< ascii ribbon - stop html email! - www.asciiribbon.org
>
>
> ------------------------------------------------------------------------------
> BPM Camp - Free Virtual Workshop May 6th at 10am PDT/1PM EDT
> Develop your own process in accordance with the BPMN 2 standard
> Learn Process modeling best practices with Bonita BPM through live
> exercises
> http://www.bonitasoft.com/be-part-of-it/events/bpm-camp-virtual-
> event?utm_
> source=Sourceforge_BPM_Camp_5_6_15&utm_medium=email&utm_campaign=VA_SF
> _______________________________________________
> Mingw-w64-public mailing list
> Mingw-w64-public@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/mingw-w64-public
>
>
------------------------------------------------------------------------------
BPM Camp - Free Virtual Workshop May 6th at 10am PDT/1PM EDT
Develop your own process in accordance with the BPMN 2 standard
Learn Process modeling best practices with Bonita BPM through live exercises
http://www.bonitasoft.com/be-part-of-it/events/bpm-camp-virtual- event?utm_
source=Sourceforge_BPM_Camp_5_6_15&utm_medium=email&utm_campaign=VA_SF
_______________________________________________
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public

Reply via email to