* Possible output redirect bug
@ 2018-03-01 1:35 Alexander Pelevin via cygwin
2018-03-01 3:02 ` Michel LaBarre
0 siblings, 1 reply; 3+ messages in thread
From: Alexander Pelevin via cygwin @ 2018-03-01 1:35 UTC (permalink / raw)
To: cygwin
[-- Attachment #1: Type: text/plain, Size: 175 bytes --]
Error output is not suppressed:
$ cygstart cmd /c "( >&2 pause ) >> test.txt"
$ cat /dev/null >> test.txt >/dev/null 2>&1
bash: test.txt: Device or resource busy
[-- Attachment #2: cygcheck.out --]
[-- Type: application/octet-stream, Size: 14578 bytes --]
Cygwin Configuration Diagnostics
Current System Time: Wed Feb 28 17:25:01 2018
Windows 7 Professional Ver 6.1 Build 7601 Service Pack 1
Path: C:\cygwin\bin
C:\Program Files\Python36\Scripts
C:\Program Files\Python36
C:\Oracle\clien11R32\bin
C:\Oracle\client11R2\bin
C:\Windows\system32
C:\Windows
C:\Windows\SysWOW64
C:\Program Files (x86)\putty
C:\Program Files (x86)\RSA SecurID Token Common
C:\Program Files (x86)\RSA SecurID Software Token
C:\Program Files (x86)\Skype\Phone
C:\Program Files (x86)\GNU\GnuPG\pub
C:\Program Files\Git\cmd
C:\Program Files (x86)\Calibre2
C:\Program Files\nodejs
C:\Program Files (x86)\apache-maven-3.0.4\bin
C:\Program Files (x86)\apache-ant-1.8.4\bin
C:\Users\Shura\AppData\Roaming\npm
Output from C:\cygwin\bin\id.exe
UID: 197608(Shura) GID: 197121(None)
197121(None) 197609(HomeUsers)
545(Users) 4(INTERACTIVE)
66049(CONSOLE LOGON) 11(Authenticated Users)
15(This Organization) 113(Local account)
4095(CurrentSession) 66048(LOCAL)
262154(NTLM Authentication) 401408(Medium Mandatory Level)
SysDir: C:\Windows\system32
WinDir: C:\Windows
PWD = '/cygdrive/d/Work/shura'
HOME = '/home/Shura'
USERDOMAIN = 'Shura-W7'
OS = 'Windows_NT'
COMMONPROGRAMFILES = 'C:\Program Files\Common Files'
PROCESSOR_LEVEL = '6'
PSModulePath = 'C:\Windows\system32\WindowsPowerShell\v1.0\Modules\'
CommonProgramW6432 = 'C:\Program Files\Common Files'
INCLUDE = 'C:\Program Files\Microsoft Platform SDK\Include\.'
CommonProgramFiles(x86) = 'C:\Program Files (x86)\Common Files'
FP_NO_HOST_CHECK = 'NO'
PUBLIC = 'C:\Users\Public'
OLDPWD = '/cygdrive/d'
OANOCACHE = '1'
Mstools = 'C:\Program Files\Microsoft Platform SDK\.'
Basemake = 'C:\Program Files\Microsoft Platform SDK\Include\BKOffice.Mak'
USERNAME = 'Shura'
JAVA_HOME = 'C:\Program Files (x86)\Java\jdk1.7.0_09'
LOGONSERVER = '\\SHURA-W7'
PROCESSOR_ARCHITECTURE = 'AMD64'
LOCALAPPDATA = 'C:\Users\Shura\AppData\Local'
RING_CENTRAL_3RDPARTIES_PATH = 'D:\Projects\third-party'
COMPUTERNAME = 'SHURA-W7'
!:: = '::\'
SYSTEMDRIVE = 'C:'
USERPROFILE = 'C:\Users\Shura'
PATHEXT = '.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC;.PY;.PYW'
INETSDK = 'C:\Program Files\Microsoft Platform SDK\.'
SYSTEMROOT = 'C:\Windows'
PROCESSOR_IDENTIFIER = 'Intel64 Family 6 Model 42 Stepping 7, GenuineIntel'
VS80COMNTOOLS = 'C:\Program Files (x86)\Microsoft Visual Studio 8\Common7\Tools\'
TMP = '/cygdrive/c/Users/Shura/AppData/Local/Temp'
PROCESSOR_REVISION = '2a07'
LIB = 'C:\Program Files\Microsoft Platform SDK\Lib\.'
NUMBER_OF_PROCESSORS = '8'
ProgramW6432 = 'C:\Program Files'
TVT = 'C:\Program Files (x86)\Lenovo'
Bkoffice = 'C:\Program Files\Microsoft Platform SDK\.'
COMSPEC = 'C:\Windows\system32\cmd.exe'
APPDATA = 'C:\Users\Shura\AppData\Roaming'
TERM = 'xterm'
WINDIR = 'C:\Windows'
ProgramData = 'C:\ProgramData'
SHLVL = '1'
PROGRAMFILES = 'C:\Program Files'
ALLUSERSPROFILE = 'C:\ProgramData'
TEMP = '/cygdrive/c/Users/Shura/AppData/Local/Temp'
asl.log = 'Destination=file'
SESSIONNAME = 'Console'
MSSdk = 'C:\Program Files\Microsoft Platform SDK\.'
ANT_HOME = 'C:\Program Files (x86)\apache-ant-1.8.4'
ProgramFiles(x86) = 'C:\Program Files (x86)'
HOMEDRIVE = 'C:'
HOMEPATH = '\Users\Shura'
EXECIGNORE = '*.dll'
_ = '/cygdrive/c/cygwin/bin/cygcheck'
HKEY_CURRENT_USER\Software\Cygwin
HKEY_CURRENT_USER\Software\Cygwin\Installations
(default) = '\??\C:\cygwin'
a3c5983b9b8a4390 = '\??\C:\tar-Tool'
bb10f156fb648d11 = '\??\D:\tar-Tool'
HKEY_CURRENT_USER\Software\Cygwin\Program Options
HKEY_CURRENT_USER\Software\Cygwin\setup
HKEY_LOCAL_MACHINE\SOFTWARE\Cygwin
HKEY_LOCAL_MACHINE\SOFTWARE\Cygwin\Installations
(default) = '\??\C:\Cygwin'
HKEY_LOCAL_MACHINE\SOFTWARE\Cygwin\setup
(default) = 'C:\Cygwin'
HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Cygwin
HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Cygwin\Installations
(default) = '\??\C:\cygwin'
HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Cygwin\Program Options
HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Cygwin\setup
(default) = 'C:\cygwin'
obcaseinsensitive set to 1
Cygwin installations found in the registry:
System: Key: c5e39b7a9d22bafb Path: C:\Cygwin
User: Key: c5e39b7a9d22bafb Path: C:\cygwin
User: Key: a3c5983b9b8a4390 Path: C:\tar-Tool (ORPHANED)
User: Key: bb10f156fb648d11 Path: D:\tar-Tool
c: hd NTFS 153598Mb 45% CP CS UN PA FC EN
d: hd NTFS 204805Mb 73% CP CS UN PA FC EN
e: cd UDF 30Mb 100% CP CS UN
C:\cygwin / system binary,auto
C:\cygwin\bin /usr/bin system binary,auto
C:\cygwin\lib /usr/lib system binary,auto
cygdrive prefix /cygdrive user binary,posix=0,auto
Found: C:\cygwin\bin\awk
-> C:\cygwin\bin\gawk.exe
Found: C:\cygwin\bin\bash.exe
Found: C:\cygwin\bin\cat.exe
Found: C:\cygwin\bin\cp.exe
Not Found: cpp (good!)
Not Found: crontab
Found: C:\cygwin\bin\find.exe
Found: C:\Windows\system32\find.exe
Warning: C:\cygwin\bin\find.exe hides C:\Windows\system32\find.exe
Found: C:\Windows\SysWOW64\find.exe
Warning: C:\cygwin\bin\find.exe hides C:\Windows\SysWOW64\find.exe
Not Found: gcc
Not Found: gdb
Found: C:\cygwin\bin\grep.exe
Found: C:\cygwin\bin\kill.exe
Not Found: ld
Found: C:\cygwin\bin\ls.exe
Not Found: make
Found: C:\cygwin\bin\mv.exe
Not Found: patch
Not Found: perl
Found: C:\cygwin\bin\rm.exe
Found: C:\cygwin\bin\sed.exe
Not Found: ssh
Found: C:\cygwin\bin\sh.exe
Found: C:\cygwin\bin\tar.exe
Found: C:\cygwin\bin\test.exe
Found: C:\cygwin\bin\vi.exe
Not Found: vim
39k 2016/09/19 C:\cygwin\bin\cygargp-0.dll - os=4.0 img=0.0 sys=5.2
"cygargp-0.dll" v0.0 ts=2016-09-18 18:13
16k 2013/03/26 C:\cygwin\bin\cygattr-1.dll - os=4.0 img=0.0 sys=5.2
"cygattr-1.dll" v0.0 ts=2013-03-26 10:26
180k 2015/03/23 C:\cygwin\bin\cygblkid-1.dll - os=4.0 img=0.0 sys=5.2
"cygblkid-1.dll" v0.0 ts=2015-03-23 01:46
64k 2017/02/22 C:\cygwin\bin\cygbz2-1.dll - os=4.0 img=0.0 sys=5.2
"cygbz2-1.dll" v0.0 ts=2017-02-21 23:22
2244k 2018/01/10 C:\cygwin\bin\cygcrypto-1.0.0.dll - os=4.0 img=0.0 sys=5.2
"cygcrypto-1.0.0.dll" v0.0 ts=2018-01-10 09:09
27k 2015/11/17 C:\cygwin\bin\cygffi-6.dll - os=4.0 img=0.0 sys=5.2
"cygffi-6.dll" v0.0 ts=2015-11-17 14:14
65k 2017/12/05 C:\cygwin\bin\cygformw-10.dll - os=4.0 img=0.0 sys=5.2
"cygformw-10.dll" v0.0 ts=2017-12-05 00:15
70k 2018/01/20 C:\cygwin\bin\cyggcc_s-seh-1.dll - os=4.0 img=0.0 sys=5.2
"cyggcc_s-seh-1.dll" v0.0 ts=2018-01-19 22:53
39k 2016/10/10 C:\cygwin\bin\cyggdbm-4.dll - os=4.0 img=0.0 sys=5.2
"cyggdbm-4.dll" v0.0 ts=2016-10-10 01:26
13k 2016/10/10 C:\cygwin\bin\cyggdbm_compat-4.dll - os=4.0 img=0.0 sys=5.2
"cyggdbm_compat-4.dll" v0.0 ts=2016-10-10 01:26
527k 2017/01/21 C:\cygwin\bin\cyggmp-10.dll - os=4.0 img=0.0 sys=5.2
"cyggmp-10.dll" v0.0 ts=2017-01-21 10:25
33k 2017/02/13 C:\cygwin\bin\cyghistory7.dll - os=4.0 img=0.0 sys=5.2
"cyghistory7.dll" v0.0 ts=2017-02-11 14:39
1009k 2015/02/20 C:\cygwin\bin\cygiconv-2.dll - os=4.0 img=0.0 sys=5.2
"cygiconv-2.dll" v0.0 ts=2015-02-20 09:07
42k 2016/10/23 C:\cygwin\bin\cygintl-8.dll - os=4.0 img=0.0 sys=5.2
"cygintl-8.dll" v0.0 ts=2016-10-22 23:17
6k 2018/02/02 C:\cygwin\bin\cyglsa64.dll - os=4.0 img=0.0 sys=5.2
"cyglsa64.dll" v0.0 ts=2018-02-02 06:16
139k 2017/05/10 C:\cygwin\bin\cyglzma-5.dll - os=4.0 img=0.0 sys=5.2
"cyglzma-5.dll" v0.0 ts=2017-05-09 17:17
121k 2017/05/03 C:\cygwin\bin\cygmagic-1.dll - os=4.0 img=0.0 sys=5.2
"cygmagic-1.dll" v0.0 ts=2017-05-03 10:25
168k 2018/01/23 C:\cygwin\bin\cygman-2-7-6-1.dll - os=4.0 img=0.0 sys=5.2
"cygman-2-7-6-1.dll" v0.0 ts=2018-01-23 12:22
22k 2018/01/23 C:\cygwin\bin\cygmandb-2-7-6-1.dll - os=4.0 img=0.0 sys=5.2
"cygmandb-2-7-6-1.dll" v0.0 ts=2018-01-23 12:22
33k 2017/12/05 C:\cygwin\bin\cygmenuw-10.dll - os=4.0 img=0.0 sys=5.2
"cygmenuw-10.dll" v0.0 ts=2017-12-05 00:15
428k 2018/02/19 C:\cygwin\bin\cygmpfr-6.dll - os=4.0 img=0.0 sys=5.2
"cygmpfr-6.dll" v0.0 ts=2018-02-19 10:09
317k 2017/12/05 C:\cygwin\bin\cygncursesw-10.dll - os=4.0 img=0.0 sys=5.2
"cygncursesw-10.dll" v0.0 ts=2017-12-05 00:13
1003k 2017/04/28 C:\cygwin\bin\cygp11-kit-0.dll - os=4.0 img=0.0 sys=5.2
"cygp11-kit-0.dll" v0.0 ts=2017-04-27 21:23
15k 2017/12/05 C:\cygwin\bin\cygpanelw-10.dll - os=4.0 img=0.0 sys=5.2
"cygpanelw-10.dll" v0.0 ts=2017-12-05 00:14
475k 2017/04/23 C:\cygwin\bin\cygpcre-1.dll - os=4.0 img=0.0 sys=5.2
"cygpcre-1.dll" v0.0 ts=2017-04-23 16:50
39k 2015/04/09 C:\cygwin\bin\cygpipeline-1.dll - os=4.0 img=0.0 sys=5.2
"cygpipeline-1.dll" v0.0 ts=2015-04-09 13:04
41k 2016/07/13 C:\cygwin\bin\cygpopt-0.dll - os=4.0 img=0.0 sys=5.2
"cygpopt-0.dll" v0.0 ts=2016-07-12 22:16
219k 2017/02/13 C:\cygwin\bin\cygreadline7.dll - os=4.0 img=0.0 sys=5.2
"cygreadline7.dll" v0.0 ts=2017-02-11 14:39
11k 2015/07/17 C:\cygwin\bin\cygsigsegv-2.dll - os=4.0 img=0.0 sys=5.2
"cygsigsegv-2.dll" v0.0 ts=2015-07-17 14:35
89k 2015/03/23 C:\cygwin\bin\cygsmartcols-1.dll - os=4.0 img=0.0 sys=5.2
"cygsmartcols-1.dll" v0.0 ts=2015-03-23 01:46
399k 2018/01/10 C:\cygwin\bin\cygssl-1.0.0.dll - os=4.0 img=0.0 sys=5.2
"cygssl-1.0.0.dll" v0.0 ts=2018-01-10 09:09
1335k 2018/01/20 C:\cygwin\bin\cygstdc++-6.dll - os=4.0 img=0.0 sys=5.2
"cygstdc++-6.dll" v0.0 ts=2018-01-19 23:14
66k 2017/05/29 C:\cygwin\bin\cygtasn1-6.dll - os=4.0 img=0.0 sys=5.2
"cygtasn1-6.dll" v0.0 ts=2017-05-29 15:32
58k 2017/12/05 C:\cygwin\bin\cygticw-10.dll - os=4.0 img=0.0 sys=5.2
"cygticw-10.dll" v0.0 ts=2017-12-05 00:13
15k 2015/03/23 C:\cygwin\bin\cyguuid-1.dll - os=4.0 img=0.0 sys=5.2
"cyguuid-1.dll" v0.0 ts=2015-03-23 01:46
83k 2017/03/03 C:\cygwin\bin\cygz.dll - os=4.0 img=0.0 sys=5.2
"cygz.dll" v0.0 ts=2017-03-03 13:42
3121k 2018/02/02 C:\cygwin\bin\cygwin1.dll - os=4.0 img=0.0 sys=5.2
"cygwin1.dll" v0.0 ts=2018-02-02 06:16
Cygwin DLL version info:
DLL version: 2.10.0
DLL epoch: 19
DLL old termios: 5
DLL malloc env: 28
Cygwin conv: 181
API major: 0
API minor: 325
Shared data: 5
DLL identifier: cygwin1
Mount registry: 3
Cygwin registry name: Cygwin
Installations name: Installations
Cygdrive default prefix:
Build date:
Shared id: cygwin1S5
Can't find the cygrunsrv utility, skipping services check.
Cygwin Package Information
Last downloaded files to: D:\Profile\Downloads
Last downloaded files from: http://cygwin.mirror.constant.com/
Package Version Status
_autorebase 001007-1 OK
alternatives 1.3.30c-10 OK
base-cygwin 3.8-1 OK
base-files 4.2-4 OK
bash 4.4.12-3 OK
bzip2 1.0.6-3 OK
ca-certificates 2.22-1 OK
coreutils 8.26-2 OK
cygutils 1.4.16-2 OK
cygwin 2.10.0-1 OK
dash 0.5.9.1-1 OK
diffutils 3.5-2 OK
editrights 1.03-1 OK
file 5.30-1 OK
findutils 4.6.0-1 OK
gawk 4.2.1-1 OK
getent 2.18.90-4 OK
grep 3.0-2 OK
groff 1.22.3-1 OK
gzip 1.8-1 OK
hostname 3.13-1 OK
info 6.5-2 OK
ipc-utils 1.0-2 OK
less 530-1 OK
libargp 20110921-3 OK
libattr1 2.4.46-1 OK
libblkid1 2.25.2-2 OK
libbz2_1 1.0.6-3 OK
libffi6 3.2.1-2 OK
libgcc1 6.4.0-5 OK
libgdbm4 1.12-1 OK
libgmp10 6.1.2-1 OK
libiconv 1.14-3 OK
libiconv2 1.14-3 OK
libintl8 0.19.8.1-2 OK
liblzma5 5.2.3-1 OK
libmpfr6 4.0.1-2 OK
libncursesw10 6.0-12.20171125 OK
libopenssl100 1.0.2n-1 OK
libp11-kit0 0.23.5-1 OK
libpcre1 8.40-3 OK
libpipeline1 1.4.0-1 OK
libpopt-common 1.16-2 OK
libpopt0 1.16-2 OK
libreadline7 7.0.3-3 OK
libsigsegv2 2.10-2 OK
libsmartcols1 2.25.2-2 OK
libstdc++6 6.4.0-5 OK
libtasn1_6 4.12-1 OK
libuuid1 2.25.2-2 OK
login 1.11-1 OK
man-db 2.7.6.1-1 OK
mintty 2.8.4-0 OK
ncurses 6.0-12.20171125 OK
openssl 1.0.2n-1 OK
p11-kit 0.23.5-1 OK
p11-kit-trust 0.23.5-1 OK
rebase 4.4.4-1 OK
run 1.3.4-2 OK
sed 4.4-1 OK
tar 1.29-1 OK
terminfo 6.0-12.20171125 OK
tzcode 2018c-1 OK
tzdata 2018c-1 OK
util-linux 2.25.2-2 OK
vim-minimal 8.0.1486-1 OK
which 2.20-2 OK
xz 5.2.3-1 OK
zlib0 1.2.11-1 OK
Use -h to see help about each section
[-- Attachment #3: Type: text/plain, Size: 219 bytes --]
--
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
^ permalink raw reply [flat|nested] 3+ messages in thread
* RE: Possible output redirect bug
2018-03-01 1:35 Possible output redirect bug Alexander Pelevin via cygwin
@ 2018-03-01 3:02 ` Michel LaBarre
2018-03-01 3:09 ` Alexander Pelevin via cygwin
0 siblings, 1 reply; 3+ messages in thread
From: Michel LaBarre @ 2018-03-01 3:02 UTC (permalink / raw)
To: 'Alexander Pelevin', cygwin
> Subject: Possible output redirect bug
>
> Error output is not suppressed:
>
>
> $ cygstart cmd /c "( >&2 pause ) >> test.txt"
>
> $ cat /dev/null >> test.txt >/dev/null 2>&1
> bash: test.txt: Device or resource busy
The error message is not from the process running "cat" which is to what the
redirections apply.
The message is coming from the shell trying to setup file descriptors to
pass to the process running "cat" - you can see "bash:"
The shell cannot open the file for appending.
A simpler demonstration is:
$ cat < zorch > /dev/null 2>&1
bash: zorch: No such file or directory
Alternately:
$ ls zorch
ls: cannot access 'zorch': No such file or directory
shows std err is from "ls" and:
$ ls zorch 2> /dev/null
$
demonstrates redirection working.
Try instead:
( cat /dev/null >> test.txt ) >/dev/null 2>&1
Cheers,
Michel
--
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
^ permalink raw reply [flat|nested] 3+ messages in thread
* RE: Possible output redirect bug
2018-03-01 3:02 ` Michel LaBarre
@ 2018-03-01 3:09 ` Alexander Pelevin via cygwin
0 siblings, 0 replies; 3+ messages in thread
From: Alexander Pelevin via cygwin @ 2018-03-01 3:09 UTC (permalink / raw)
To: 'Michel LaBarre', cygwin
You are right, thank you for the explanation.
Alex.
-----Original Message-----
From: cygwin-owner@cygwin.com [mailto:cygwin-owner@cygwin.com] On Behalf Of
Michel LaBarre
Sent: Wednesday, February 28, 2018 7:02 PM
To: 'Alexander Pelevin'; cygwin@cygwin.com
Subject: RE: Possible output redirect bug
> Subject: Possible output redirect bug
>
> Error output is not suppressed:
>
>
> $ cygstart cmd /c "( >&2 pause ) >> test.txt"
>
> $ cat /dev/null >> test.txt >/dev/null 2>&1
> bash: test.txt: Device or resource busy
The error message is not from the process running "cat" which is to what the
redirections apply.
The message is coming from the shell trying to setup file descriptors to
pass to the process running "cat" - you can see "bash:"
The shell cannot open the file for appending.
A simpler demonstration is:
$ cat < zorch > /dev/null 2>&1
bash: zorch: No such file or directory
Alternately:
$ ls zorch
ls: cannot access 'zorch': No such file or directory
shows std err is from "ls" and:
$ ls zorch 2> /dev/null
$
demonstrates redirection working.
Try instead:
( cat /dev/null >> test.txt ) >/dev/null 2>&1
Cheers,
Michel
--
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
--
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
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2018-03-01 3:09 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-03-01 1:35 Possible output redirect bug Alexander Pelevin via cygwin
2018-03-01 3:02 ` Michel LaBarre
2018-03-01 3:09 ` Alexander Pelevin via cygwin
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).