http://bugs.winehq.org/show_bug.cgi?id=28037
Summary: cmd: sharing violation when using >> Product: Wine Version: 1.3.26 Platform: x86 OS/Version: Linux Status: NEW Keywords: download, source, testcase Severity: normal Priority: P2 Component: cmd AssignedTo: wine-bugs@winehq.org ReportedBy: frederic.delanoy@gmail.com
Assuming "bar" does not pre-exist, issuing
if 1==1 echo foo>>bar
in cmd generates a "Sharing violation" message, and "bar" isn't created
http://bugs.winehq.org/show_bug.cgi?id=28037
--- Comment #1 from Frédéric Delanoy frederic.delanoy@gmail.com 2011-08-09 10:42:22 CDT --- (In reply to comment #0)
Assuming "bar" does not pre-exist, issuing
if 1==1 echo foo>>bar
in cmd generates a "Sharing violation" message, and "bar" isn't created
Actually it's created, but is empty
http://bugs.winehq.org/show_bug.cgi?id=28037
--- Comment #2 from Frédéric Delanoy frederic.delanoy@gmail.com 2011-08-10 05:22:41 CDT --- After further examination, current code redirects twice output to bar file: 1. when initially parsing "if 1==1 echo foo>bar" => there's a scan through the whole command for redirects, regardless of tokens (WCMD_execute)
and
2. when executing the subcommand "echo foo>bar" (WCMD_part_execute)
http://bugs.winehq.org/show_bug.cgi?id=28037
Frédéric Delanoy frederic.delanoy@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Summary|cmd: sharing violation when |cmd: sharing violation when |using >> |using redirections
http://bugs.winehq.org/show_bug.cgi?id=28037
sachse@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |sachse@gmx.net
http://bugs.winehq.org/show_bug.cgi?id=28037
Iip Umar Rifai iip.umar.rifai@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |iip.umar.rifai@gmail.com
http://bugs.winehq.org/show_bug.cgi?id=28037
--- Comment #3 from Iip Umar Rifai iip.umar.rifai@gmail.com 2012-09-13 11:35:38 CDT --- the same problem on Wine 1.5.12:
echo hello>test.txt if 1==1 echo hello2>>test.txt
First line is ok but the second line were still output: Sharing violation.
http://bugs.winehq.org/show_bug.cgi?id=28037
--- Comment #4 from Iip Umar Rifai iip.umar.rifai@gmail.com 2012-09-13 11:48:30 CDT --- for now the temporary solution is adding cmd /c berfore the command..it seem works.
cmd /c if 1==1 echo hello2>>test.txt
http://bugs.winehq.org/show_bug.cgi?id=28037
--- Comment #5 from Frédéric Delanoy frederic.delanoy@gmail.com 2012-10-26 15:27:07 CDT --- Still in 1.5.16
http://bugs.winehq.org/show_bug.cgi?id=28037
--- Comment #6 from Frédéric Delanoy frederic.delanoy@gmail.com 2013-01-07 16:24:15 CST --- Still in 1.5.21
http://bugs.winehq.org/show_bug.cgi?id=28037
Jason Edmeades us@edmeades.me.uk changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |us@edmeades.me.uk
--- Comment #7 from Jason Edmeades us@edmeades.me.uk 2013-06-11 16:41:30 CDT --- Note I put an attachment in http://bugs.winehq.org/attachment.cgi?id=41528 against 21227 which performs various tests around this bug
https://bugs.winehq.org/show_bug.cgi?id=28037
super_man@post.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |super_man@post.com
--- Comment #8 from super_man@post.com --- if 1==1 echo hello2>>test.txt Sharing violation.
wine 1.7.50
https://bugs.winehq.org/show_bug.cgi?id=28037
winetest@luukku.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |winetest@luukku.com
--- Comment #9 from winetest@luukku.com --- (In reply to super_man from comment #8)
if 1==1 echo hello2>>test.txt Sharing violation.
wine 1.7.50
the same wine 1.9.22-git.
https://bugs.winehq.org/show_bug.cgi?id=28037
--- Comment #10 from winetest@luukku.com --- (In reply to winetest from comment #9)
(In reply to super_man from comment #8)
if 1==1 echo hello2>>test.txt Sharing violation.
wine 1.7.50
the same wine 1.9.22-git.
The same wine 2.1.
https://bugs.winehq.org/show_bug.cgi?id=28037
Jason Edmeades us@edmeades.me.uk changed:
What |Removed |Added ---------------------------------------------------------------------------- Assignee|wine-bugs@winehq.org |us@edmeades.me.uk
https://bugs.winehq.org/show_bug.cgi?id=28037
--- Comment #11 from Jason Edmeades us@edmeades.me.uk --- https://www.winehq.org/pipermail/wine-devel/2018-August/130218.html
https://bugs.winehq.org/show_bug.cgi?id=28037
Jason Edmeades us@edmeades.me.uk changed:
What |Removed |Added ---------------------------------------------------------------------------- Fixed by SHA1| |58d21b3319f719b4d0b6972a801 | |b5f81993d5c10 Resolution|--- |FIXED Status|NEW |RESOLVED
--- Comment #12 from Jason Edmeades us@edmeades.me.uk --- Committed
https://bugs.winehq.org/show_bug.cgi?id=28037
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #13 from Alexandre Julliard julliard@winehq.org --- Closing bugs fixed in 3.15.