From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6125 invoked by alias); 17 Dec 2014 17:52:23 -0000 Mailing-List: contact cygwin-xfree-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-xfree-owner@cygwin.com Reply-To: cygwin-xfree@cygwin.com Mail-Followup-To: cygwin-xfree@cygwin.com Received: (qmail 6054 invoked by uid 89); 17 Dec 2014 17:52:22 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.5 required=5.0 tests=AWL,BAYES_00,T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-HELO: newsaf.bio.caltech.edu Received: from newsaf.bio.caltech.edu (HELO newsaf.bio.caltech.edu) (131.215.12.41) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Wed, 17 Dec 2014 17:52:21 +0000 Received: from apache by newsaf.bio.caltech.edu ([local]:local) with local id 1Y1Iln-000707-QT - Using Exim-4.72 (MandrivaLinux) MTA (return-path ); Wed, 17 Dec 2014 09:52:19 -0800 To: cygwin-xfree@cygwin.com Subject: Re: startxwin.exe no longer =?UTF-8?Q?exists=3F?= HTTP-Posting-Client: 131.215.12.39 HTTP-Posting-URI: saf.bio.caltech.edu:443/roundcubemail/index.php HTTP-Posting-User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:34.0) Gecko/20100101 Firefox/34.0 SeaMonkey/2.31 X-PHP-Originating-Script: 0:rcmail.php MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Date: Wed, 17 Dec 2014 17:52:00 -0000 From: mathog In-Reply-To: References: " <548C82A3.9080604@gmail.com> <54905E8F.40809@ucsd.edu> " <9439619875edc65b1e7152b743ad5553@saf.bio.caltech.edu> Message-ID: X-Sender: mathog@caltech.edu User-Agent: Roundcube Webmail/0.9.5 X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: apache@saf.bio.caltech.edu X-SA-Exim-Scanned: No (on newsaf.bio.caltech.edu); SAEximRunCond expanded to false X-IsSubscribed: yes X-SW-Source: 2014-12/txt/msg00045.txt.bz2 On 17-Dec-2014 09:40, Erik Soderquist wrote: > >> There is no reason that should happen unless the startxwin script also >> crashes - and that basically should never happen. The script should >> clean >> up any mess that the binary might leave, and it should handle all >> conditions >> that might result from some process it has started crashing. That is, >> in >> the script (pseudocode): >> >> # If there is an existing lock file: >> # Test is there also an existing X11 binary process? >> # yes - abort with message: X11 server already running >> # no - remove lock file >> ########## >> # do whatever housekeeping is needed >> # then start binary >> /path/X11_server_binary $args >> #no matter how binary exits... >> rm /path/.X*lock >> >> The only time a script might not have a chance to run the last command >> is if >> it starts the server via "nohup binary &", assuming such a thing is >> even >> possible in cygwin, and then exits without waiting around for the >> binary to >> exit. Or, of course, if the whole system crashes, but that isn't the >> issue >> the end users are having. > > So you want your script to completely mask and/or destroy any evidence > that something crashed?? No, that is the log file, this is the lock file. It should rotate the log file from the previous run and delete the lock file. > > Also, as the X server is not bound to a tty, it forks to the > background on its own anyway, so your pseudocode example would delete > the lock file just after the X server started. In that case the the script needs to retrieve the PID of the forked process and wait for it to exit. Regards, David Mathog mathog@caltech.edu Manager, Sequence Analysis Facility, Biology Division, Caltech -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://x.cygwin.com/docs/ FAQ: http://x.cygwin.com/docs/faq/