From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22719 invoked by alias); 24 Jul 2015 13:34:12 -0000 Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com Received: (qmail 22710 invoked by uid 89); 24 Jul 2015 13:34:12 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-5.4 required=5.0 tests=AWL,BAYES_00,KAM_LAZY_DOMAIN_SECURITY autolearn=no version=3.3.2 X-HELO: calimero.vinschen.de Received: from aquarius.hirmke.de (HELO calimero.vinschen.de) (217.91.18.234) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 24 Jul 2015 13:34:11 +0000 Received: by calimero.vinschen.de (Postfix, from userid 500) id A29F7A8090E; Fri, 24 Jul 2015 15:34:08 +0200 (CEST) Date: Fri, 24 Jul 2015 13:34:00 -0000 From: Corinna Vinschen To: cygwin@cygwin.com Subject: Re: [ANNOUNCEMENT] Update: mintty 2.1.2 Message-ID: <20150724133408.GB7535@calimero.vinschen.de> Reply-To: cygwin@cygwin.com Mail-Followup-To: cygwin@cygwin.com References: <63a08c60771faffa23bc1c029235301d.squirrel@oude-webmail.xs4all.nl> <55B22422.6000601@towo.net> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="9zSXsLTf0vkW971A" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) X-SW-Source: 2015-07/txt/msg00377.txt.bz2 --9zSXsLTf0vkW971A Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-length: 2575 On Jul 24 15:18, Houder wrote: > Hi Thomas, >=20 > >>> mintty 2.1.2 is an update in response to a number of crash reports un= der > >>> unclear circumstances; > > To resolve this discomforting issue which I still cannot reproduce, > > could please those who experience a crash report some details about > > their calling environment? > > Could the issue be related to the occasional fork() resource problems in > > cygwin? >=20 > ... euh, I do not believe so (in my case) ... I installed v211 using setu= p, which as > you know, does a full "rebase" ... >=20 > Also using 'setsid mintty' (in case of v113, v203) does not fail ... >=20 > > How much free memory do you have? >=20 > - my computer has lots of free memory (using less than 2 Gb of 8 Gb) > - my environment: using Cygwin (only the traditional tools) > - plus: Explorer (and most of the time: Process Explorer from SysInterna= ls) >=20 > I am really surprised, that you (and others?) do not experience crashes (= v211, v212 > if -D is specfied). Failure occurs consistent on my side. >=20 > > Maybe setsid() should not be called if fork() fails... > > Could you try this please: > > if (daemonize && !isatty(0)) { > > int pid =3D fork(); > > if (pid > 0) exit(0); // exit parent process > > if (pid =3D=3D 0) setsid(); // detach child process > > if (pid < 0) { > > error("could not detach from caller"); > > exit(9); > > } > > } >=20 > Hint: source code of setsid.c -- util-linux package) >=20 > >> (... and I ask myself whether or not the condition '!isatty' is the "c= orrect condition" to > >> go "daemon") > > I wanted to check ttyname() for "/cons" but surprisingly ttyname() was > > null when started from cygwin console; >=20 > ... I expect ttyname() to return NULL, as mintty is a GUI application ...= (and it did, using > a "small GUI test program"; however it returned /dev/pty0 when executing = it from a dos console > in which mintty had been started). Yes, I am confused). >=20 > As I wrote 'and I asked myself', I was wondering about something like: 'g= etpid() !=3D 1' Guys, the Cygwin DLL is as much open source as the other stuff we're talking about here. It's a user space DLL, not a kernel driver or rocket science. Give debugging a chance. Ideally build your own Cygwin DLL with CFLAGS=3D-g to avoid optimization. Please don't let me do this alone and just give up if I don't. Corinna --=20 Corinna Vinschen Please, send mails regarding Cygwin to Cygwin Maintainer cygwin AT cygwin DOT com Red Hat --9zSXsLTf0vkW971A Content-Type: application/pgp-signature Content-length: 819 -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBCAAGBQJVsj7QAAoJEPU2Bp2uRE+gJUsP/A9v8yVYiaaId8mKmkqlT/Ws OomC0IuadkflPIXy/gM9Y1QL2P4TBUjdOf8g9H7OqMq5mXR1YSzG01pGhuZVWPw8 H4pe15yzXUtKwcdQ0BcmRNlTvfBnjGZTRX0jFGM8SAclA5MZS4zl3ESPORy9iTht snwr/ZjULdv25VvT01luuA8UFv9IjXSj3k2p8QmAtfIBXPg5ewEiSRu/JFtvSurV BXX4dOOK3jS1krPmxRGAhpxj/VD58d5KyBb5TcDDGY56izUDERQAG+0ta2E1/zk3 5uIhhepkD2pD6vzacmeRLNAFOKDGH3jgD1x0T/+PWvXhMQH8jGeMe9bd2Zi1WGaa WbUYDREwgQARQNXEuvfYQ8kz28jBivrSp9PHwql22bFKjqhcDvtu8tkyMsH9bAyF xfCRNuF0pQIIKNZfLoIYVy2V1Of6y+K+LgZSGW5DZhRwvp6QLeeXYEZPKx4wURj3 mzB+mHevKTOwfGMCoMEb7mwrO8wiy9D0SYbqOGSqH+hIwMgcJtmapFVldhexlEtF F7mjvwMuknQiSmfOa8km9H3jjvREgW9gxywXTXzCxw/pPswxsZ1+XRONhtd7TMTP 5hOmMJkoF04yPP/YTVSI9M0uMdcA0yG1auMWAndKCAgrYmqXgD+kZAYqnNRemXLa uXs6bptE33tNgc9rJYKU =cIea -----END PGP SIGNATURE----- --9zSXsLTf0vkW971A--