X-Recipient: archive-cygwin AT delorie DOT com X-SWARE-Spam-Status: No, hits=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Message-ID: <33972885.post@talk.nabble.com> Date: Wed, 6 Jun 2012 15:19:51 -0700 (PDT) From: jjo <3pf2udv2bz AT snkmail DOT com> To: cygwin AT cygwin DOT com Subject: program restarts itself automatically when run from Cygwin shell MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: 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 My problem in brief: Oftentimes, when I start my command line launched console application from Cygwin it runs through to the end and then it restarts itself from the beginning without any intervention on my part. I've seen it automatically restart itself and run through several times over before it finally stops repeating. This doesn't happen every time, but it happens frequently enough to be really annoying. I have never seen this happen when I start the program from a standard Windows Command Prompt window. Details: 1) My application has buils for Linux, Macintosh, and Windows systems, some 32-bit others 64-bit, using several different C++ compilers (eg., Intel, Visual Studio, Metrowerks Codewarrior, Xcode, etc.) and various combinations of libraries. The problem is confined to the Windows-compatible builds that are run from a Cygwin shell, i.e., if you run any other version of the code on a different system or you don't start the code from a Cygwin shell, you never see this behavior, but if you run any of the Windows builds (32- or 64-bit Visual Studio C++ or 32-bit Codewarrior C++) from a Cygwin shell you sometimes do. 2) My application can be run single or multithreaded. The number of threads to use is a command line option. When the code starts it uses CreateThread Windows API calls to create any additional threads it needs and before it ends it uses CloseHandle calls to destroy them. The problem does not occur when the program runs single threaded but can occur when two or more threads are used. 3) My application is big and complicated and I couldn't post it for others to experiment with even if I wanted to, so the best I can do is describe it and answer more specific questions. My question: So the question is this: How do I debug this? Since the problem apparently occurs after my program has already finished I'm at a loss as to what to do. -- View this message in context: http://old.nabble.com/program-restarts-itself-automatically-when-run-from-Cygwin-shell-tp33972885p33972885.html Sent from the Cygwin list mailing list archive at Nabble.com. -- 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