From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29342 invoked by alias); 17 Dec 2014 17:40:25 -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 29330 invoked by uid 89); 17 Dec 2014 17:40:23 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.6 required=5.0 tests=BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-yk0-f174.google.com Received: from mail-yk0-f174.google.com (HELO mail-yk0-f174.google.com) (209.85.160.174) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Wed, 17 Dec 2014 17:40:22 +0000 Received: by mail-yk0-f174.google.com with SMTP id 10so7053993ykt.19 for ; Wed, 17 Dec 2014 09:40:20 -0800 (PST) MIME-Version: 1.0 X-Received: by 10.236.30.65 with SMTP id j41mr31494266yha.105.1418838020381; Wed, 17 Dec 2014 09:40:20 -0800 (PST) Received: by 10.170.233.6 with HTTP; Wed, 17 Dec 2014 09:40:20 -0800 (PST) In-Reply-To: <9439619875edc65b1e7152b743ad5553@saf.bio.caltech.edu> References: <548C82A3.9080604@gmail.com> <54905E8F.40809@ucsd.edu> <9439619875edc65b1e7152b743ad5553@saf.bio.caltech.edu> Date: Wed, 17 Dec 2014 17:40:00 -0000 Message-ID: Subject: Re: startxwin.exe no longer exists? From: Erik Soderquist To: cygwin-xfree@cygwin.com Content-Type: text/plain; charset=UTF-8 X-IsSubscribed: yes X-SW-Source: 2014-12/txt/msg00044.txt.bz2 > 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?? That is very counter-productive toward anything resembling fixing a problem or even discovering a problem exists. 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. > > Regards, > > David Mathog -- Erik -- 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/