X-Spam-Check-By: sourceware.org Message-ID: <43E70DF0.A05E2BBB@dessent.net> Date: Mon, 06 Feb 2006 00:50:56 -0800 From: Brian Dessent MIME-Version: 1.0 To: cygwin AT cygwin DOT com Subject: Re: how to avoid error dialog during app crash when non-interactive References: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Reply-To: cygwin AT cygwin DOT com Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Hans Horn wrote: > I have an app build with gcc -mno-cygwin, that constantly bombards me with > error dialogs as shown in the attachment. > The app is meant to run non-interactively. > Is there a way to compile the app differently so error notifications get > simply printed out rather than being presented via dialog? First of all, you're using the mingw compiler when you use -mno-cygwin, so you should ask on the mingw list. This has little to do with Cygwin. But I don't think there's a lot you can do about this other than obviously fixing your bugs that are causing the faults. When you use mingw you are using the Microsoft C runtime library (MSVCRT) and it sets up its the fault hander which is what is showing the above dialog. So I don't think you have any control in that aspect. I suppose you could try installing your own handler in the SEH chain that would catch the access violation and handle it in some way. If you were using MSVC you could just use _try/_except but unfortunately gcc does not support this, so you would have to do it manually. (Is there a set of macros out there somewhere that eases this?) You'll have to consult MSDN or google for more details there, not exactly on topic for this list since Cygwin does exception handling in the posix way. A starting point is . Brian -- 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/