mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* process.c (rb_exec_without_timer_thread): renamed from rb_exec_err.
(rb_exec_err): new stub function to call rb_exec_without_timer_thread. (rb_f_exec): call rb_exec_without_timer_thread. (rb_exec): call rb_exec_without_timer_thread. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36021 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
4fa66dc53b
commit
fa5cd00340
2 changed files with 21 additions and 5 deletions
|
@ -1,3 +1,11 @@
|
|||
Sun Jun 10 21:30:11 2012 Tanaka Akira <akr@fsij.org>
|
||||
|
||||
* process.c (rb_exec_without_timer_thread): renamed from rb_exec_err.
|
||||
(rb_exec_err): new stub function to call
|
||||
rb_exec_without_timer_thread.
|
||||
(rb_f_exec): call rb_exec_without_timer_thread.
|
||||
(rb_exec): call rb_exec_without_timer_thread.
|
||||
|
||||
Sun Jun 10 21:13:10 2012 Tanaka Akira <akr@fsij.org>
|
||||
|
||||
* process.c (rb_fork): call rb_fork_internal instead of rb_fork_err.
|
||||
|
|
18
process.c
18
process.c
|
@ -1975,6 +1975,8 @@ rb_exec_arg_prepare(struct rb_exec_arg *earg, int argc, VALUE *argv)
|
|||
rb_exec_arg_fixup(earg);
|
||||
}
|
||||
|
||||
static int rb_exec_without_timer_thread(const struct rb_exec_arg *e, char *errmsg, size_t errmsg_buflen);
|
||||
|
||||
/*
|
||||
* call-seq:
|
||||
* exec([env,] command... [,options])
|
||||
|
@ -2029,7 +2031,7 @@ rb_f_exec(int argc, VALUE *argv)
|
|||
rb_exec_arg_prepare(&earg, argc, argv);
|
||||
|
||||
#ifdef __MacOS_X__
|
||||
rb_exec_err(&earg, errmsg, sizeof(errmsg));
|
||||
rb_exec_without_timer_thread(&earg, errmsg, sizeof(errmsg));
|
||||
#else
|
||||
rb_exec_async_signal_safe(&earg, errmsg, sizeof(errmsg));
|
||||
#endif
|
||||
|
@ -2649,8 +2651,8 @@ failure:
|
|||
return -1;
|
||||
}
|
||||
|
||||
int
|
||||
rb_exec_err(const struct rb_exec_arg *e, char *errmsg, size_t errmsg_buflen)
|
||||
static int
|
||||
rb_exec_without_timer_thread(const struct rb_exec_arg *e, char *errmsg, size_t errmsg_buflen)
|
||||
{
|
||||
int ret;
|
||||
before_exec_non_async_signal_safe(); /* async-signal-safe if forked_child is true */
|
||||
|
@ -2659,12 +2661,18 @@ rb_exec_err(const struct rb_exec_arg *e, char *errmsg, size_t errmsg_buflen)
|
|||
return ret;
|
||||
}
|
||||
|
||||
int
|
||||
rb_exec_err(const struct rb_exec_arg *e, char *errmsg, size_t errmsg_buflen)
|
||||
{
|
||||
return rb_exec_without_timer_thread(e, errmsg, errmsg_buflen);
|
||||
}
|
||||
|
||||
int
|
||||
rb_exec(const struct rb_exec_arg *e)
|
||||
{
|
||||
#if !defined FD_CLOEXEC && !defined HAVE_SPAWNV
|
||||
char errmsg[80] = { '\0' };
|
||||
int ret = rb_exec_err(e, errmsg, sizeof(errmsg));
|
||||
int ret = rb_exec_without_timer_thread(e, errmsg, sizeof(errmsg));
|
||||
preserving_errno(
|
||||
if (errmsg[0]) {
|
||||
fprintf(stderr, "%s\n", errmsg);
|
||||
|
@ -2677,7 +2685,7 @@ rb_exec(const struct rb_exec_arg *e)
|
|||
);
|
||||
return ret;
|
||||
#else
|
||||
return rb_exec_err(e, NULL, 0);
|
||||
return rb_exec_without_timer_thread(e, NULL, 0);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue