summaryrefslogtreecommitdiff
path: root/libstd
diff options
context:
space:
mode:
authorOri Bernstein <ori@eigenstate.org>2015-02-23 09:16:07 -0800
committerOri Bernstein <ori@eigenstate.org>2015-02-23 09:16:07 -0800
commit94f375a98537b0e1b1e8495ae4f440c51e027079 (patch)
tree2932e4251077c5740dfb922d4b793e819809b114 /libstd
parent64d76c27e6ffeb9fe652af8388470f7c9283e803 (diff)
downloadmc-94f375a98537b0e1b1e8495ae4f440c51e027079.tar.gz
Fix stupid mistake in exec() change.
Diffstat (limited to 'libstd')
-rw-r--r--libstd/execvp.myr12
1 files changed, 6 insertions, 6 deletions
diff --git a/libstd/execvp.myr b/libstd/execvp.myr
index 6939917..4f70e63 100644
--- a/libstd/execvp.myr
+++ b/libstd/execvp.myr
@@ -12,7 +12,7 @@ pkg std =
;;
const execvp = {cmd, args
- var paths, cmd
+ var paths, binpath
var buf : byte[512]
match strfind(cmd, "/")
@@ -21,8 +21,8 @@ const execvp = {cmd, args
| `None:
paths = getpaths()
for p in paths
- cmd = bfmt(buf[:], "%s/%s", p, cmd)
- execv(cmd, args)
+ binpath = bfmt(buf[:], "%s/%s", p, cmd)
+ execv(binpath, args)
;;
slfree(paths)
;;
@@ -30,7 +30,7 @@ const execvp = {cmd, args
}
const execvpe = {cmd, args, env
- var paths, cmd
+ var paths, binpath
var buf : byte[512]
match strfind(cmd, "/")
@@ -39,8 +39,8 @@ const execvpe = {cmd, args, env
| `None:
paths = getpaths()
for p in paths
- cmd = bfmt(buf[:], "%s/%s", p, cmd)
- execve(cmd, args, env)
+ binpath = bfmt(buf[:], "%s/%s", p, cmd)
+ execve(binpath, args, env)
;;
slfree(paths)
;;