delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2019/12/18/17:56:13

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:subject:to:references:from:message-id:date
:mime-version:in-reply-to:content-type
:content-transfer-encoding; q=dns; s=default; b=Qi6H8wVNOBYOFuzH
/NmsVKzPX6zPTRnVbHwa/Zt1dM/sxqsvDmDTnXhuCuVkr5zXhPmF/GMis3g3FuDi
fGB5gMf7GDh0iTUTSXyRcfrY6WD1vp7W6KT0laREszYvbZ6As3Mpw/fa7/Unjxu8
L8HrqIVtgdtvcuwAsUUueSpa+tg=
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:subject:to:references:from:message-id:date
:mime-version:in-reply-to:content-type
:content-transfer-encoding; s=default; bh=Ebg1jZinc02B1RGX0MHaAa
ZIpi8=; b=RNN+TxqCtPFhsqzuxqk4ZjsxMdRJWI7icPb5LHZly4q0nQu97pqbI0
i2i2a8kFUBi6K4geVG2oU83ISAwx0CtZtToR90sVMpjIhBNTSxpSpo6OmKd00KTG
zRp8X3F9G3veW1SbhA52aQZeZMR8JJL9IvmeDE7ul6ctQH/WwUBME=
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-Spam-SWARE-Status: No, score=-2.3 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 spammy=
X-HELO: mout.kundenserver.de
Subject: Re: MC no longer working with cygwin 3.1.x
To: cygwin AT cygwin DOT com
References: <DB8PR01MB5996973955794728D12078E6BC530 AT DB8PR01MB5996 DOT eurprd01 DOT prod DOT exchangelabs DOT com> <97c8a719-73b9-e0ec-9651-97c2c684a086 AT gmail DOT com> <20191218193205 DOT GP10310 AT calimero DOT vinschen DOT de> <c3809f52-1842-83d6-6692-53f6caec3491 AT cornell DOT edu>
From: Thomas Wolff <towo AT towo DOT net>
Message-ID: <e79cd247-c573-3c27-6636-c6d9a32447a4@towo.net>
Date: Wed, 18 Dec 2019 23:55:16 +0100
User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.9.1
MIME-Version: 1.0
In-Reply-To: <c3809f52-1842-83d6-6692-53f6caec3491@cornell.edu>
X-IsSubscribed: yes


Am 18.12.2019 um 22:14 schrieb Ken Brown:
> On 12/18/2019 2:32 PM, Corinna Vinschen wrote:
>> On Dec 18 17:23, Marco Atzeri wrote:
>>> Am 18.12.2019 um 15:42 schrieb Laurent R:
>>>> Dear all,
>>>>
>>>> After the update to cygwin-3.1.1, mc (aka Midnight Commander) no longer starts. It goes into an infinite loop, if I go back to cygwin-3.0.7, mc works perfectly.
>>>>
>>>> I tested with cygwin-3.1.0, same problem.
>>>>
>>>> The MC version is 4.8.23 and the operating system is Windows 10 Pro x64 1903.
>>>>
>>>> Regards.
>>>>
>>> confirmed
>>>
>>> there must be a race somewhere as running /usr/bin/mc.exe from strace
>>> works fine.
>> But that's not the only problem running mc AFAICS.  I'm seeing an
>> error message in the background:
>>
>> Cannot open named pipe /tmp/mc-corinna/mc.pipe.384
>>     /cygdrive/d/cyg_pub/devel/mc/mc-4.8.23-1.x86_64/src/mc-4.8.23/src/subshell/common.c: open: Permission denied
>>
>> It looks like there's another problem, this time with the new FIFO
>> code.
>>
>> Ken, care to take a look?
> I've just looked at the mc source code, and it seems that (under tcsh only), mc
> creates a fifo and tries to open it twice as O_RDWR.  This is not supported on
> Cygwin, so the second attempt fails.
>
> Here's the relevant code from src/subshell/common.c:
>
>           if (mc_global.shell->type == SHELL_TCSH)
>           {
>               g_snprintf (tcsh_fifo, sizeof (tcsh_fifo), "%s/mc.pipe.%d",
>                           mc_tmpdir (), (int) getpid ());
>               if (mkfifo (tcsh_fifo, 0600) == -1)
>               [...]
>               /* Opening the FIFO as O_RDONLY or O_WRONLY causes deadlock */
>
>               if ((subshell_pipe[READ] = open (tcsh_fifo, O_RDWR)) == -1
>                   || (subshell_pipe[WRITE] = open (tcsh_fifo, O_RDWR)) == -1)
>               {
>                   fprintf (stderr, _("Cannot open named pipe %s\n"), tcsh_fifo);
>                   perror (__FILE__ ": open");
>                   mc_global.tty.use_subshell = FALSE;
>                   [...]
>
> Under bash, zsh, and some other shells, mc uses ordinary pipes rather than
> FIFOs.  I have no idea why tcsh is treated differently.
>
> Until someone[*] gets around to making it possible to open a FIFO twice for
> reading, I don't think there's anything we can do about it.  I also don't know
> how important this is for mc.  I don't use tcsh or mc, so I can't judge.
I've reproduced mc to fail, from bash, in cygwin 3.1.0 and 3.1.1, 
Windows 1809 and 1903.

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