www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 20765] New: Can't run processes with relative paths when

https://issues.dlang.org/show_bug.cgi?id=20765

          Issue ID: 20765
           Summary: Can't run processes with relative paths when
                    specifying a working directory
           Product: D
           Version: D2
          Hardware: All
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P1
         Component: phobos
          Assignee: nobody puremagic.com
          Reporter: dlang-bugzilla thecybershadow.net

//////////////////////// test.d ////////////////////////
import std.conv : octal;
import std.file;
import std.process;

void main()
{
    mkdir("dir");

    setAttributes("dir/program", octal!700);

    spawnProcess("./program", null, Config.none, "dir");
}
////////////////////////////////////////////////////////

Fails with:
std.process.ProcessException std/process.d(884): Not an executable file:
./program

--
Apr 24