From 2240eb37b8c9abdfd1583bc29ea713695d6a2f6d Mon Sep 17 00:00:00 2001 From: nobu Date: Wed, 27 Jun 2012 00:15:51 +0000 Subject: popen: shell commands with envvars and execopts * io.c (is_popen_fork): check if fork and raise NotImplementedError if unavailable. * io.c (rb_io_s_popen): allow environment variables hash and exec options as flat parameters, not in an array arguments. [Feature#6651] [EXPERIMENTAL] * process.c (rb_execarg_extract_options): extract exec options, but no exceptions on non-exec options and returns them as a Hash. * process.c (rb_execarg_setenv): set environment variables. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36229 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- internal.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'internal.h') diff --git a/internal.h b/internal.h index a8974443d4..51d71d7cab 100644 --- a/internal.h +++ b/internal.h @@ -309,6 +309,8 @@ VALUE rb_execarg_init(int argc, VALUE *argv, int accept_shell, VALUE execarg_obj int rb_execarg_addopt(VALUE execarg_obj, VALUE key, VALUE val); void rb_execarg_fixup(VALUE execarg_obj); int rb_execarg_run_options(const struct rb_execarg *e, struct rb_execarg *s, char* errmsg, size_t errmsg_buflen); +VALUE rb_execarg_extract_options(VALUE execarg_obj, VALUE opthash); +void rb_execarg_setenv(VALUE execarg_obj, VALUE env); #if defined __GNUC__ && __GNUC__ >= 4 #pragma GCC visibility pop -- cgit v1.2.3