delorie.com/archives/browse.cgi | search |
X-Recipient: | archive-cygwin AT delorie DOT com |
X-SWARE-Spam-Status: | No, hits=-3.0 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,KHOP_THREADED,T_RP_MATCHES_RCVD |
X-Spam-Check-By: | sourceware.org |
Message-ID: | <33973296.post@talk.nabble.com> |
Date: | Wed, 6 Jun 2012 17:38:10 -0700 (PDT) |
From: | jjo <3pf2udv2bz AT snkmail DOT com> |
To: | cygwin AT cygwin DOT com |
Subject: | Re: program restarts itself automatically when run from Cygwin shell |
In-Reply-To: | <4FCFED7A.4070903@cs.umass.edu> |
MIME-Version: | 1.0 |
References: | <33972885 DOT post AT talk DOT nabble DOT com> <4FCFDF18 DOT 5060901 AT sbcglobal DOT net> <33973137 DOT post AT talk DOT nabble DOT com> <4FCFED7A DOT 4070903 AT cs DOT umass DOT edu> |
X-IsSubscribed: | yes |
Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
List-Id: | <cygwin.cygwin.com> |
List-Unsubscribe: | <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT 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 |
Actually, I think Greg Chicares-2 may have provided the answer earlier. When I set CYGWIN to procs_retry:1 the old fashioned Windows way (using the Control Panel, etc.) and then open a new Cygwin shell to run my application in, I do not see the repeated restart behavior. Furthermore, when I follow my command line with '; echo $?' to see its exit status, I'm finding it is usually 0 but sometimes 127 and I think it is on these occasions that the program would previously repeat itself. The odd thing is that this can happen even after the program has apparently concluded successfully. This is useful information in two respects. First, I now know how to avoid random restarts. Second, this is a clue that somewhere in the code there is a problem with how multiple threads are behaving (probably in terms of memory access) which ends up causing something (a destructor?) to exit with status 127 (is that equivalent to -1 in this case??) before the program as a whole can return 0 upon exit. All the other operating systems don't really care about this, but Cygwin does so I might as well track it down and fix it. You never know if it may be corrupting more important data somewhere else. My thanks to all. -- View this message in context: http://old.nabble.com/program-restarts-itself-automatically-when-run-from-Cygwin-shell-tp33972885p33973296.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
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |