X-Recipient: archive-cygwin AT delorie DOT com DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 3B626388A412 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com; s=default; t=1609323208; bh=M76umWoAATNRFNb5OQ8yPLUGhmxSeVvT6fTyRZmlIu8=; h=Date:To:Subject:In-Reply-To:References:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=EHSOS/pQtIimi7Hh0x3C9Us16FHdcD4o0iLVa9yyFuaZzghNU8earf4+ICYac39i1 t0sSRYxcOhMZKWzTfQSRdyJBInWjVAJ4Keg5tU77W09ow2wwI5zmaaqNI/duLd+0NI CuvjP+KrTmh9kEE1EbLI/x3doba+/W3pRPhqj/kk= X-Original-To: cygwin AT cygwin DOT com Delivered-To: cygwin AT cygwin DOT com DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 6D1DA3857C6F DKIM-Filter: OpenDKIM Filter v2.10.3 conssluserg-02.nifty.com 0BUAD7G1025423 X-Nifty-SrcIP: [122.249.67.108] Date: Wed, 30 Dec 2020 19:13:09 +0900 To: cygwin AT cygwin DOT com Subject: Re: tee: 'standard output': Permission denied Message-Id: <20201230191309.ea33fb623b88392b829f8ad8@nifty.ne.jp> In-Reply-To: <1798147396.20201230052402@inbox.ru> References: <20201230104504 DOT 26f3064d3c231c6669637b6d AT nifty DOT ne DOT jp> <1798147396 DOT 20201230052402 AT inbox DOT ru> X-Mailer: Sylpheed 3.7.0 (GTK+ 2.24.30; i686-pc-mingw32) Mime-Version: 1.0 X-Spam-Status: No, score=-5.4 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, NICE_REPLY_A, 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 X-BeenThere: cygwin AT cygwin DOT 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: , From: Takashi Yano via Cygwin Reply-To: Takashi Yano Content-Type: text/plain; charset="utf-8" Errors-To: cygwin-bounces AT cygwin DOT com Sender: "Cygwin" Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from base64 to 8bit by delorie.com id 0BUADu7R031660 On Wed, 30 Dec 2020 05:24:02 +0300 Andry wrote: > Hello takashi, > > >I cannot reproducue your problem even with chcp.com 65001 and > >start "" cmd.exe ... > Seems this is a bug specifically for the Windows 7 x64. I guess the problem is essentially the same with followings. In Win7, 1) Start command prompt. 2) Run chcp 65001 3) Change the font of command prompt to raster font. 4) Run c:\cygwin\bin\printf "\xce\b1\n" This causes the error: /usr/bin/printf: write error What weird is that if the font is other than raster font, this error does not occur. I looked into this problem and found that the following simple c code does not work in command prompt with chcp 65001 and raster font in Win7. /* Compile this code using MinGW compiler and run in cmd.exe */ #include #include int main() { wchar_t wstr[] = L"α\r\n"; HANDLE h = GetStdHandle(STD_OUTPUT_HANDLE); DWORD n; int ret = WriteConsoleW(h, wstr, wcslen(wstr), &n, NULL); printf("n=%d, ret=%d, Err=0x%08x\n", n, ret, GetLastError()); return 0; } This is also reproducible in legacy console mode of windows10. The error code is 0x0000001f (ERROR_GEN_FAILURE: A device attached to the system is not functioning). Is this possibly a bug of windows? -- Takashi Yano -- Problem reports: https://cygwin.com/problems.html FAQ: https://cygwin.com/faq/ Documentation: https://cygwin.com/docs.html Unsubscribe info: https://cygwin.com/ml/#unsubscribe-simple