[Issue 3158] New: std.process.execv() not return result, but terminate application

d-bugmail at puremagic.com d-bugmail at puremagic.com
Thu Jul 9 05:17:44 PDT 2009


http://d.puremagic.com/issues/show_bug.cgi?id=3158

           Summary: std.process.execv() not return result, but terminate
                    application
           Product: D
           Version: 2.031
          Platform: x86
        OS/Version: Windows
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Phobos
        AssignedTo: nobody at puremagic.com
        ReportedBy: golovanov_alexey at mail.ru


Phobos in DMD 2.031, 2.030, 1.045 on Windows XP SP3:

function int std.process.execv(in string pathname, in immutable(char)[][] argv)
not return any value, but terminate application.

Short example - caller.exe should run called.exe, then print returned value:

/*** begin file caller.d */
import std.process;
import std.stdio;

void main()
{
  string[] args = ["a1", "b2", "c3"];
  int res = std.process.execv("called.exe", args);
  writefln("res=%d", res); /*this line never executed*/
}/*** end file caller.d */

In Windiws XP environment caller.exe terminates with code 0 while executing
execv() function, and writefln() never executed - no any output occure;

Under debug we can see calls:

_Dmain -> std at process@execv -> _execv -> ___spawn -> sub_4263F0 -> _exec ->
_exit

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list