From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-lj1-x22f.google.com (mail-lj1-x22f.google.com [IPv6:2a00:1450:4864:20::22f]) by sourceware.org (Postfix) with ESMTPS id 9DF79383E807 for ; Sat, 16 May 2020 19:35:45 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 9DF79383E807 Received: by mail-lj1-x22f.google.com with SMTP id h4so5711371ljg.12 for ; Sat, 16 May 2020 12:35:45 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=b86JtGybcinIlUMD+flZd43jh11T/HqgXpKP3867EMA=; b=b3VsOEQ0WX24jWa8vnRXqtxKsqRI7W861G9D5xxmPx/UHII7s0nNPXoL8pfJXm+cO3 Avgh5By7YeAY/dnVMIKM1T2BWfxJmUF0jlPMyHoaxVG6VsFCcmLISeb+3+mK5eylVmeH Re/AA4l+NFTstAfjScWUfOmw2oxZxHjT2cAoHEXW1jKFhLgcYoqE3LEAgbTYRAtyH7P1 woJ29Vb8sCz1EdY7HHdGF5FMhxjppylT8VeBcmSVxqt5dpjj35z869HOf0Q2AZn85RZa C50LBjzevoq08vfMD0rF536A2AwuoRFPzeo5LsPu2Df+fBBtIkY981mmCy7/cJY8HNfR pPWw== X-Gm-Message-State: AOAM5307IXRm2u4G3T0kCmxnHQj9d170+S3SppT/L6qVRCSVA0JiPR+n qUZQQUZXFCjdpksKccn6+Qe/diH0amnY49MJA/AleFUQ X-Google-Smtp-Source: ABdhPJz/LMJ+G2XoFu/fqPXRC74IzKc7bYBcrPHqzu000URbs3fjSrAUPIU7eDIdOelLKhY/9m5YFEc8gC7q6QBNIi8= X-Received: by 2002:a2e:b8c4:: with SMTP id s4mr5739598ljp.101.1589657744050; Sat, 16 May 2020 12:35:44 -0700 (PDT) MIME-Version: 1.0 References: <111569852.20200326220436@yandex.ru> In-Reply-To: From: Kacper Michajlow Date: Sat, 16 May 2020 21:35:25 +0200 Message-ID: Subject: Re: "tmux open terminal failed: not a terminal" in terminal emulators other than mintty To: The Cygwin Mailing List X-Spam-Status: No, score=-2.4 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM, HTML_MESSAGE, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: cygwin@cygwin.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: General Cygwin discussions and problem reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 16 May 2020 19:35:47 -0000 On Fri, 27 Mar 2020 at 21:15, Michael Wild via Cygwin wrote: > Hi > > As the maintainer of the tmux Cygwin package I have to admit that I have no > idea how to fix this. Sorry. > Hi, I did take a look how tmux works and what is going on in Cygwin. Here is short summary of my findings. * Tmux sends each client stdio fd to the server through socket. Cygwin does not support passing file descriptors over to other processes so this fails. * Tmux has a hack for Cygwin where it opens tty by name provided by client... And now there are two cases: 1. When there is no pseudo terminal. cmd.exe, (WT and most other terminal emulators out there) * Tmux server will try to open /dev/cons by name provided by client, but this fails with ENOENT, because server process doesn't see this device. 2. When there is allocated pseudo terminal * Tmux server will try to open /dev/pty by name provided by client and actually work. Is there a way to make tmux work with /dev/cons? I have seen in docs /dev/cons1 Console device names are pseudo device names, only accessible ... from processes within this very console session. This is due to a restriction in Windows. So it likely means that whatever we do it will not be accessible from another process. Is this docs still holds true in latest Windows? I have seen a path to always allocate pty for native applications, maybe this would actually resolve this problem too. Best Regards, Kacper