delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2015/07/24/03:50:52

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=gcrKIyrEgh1X/tw6sfRNssV3uGsx5tascTo9GvEBBOpKjF
qoBsRWxmMM7E46iQT8AeIZespFiFjIbsrRWrgTfGFoflvVdNznUkFnhypdyIy3au
JlFHiDmLqS4gpkf3B7NLLZzrVLkuX1Ip+d1y0pB8+ZiS5X7ql8K47CPV5+vDA=
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=KlqEjFSAZqJ8aKuGE8M2zUHMUto=; b=KTYWeqZJQ+6tfKqysqpx
NjwX/rbYbY7SgFD9RBeXBV6USJnvD/yZoJ+q7IBJwhYmezFITZZFV5bW4B2KeZGS
ld9rotD+mX7U9t83sTpBdNXph91Bvbn5OtvHg0xujVVSpIHIjQDq3gwHmfuTb7lb
i8G2H4EREcFcJZRljP0D+KQ=
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.3 required=5.0 tests=AWL,BAYES_20,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2
X-HELO: lb3-smtp-cloud2.xs4all.net
Message-ID: <63a08c60771faffa23bc1c029235301d.squirrel@oude-webmail.xs4all.nl>
In-Reply-To: <announce.55B1677D.5080303@towo.net>
References: <announce DOT 55B1677D DOT 5080303 AT towo DOT net>
Date: Fri, 24 Jul 2015 09:50:28 +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

> mintty 2.1.2 is an update in response to a number of crash reports under
> unclear circumstances;
> mintty only detaches from the caller's terminal if the option -D is given

Thank you, Thomas!

I extracted mintty.exe (and named it mintty-v212.exe) from mintty-2.1.2-0.tar.xz, and
placed it in <Windows Cygwin root>/bin (i.e. I did not install through setup.exe)

From winmain.c (v212),

  // if started from console, try to detach from caller's terminal (~daemonize)
  // in order to not suppress signals
  // (indicated by isatty if linked with -mwindows)
  if (daemonize && !isatty(0)) { // boolean daemonize is set to true if -D is specified
    if (fork() > 0) exit(0);
    setsid();
  }

I gather, that v212 has the "old behaviour" if -D is not specified on the command line.

Test v212:

 - started from the explorer: works
 - using a dos console (in which mintty-v212 is started): works
 - using a dos console (in which bash is started), followed by invocation of mintty-v212: works
 - using a dos console (in which cmd is started), followed by invocation of mintty-v212: works

Of course, SIGINT is ignored in the third case (old behaviour).

Invocation of 'mintty-v212 -D' in the third case, makes "mintty" crash again ...
(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")

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