X-Recipient: archive-cygwin AT delorie DOT com DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 44B23385800E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com; s=default; t=1609300995; bh=Ekn9QY9le7DriE6wf4Npwy995QwvTlXRwuAaFrY0Lus=; h=Date:To:Subject:In-Reply-To:References:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=WlYWGC58TzATnjZcpjjRQs2aqKUgm7/lbwq0cPhjHKBX+ycJb6Q7/7Q6uJl1IVKj6 ke3V0TlDIV6u3NTe9/iU3uJQaQ74e4cc4lcEL4cfBXI7CwKtMGuVI+R5Kwoj53Mh2Q wqHVOJN4myv9Hxuzyt3oMQf5qe4iDdQjD5RIETT0= X-Original-To: cygwin AT cygwin DOT com Delivered-To: cygwin AT cygwin DOT com DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org A52263858004 DKIM-Filter: OpenDKIM Filter v2.10.3 conssluserg-04.nifty.com 0BU42lh6025373 X-Nifty-SrcIP: [122.249.67.108] Date: Wed, 30 Dec 2020 13:02:58 +0900 To: cygwin AT cygwin DOT com Subject: Re: tee: 'standard output': Permission denied Message-Id: <20201230130258.b2be068bdd45172de0cbb20c@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=-4.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 Cc: Andry Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: cygwin-bounces AT cygwin DOT com Sender: "Cygwin" 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. > > >By the way, using tee for logging the output is not good > >idea because stdout is not a tty. Due to this, less command > >does not work properly. > That is way to not break the cygwin colorization and I don't want > to start a script, all I want is to start an interactive console in > an arbitrary working directory. > > >Instead, I recommend: > > > >@echo off > >set CYGWIN_ROOT=... > >set PROJECT_LOG_FILE=... > > > >"%CYGWIN_ROOT%\bin\script" -q -a "%PROJECT_LOG_FILE%" -c "chcp.com 65001 > /dev/null 2>&1; /bin/bash --login" > That is not an equivalent, there is no directory to switch to BEFORE the login. I am not sure why you don't wat to use script, how about this then? @echo off set CYGWIN_ROOT=... set PWD=... set PROJECT_LOG_FILE=... "%CYGWIN_ROOT%\bin\script" -q -a "%PROJECT_LOG_FILE%" -c "chcp.com 65001 > /dev/null 2>&1; cd \"%PWD%\"; CHERE_INVOKING=1 /bin/bash --login" -- 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