update async-signal-safe comments.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35981 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
4a9a7756da
commit
4da82e58a1
@ -1062,7 +1062,7 @@ exec_with_sh(const char *prog, char **argv, char **envp)
|
|||||||
#define try_with_sh(prog, argv, envp) (void)0
|
#define try_with_sh(prog, argv, envp) (void)0
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* This function should be async-signal-safe. Actually it isn't because after_exec(). */
|
/* This function should be async-signal-safe. Actually it is. */
|
||||||
static int
|
static int
|
||||||
proc_exec_cmd(const char *prog, VALUE argv_str, VALUE envp_str)
|
proc_exec_cmd(const char *prog, VALUE argv_str, VALUE envp_str)
|
||||||
{
|
{
|
||||||
@ -1127,7 +1127,7 @@ proc_exec_cmd(const char *prog, VALUE argv_str, VALUE envp_str)
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
/* This function should be async-signal-safe. Actually it isn't because after_exec(). */
|
/* This function should be async-signal-safe. Actually it is. */
|
||||||
static int
|
static int
|
||||||
proc_exec_sh(const char *str, VALUE envp_str)
|
proc_exec_sh(const char *str, VALUE envp_str)
|
||||||
{
|
{
|
||||||
@ -2600,13 +2600,13 @@ rb_exec_err(const struct rb_exec_arg *e, char *errmsg, size_t errmsg_buflen)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (e->use_shell) {
|
if (e->use_shell) {
|
||||||
proc_exec_sh(RSTRING_PTR(e->invoke.sh.shell_script), e->envp_str); /* not async-signal-safe because after_exec. */
|
proc_exec_sh(RSTRING_PTR(e->invoke.sh.shell_script), e->envp_str); /* async-signal-safe */
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
char *abspath = NULL;
|
char *abspath = NULL;
|
||||||
if (!NIL_P(e->invoke.cmd.command_abspath))
|
if (!NIL_P(e->invoke.cmd.command_abspath))
|
||||||
abspath = RSTRING_PTR(e->invoke.cmd.command_abspath);
|
abspath = RSTRING_PTR(e->invoke.cmd.command_abspath);
|
||||||
proc_exec_cmd(abspath, e->invoke.cmd.argv_str, e->envp_str); /* not async-signal-safe because after_exec. */
|
proc_exec_cmd(abspath, e->invoke.cmd.argv_str, e->envp_str); /* async-signal-safe */
|
||||||
}
|
}
|
||||||
#if !defined(HAVE_FORK)
|
#if !defined(HAVE_FORK)
|
||||||
preserving_errno(rb_run_exec_options_err(sargp, NULL, errmsg, errmsg_buflen));
|
preserving_errno(rb_run_exec_options_err(sargp, NULL, errmsg, errmsg_buflen));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user