1 #ifndef INTERNAL_PROCESS_H
2 #define INTERNAL_PROCESS_H
11 #include "ruby/internal/config.h"
14 #ifdef HAVE_SYS_TYPES_H
15 # include <sys/types.h>
19 # include "ruby/win32.h"
23 #include "internal/compilers.h"
24 #include "internal/imemo.h"
26 #define RB_MAX_GROUPS (65536)
37 VALUE command_abspath;
46 unsigned use_shell : 1;
47 unsigned pgroup_given : 1;
48 unsigned umask_given : 1;
49 unsigned unsetenv_others_given : 1;
50 unsigned unsetenv_others_do : 1;
51 unsigned close_others_given : 1;
52 unsigned close_others_do : 1;
53 unsigned chdir_given : 1;
54 unsigned new_pgroup_given : 1;
55 unsigned new_pgroup_flag : 1;
56 unsigned uid_given : 1;
57 unsigned gid_given : 1;
58 unsigned exception : 1;
59 unsigned exception_given : 1;
67 int close_others_maxhint;
72 VALUE env_modification;
78 rb_pid_t rb_call_proc__fork(
void);
79 void rb_last_status_clear(
void);
80 static inline char **ARGVSTR2ARGV(
VALUE argv_str);
81 static inline size_t ARGVSTR2ARGC(
VALUE argv_str);
84 VALUE rb_getlogin(
void);
86 VALUE rb_getpwdiruid(
void);
89 RUBY_SYMBOL_EXPORT_BEGIN
91 int rb_exec_async_signal_safe(
const struct rb_execarg *e,
char *errmsg,
size_t errmsg_buflen);
92 rb_pid_t rb_fork_async_signal_safe(
int *status,
int (*chfunc)(
void*,
char *,
size_t),
void *charg,
VALUE fds,
char *errmsg,
size_t errmsg_buflen);
93 VALUE rb_execarg_new(
int argc,
const VALUE *argv,
int accept_shell,
int allow_exc_opt);
96 void rb_execarg_parent_start(
VALUE execarg_obj);
97 void rb_execarg_parent_end(
VALUE execarg_obj);
98 int rb_execarg_run_options(
const struct rb_execarg *e,
struct rb_execarg *s,
char* errmsg,
size_t errmsg_buflen);
100 void rb_execarg_setenv(
VALUE execarg_obj,
VALUE env);
101 RUBY_SYMBOL_EXPORT_END
107 static inline char **
108 ARGVSTR2ARGV(
VALUE argv_str)
110 char **buf = RB_IMEMO_TMPBUF_PTR(argv_str);
115 ARGVSTR2ARGC(
VALUE argv_str)
118 char *
const *p = ARGVSTR2ARGV(argv_str);
uintptr_t VALUE
Type that represents a Ruby object.