summaryrefslogtreecommitdiff
path: root/process.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-02-25 17:19:16 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-02-25 17:19:16 +0000
commit56e2c5243fd1caa769f2dff7ebc819af60a2562b (patch)
treed7817d3573cd4757b2d8d7929041e24d5fd176c0 /process.c
parent920f5af3035c146a4b73d024a44757722eb05252 (diff)
* process.c (rb_f_exec): get rid of SEGV when exec failed.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5833 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'process.c')
-rw-r--r--process.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/process.c b/process.c
index 18c46c2659..cb201ebfff 100644
--- a/process.c
+++ b/process.c
@@ -901,7 +901,7 @@ extern char *dln_find_exe();
static void
security(str)
- char *str;
+ const char *str;
{
if (rb_env_path_tainted()) {
if (rb_safe_level() > 0) {
@@ -913,7 +913,7 @@ security(str)
static int
proc_exec_v(argv, prog)
char **argv;
- char *prog;
+ const char *prog;
{
int err;
@@ -1232,7 +1232,7 @@ rb_f_exec(argc, argv)
e.argv = argv;
e.prog = prog ? RSTRING(prog)->ptr : 0;
rb_exec(&e);
- rb_sys_fail(RSTRING(argv[0])->ptr);
+ rb_sys_fail(e.prog);
return Qnil; /* dummy */
}