Ruby 3.0.5p211 (2022-11-24 revision ba5cf0f7c52d4d35cc6a173c89eda98ceffa2dcf)
|
Internal header for Process. More...
#include "ruby/internal/config.h"
#include <stddef.h>
#include "ruby/ruby.h"
#include "internal/imemo.h"
#include "internal/warnings.h"
Go to the source code of this file.
Data Structures | |
struct | rb_execarg |
Macros | |
#define | RB_MAX_GROUPS (65536) |
Functions | |
rb_pid_t | rb_fork_ruby (int *status) |
void | rb_last_status_clear (void) |
int | rb_exec_async_signal_safe (const struct rb_execarg *e, char *errmsg, size_t errmsg_buflen) |
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) |
VALUE | rb_execarg_new (int argc, const VALUE *argv, int accept_shell, int allow_exc_opt) |
struct rb_execarg * | rb_execarg_get (VALUE execarg_obj) |
int | rb_execarg_addopt (VALUE execarg_obj, VALUE key, VALUE val) |
void | rb_execarg_parent_start (VALUE execarg_obj) |
void | rb_execarg_parent_end (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) |
Internal header for Process.
Definition in file process.h.
int rb_exec_async_signal_safe | ( | const struct rb_execarg * | e, |
char * | errmsg, | ||
size_t | errmsg_buflen | ||
) |
Definition at line 2240 of file process.c.
References rb_execarg::chdir_dir, rb_execarg::chdir_given, rb_execarg::close_others_do, rb_execarg::close_others_given, rb_execarg::exception_given, EXPORT_DUP, FilePathValue, rb_execarg::gid, rb_execarg::gid_given, id, id_exception, id_in, INT2FIX, key, mode_t, rb_execarg::new_pgroup_flag, rb_execarg::new_pgroup_given, NUM2MODET, NUM2PIDT, OBJ2GID, OBJ2UID, rb_execarg::pgroup_given, rb_execarg::pgroup_pgid, Qtrue, rb_check_id(), rb_eArgError, rb_eNotImpError, rb_execarg_get(), RB_GC_GUARD, rb_raise(), rb_str_encode_ospath(), RTEST, ST_CONTINUE, ST_STOP, T_ARRAY, T_FILE, T_FIXNUM, T_SYMBOL, TO_BOOL, TYPE, rb_execarg::uid, rb_execarg::uid_given, rb_execarg::umask_given, rb_execarg::umask_mask, rb_execarg::unsetenv_others_do, and rb_execarg::unsetenv_others_given.
Definition at line 2506 of file process.c.
References Qnil, rb_hash_stlike_foreach(), and RHASH_EMPTY_P.
Referenced by rb_io_popen().
struct rb_execarg * rb_execarg_get | ( | VALUE | execarg_obj | ) |
Definition at line 2837 of file process.c.
References TypedData_Get_Struct.
Referenced by rb_execarg_addopt(), rb_execarg_setenv(), and rb_f_exec().
Definition at line 2862 of file process.c.
References argc, argv, rb_execarg::exception_given, rb_eArgError, rb_raise(), and TypedData_Make_Struct.
Referenced by rb_f_exec(), and rb_io_popen().
void rb_execarg_parent_end | ( | VALUE | execarg_obj | ) |
Definition at line 3082 of file process.c.
References RB_GC_GUARD.
Referenced by rb_execarg_parent_start().
void rb_execarg_parent_start | ( | VALUE | execarg_obj | ) |
Definition at line 3043 of file process.c.
References rb_execarg_parent_end(), rb_jump_tag(), and rb_protect().
int rb_execarg_run_options | ( | const struct rb_execarg * | e, |
struct rb_execarg * | s, | ||
char * | errmsg, | ||
size_t | errmsg_buflen | ||
) |
Definition at line 3622 of file process.c.
References rb_execarg::chdir_dir, rb_execarg::chdir_given, rb_execarg::close_others_do, rb_execarg::close_others_maxhint, rb_execarg::dup2_tmpbuf, rb_execarg::env_modification, ERRMSG, rb_execarg::fd_close, rb_execarg::fd_dup2, rb_execarg::fd_dup2_child, rb_execarg::gid, rb_execarg::gid_given, key, mask, MEMZERO, mode_t, NIL_P, rb_execarg::pgroup_given, Qfalse, Qnil, RARRAY_AREF, RARRAY_LEN, rb_close_before_exec(), rb_dir_getwd_ospath(), rb_env_clear(), rb_warn(), rb_execarg::redirect_fds, rb_execarg::rlimit_limits, RSTRING_PTR, ruby_setenv(), setgid(), setuid(), StringValueCStr, rb_execarg::uid, rb_execarg::uid_given, rb_execarg::umask_given, rb_execarg::umask_mask, rb_execarg::unsetenv_others_do, and rb_execarg::unsetenv_others_given.
Definition at line 2875 of file process.c.
References env, rb_execarg::env_modification, NIL_P, rb_execarg::path_env, Qfalse, and rb_execarg_get().
Referenced by rb_io_popen().
rb_pid_t rb_fork_async_signal_safe | ( | int * | status, |
int(*)(void *, char *, size_t) | chfunc, | ||
void * | charg, | ||
VALUE | fds, | ||
char * | errmsg, | ||
size_t | errmsg_buflen | ||
) |
rb_pid_t rb_fork_ruby | ( | int * | status | ) |