delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2015/07/24/09:19:04

X-Recipient: archive-cygwin AT delorie DOT com
DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:message-id:in-reply-to:references:date:subject
:from:to:mime-version:content-type:content-transfer-encoding; q=
dns; s=default; b=qt+hdOvtNXHKQTJqEUtvqQdXSaTDrpfp5TUP+vUvdulYb+
KaYJ0RZYwULDNH+/enlmj5FYYc8vH7OTUABwjZNf2oCD6zTTRJ0xDcY94MTDGx0P
9DyBai6SKUC4Gb/BTtWQXn7w+kakIoiD4wflzoDUqhj3Iz3xRYizNFhLS1uoQ=
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:message-id:in-reply-to:references:date:subject
:from:to:mime-version:content-type:content-transfer-encoding; s=
default; bh=7l1VJvYV91XQ/7UfBiR4Oc3OOn4=; b=M3zjx93yZ/SQLX9SFCIY
yrGp5nqXK5gMMY4E0jXXThJ03tEzDGVUyUuNj+IyWUkjRtiIHv2bkfhyH1fAcCXD
yFAHf+T+oOFs7F8CS0Ylz5gWms4iKQjBGueHHjTs5q6ALMLT/A08oqWWlGvid5xw
X4jYCvNFwYRdvOoPnj4doxk=
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.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
Authentication-Results: sourceware.org; auth=none
X-Virus-Found: No
X-Spam-SWARE-Status: No, score=0.1 required=5.0 tests=AWL,BAYES_50,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2
X-HELO: lb2-smtp-cloud6.xs4all.net
Message-ID: <d9ef810e0ad325a9b51f641a10a06f0b.squirrel@oude-webmail.xs4all.nl>
In-Reply-To: <55B22422.6000601@towo.net>
References: <announce DOT 55B1677D DOT 5080303 AT towo DOT net> <63a08c60771faffa23bc1c029235301d DOT squirrel AT oude-webmail DOT xs4all DOT nl> <55B22422 DOT 6000601 AT towo DOT net>
Date: Fri, 24 Jul 2015 15:18:42 +0200
Subject: Re: [ANNOUNCEMENT] Update: mintty 2.1.2
From: "Houder" <houder AT xs4all DOT nl>
To: cygwin AT cygwin DOT com
User-Agent: SquirrelMail/1.4.22
MIME-Version: 1.0
X-IsSubscribed: yes

Hi Thomas,

>>> mintty 2.1.2 is an update in response to a number of crash reports under
>>> 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?

... euh, I do not believe so (in my case) ... I installed v211 using setup, which as
you know, does a full "rebase" ...

Also using 'setsid mintty' (in case of v113, v203) does not fail ...

> How much free memory do you have?

 - 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 SysInternals)

I am really surprised, that you (and others?) do not experience crashes (v211, v212
if -D is specfied). Failure occurs consistent on my side.

> Maybe setsid() should not be called if fork() fails...
> Could you try this please:
>    if (daemonize && !isatty(0)) {
>      int pid = fork();
>      if (pid > 0) exit(0);    // exit parent process
>      if (pid == 0) setsid();  // detach child process
>      if (pid < 0) {
>        error("could not detach from caller");
>        exit(9);
>      }
>    }

Hint: source code of setsid.c -- util-linux package)

>> (... and I ask myself whether or not the condition '!isatty' is the "correct condition" to
>>   go "daemon")
> I wanted to check ttyname() for "/cons" but surprisingly ttyname() was
> null when started from cygwin console;

... 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).

As I wrote 'and I asked myself', I was wondering about something like: 'getpid() != 1'

Henri


--
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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019