Ruby
2.1.10p492(2016-04-01revision54464)
|
#include "ruby/ruby.h"
#include "ruby/io.h"
#include "ruby/thread.h"
#include "ruby/util.h"
#include "internal.h"
#include "vm_core.h"
#include <stdio.h>
#include <errno.h>
#include <signal.h>
#include <time.h>
#include <ctype.h>
#include "ruby/st.h"
#include <sys/stat.h>
#include "dln.h"
Go to the source code of this file.
Data Structures | |
struct | wait_data |
struct | string_part |
struct | run_exec_dup2_fd_pair |
struct | timetick |
Typedefs | |
typedef unsigned int | unsigned_clock_t |
typedef long | timetick_int_t |
Variables | |
static VALUE | rb_cProcessStatus |
static st_table * | pid_tbl |
static int | forked_child = 0 |
static const rb_data_type_t | exec_arg_data_type |
static | VALUE |
return | Qnil |
static int | under_uid_switch = 0 |
static int | under_gid_switch = 0 |
static rb_uid_t | SAVED_USER_ID = -1 |
static rb_gid_t | SAVED_GROUP_ID = -1 |
VALUE | rb_mProcess |
VALUE | rb_mProcUID |
VALUE | rb_mProcGID |
VALUE | rb_mProcID_Syscall |
#define after_fork | ( | ) | (rb_threadptr_pending_interrupt_clear(GET_THREAD()), after_exec()) |
Referenced by rb_proc_exec_n().
#define ARGV_SIZE | ( | n | ) | (sizeof(char*) * ARGV_COUNT(n)) |
#define before_fork | ( | ) | before_exec() |
#define CHILD_ERRMSG_BUFLEN 80 |
Referenced by rb_f_exec(), and rb_f_spawn().
Definition at line 6882 of file process.c.
Referenced by timetick2integer().
#define ERRMSG | ( | str | ) | do { if (errmsg && 0 < errmsg_buflen) strlcpy(errmsg, (str), errmsg_buflen); } while (0) |
Definition at line 2507 of file process.c.
Referenced by rb_execarg_run_options(), run_exec_close(), run_exec_dup2(), run_exec_dup2_child(), run_exec_open(), and save_redirect_fd().
#define EXIT_FAILURE 1 |
Definition at line 44 of file process.c.
Referenced by exit_status_code(), rb_f_abort(), and rb_f_exit_bang().
#define EXIT_SUCCESS 0 |
Definition at line 41 of file process.c.
Referenced by exit_status_code(), pst_success_p(), rb_f_exit(), and rb_f_system().
#define EXPORT_DUP | ( | str | ) | rb_str_dup(str) |
Definition at line 1426 of file process.c.
Referenced by check_exec_redirect(), and rb_execarg_addopt().
Definition at line 1425 of file process.c.
Referenced by check_exec_env_i(), and rb_exec_fillarg().
#define MAXPATHLEN 1024 |
Definition at line 57 of file process.c.
Referenced by proc_exec_sh(), proc_exec_v(), and rb_exec_fillarg().
Definition at line 231 of file process.c.
Referenced by p_gid_change_privilege(), p_gid_grant_privilege(), and rb_execarg_addopt().
Definition at line 190 of file process.c.
Referenced by p_uid_change_privilege(), p_uid_grant_privilege(), and rb_execarg_addopt().
#define p_gid_from_name p_gid_from_name |
Definition at line 234 of file process.c.
Referenced by Init_process().
#define p_gid_from_name rb_f_notimplement |
#define P_NOWAIT _P_NOWAIT |
Definition at line 1435 of file process.c.
Referenced by check_spawn_mode().
#define p_sys_issetugid rb_f_notimplement |
Definition at line 5555 of file process.c.
Referenced by Init_process().
#define p_sys_setegid rb_f_notimplement |
Definition at line 5468 of file process.c.
Referenced by Init_process().
#define p_sys_seteuid rb_f_notimplement |
Definition at line 5084 of file process.c.
Referenced by Init_process().
#define p_sys_setgid rb_f_notimplement |
Definition at line 5424 of file process.c.
Referenced by Init_process().
#define p_sys_setregid rb_f_notimplement |
Definition at line 5497 of file process.c.
Referenced by Init_process().
#define p_sys_setresgid rb_f_notimplement |
Definition at line 5526 of file process.c.
Referenced by Init_process().
#define p_sys_setresuid rb_f_notimplement |
Definition at line 5143 of file process.c.
Referenced by Init_process().
#define p_sys_setreuid rb_f_notimplement |
Definition at line 5113 of file process.c.
Referenced by Init_process().
#define p_sys_setrgid rb_f_notimplement |
Definition at line 5446 of file process.c.
Referenced by Init_process().
#define p_sys_setruid rb_f_notimplement |
Definition at line 5062 of file process.c.
Referenced by Init_process().
#define p_sys_setuid rb_f_notimplement |
Definition at line 5040 of file process.c.
Referenced by Init_process().
#define p_uid_from_name p_uid_from_name |
Definition at line 193 of file process.c.
Referenced by Init_process().
#define p_uid_from_name rb_f_notimplement |
#define preserving_errno | ( | stmts | ) | do {int saved_errno = errno; stmts; errno = saved_errno;} while (0) |
Definition at line 146 of file process.c.
Referenced by proc_exec_cmd(), proc_exec_v(), rb_exec(), rb_exec_async_signal_safe(), rb_exec_without_timer_thread(), and rb_proc_exec().
#define proc_daemon rb_f_notimplement |
Definition at line 5911 of file process.c.
Referenced by Init_process().
#define proc_getgroups rb_f_notimplement |
Definition at line 5703 of file process.c.
Referenced by Init_process().
#define proc_getmaxgroups rb_f_notimplement |
Definition at line 5803 of file process.c.
Referenced by Init_process().
#define proc_getpgid rb_f_notimplement |
Definition at line 4332 of file process.c.
Referenced by Init_process().
#define proc_getpgrp rb_f_notimplement |
Definition at line 4277 of file process.c.
Referenced by Init_process().
#define proc_getpriority rb_f_notimplement |
Definition at line 4488 of file process.c.
Referenced by Init_process().
#define proc_getrlimit rb_f_notimplement |
Definition at line 4756 of file process.c.
Referenced by Init_process().
#define proc_getsid rb_f_notimplement |
Definition at line 4392 of file process.c.
Referenced by Init_process().
#define proc_initgroups rb_f_notimplement |
Definition at line 5783 of file process.c.
Referenced by Init_process().
#define proc_setegid_m rb_f_notimplement |
Definition at line 6302 of file process.c.
Referenced by Init_process().
#define proc_seteuid_m rb_f_notimplement |
Definition at line 6172 of file process.c.
Referenced by Init_process().
#define proc_setgid rb_f_notimplement |
Definition at line 5613 of file process.c.
Referenced by Init_process().
#define proc_setgroups rb_f_notimplement |
Definition at line 5752 of file process.c.
Referenced by Init_process().
#define proc_setmaxgroups rb_f_notimplement |
Definition at line 5835 of file process.c.
Referenced by Init_process().
#define proc_setpgid rb_f_notimplement |
Definition at line 4358 of file process.c.
Referenced by Init_process().
#define proc_setpgrp rb_f_notimplement |
Definition at line 4306 of file process.c.
Referenced by Init_process().
#define proc_setpriority rb_f_notimplement |
Definition at line 4520 of file process.c.
Referenced by Init_process().
#define proc_setrlimit rb_f_notimplement |
Definition at line 4832 of file process.c.
Referenced by Init_process().
#define proc_setsid rb_f_notimplement |
Definition at line 4451 of file process.c.
Referenced by Init_process().
#define proc_setuid rb_f_notimplement |
Definition at line 5202 of file process.c.
Referenced by Init_process().
Definition at line 360 of file process.c.
Referenced by pst_bitand(), pst_inspect(), pst_rshift(), pst_success_p(), pst_to_s(), pst_wcoredump(), pst_wexitstatus(), pst_wifexited(), pst_wifsignaled(), pst_wifstopped(), pst_wstopsig(), pst_wtermsig(), and rb_f_system().
#define rb_f_fork rb_f_notimplement |
Definition at line 3601 of file process.c.
Referenced by Init_process().
#define rb_intern | ( | str | ) | rb_intern_const(str) |
#define rb_proc_times rb_f_notimplement |
Definition at line 6773 of file process.c.
Referenced by Init_process().
#define redirect_close | ( | fd | ) | close(fd) |
Definition at line 2574 of file process.c.
Referenced by run_exec_close(), run_exec_dup2(), and run_exec_open().
#define redirect_dup | ( | oldfd | ) | dup(oldfd) |
Definition at line 2572 of file process.c.
Referenced by run_exec_dup2(), and save_redirect_fd().
#define redirect_dup2 | ( | oldfd, | |
newfd | |||
) | dup2((oldfd), (newfd)) |
Definition at line 2573 of file process.c.
Referenced by run_exec_dup2(), run_exec_dup2_child(), and run_exec_open().
Definition at line 2575 of file process.c.
Referenced by run_exec_open().
#define RUBY_CLOCK_BASED_CLOCK_PROCESS_CPUTIME_ID ID2SYM(rb_intern("CLOCK_BASED_CLOCK_PROCESS_CPUTIME_ID")) |
Referenced by rb_clock_getres(), and rb_clock_gettime().
#define RUBY_GETTIMEOFDAY_BASED_CLOCK_REALTIME ID2SYM(rb_intern("GETTIMEOFDAY_BASED_CLOCK_REALTIME")) |
Referenced by Init_process(), rb_clock_getres(), and rb_clock_gettime().
Referenced by rb_clock_getres(), and rb_clock_gettime().
Definition at line 6785 of file process.c.
Referenced by timetick2integer().
#define TIMETICK_INT_MAX LONG_MAX |
Definition at line 6784 of file process.c.
Referenced by timetick2integer().
#define TIMETICK_INT_MIN LONG_MIN |
Definition at line 6783 of file process.c.
Referenced by timetick2integer().
Definition at line 1196 of file process.c.
Referenced by proc_exec_cmd(), and proc_exec_v().
#define WEXITSTATUS | ( | w | ) | (((w) >> 8) & 0xff) |
Definition at line 109 of file process.c.
Referenced by pst_message(), pst_success_p(), and pst_wexitstatus().
#define WIFEXITED | ( | w | ) | (((w) & 0xff) == 0) |
Definition at line 100 of file process.c.
Referenced by pst_message(), pst_success_p(), pst_wexitstatus(), and pst_wifexited().
#define WIFSIGNALED | ( | w | ) | (((w) & 0x7f) > 0 && (((w) & 0x7f) < 0x7f)) |
Definition at line 103 of file process.c.
Referenced by pst_message(), pst_wifsignaled(), and pst_wtermsig().
#define WIFSTOPPED | ( | w | ) | (((w) & 0xff) == 0x7f) |
Definition at line 106 of file process.c.
Referenced by pst_message(), pst_wifstopped(), and pst_wstopsig().
#define WSTOPSIG WEXITSTATUS |
Definition at line 115 of file process.c.
Referenced by pst_message(), and pst_wstopsig().
#define WTERMSIG | ( | w | ) | ((w) & 0x7f) |
Definition at line 112 of file process.c.
Referenced by pst_message(), and pst_wtermsig().
typedef long timetick_int_t |
typedef unsigned int unsigned_clock_t |
Definition at line 1159 of file process.c.
References after_exec_async_signal_safe(), and after_exec_non_async_signal_safe().
Referenced by proc_exec_v(), and rb_proc_exec().
Definition at line 1142 of file process.c.
References signal().
Referenced by after_exec(), and rb_exec_async_signal_safe().
Definition at line 1150 of file process.c.
References forked_child, rb_thread_reset_timer_thread(), and rb_thread_start_timer_thread().
Referenced by after_exec(), and rb_exec_without_timer_thread().
Definition at line 1134 of file process.c.
References before_exec_async_signal_safe(), and before_exec_non_async_signal_safe().
Referenced by proc_exec_v(), and rb_proc_exec().
Definition at line 1105 of file process.c.
References signal().
Referenced by before_exec(), and rb_exec_async_signal_safe().
Definition at line 1119 of file process.c.
References forked_child, and rb_thread_stop_timer_thread().
Referenced by before_exec(), and rb_exec_without_timer_thread().
Definition at line 1972 of file process.c.
References env, EXPORT_STR, hide_obj(), key, NIL_P(), rb_ary_push(), rb_assoc_new(), rb_eArgError, rb_raise(), ST_CONTINUE, strchr(), StringValueCStr, and val.
Referenced by rb_check_exec_env().
|
static |
Definition at line 1904 of file process.c.
References ary, check_exec_fds_1(), rb_execarg::close_others_maxhint, depth, rb_execarg::fd_close, rb_execarg::fd_dup2, rb_execarg::fd_dup2_child, rb_execarg::fd_open, FIX2INT, FIXNUM_P, i, INT2FIX, Qtrue, RARRAY_AREF, RARRAY_LEN, rb_ary_store(), rb_eArgError, rb_hash_aset(), rb_hash_lookup, rb_hash_new(), rb_raise(), and val.
Referenced by rb_execarg_fixup().
|
static |
Definition at line 1874 of file process.c.
References rb_execarg::fd_dup2, rb_execarg::fd_dup2_child, rb_execarg::fd_open, FIX2INT, i, INT2FIX, Qfalse, Qtrue, RARRAY_AREF, RARRAY_LEN, rb_eArgError, rb_hash_aset(), rb_hash_lookup, rb_raise(), and RTEST.
Referenced by check_exec_fds().
Definition at line 1844 of file process.c.
References key, PRIsVALUE, rb_eArgError, rb_execarg_addopt(), rb_raise(), ST_CONTINUE, SYMBOL_P, and val.
Referenced by rb_check_exec_options().
|
static |
Definition at line 1859 of file process.c.
References args, key, NIL_P(), rb_execarg_addopt(), rb_hash_aset(), rb_hash_new(), ST_CONTINUE, and val.
Referenced by rb_execarg_extract_options().
|
static |
Definition at line 1576 of file process.c.
References check_exec_redirect1(), check_exec_redirect_fd(), EXPORT_DUP, rb_execarg::fd_close, rb_execarg::fd_dup2, rb_execarg::fd_dup2_child, rb_execarg::fd_open, FilePathValue, FIX2INT, FIXNUM_P, flags, hide_obj(), id, INT2FIX, INT2NUM, io, NIL_P(), param, path, perm, Qnil, RARRAY_LEN, rb_ary_entry(), rb_ary_new3, rb_eArgError, rb_id2name(), rb_intern, rb_io_check_io(), rb_io_modestr_oflags(), rb_raise(), rb_to_int(), RB_TYPE_P, StringValueCStr, SYM2ID, SYMBOL_P, T_ARRAY, T_FILE, T_FIXNUM, T_STRING, T_SYMBOL, tmp, TYPE, and val.
Referenced by rb_execarg_addopt().
Definition at line 1554 of file process.c.
References ary, check_exec_redirect_fd(), hide_obj(), i, n, NIL_P(), Qfalse, RARRAY_AREF, RARRAY_LEN, rb_ary_new(), rb_ary_push(), rb_assoc_new(), RB_TYPE_P, T_ARRAY, and v.
Referenced by check_exec_redirect().
Definition at line 1513 of file process.c.
References rb_io_t::fd, FIX2INT, FIXNUM_P, GetOpenFile, INT2FIX, NIL_P(), rb_check_convert_type(), rb_eArgError, rb_intern, rb_raise(), SYM2ID, SYMBOL_P, T_FILE, rb_io_t::tied_io_for_writing, and tmp.
Referenced by check_exec_redirect(), and check_exec_redirect1().
Definition at line 4847 of file process.c.
References rb_eRuntimeError, rb_raise(), and rb_secure().
Referenced by p_gid_change_privilege(), p_gid_exchange(), p_gid_switch(), rb_execarg_addopt(), and rb_setegid_core().
Definition at line 4837 of file process.c.
References rb_eRuntimeError, rb_raise(), and rb_secure().
Referenced by p_uid_change_privilege(), p_uid_exchange(), p_uid_switch(), rb_execarg_addopt(), and rb_seteuid_core().
Definition at line 2075 of file process.c.
References key, string_part::len, string_part::ptr, and ret.
Referenced by rb_exec_fillarg().
Definition at line 1009 of file process.c.
References id_pid(), and rb_thread_local_aref().
Referenced by rb_detach_process().
Definition at line 1015 of file process.c.
References arg, wait_data::pid, rb_last_status_get(), rb_waitpid(), and status.
Referenced by rb_detach_process().
Definition at line 3605 of file process.c.
References EXIT_FAILURE, EXIT_SUCCESS, NUM2INT, Qfalse, and Qtrue.
Referenced by rb_f_exit(), and rb_f_exit_bang().
Definition at line 2308 of file process.c.
References rb_execarg::envp_buf, key, rb_str_buf_cat(), rb_str_buf_cat2(), ST_CONTINUE, StringValueCStr, and val.
Referenced by rb_execarg_fixup().
|
static |
Definition at line 257 of file process.c.
References PIDT2NUM, and rb_secure().
Referenced by Init_process().
Definition at line 281 of file process.c.
References PIDT2NUM, and rb_secure().
Referenced by Init_process().
Definition at line 1506 of file process.c.
References obj, and RBASIC_CLEAR_CLASS.
Referenced by check_exec_env_i(), check_exec_redirect(), check_exec_redirect1(), rb_check_exec_env(), rb_exec_fillarg(), rb_execarg_addopt(), rb_execarg_fixup(), rb_execarg_new(), rb_execarg_run_options(), save_env(), and save_redirect_fd().
Definition at line 1001 of file process.c.
References CONST_ID, and wait_data::pid.
Referenced by detach_process_pid(), and rb_detach_process().
Definition at line 7414 of file process.c.
References CLASS_OF, CLOCK_MONOTONIC, CLOCK_REALTIME, get_pid(), get_ppid(), getegid(), geteuid(), inf, INT2FIX, NULL, p_gid_change_privilege(), p_gid_exchange(), p_gid_exchangeable(), p_gid_from_name, p_gid_grant_privilege(), p_gid_have_saved_id(), p_gid_switch(), p_sys_issetugid, p_sys_setegid, p_sys_seteuid, p_sys_setgid, p_sys_setregid, p_sys_setresgid, p_sys_setresuid, p_sys_setreuid, p_sys_setrgid, p_sys_setruid, p_sys_setuid, p_uid_change_privilege(), p_uid_exchange(), p_uid_exchangeable(), p_uid_from_name, p_uid_grant_privilege(), p_uid_have_saved_id(), p_uid_switch(), proc_daemon, proc_detach(), proc_getegid(), proc_geteuid(), proc_getgid(), proc_getgroups, proc_getmaxgroups, proc_getpgid, proc_getpgrp, proc_getpriority, proc_getrlimit, proc_getsid, proc_getuid(), proc_initgroups, proc_setegid_m, proc_seteuid_m, proc_setgid, proc_setgroups, proc_setmaxgroups, proc_setpgid, proc_setpgrp, proc_setpriority, proc_setrlimit, proc_setsid, proc_setuid, proc_wait(), proc_wait2(), proc_waitall(), pst_bitand(), pst_equal(), pst_inspect(), pst_pid(), pst_rshift(), pst_success_p(), pst_to_i(), pst_to_s(), pst_wcoredump(), pst_wexitstatus(), pst_wifexited(), pst_wifsignaled(), pst_wifstopped(), pst_wstopsig(), pst_wtermsig(), rb_clock_getres(), rb_clock_gettime(), rb_cObject, rb_cProcessStatus, rb_cStruct, rb_define_alias(), rb_define_class_under(), rb_define_const(), rb_define_global_function(), rb_define_method(), rb_define_module(), rb_define_module_function(), rb_define_module_under(), rb_define_singleton_method(), rb_define_virtual_variable(), rb_f_abort(), rb_f_exec(), rb_f_exit(), rb_f_exit_bang(), rb_f_fork, rb_f_kill(), rb_f_sleep(), rb_f_spawn(), rb_f_system(), rb_last_status_get(), rb_proc_times, rb_singleton_class(), rb_struct_define_under(), rb_undef_method(), RUBY_GETTIMEOFDAY_BASED_CLOCK_REALTIME, and WNOHANG.
|
static |
Definition at line 6928 of file process.c.
References ID2SYM, NIL_P(), PRIsVALUE, rb_eArgError, rb_intern, rb_raise(), timetick2dblnum(), and timetick2integer().
Referenced by rb_clock_getres(), and rb_clock_gettime().
Definition at line 1369 of file process.c.
References rb_execarg::chdir_dir, rb_execarg::cmd, rb_execarg::dup2_tmpbuf, rb_execarg::env_modification, rb_execarg::envp_buf, rb_execarg::envp_str, rb_execarg::fd_close, rb_execarg::fd_dup2, rb_execarg::fd_dup2_child, rb_execarg::fd_open, rb_execarg::invoke, ptr, rb_gc_mark(), rb_execarg::redirect_fds, rb_execarg::rlimit_limits, rb_execarg::sh, and rb_execarg::use_shell.
Definition at line 5955 of file process.c.
References check_gid_switch(), EPERM, errno, getegid(), geteuid(), getgid(), id, OBJ2GID, rb_notimplement(), rb_sys_fail(), setegid(), setgid(), and void.
Referenced by Init_process().
Definition at line 6464 of file process.c.
References check_gid_switch(), getegid(), getgid(), GIDT2NUM, rb_notimplement(), and rb_sys_fail().
Referenced by Init_process(), p_gid_sw_ensure(), and p_gid_switch().
Definition at line 6439 of file process.c.
Referenced by Init_process().
Definition at line 6360 of file process.c.
References id, OBJ2GID, and rb_setegid_core().
Referenced by Init_process().
Definition at line 6618 of file process.c.
Referenced by Init_process().
Definition at line 6689 of file process.c.
References p_gid_exchange().
Referenced by p_gid_switch().
Definition at line 6696 of file process.c.
References check_gid_switch(), EPERM, errno, getegid(), getgid(), GIDT2NUM, p_gid_exchange(), p_gid_sw_ensure(), Qnil, rb_block_given_p(), rb_ensure(), rb_sys_fail(), and rb_yield().
Referenced by Init_process().
Definition at line 5247 of file process.c.
References check_uid_switch(), EPERM, errno, geteuid(), getuid(), id, OBJ2UID, rb_notimplement(), rb_sys_fail(), seteuid(), setuid(), and void.
Referenced by Init_process().
Definition at line 6402 of file process.c.
References check_uid_switch(), geteuid(), getuid(), rb_notimplement(), rb_sys_fail(), and UIDT2NUM.
Referenced by Init_process(), p_uid_sw_ensure(), and p_uid_switch().
Definition at line 6377 of file process.c.
Referenced by Init_process().
Definition at line 6230 of file process.c.
References id, OBJ2UID, and rb_seteuid_core().
Referenced by Init_process().
Definition at line 6502 of file process.c.
Referenced by Init_process().
Definition at line 6574 of file process.c.
References p_uid_exchange().
Referenced by p_uid_switch().
Definition at line 6581 of file process.c.
References check_uid_switch(), EPERM, errno, geteuid(), getuid(), p_uid_exchange(), p_uid_sw_ensure(), Qnil, rb_block_given_p(), rb_ensure(), rb_sys_fail(), rb_yield(), and UIDT2NUM.
Referenced by Init_process().
Definition at line 1084 of file process.c.
References NUM2PIDT, rb_detach_process(), and rb_secure().
Referenced by Init_process().
Definition at line 1201 of file process.c.
References ALLOC_N, argv, ARGVSTR2ARGV, dln_find_exe_r, errno, execv(), n, NULL, p, preserving_errno, rb_notimplement(), RSTRING_PTR, STRCASECMP, strcpy(), strlen(), strrchr(), try_with_sh, UNREACHABLE, and xfree.
Referenced by rb_exec_async_signal_safe().
Definition at line 1314 of file process.c.
References dln_find_exe_r, errno, execl(), MAXPATHLEN, NULL, rb_notimplement(), rb_w32_uspawn(), RSTRING_PTR, s, shell, status, str, and UNREACHABLE.
Referenced by rb_exec_async_signal_safe(), and rb_proc_exec().
Definition at line 1266 of file process.c.
References after_exec(), before_exec(), dln_find_exe_r, errno, execv(), MAXPATHLEN, preserving_errno, and try_with_sh.
Referenced by rb_proc_exec_n().
Definition at line 6250 of file process.c.
References getegid(), and GIDT2NUM.
Referenced by Init_process().
Definition at line 6126 of file process.c.
References geteuid(), and UIDT2NUM.
Referenced by Init_process().
Definition at line 5571 of file process.c.
References getgid(), and GIDT2NUM.
Referenced by Init_process().
Definition at line 5159 of file process.c.
References getuid(), and UIDT2NUM.
Referenced by Init_process().
Definition at line 885 of file process.c.
References flags, NIL_P(), NUM2PIDT, NUM2UINT, wait_data::pid, PIDT2NUM, Qnil, rb_last_status_clear(), rb_scan_args(), rb_secure(), rb_sys_fail(), rb_waitpid(), and status.
Referenced by Init_process(), and proc_wait2().
Definition at line 930 of file process.c.
References NIL_P(), wait_data::pid, proc_wait(), Qnil, rb_assoc_new(), and rb_last_status_get().
Referenced by Init_process().
Definition at line 959 of file process.c.
References errno, wait_data::pid, PIDT2NUM, rb_ary_new(), rb_ary_push(), rb_assoc_new(), rb_last_status_clear(), rb_last_status_get(), rb_last_status_set(), rb_secure(), rb_sys_fail(), rb_thread_schedule(), rb_waitpid(), result, st_foreach(), status, wait, and waitall_each().
Referenced by Init_process().
Definition at line 482 of file process.c.
References pst_to_i(), Qtrue, and rb_equal().
Referenced by Init_process().
Definition at line 453 of file process.c.
References CLASS_OF, NIL_P(), NUM2PIDT, PST2INT, pst_message(), pst_pid(), rb_class2name(), rb_sprintf(), rb_str_cat2(), status, and str.
Referenced by Init_process().
Definition at line 380 of file process.c.
References rb_str_cat2(), rb_str_catf(), ruby_signal_name(), WEXITSTATUS, WIFEXITED, WIFSIGNALED, WIFSTOPPED, WSTOPSIG, and WTERMSIG.
Referenced by pst_inspect(), and pst_to_s().
Definition at line 374 of file process.c.
References rb_attr_get(), and rb_intern.
Referenced by Init_process(), pst_inspect(), and pst_to_s().
Definition at line 671 of file process.c.
References EXIT_SUCCESS, PST2INT, Qfalse, Qnil, Qtrue, status, WEXITSTATUS, and WIFEXITED.
Referenced by Init_process().
Definition at line 355 of file process.c.
References rb_iv_get().
Referenced by Init_process(), and pst_equal().
Definition at line 426 of file process.c.
References NUM2PIDT, PST2INT, pst_message(), pst_pid(), rb_str_buf_new(), status, and str.
Referenced by Init_process().
Definition at line 652 of file process.c.
References INT2NUM, PST2INT, Qnil, status, WEXITSTATUS, and WIFEXITED.
Referenced by Init_process().
Definition at line 580 of file process.c.
References PST2INT, Qfalse, Qtrue, status, and WIFSIGNALED.
Referenced by Init_process().
Definition at line 541 of file process.c.
References PST2INT, Qfalse, Qtrue, status, and WIFSTOPPED.
Referenced by Init_process().
Definition at line 561 of file process.c.
References INT2NUM, PST2INT, Qnil, status, WIFSTOPPED, and WSTOPSIG.
Referenced by Init_process().
Definition at line 601 of file process.c.
References INT2NUM, PST2INT, Qnil, status, WIFSIGNALED, and WTERMSIG.
Referenced by Init_process().
Definition at line 2006 of file process.c.
References argc, i, name, NIL_P(), RARRAY_AREF, RARRAY_LEN, rb_check_arity, rb_check_array_type(), rb_eArgError, rb_raise(), rb_str_new_frozen(), RSTRING_PTR, SafeStringValue, security(), StringValueCStr, tmp, and UNLIMITED_ARGUMENTS.
Referenced by rb_exec_getargs().
Definition at line 1995 of file process.c.
References check_exec_env_i(), env, hide_obj(), rb_ary_new(), rb_hash_tbl_raw(), st_data_t, and st_foreach().
Referenced by rb_exec_fillarg(), and rb_execarg_setenv().
Definition at line 1952 of file process.c.
References check_exec_options_i(), rb_hash_tbl_raw(), RHASH_EMPTY_P, st_data_t, and st_foreach().
Referenced by rb_exec_fillarg().
Definition at line 7297 of file process.c.
References c, clock_getres(), timetick::count, errno, timetick::giga_count, ID2SYM, info, make_clock_result(), rb_intern, rb_scan_args(), rb_sys_fail(), RUBY_CLOCK_BASED_CLOCK_PROCESS_CPUTIME_ID, RUBY_GETTIMEOFDAY_BASED_CLOCK_REALTIME, RUBY_TIME_BASED_CLOCK_REALTIME, SYMBOL_P, timetick2dblnum_reciprocal(), timespec::tv_nsec, and timespec::tv_sec.
Referenced by Init_process().
Definition at line 7101 of file process.c.
References buf, c, clock_gettime(), timetick::count, errno, getrusage(), gettimeofday(), timetick::giga_count, info, make_clock_result(), NULL, rb_scan_args(), rb_sys_fail(), ret, RUBY_CLOCK_BASED_CLOCK_PROCESS_CPUTIME_ID, RUBY_GETTIMEOFDAY_BASED_CLOCK_REALTIME, RUBY_TIME_BASED_CLOCK_REALTIME, SYMBOL_P, t, time, tms::tms_stime, tms::tms_utime, timespec::tv_nsec, timeval::tv_sec, timespec::tv_sec, timeval::tv_usec, usage(), and utime().
Referenced by Init_process().
VALUE rb_detach_process | ( | rb_pid_t | pid | ) |
Definition at line 1027 of file process.c.
References detach_process_pid(), detach_process_watcher(), id_pid(), PIDT2NUM, rb_define_singleton_method(), rb_thread_create(), and rb_thread_local_aset().
Referenced by proc_detach(), and pty_detach_process().
int rb_exec | ( | const struct rb_exec_arg * | e | ) |
Definition at line 3162 of file process.c.
References rb_exec_arg::execarg_obj, NULL, preserving_errno, rb_exec_without_timer_thread(), rb_execarg_get(), rb_sourcefile, rb_sourceline(), ret, and RSTRING_PTR.
int rb_exec_arg_addopt | ( | struct rb_exec_arg * | e, |
VALUE | key, | ||
VALUE | val | ||
) |
Definition at line 1838 of file process.c.
References rb_exec_arg::execarg_obj, and rb_execarg_addopt().
void rb_exec_arg_fixup | ( | struct rb_exec_arg * | e | ) |
Definition at line 2402 of file process.c.
References rb_exec_arg::execarg_obj, and rb_execarg_fixup().
VALUE rb_exec_arg_init | ( | int | argc, |
VALUE * | argv, | ||
int | accept_shell, | ||
struct rb_exec_arg * | e | ||
) |
Definition at line 2294 of file process.c.
References rb_exec_arg::execarg_obj, and rb_execarg_init().
int rb_exec_async_signal_safe | ( | const struct rb_execarg * | eargp, |
char * | errmsg, | ||
size_t | errmsg_buflen | ||
) |
Definition at line 3113 of file process.c.
References after_exec_async_signal_safe(), before_exec_async_signal_safe(), rb_execarg::cmd, rb_execarg::envp_str, rb_execarg::invoke, NIL_P(), NULL, preserving_errno, proc_exec_cmd(), proc_exec_sh(), rb_execarg_run_options(), RSTRING_PTR, rb_execarg::sh, and rb_execarg::use_shell.
Referenced by chfunc(), rb_exec_without_timer_thread(), and rb_f_exec().
int rb_exec_err | ( | const struct rb_exec_arg * | e, |
char * | errmsg, | ||
size_t | errmsg_buflen | ||
) |
Definition at line 3156 of file process.c.
References rb_exec_arg::execarg_obj, rb_exec_without_timer_thread(), and rb_execarg_get().
|
static |
Definition at line 2085 of file process.c.
References arg, argc, rb_execarg::cmd, compare_posix_sh(), dln_find_exe_r, env, rb_execarg::env_modification, EXPORT_STR, hide_obj(), i, rb_execarg::invoke, string_part::len, MAXPATHLEN, MEMZERO, NIL_P(), NULL, numberof, p, string_part::ptr, Qnil, rb_check_exec_env(), rb_check_exec_options(), rb_execarg_get(), RB_GC_GUARD(), rb_str_buf_cat(), rb_str_buf_new(), rb_str_new_cstr(), RSTRING_LEN, RSTRING_PTR, s, rb_execarg::sh, strchr(), StringValueCStr, strlen(), and rb_execarg::use_shell.
Referenced by rb_execarg_init().
|
static |
Definition at line 2037 of file process.c.
References hash, NIL_P(), rb_check_argv(), and rb_check_hash_type().
Referenced by rb_execarg_init().
|
static |
Definition at line 3146 of file process.c.
References after_exec_non_async_signal_safe(), before_exec_non_async_signal_safe(), preserving_errno, rb_exec_async_signal_safe(), and ret.
Referenced by rb_exec(), rb_exec_err(), and rb_f_exec().
Definition at line 1670 of file process.c.
References ary, rb_execarg::chdir_dir, rb_execarg::chdir_given, check_exec_redirect(), check_gid_switch(), check_uid_switch(), rb_execarg::close_others_do, rb_execarg::close_others_given, EXPORT_DUP, FilePathValue, rb_execarg::gid, rb_execarg::gid_given, hide_obj(), id, INT2FIX, INT2NUM, mode_t, rb_execarg::new_pgroup_flag, rb_execarg::new_pgroup_given, NIL_P(), NUM2MODET, NUM2PIDT, OBJ2GID, OBJ2UID, rb_execarg::pgroup_given, rb_execarg::pgroup_pgid, Qfalse, Qtrue, RARRAY_LEN, rb_ary_entry(), rb_ary_new(), rb_ary_new3, rb_ary_push(), rb_check_array_type(), rb_eArgError, rb_eNotImpError, rb_execarg_get(), RB_GC_GUARD(), rb_id2name(), rb_intern, rb_raise(), rb_secure(), rb_str_encode_ospath(), rb_to_int(), rb_execarg::rlimit_limits, RTEST, ST_CONTINUE, ST_STOP, SYM2ID, T_ARRAY, T_FILE, T_FIXNUM, T_SYMBOL, tmp, 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.
Referenced by check_exec_options_i(), check_exec_options_i_extract(), pipe_open(), and rb_exec_arg_addopt().
Definition at line 1960 of file process.c.
References args, check_exec_options_i_extract(), Qnil, rb_hash_tbl_raw(), RHASH_EMPTY_P, st_data_t, and st_foreach().
Referenced by rb_io_s_popen().
Definition at line 2326 of file process.c.
References ary, check_exec_fds(), rb_execarg::dup2_tmpbuf, rb_execarg::env_modification, rb_execarg::envp_buf, rb_execarg::envp_str, envtbl, rb_execarg::fd_dup2, fill_envp_buf_i(), hide_obj(), i, key, len, NIL_P(), NULL, p, pair, Qfalse, Qundef, RARRAY_AREF, RARRAY_LEN, rb_cObject, rb_const_get(), rb_convert_type(), rb_execarg_get(), RB_GC_GUARD(), rb_hash_new(), rb_intern, RB_OBJ_WRITTEN, rb_str_buf_cat(), rb_str_buf_new(), rb_str_new(), rb_str_set_len(), rb_execarg::redirect_fds, RHASH_SIZE, RHASH_TBL_RAW, RSTRING_LEN, RSTRING_PTR, run_exec_dup2_tmpbuf_size(), st_data_t, st_delete(), st_foreach(), st_insert(), strlen(), T_HASH, tmpbuf, rb_execarg::unsetenv_others_do, rb_execarg::unsetenv_others_given, and val.
Referenced by establishShell(), pipe_open(), rb_exec_arg_fixup(), rb_f_exec(), rb_f_spawn(), and rb_spawn_internal().
struct rb_execarg* rb_execarg_get | ( | VALUE | execarg_obj | ) |
Definition at line 2273 of file process.c.
References exec_arg_data_type, and TypedData_Get_Struct.
Referenced by establishShell(), pipe_open(), rb_exec(), rb_exec_err(), rb_exec_fillarg(), rb_execarg_addopt(), rb_execarg_fixup(), rb_execarg_init(), rb_execarg_setenv(), rb_f_exec(), rb_f_spawn(), rb_run_exec_options(), rb_run_exec_options_err(), and rb_spawn_internal().
Definition at line 2281 of file process.c.
References rb_execarg::cmd, env, rb_execarg::invoke, Qnil, rb_exec_fillarg(), rb_exec_getargs(), rb_execarg_get(), RB_GC_GUARD(), ret, rb_execarg::sh, and rb_execarg::use_shell.
Referenced by rb_exec_arg_init(), and rb_execarg_new().
Definition at line 2262 of file process.c.
References exec_arg_data_type, hide_obj(), rb_cData, rb_execarg_init(), and TypedData_Make_Struct.
Referenced by establishShell(), pipe_open_s(), rb_f_exec(), rb_f_spawn(), rb_io_s_popen(), and rb_spawn_internal().
int rb_execarg_run_options | ( | const struct rb_execarg * | eargp, |
struct rb_execarg * | sargp, | ||
char * | errmsg, | ||
size_t | errmsg_buflen | ||
) |
Definition at line 2966 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::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::fd_open, rb_execarg::gid, rb_execarg::gid_given, hide_obj(), i, key, len, MEMZERO, mode_t, my_getcwd, NIL_P(), obj, pair, rb_execarg::pgroup_given, Qfalse, Qnil, RARRAY_AREF, RARRAY_LEN, rb_close_before_exec(), rb_env_clear(), rb_str_new(), rb_str_new2, rb_str_set_len(), rb_warn(), rb_execarg::redirect_fds, rb_execarg::rlimit_limits, RSTRING_PTR, ruby_setenv(), run_exec_close(), run_exec_dup2(), run_exec_dup2_child(), run_exec_dup2_tmpbuf_size(), run_exec_open(), save_env(), setgid(), setuid(), StringValueCStr, tmpbuf, rb_execarg::uid, rb_execarg::uid_given, umask(), rb_execarg::umask_given, rb_execarg::umask_mask, rb_execarg::unsetenv_others_do, rb_execarg::unsetenv_others_given, val, and xfree.
Referenced by pipe_open(), rb_exec_async_signal_safe(), rb_run_exec_options(), rb_run_exec_options_err(), and rb_spawn_process().
Definition at line 2300 of file process.c.
References env, rb_execarg::env_modification, NIL_P(), Qfalse, rb_check_exec_env(), and rb_execarg_get().
Referenced by rb_io_s_popen().
Definition at line 3656 of file process.c.
References args, GET_THREAD(), INT2NUM, rb_class_new_instance(), rb_eSystemExit, rb_exc_raise(), rb_str_new2, and ruby_finalize().
Referenced by rb_f_abort(), rb_f_exit(), and rb_thread_kill().
Definition at line 3741 of file process.c.
References args, EXIT_FAILURE, GET_THREAD(), INT2NUM, NIL_P(), rb_class_new_instance(), rb_eSystemExit, rb_exc_raise(), rb_exit(), rb_io_puts(), rb_scan_args(), rb_stderr, ruby_error_print(), StringValue, and UNREACHABLE.
Referenced by Init_process().
Definition at line 2483 of file process.c.
References CHILD_ERRMSG_BUFLEN, rb_execarg::cmd, rb_execarg::invoke, Qnil, rb_exec_async_signal_safe(), rb_exec_without_timer_thread(), rb_execarg_fixup(), rb_execarg_get(), rb_execarg_new(), RB_GC_GUARD(), rb_sys_fail(), rb_sys_fail_str(), rb_execarg::sh, TRUE, and rb_execarg::use_shell.
Referenced by Init_process().
Definition at line 3712 of file process.c.
References exit_status_code(), EXIT_SUCCESS, rb_exit(), rb_scan_args(), status, and UNREACHABLE.
Referenced by Init_process().
Definition at line 3639 of file process.c.
References EXIT_FAILURE, exit_status_code(), rb_scan_args(), status, and UNREACHABLE.
Referenced by Init_process().
Definition at line 4229 of file process.c.
References end, INT2FIX, rb_check_arity, rb_thread_sleep_forever(), rb_thread_wait_for(), rb_time_interval(), and time.
Referenced by Init_process().
Definition at line 4182 of file process.c.
References CHILD_ERRMSG_BUFLEN, rb_execarg::cmd, rb_execarg::invoke, PIDT2NUM, Qnil, rb_execarg_fixup(), rb_execarg_get(), rb_execarg_new(), RB_GC_GUARD(), rb_spawn_process(), rb_sys_fail(), rb_sys_fail_str(), rb_execarg::sh, TRUE, and rb_execarg::use_shell.
Referenced by Init_process().
Definition at line 3881 of file process.c.
References chfunc(), EXIT_SUCCESS, int, NULL, PST2INT, Qfalse, Qnil, Qtrue, rb_last_status_clear(), rb_last_status_get(), rb_spawn_internal(), rb_sys_fail(), rb_waitpid(), ret, signal(), and status.
Referenced by Init_process().
Definition at line 336 of file process.c.
References GET_THREAD(), rb_thread_struct::last_status, and Qnil.
Referenced by proc_wait(), proc_waitall(), rb_f_backquote(), rb_f_system(), and rb_io_close().
Definition at line 321 of file process.c.
References GET_THREAD(), and rb_thread_struct::last_status.
Referenced by detach_process_watcher(), Init_process(), proc_wait2(), proc_waitall(), pty_check(), raise_from_check(), rb_f_system(), and waitall_each().
Definition at line 327 of file process.c.
References GET_THREAD(), INT2FIX, rb_thread_struct::last_status, PIDT2NUM, rb_cProcessStatus, rb_iv_set(), rb_obj_alloc(), and th.
Referenced by pipe_finalize(), proc_waitall(), rb_spawn_process(), rb_waitpid(), and waitall_each().
Definition at line 1359 of file process.c.
References after_exec(), before_exec(), preserving_errno, proc_exec_sh(), Qfalse, and ret.
Definition at line 1285 of file process.c.
References ALLOC_ARGV, ALLOCV_END, argc, args, i, proc_exec_v(), ret, RSTRING_PTR, and v.
int rb_run_exec_options | ( | const struct rb_exec_arg * | e, |
struct rb_exec_arg * | s | ||
) |
Definition at line 3106 of file process.c.
References rb_exec_arg::execarg_obj, NULL, rb_execarg_get(), and rb_execarg_run_options().
int rb_run_exec_options_err | ( | const struct rb_exec_arg * | e, |
struct rb_exec_arg * | s, | ||
char * | errmsg, | ||
size_t | errmsg_buflen | ||
) |
Definition at line 3100 of file process.c.
References rb_exec_arg::execarg_obj, rb_execarg_get(), and rb_execarg_run_options().
|
static |
Definition at line 6306 of file process.c.
References check_gid_switch(), geteuid(), getgid(), rb_notimplement(), rb_sys_fail(), setegid(), and setgid().
Referenced by p_gid_grant_privilege().
|
static |
Definition at line 6176 of file process.c.
References check_uid_switch(), geteuid(), getuid(), rb_notimplement(), rb_sys_fail(), seteuid(), and setuid().
Referenced by p_uid_grant_privilege().
Definition at line 3842 of file process.c.
References NULL, and rb_spawn_internal().
Definition at line 3836 of file process.c.
References rb_spawn_internal().
|
static |
Definition at line 3821 of file process.c.
References rb_execarg_fixup(), rb_execarg_get(), rb_execarg_new(), RB_GC_GUARD(), rb_spawn_process(), ret, and TRUE.
Referenced by rb_f_system(), rb_spawn(), and rb_spawn_err().
|
static |
Definition at line 3771 of file process.c.
References argc, ARGVSTR2ARGC, ARGVSTR2ARGV, rb_execarg::cmd, rb_execarg::invoke, NULL, rb_ary_join(), rb_ary_new4, rb_execarg_run_options(), rb_fork_async_signal_safe(), rb_last_status_set(), rb_str_new2, rb_execarg::redirect_fds, RSTRING_PTR, rb_execarg::sh, status, StringValuePtr, and rb_execarg::use_shell.
Referenced by rb_f_spawn(), and rb_spawn_internal().
void rb_syswait | ( | rb_pid_t | pid | ) |
Definition at line 3763 of file process.c.
References rb_waitpid(), and status.
Referenced by rb_io_close().
Definition at line 758 of file process.c.
References errno, flags, GET_THREAD(), wait_data::pid, rb_eArgError, rb_last_status_set(), rb_raise(), rb_thread_alone(), rb_thread_blocking_region(), rb_thread_call_without_gvl(), rb_thread_schedule(), rb_waitpid_blocking(), result, retry, RUBY_UBF_PROCESS, RUBY_VM_CHECK_INTS, st, st_data_t, st_delete(), st_foreach(), st_init_numtable(), st_insert(), wait_data::status, status, and wait_each().
Referenced by detach_process_watcher(), proc_wait(), proc_waitall(), pty_check(), rb_f_system(), and rb_syswait().
|
static |
Definition at line 6819 of file process.c.
References i, j, and reduce_fraction().
Referenced by timetick2dblnum(), timetick2dblnum_reciprocal(), and timetick2integer().
|
static |
Definition at line 6809 of file process.c.
References gcd_timetick_int().
Referenced by reduce_factors().
Definition at line 2769 of file process.c.
References ERRMSG, FIX2INT, i, RARRAY_AREF, RARRAY_LEN, redirect_close, and ret.
Referenced by rb_execarg_run_options().
|
static |
Definition at line 2637 of file process.c.
References ERRMSG, fail, fcntl(), FIX2INT, i, intcmp(), intrcmp(), j, n, run_exec_dup2_fd_pair::newfd, run_exec_dup2_fd_pair::num_newer, run_exec_dup2_fd_pair::older_index, run_exec_dup2_fd_pair::oldfd, RARRAY_AREF, RARRAY_LEN, rb_update_max_fd(), redirect_close, redirect_dup, redirect_dup2, ret, RSTRING_PTR, and save_redirect_fd().
Referenced by rb_execarg_run_options().
|
static |
Definition at line 2841 of file process.c.
References ERRMSG, FIX2INT, i, run_exec_dup2_fd_pair::newfd, run_exec_dup2_fd_pair::oldfd, RARRAY_AREF, RARRAY_LEN, rb_update_max_fd(), redirect_dup2, ret, and save_redirect_fd().
Referenced by rb_execarg_run_options().
|
static |
Definition at line 2630 of file process.c.
References n.
Referenced by rb_execarg_fixup(), and rb_execarg_run_options().
|
static |
Definition at line 2788 of file process.c.
References ERRMSG, FilePathValue, FIX2INT, i, NUM2INT, param, perm, RARRAY_AREF, RARRAY_LEN, rb_str_encode_ospath(), rb_update_max_fd(), redirect_close, redirect_dup2, redirect_open, ret, RSTRING_PTR, and save_redirect_fd().
Referenced by rb_execarg_run_options().
|
static |
Definition at line 2941 of file process.c.
References ary, env, rb_execarg::env_modification, hide_obj(), Qfalse, rb_ary_new(), rb_block_call(), rb_cObject, rb_const_get(), rb_intern, RTEST, rb_execarg::unsetenv_others_do, and rb_execarg::unsetenv_others_given.
Referenced by rb_execarg_run_options().
|
static |
Definition at line 2579 of file process.c.
References ERRMSG, errno, rb_execarg::fd_close, rb_execarg::fd_dup2, hide_obj(), INT2FIX, Qfalse, Qnil, rb_ary_new(), rb_ary_push(), rb_assoc_new(), rb_update_max_fd(), and redirect_dup.
Referenced by run_exec_dup2(), run_exec_dup2_child(), and run_exec_open().
Definition at line 1171 of file process.c.
References rb_env_path_tainted(), rb_eSecurityError, rb_raise(), and rb_safe_level.
Referenced by rb_check_argv().
|
static |
Definition at line 6840 of file process.c.
References timetick::count, d, DBL2NUM, timetick::giga_count, i, and reduce_factors().
Referenced by make_clock_result().
|
static |
Definition at line 6861 of file process.c.
References timetick::count, d, DBL2NUM, timetick::giga_count, i, and reduce_factors().
Referenced by rb_clock_getres().
|
static |
Definition at line 6885 of file process.c.
References timetick::count, DIV, timetick::giga_count, i, LONG2FIX, MUL_OVERFLOW_SIGNED_INTEGER_P, rb_funcall(), reduce_factors(), t, TIMETICK_INT2NUM, TIMETICK_INT_MAX, TIMETICK_INT_MIN, and v.
Referenced by make_clock_result().
Definition at line 714 of file process.c.
References wait_data::pid, ST_DELETE, ST_STOP, wait_data::status, and status.
Referenced by rb_waitpid().
Definition at line 724 of file process.c.
References PIDT2NUM, rb_ary_push(), rb_assoc_new(), rb_last_status_get(), rb_last_status_set(), and ST_DELETE.
Referenced by proc_waitall().
|
static |
Definition at line 1405 of file process.c.
Referenced by rb_execarg_get(), and rb_execarg_new().
|
static |
Definition at line 1090 of file process.c.
Referenced by after_exec_non_async_signal_safe(), and before_exec_non_async_signal_safe().
|
static |
Definition at line 318 of file process.c.
Referenced by Init_process(), and rb_last_status_set().
|
static |