mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* 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
This commit is contained in:
parent
920f5af303
commit
56e2c5243f
2 changed files with 7 additions and 3 deletions
|
@ -1,3 +1,7 @@
|
||||||
|
Thu Feb 26 02:19:11 2004 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||||
|
|
||||||
|
* process.c (rb_f_exec): get rid of SEGV when exec failed.
|
||||||
|
|
||||||
Wed Feb 25 21:17:33 2004 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
Wed Feb 25 21:17:33 2004 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||||
|
|
||||||
* gc.c (obj_free), io.c (rb_io_fptr_finalize), rubyio.h (OpenFile):
|
* gc.c (obj_free), io.c (rb_io_fptr_finalize), rubyio.h (OpenFile):
|
||||||
|
|
|
@ -901,7 +901,7 @@ extern char *dln_find_exe();
|
||||||
|
|
||||||
static void
|
static void
|
||||||
security(str)
|
security(str)
|
||||||
char *str;
|
const char *str;
|
||||||
{
|
{
|
||||||
if (rb_env_path_tainted()) {
|
if (rb_env_path_tainted()) {
|
||||||
if (rb_safe_level() > 0) {
|
if (rb_safe_level() > 0) {
|
||||||
|
@ -913,7 +913,7 @@ security(str)
|
||||||
static int
|
static int
|
||||||
proc_exec_v(argv, prog)
|
proc_exec_v(argv, prog)
|
||||||
char **argv;
|
char **argv;
|
||||||
char *prog;
|
const char *prog;
|
||||||
{
|
{
|
||||||
int err;
|
int err;
|
||||||
|
|
||||||
|
@ -1232,7 +1232,7 @@ rb_f_exec(argc, argv)
|
||||||
e.argv = argv;
|
e.argv = argv;
|
||||||
e.prog = prog ? RSTRING(prog)->ptr : 0;
|
e.prog = prog ? RSTRING(prog)->ptr : 0;
|
||||||
rb_exec(&e);
|
rb_exec(&e);
|
||||||
rb_sys_fail(RSTRING(argv[0])->ptr);
|
rb_sys_fail(e.prog);
|
||||||
return Qnil; /* dummy */
|
return Qnil; /* dummy */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue