Bug 20765 – Can't run processes with relative paths when specifying a working directory

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P1
Component
phobos
Product
D
Version
D2
Platform
All
OS
Linux
Creation time
2020-04-25T05:07:37Z
Last change time
2020-08-10T18:43:51Z
Keywords
pull
Assigned to
No Owner
Creator
Vladimir Panteleev

Comments

Comment #0 by dlang-bugzilla — 2020-04-25T05:07:37Z
//////////////////////// test.d //////////////////////// import std.conv : octal; import std.file; import std.process; void main() { mkdir("dir"); write("dir/program", "#!/bin/bash\necho Hello"); 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
Comment #1 by dlang-bot — 2020-04-25T05:10:59Z
@CyberShadow created dlang/phobos pull request #7455 "Fix Issue 20765 - Can't run processes with relative paths when specif…" fixing this issue: - Fix Issue 20765 - Can't run processes with relative paths when specifying a working directory Remove the dubious check which attempted to duplicate the operating system's behavior. https://github.com/dlang/phobos/pull/7455
Comment #2 by dlang-bot — 2020-08-10T18:43:51Z
dlang/phobos pull request #7455 "Fix Issue 20765 - Can't run processes with relative paths when specif…" was merged into master: - 92276d0da9dec8e9cc97e5aaf5ad1964d413981a by Vladimir Panteleev: Fix Issue 20765 - Can't run processes with relative paths when specifying a working directory Remove the dubious check which attempted to duplicate the operating system's behavior. https://github.com/dlang/phobos/pull/7455