summaryrefslogtreecommitdiff
path: root/process.c
diff options
context:
space:
mode:
authorakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-06-10 01:17:53 +0000
committerakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-06-10 01:17:53 +0000
commit8fcdb757a597b69d46216d7475ed4d07e6a330ef (patch)
tree913030ae5bb055b4ea9339503ac539db2eb4162c /process.c
parent99c71b1ee4024bd9112e26cc442d9c91b2bc75e3 (diff)
* process.c (rb_f_exec): use rb_exec_arg_prepare.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36000 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'process.c')
-rw-r--r--process.c17
1 files changed, 8 insertions, 9 deletions
diff --git a/process.c b/process.c
index e452a9228be..64cde6c1465 100644
--- a/process.c
+++ b/process.c
@@ -1968,6 +1968,13 @@ rb_exec_arg_fixup(struct rb_exec_arg *e)
}
}
+static void
+rb_exec_arg_prepare(struct rb_exec_arg *earg, int argc, VALUE *argv)
+{
+ rb_exec_arg_init(argc, argv, TRUE, earg);
+ rb_exec_arg_fixup(earg);
+}
+
/*
* call-seq:
* exec([env,] command... [,options])
@@ -2019,8 +2026,7 @@ rb_f_exec(int argc, VALUE *argv)
#define CHILD_ERRMSG_BUFLEN 80
char errmsg[CHILD_ERRMSG_BUFLEN] = { '\0' };
- rb_exec_arg_init(argc, argv, TRUE, &earg);
- rb_exec_arg_fixup(&earg);
+ rb_exec_arg_prepare(&earg, argc, argv);
rb_exec_err(&earg, errmsg, sizeof(errmsg));
if (errmsg[0])
@@ -3224,13 +3230,6 @@ rb_syswait(rb_pid_t pid)
rb_waitpid(pid, &status, 0);
}
-static void
-rb_exec_arg_prepare(struct rb_exec_arg *earg, int argc, VALUE *argv)
-{
- rb_exec_arg_init(argc, argv, TRUE, earg);
- rb_exec_arg_fixup(earg);
-}
-
static rb_pid_t
rb_spawn_process(struct rb_exec_arg *earg, char *errmsg, size_t errmsg_buflen)
{