summaryrefslogtreecommitdiff
path: root/internal.h
diff options
context:
space:
mode:
authorakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-06-05 13:29:54 +0000
committerakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-06-05 13:29:54 +0000
commita79bbdf6b5c84a109747d54ac7a5a9449f11fc17 (patch)
tree77d3050f9cf52634ab6b1a64d10dd33ec9fe8a51 /internal.h
parent60d5e14b92f6cbf4d6d6ac38abac964fc64b0610 (diff)
* internal.h: rb_exec_arg and related stuff moved from intern.h
* include/ruby/intern.h (rb_proc_exec_n): removed. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35925 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'internal.h')
-rw-r--r--internal.h21
1 files changed, 21 insertions, 0 deletions
diff --git a/internal.h b/internal.h
index 48a3a763d5..a552923623 100644
--- a/internal.h
+++ b/internal.h
@@ -159,6 +159,19 @@ st_index_t rb_hash_proc(st_index_t hash, VALUE proc);
/* process.c */
+struct rb_exec_arg {
+ const char *prog;
+ VALUE options;
+ VALUE redirect_fds;
+ VALUE progname;
+ int use_shell;
+ VALUE argv_str;
+ VALUE argv_buf;
+ VALUE envp_str;
+ VALUE envp_buf;
+ VALUE dup2_tmpbuf;
+};
+
/* argv_str contains extra two elements.
* The beginning one is for /bin/sh used by exec_with_sh.
* The last one for terminating NULL used by execve.
@@ -166,6 +179,14 @@ st_index_t rb_hash_proc(st_index_t hash, VALUE proc);
#define ARGVSTR2ARGC(argv_str) (RSTRING_LEN(argv_str) / sizeof(char *) - 2)
#define ARGVSTR2ARGV(argv_str) ((char **)RSTRING_PTR(argv_str) + 1)
+VALUE rb_exec_arg_init(int argc, VALUE *argv, int accept_shell, struct rb_exec_arg *e);
+int rb_exec_arg_addopt(struct rb_exec_arg *e, VALUE key, VALUE val);
+void rb_exec_arg_fixup(struct rb_exec_arg *e);
+int rb_run_exec_options(const struct rb_exec_arg *e, struct rb_exec_arg *s);
+int rb_run_exec_options_err(const struct rb_exec_arg *e, struct rb_exec_arg *s, char*, size_t);
+int rb_exec(const struct rb_exec_arg*);
+int rb_exec_err(const struct rb_exec_arg*, char*, size_t);
+
/* rational.c */
VALUE rb_lcm(VALUE x, VALUE y);
VALUE rb_rational_reciprocal(VALUE x);