This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [ANNOUNCEMENT] Update: mintty 2.1.2


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]