From: Andry <andry@inbox.ru>
To: cygwin@cygwin.com
Subject: tee: 'standard output': Permission denied
Date: Wed, 30 Dec 2020 00:50:56 +0300 [thread overview]
Message-ID: <1626660026.20201230005056@inbox.ru> (raw)
In-Reply-To: <1939012153.20201227050421@inbox.ru>
Hello Cygwin,
>I am trying to change directory before run a bash shell with login:
I've minimized to a minimal example to repro the issue:
*run_cygwin_bash.bat*:
```
@echo off
set CYGWIN_ROOT=...
set PWD=...
set PROJECT_LOG_FILE=...
chcp.com 65001 >nul
"%CYGWIN_ROOT%\bin\bash.exe" -c "{ cd ""%PWD:\=/%""; CHERE_INVOKING=. ""%CYGWIN_ROOT:\=/%/bin/bash.exe"" -l -i; } 2>&1 | ""%CYGWIN_ROOT:\=/%/bin/tee.exe"" -a ""%PROJECT_LOG_FILE:\=/%"""
```
To execute:
```
c:\> start "" cmd.exe /C run_cygwin_bash.bat
```
To stall:
```
$ 123
c:/cygwin/bin/tee: 'standard output': Permission denied
```
It repro only if:
`chcp.com 65001` used together with `start "" cmd.exe ...`
next prev parent reply other threads:[~2020-12-29 21:47 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-27 2:04 Andry
2020-12-29 21:50 ` Andry [this message]
2020-12-30 1:29 ` Kevin Schnitzius
2020-12-30 2:22 ` Andry
2020-12-30 19:21 ` Brian Inglis
2020-12-31 16:33 ` Andry
2020-12-30 1:31 ` Doug Henderson
2020-12-30 1:45 ` Takashi Yano
2020-12-30 2:24 ` Andry
2020-12-30 4:02 ` Takashi Yano
2020-12-30 4:40 ` Takashi Yano
2020-12-30 4:54 ` Andry
2020-12-30 5:11 ` Andry
2020-12-30 4:49 ` Andry
2020-12-30 5:03 ` Takashi Yano
2020-12-30 5:18 ` Andry
2020-12-30 6:40 ` Takashi Yano
2020-12-30 10:13 ` Takashi Yano
2020-12-30 15:07 ` Andry
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1626660026.20201230005056@inbox.ru \
--to=andry@inbox.ru \
--cc=cygwin@cygwin.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).