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 Message-ID: <5AC19B5C084C754D82F23EA55ECF2EF610BB8F@mailgate.salmon.ltd.uk> From: Glen Burson To: "'cygwin AT cygwin DOT com'" Subject: RE: Restart cygrunsrv service on failure Date: Wed, 19 Oct 2005 08:53:16 +0100 MIME-Version: 1.0 Content-Type: text/plain Hello, cygrunsrv V1.10 Windows XP I'm having real trouble getting my service to restart on failure, using the Windows service "Recovery" options. I have set: - First Failure "Restart the Service" Second Failure "Restart the Service" Subsequence Failures "Restart the Service" I have installed my process like: - cygrunsrv -I test -p /tmp/test.sh "test.sh" just goes to sleep for 10 seconds then terminates. Windows logs in the Event Viewer that the service terminated (gracefully, error code 0) but doesn't restart it. I have tried exiting from the script using a non-zero code (I've tried lots of different ones) but although the non-zero exit code is logged in the Event Viewer, it still doesn't restart it. I've also tried the install option "-n" which tells Windows that the service should never terminate but, although I now get an error in the Event Viewer, it still doesn't restart it! The ONLY way I've managed to get Windows to restart the service is to kill the cygrunsrv process before the child script terminates. Killing the child script does not work either. It seems to be related to how the process terminates but I seem to crack it! Thanks in advance for any suggestions. I've seen some postings that imply that people have this working but no examples. Thanks, Glen. ********************************************************************** This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the system manager. This footnote also confirms that this email message has been swept by MIMEsweeper for the presence of computer viruses. www.mimesweeper.com ********************************************************************** This message has been scanned for viruses by BlackSpider MailControl - www.blackspider.com -- 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/