Bug 4688 – [patch] rdmd/Win: rdmd'ed program's output appears after cmd prompt

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
phobos
Product
D
Version
D2
Platform
Other
OS
Windows
Creation time
2010-08-20T00:26:00Z
Last change time
2011-05-22T22:53:54Z
Assigned to
andrei
Creator
bus_dbugzilla

Attachments

IDFilenameSummaryContent-TypeSize
732rdmd.d.diffPatch against rdmd r1400text/plain2597
734rdmd.d.diffFixed patch against rdmd r1400text/plain2794
735rdmd.d.diffRe-Fixed patch against rdmd r1400text/plain2834

Comments

Comment #0 by bus_dbugzilla — 2010-08-20T00:26:09Z
Created attachment 732 Patch against rdmd r1400 On Windows (XP Pro SP2 32-bit, not sure about other versions): Expected: ------------------------ C:\myDir>rdmd helloworld.d Hello, world! C:\myDir> ------------------------ Actual: ------------------------ C:\myDir>rdmd helloworld.d C:\myDir>Hello, world! ------------------------ This happens because execv fools the Windows command-line into thinking the program is done and returning control back to the user.
Comment #1 by bus_dbugzilla — 2010-08-20T00:30:21Z
Note: The patch also fixes a minor issue where rdmd imports the "scheduled for deprecation" std.contracts instead of the (apparently) preferred std.exception.
Comment #2 by bus_dbugzilla — 2010-08-20T14:10:24Z
Created attachment 734 Fixed patch against rdmd r1400 Fixed an issue with the patch, too many backslashes were being escaped.
Comment #3 by bus_dbugzilla — 2010-08-21T13:54:45Z
Created attachment 735 Re-Fixed patch against rdmd r1400 Another fix for the patch: Double-quotes weren't properly escaped.
Comment #4 by bus_dbugzilla — 2010-08-24T21:42:18Z
Note that this bug is not just cosmetic: It causes problems for programs that launch rdmd through a "system()" call. The system() call will return *before* the rdmd'ed program runs which causes a (repeatable) race problem.
Comment #5 by bus_dbugzilla — 2010-09-24T13:58:53Z
A combined patch for issues #4672, #4683, #4684, #4688, #4928, #4930 is here: http://d.puremagic.com/issues/show_bug.cgi?id=4930
Comment #6 by andrei — 2011-05-14T16:48:33Z
Comment #7 by andrej.mitrovich — 2011-05-22T22:53:54Z
*** Issue 5600 has been marked as a duplicate of this issue. ***