This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Re: [ANNOUNCEMENT] Update: mintty 2.1.2
- From: "Houder" <houder at xs4all dot nl>
- To: cygwin at cygwin dot com
- Date: Fri, 24 Jul 2015 15:18:42 +0200
- Subject: Re: [ANNOUNCEMENT] Update: mintty 2.1.2
- Authentication-results: sourceware.org; auth=none
- 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>
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