Ruby 2.7.6p219 (2022-04-12 revision c9c2245c0a25176072e02db9254f0e0c84c805cd)
Data Structures | Macros | Typedefs | Functions | Variables
process.c File Reference
#include "ruby/config.h"
#include "ruby/io.h"
#include "internal.h"
#include "ruby/thread.h"
#include "ruby/util.h"
#include "vm_core.h"
#include "hrtime.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  waitpid_state
 
struct  string_part
 
struct  open_struct
 
struct  run_exec_dup2_fd_pair
 
struct  spawn_args
 
struct  timetick
 

Macros

#define EXIT_SUCCESS   0
 
#define EXIT_FAILURE   1
 
#define MAXPATHLEN   1024
 
#define WIFEXITED(w)   (((w) & 0xff) == 0)
 
#define WIFSIGNALED(w)   (((w) & 0x7f) > 0 && (((w) & 0x7f) < 0x7f))
 
#define WIFSTOPPED(w)   (((w) & 0xff) == 0x7f)
 
#define WEXITSTATUS(w)   (((w) >> 8) & 0xff)
 
#define WTERMSIG(w)   ((w) & 0x7f)
 
#define WSTOPSIG   WEXITSTATUS
 
#define p_uid_from_name   p_uid_from_name
 
#define p_gid_from_name   p_gid_from_name
 
#define PREPARE_GETPWNAM   /* do nothing */
 
#define FINISH_GETPWNAM   /* do nothing */
 
#define OBJ2UID1(id)   NUM2UIDT(id)
 
#define OBJ2UID(id)   NUM2UIDT(id)
 
#define p_uid_from_name   rb_f_notimplement
 
#define PREPARE_GETGRNAM   /* do nothing */
 
#define FINISH_GETGRNAM   /* do nothing */
 
#define OBJ2GID1(id)   NUM2GIDT(id)
 
#define OBJ2GID(id)   NUM2GIDT(id)
 
#define p_gid_from_name   rb_f_notimplement
 
#define id_exception   idException
 
#define ALWAYS_NEED_ENVP   0
 
#define redirect_dup(oldfd)   dup(oldfd)
 
#define redirect_dup2(oldfd, newfd)   dup2((oldfd), (newfd))
 
#define redirect_cloexec_dup(oldfd)   rb_cloexec_dup(oldfd)
 
#define redirect_cloexec_dup2(oldfd, newfd)   rb_cloexec_dup2((oldfd), (newfd))
 
#define redirect_close(fd)   close_unless_reserved(fd)
 
#define parent_redirect_open(pathname, flags, perm)   rb_cloexec_open((pathname), (flags), (perm))
 
#define parent_redirect_close(fd)   close_unless_reserved(fd)
 
#define PST2INT(st)   NUM2INT(pst_to_i(st))
 
#define WAITPID_LOCK_ONLY   ((struct waitpid_state *)-1)
 
#define ruby_nocldwait   0
 
#define WRITE_CONST(fd, str)   (void)(write((fd),(str),sizeof(str)-1)<0)
 
#define try_with_sh(err, prog, argv, envp)   (void)0
 
#define EXPORT_STR(str)   (str)
 
#define EXPORT_DUP(str)   rb_str_dup(str)
 
#define USE_SPAWNV   0
 
#define P_NOWAIT   _P_NOWAIT
 
#define TO_BOOL(val, name)   NIL_P(val) ? 0 : rb_bool_expected((val), name)
 
#define ENVMATCH(n1, n2)   (strcmp((n1), (n2)) == 0)
 
#define CHILD_ERRMSG_BUFLEN   80
 
#define ERRMSG(str)   do { if (errmsg && 0 < errmsg_buflen) strlcpy(errmsg, (str), errmsg_buflen); } while (0)
 
#define ERRMSG1(str, a)   do { if (errmsg && 0 < errmsg_buflen) snprintf(errmsg, errmsg_buflen, (str), (a)); } while (0)
 
#define ERRMSG2(str, a, b)   do { if (errmsg && 0 < errmsg_buflen) snprintf(errmsg, errmsg_buflen, (str), (a), (b)); } while (0)
 
#define rb_f_fork   rb_f_notimplement
 
#define proc_getpgrp   rb_f_notimplement
 
#define proc_setpgrp   rb_f_notimplement
 
#define proc_getpgid   rb_f_notimplement
 
#define proc_setpgid   rb_f_notimplement
 
#define proc_getsid   rb_f_notimplement
 
#define proc_setsid   rb_f_notimplement
 
#define proc_getpriority   rb_f_notimplement
 
#define proc_setpriority   rb_f_notimplement
 
#define proc_getrlimit   rb_f_notimplement
 
#define proc_setrlimit   rb_f_notimplement
 
#define p_sys_setuid   rb_f_notimplement
 
#define p_sys_setruid   rb_f_notimplement
 
#define p_sys_seteuid   rb_f_notimplement
 
#define p_sys_setreuid   rb_f_notimplement
 
#define p_sys_setresuid   rb_f_notimplement
 
#define proc_setuid   rb_f_notimplement
 
#define p_sys_setgid   rb_f_notimplement
 
#define p_sys_setrgid   rb_f_notimplement
 
#define p_sys_setegid   rb_f_notimplement
 
#define p_sys_setregid   rb_f_notimplement
 
#define p_sys_setresgid   rb_f_notimplement
 
#define p_sys_issetugid   rb_f_notimplement
 
#define proc_setgid   rb_f_notimplement
 
#define proc_getgroups   rb_f_notimplement
 
#define proc_setgroups   rb_f_notimplement
 
#define proc_initgroups   rb_f_notimplement
 
#define proc_getmaxgroups   rb_f_notimplement
 
#define proc_setmaxgroups   rb_f_notimplement
 
#define proc_daemon   rb_f_notimplement
 
#define proc_seteuid_m   rb_f_notimplement
 
#define proc_setegid_m   rb_f_notimplement
 
#define rb_proc_times   rb_f_notimplement
 
#define TIMETICK_INT_MIN   LONG_MIN
 
#define TIMETICK_INT_MAX   LONG_MAX
 
#define TIMETICK_INT2NUM(v)   LONG2NUM(v)
 
#define MUL_OVERFLOW_TIMETICK_P(a, b)   MUL_OVERFLOW_LONG_P(a, b)
 
#define NDIV(x, y)   (-(-((x)+1)/(y))-1)
 
#define DIV(n, d)   ((n)<0 ? NDIV((n),(d)) : (n)/(d))
 
#define RUBY_TIME_BASED_CLOCK_REALTIME   ID2SYM(id_TIME_BASED_CLOCK_REALTIME)
 
#define RUBY_CLOCK_BASED_CLOCK_PROCESS_CPUTIME_ID    ID2SYM(id_CLOCK_BASED_CLOCK_PROCESS_CPUTIME_ID)
 
#define rb_intern(str)   rb_intern_const(str)
 

Typedefs

typedef unsigned int unsigned_clock_t
 
typedef void(* sig_t) (int)
 
typedef long timetick_int_t
 

Functions

VALUE rb_last_status_get (void)
 
void rb_last_status_set (int status, rb_pid_t pid)
 
void rb_last_status_clear (void)
 
void rb_native_mutex_lock (rb_nativethread_lock_t *)
 
void rb_native_mutex_unlock (rb_nativethread_lock_t *)
 
void rb_native_cond_signal (rb_nativethread_cond_t *)
 
void rb_native_cond_wait (rb_nativethread_cond_t *, rb_nativethread_lock_t *)
 
int rb_sigwait_fd_get (const rb_thread_t *)
 
void rb_sigwait_sleep (const rb_thread_t *, int fd, const rb_hrtime_t *)
 
void rb_sigwait_fd_put (const rb_thread_t *, int fd)
 
void rb_thread_sleep_interruptible (void)
 
void rb_sigwait_fd_migrate (rb_vm_t *vm)
 
void ruby_waitpid_all (rb_vm_t *vm)
 
rb_pid_t ruby_waitpid_locked (rb_vm_t *vm, rb_pid_t pid, int *status, int options, rb_nativethread_cond_t *cond)
 
rb_pid_t rb_waitpid (rb_pid_t pid, int *st, int flags)
 
VALUE rb_detach_process (rb_pid_t pid)
 
int rb_proc_exec (const char *str)
 
int rb_execarg_addopt (VALUE execarg_obj, VALUE key, VALUE val)
 
VALUE rb_execarg_extract_options (VALUE execarg_obj, VALUE opthash)
 
struct rb_execargrb_execarg_get (VALUE execarg_obj)
 
VALUE rb_execarg_new (int argc, const VALUE *argv, int accept_shell, int allow_exc_opt)
 
void rb_execarg_setenv (VALUE execarg_obj, VALUE env)
 
void rb_execarg_parent_start (VALUE execarg_obj)
 
void rb_execarg_parent_end (VALUE execarg_obj)
 
VALUE rb_f_exec (int argc, const VALUE *argv)
 
int rb_execarg_run_options (const struct rb_execarg *eargp, struct rb_execarg *sargp, char *errmsg, size_t errmsg_buflen)
 
int rb_exec_async_signal_safe (const struct rb_execarg *eargp, char *errmsg, size_t errmsg_buflen)
 
void rb_exit (int status)
 
VALUE rb_f_exit (int argc, const VALUE *argv)
 
VALUE rb_f_abort (int argc, const VALUE *argv)
 
void rb_syswait (rb_pid_t pid)
 
charrb_execarg_commandline (const struct rb_execarg *eargp, VALUE *prog)
 
rb_pid_t rb_spawn_err (int argc, const VALUE *argv, char *errmsg, size_t errmsg_buflen)
 
rb_pid_t rb_spawn (int argc, const VALUE *argv)
 
 CONSTFUNC (static timetick_int_t gcd_timetick_int(timetick_int_t, timetick_int_t))
 
void InitVM_process (void)
 
void Init_process (void)
 

Variables

VALUE rb_mProcess
 

Macro Definition Documentation

◆ ALWAYS_NEED_ENVP

#define ALWAYS_NEED_ENVP   0

Definition at line 313 of file process.c.

◆ CHILD_ERRMSG_BUFLEN

#define CHILD_ERRMSG_BUFLEN   80

◆ DIV

#define DIV (   n,
 
)    ((n)<0 ? NDIV((n),(d)) : (n)/(d))

Definition at line 7809 of file process.c.

◆ ENVMATCH

#define ENVMATCH (   n1,
  n2 
)    (strcmp((n1), (n2)) == 0)

Definition at line 2321 of file process.c.

◆ ERRMSG

#define ERRMSG (   str)    do { if (errmsg && 0 < errmsg_buflen) strlcpy(errmsg, (str), errmsg_buflen); } while (0)

Definition at line 3020 of file process.c.

◆ ERRMSG1

#define ERRMSG1 (   str,
 
)    do { if (errmsg && 0 < errmsg_buflen) snprintf(errmsg, errmsg_buflen, (str), (a)); } while (0)

Definition at line 3021 of file process.c.

◆ ERRMSG2

#define ERRMSG2 (   str,
  a,
 
)    do { if (errmsg && 0 < errmsg_buflen) snprintf(errmsg, errmsg_buflen, (str), (a), (b)); } while (0)

Definition at line 3022 of file process.c.

◆ EXIT_FAILURE

#define EXIT_FAILURE   1

Definition at line 45 of file process.c.

◆ EXIT_SUCCESS

#define EXIT_SUCCESS   0

Definition at line 42 of file process.c.

◆ EXPORT_DUP

#define EXPORT_DUP (   str)    rb_str_dup(str)

Definition at line 1756 of file process.c.

◆ EXPORT_STR

#define EXPORT_STR (   str)    (str)

Definition at line 1755 of file process.c.

◆ FINISH_GETGRNAM

#define FINISH_GETGRNAM   /* do nothing */

Definition at line 261 of file process.c.

◆ FINISH_GETPWNAM

#define FINISH_GETPWNAM   /* do nothing */

Definition at line 218 of file process.c.

◆ id_exception

#define id_exception   idException

Definition at line 281 of file process.c.

◆ MAXPATHLEN

#define MAXPATHLEN   1024

Definition at line 61 of file process.c.

◆ MUL_OVERFLOW_TIMETICK_P

#define MUL_OVERFLOW_TIMETICK_P (   a,
 
)    MUL_OVERFLOW_LONG_P(a, b)

Definition at line 7711 of file process.c.

◆ NDIV

#define NDIV (   x,
 
)    (-(-((x)+1)/(y))-1)

Definition at line 7808 of file process.c.

◆ OBJ2GID

#define OBJ2GID (   id)    NUM2GIDT(id)

Definition at line 263 of file process.c.

◆ OBJ2GID1

#define OBJ2GID1 (   id)    NUM2GIDT(id)

Definition at line 262 of file process.c.

◆ OBJ2UID

#define OBJ2UID (   id)    NUM2UIDT(id)

Definition at line 220 of file process.c.

◆ OBJ2UID1

#define OBJ2UID1 (   id)    NUM2UIDT(id)

Definition at line 219 of file process.c.

◆ p_gid_from_name [1/2]

#define p_gid_from_name   p_gid_from_name

Definition at line 266 of file process.c.

◆ p_gid_from_name [2/2]

#define p_gid_from_name   rb_f_notimplement

Definition at line 266 of file process.c.

◆ P_NOWAIT

#define P_NOWAIT   _P_NOWAIT

Definition at line 1765 of file process.c.

◆ p_sys_issetugid

#define p_sys_issetugid   rb_f_notimplement

Definition at line 6464 of file process.c.

◆ p_sys_setegid

#define p_sys_setegid   rb_f_notimplement

Definition at line 6382 of file process.c.

◆ p_sys_seteuid

#define p_sys_seteuid   rb_f_notimplement

Definition at line 6002 of file process.c.

◆ p_sys_setgid

#define p_sys_setgid   rb_f_notimplement

Definition at line 6338 of file process.c.

◆ p_sys_setregid

#define p_sys_setregid   rb_f_notimplement

Definition at line 6409 of file process.c.

◆ p_sys_setresgid

#define p_sys_setresgid   rb_f_notimplement

Definition at line 6436 of file process.c.

◆ p_sys_setresuid

#define p_sys_setresuid   rb_f_notimplement

Definition at line 6061 of file process.c.

◆ p_sys_setreuid

#define p_sys_setreuid   rb_f_notimplement

Definition at line 6031 of file process.c.

◆ p_sys_setrgid

#define p_sys_setrgid   rb_f_notimplement

Definition at line 6360 of file process.c.

◆ p_sys_setruid

#define p_sys_setruid   rb_f_notimplement

Definition at line 5980 of file process.c.

◆ p_sys_setuid

#define p_sys_setuid   rb_f_notimplement

Definition at line 5958 of file process.c.

◆ p_uid_from_name [1/2]

#define p_uid_from_name   p_uid_from_name

Definition at line 223 of file process.c.

◆ p_uid_from_name [2/2]

#define p_uid_from_name   rb_f_notimplement

Definition at line 223 of file process.c.

◆ parent_redirect_close

#define parent_redirect_close (   fd)    close_unless_reserved(fd)

Definition at line 441 of file process.c.

◆ parent_redirect_open

#define parent_redirect_open (   pathname,
  flags,
  perm 
)    rb_cloexec_open((pathname), (flags), (perm))

Definition at line 440 of file process.c.

◆ PREPARE_GETGRNAM

#define PREPARE_GETGRNAM   /* do nothing */

Definition at line 260 of file process.c.

◆ PREPARE_GETPWNAM

#define PREPARE_GETPWNAM   /* do nothing */

Definition at line 217 of file process.c.

◆ proc_daemon

#define proc_daemon   rb_f_notimplement

Definition at line 6835 of file process.c.

◆ proc_getgroups

#define proc_getgroups   rb_f_notimplement

Definition at line 6625 of file process.c.

◆ proc_getmaxgroups

#define proc_getmaxgroups   rb_f_notimplement

Definition at line 6725 of file process.c.

◆ proc_getpgid

#define proc_getpgid   rb_f_notimplement

Definition at line 5004 of file process.c.

◆ proc_getpgrp

#define proc_getpgrp   rb_f_notimplement

Definition at line 4951 of file process.c.

◆ proc_getpriority

#define proc_getpriority   rb_f_notimplement

Definition at line 5154 of file process.c.

◆ proc_getrlimit

#define proc_getrlimit   rb_f_notimplement

Definition at line 5442 of file process.c.

◆ proc_getsid

#define proc_getsid   rb_f_notimplement

Definition at line 5060 of file process.c.

◆ proc_initgroups

#define proc_initgroups   rb_f_notimplement

Definition at line 6705 of file process.c.

◆ proc_setegid_m

#define proc_setegid_m   rb_f_notimplement

Definition at line 7222 of file process.c.

◆ proc_seteuid_m

#define proc_seteuid_m   rb_f_notimplement

Definition at line 7092 of file process.c.

◆ proc_setgid

#define proc_setgid   rb_f_notimplement

Definition at line 6522 of file process.c.

◆ proc_setgroups

#define proc_setgroups   rb_f_notimplement

Definition at line 6674 of file process.c.

◆ proc_setmaxgroups

#define proc_setmaxgroups   rb_f_notimplement

Definition at line 6757 of file process.c.

◆ proc_setpgid

#define proc_setpgid   rb_f_notimplement

Definition at line 5029 of file process.c.

◆ proc_setpgrp

#define proc_setpgrp   rb_f_notimplement

Definition at line 4979 of file process.c.

◆ proc_setpriority

#define proc_setpriority   rb_f_notimplement

Definition at line 5185 of file process.c.

◆ proc_setrlimit

#define proc_setrlimit   rb_f_notimplement

Definition at line 5518 of file process.c.

◆ proc_setsid

#define proc_setsid   rb_f_notimplement

Definition at line 5118 of file process.c.

◆ proc_setuid

#define proc_setuid   rb_f_notimplement

Definition at line 6120 of file process.c.

◆ PST2INT

#define PST2INT (   st)    NUM2INT(pst_to_i(st))

Definition at line 605 of file process.c.

◆ rb_f_fork

#define rb_f_fork   rb_f_notimplement

Definition at line 4171 of file process.c.

◆ rb_intern

#define rb_intern (   str)    rb_intern_const(str)

◆ rb_proc_times

#define rb_proc_times   rb_f_notimplement

Definition at line 7697 of file process.c.

◆ redirect_cloexec_dup

#define redirect_cloexec_dup (   oldfd)    rb_cloexec_dup(oldfd)

Definition at line 437 of file process.c.

◆ redirect_cloexec_dup2

#define redirect_cloexec_dup2 (   oldfd,
  newfd 
)    rb_cloexec_dup2((oldfd), (newfd))

Definition at line 438 of file process.c.

◆ redirect_close

#define redirect_close (   fd)    close_unless_reserved(fd)

Definition at line 439 of file process.c.

◆ redirect_dup

#define redirect_dup (   oldfd)    dup(oldfd)

Definition at line 435 of file process.c.

◆ redirect_dup2

#define redirect_dup2 (   oldfd,
  newfd 
)    dup2((oldfd), (newfd))

Definition at line 436 of file process.c.

◆ RUBY_CLOCK_BASED_CLOCK_PROCESS_CPUTIME_ID

#define RUBY_CLOCK_BASED_CLOCK_PROCESS_CPUTIME_ID    ID2SYM(id_CLOCK_BASED_CLOCK_PROCESS_CPUTIME_ID)

◆ ruby_nocldwait

#define ruby_nocldwait   0

Definition at line 1053 of file process.c.

◆ RUBY_TIME_BASED_CLOCK_REALTIME

#define RUBY_TIME_BASED_CLOCK_REALTIME   ID2SYM(id_TIME_BASED_CLOCK_REALTIME)

◆ TIMETICK_INT2NUM

#define TIMETICK_INT2NUM (   v)    LONG2NUM(v)

Definition at line 7710 of file process.c.

◆ TIMETICK_INT_MAX

#define TIMETICK_INT_MAX   LONG_MAX

Definition at line 7709 of file process.c.

◆ TIMETICK_INT_MIN

#define TIMETICK_INT_MIN   LONG_MIN

Definition at line 7708 of file process.c.

◆ TO_BOOL

#define TO_BOOL (   val,
  name 
)    NIL_P(val) ? 0 : rb_bool_expected((val), name)

Definition at line 2039 of file process.c.

◆ try_with_sh

#define try_with_sh (   err,
  prog,
  argv,
  envp 
)    (void)0

Definition at line 1621 of file process.c.

◆ USE_SPAWNV

#define USE_SPAWNV   0

Definition at line 1762 of file process.c.

◆ WAITPID_LOCK_ONLY

#define WAITPID_LOCK_ONLY   ((struct waitpid_state *)-1)

Definition at line 969 of file process.c.

◆ WEXITSTATUS

#define WEXITSTATUS (   w)    (((w) >> 8) & 0xff)

Definition at line 111 of file process.c.

◆ WIFEXITED

#define WIFEXITED (   w)    (((w) & 0xff) == 0)

Definition at line 102 of file process.c.

◆ WIFSIGNALED

#define WIFSIGNALED (   w)    (((w) & 0x7f) > 0 && (((w) & 0x7f) < 0x7f))

Definition at line 105 of file process.c.

◆ WIFSTOPPED

#define WIFSTOPPED (   w)    (((w) & 0xff) == 0x7f)

Definition at line 108 of file process.c.

◆ WRITE_CONST

#define WRITE_CONST (   fd,
  str 
)    (void)(write((fd),(str),sizeof(str)-1)<0)

Definition at line 1533 of file process.c.

◆ WSTOPSIG

#define WSTOPSIG   WEXITSTATUS

Definition at line 117 of file process.c.

◆ WTERMSIG

#define WTERMSIG (   w)    ((w) & 0x7f)

Definition at line 114 of file process.c.

Typedef Documentation

◆ sig_t

typedef void(* sig_t) (int)

Definition at line 278 of file process.c.

◆ timetick_int_t

Definition at line 7707 of file process.c.

◆ unsigned_clock_t

Definition at line 271 of file process.c.

Function Documentation

◆ CONSTFUNC()

CONSTFUNC ( static timetick_int_t   gcd_timetick_inttimetick_int_t, timetick_int_t)

◆ Init_process()

void Init_process ( void  )

Definition at line 8832 of file process.c.

References id_in, and rb_intern.

◆ InitVM_process()

void InitVM_process ( void  )

Definition at line 8405 of file process.c.

References rb_define_virtual_variable().

◆ rb_detach_process()

VALUE rb_detach_process ( rb_pid_t  pid)

Definition at line 1451 of file process.c.

References rb_thread_create().

◆ rb_exec_async_signal_safe()

int rb_exec_async_signal_safe ( const struct rb_execarg eargp,
char errmsg,
size_t  errmsg_buflen 
)

Definition at line 3551 of file process.c.

References errno.

◆ rb_execarg_addopt()

int rb_execarg_addopt ( VALUE  execarg_obj,
VALUE  key,
VALUE  val 
)

◆ rb_execarg_commandline()

char * rb_execarg_commandline ( const struct rb_execarg eargp,
VALUE prog 
)

◆ rb_execarg_extract_options()

VALUE rb_execarg_extract_options ( VALUE  execarg_obj,
VALUE  opthash 
)

Definition at line 2307 of file process.c.

References Qnil, rb_hash_stlike_foreach(), and RHASH_EMPTY_P.

◆ rb_execarg_get()

struct rb_execarg * rb_execarg_get ( VALUE  execarg_obj)

Definition at line 2636 of file process.c.

References TypedData_Get_Struct.

Referenced by rb_execarg_addopt(), rb_execarg_setenv(), and rb_f_exec().

◆ rb_execarg_new()

VALUE rb_execarg_new ( int  argc,
const VALUE argv,
int  accept_shell,
int  allow_exc_opt 
)

Definition at line 2661 of file process.c.

References TypedData_Make_Struct.

Referenced by rb_f_exec().

◆ rb_execarg_parent_end()

void rb_execarg_parent_end ( VALUE  execarg_obj)

Definition at line 2883 of file process.c.

◆ rb_execarg_parent_start()

void rb_execarg_parent_start ( VALUE  execarg_obj)

Definition at line 2844 of file process.c.

References rb_protect().

◆ rb_execarg_run_options()

int rb_execarg_run_options ( const struct rb_execarg eargp,
struct rb_execarg sargp,
char errmsg,
size_t  errmsg_buflen 
)

◆ rb_execarg_setenv()

void rb_execarg_setenv ( VALUE  execarg_obj,
VALUE  env 
)

Definition at line 2674 of file process.c.

References env, NIL_P, and rb_execarg_get().

◆ rb_exit()

void rb_exit ( int  status)

Definition at line 4225 of file process.c.

References GET_EC, INT2NUM, rb_class_new_instance(), rb_eSystemExit, rb_exc_raise(), rb_str_new2, and ruby_stop().

Referenced by rb_f_abort().

◆ rb_f_abort()

VALUE rb_f_abort ( int  argc,
const VALUE argv 
)

◆ rb_f_exec()

VALUE rb_f_exec ( int  argc,
const VALUE argv 
)

◆ rb_f_exit()

VALUE rb_f_exit ( int  argc,
const VALUE argv 
)

Definition at line 4238 of file process.c.

References argc, and rb_check_arity.

◆ rb_last_status_clear()

void rb_last_status_clear ( void  )

Definition at line 582 of file process.c.

References GET_THREAD, and Qnil.

◆ rb_last_status_get()

VALUE rb_last_status_get ( void  )

Definition at line 546 of file process.c.

References GET_THREAD.

◆ rb_last_status_set()

void rb_last_status_set ( int  status,
rb_pid_t  pid 
)

Definition at line 573 of file process.c.

References GET_THREAD, rb_thread_struct::last_status, and rb_obj_alloc().

◆ rb_native_cond_signal()

void rb_native_cond_signal ( rb_nativethread_cond_t )

◆ rb_native_cond_wait()

void rb_native_cond_wait ( rb_nativethread_cond_t ,
rb_nativethread_lock_t  
)

◆ rb_native_mutex_lock()

void rb_native_mutex_lock ( rb_nativethread_lock_t )

◆ rb_native_mutex_unlock()

void rb_native_mutex_unlock ( rb_nativethread_lock_t )

◆ rb_proc_exec()

int rb_proc_exec ( const char str)

Definition at line 1693 of file process.c.

References waitpid_state::ret.

◆ rb_sigwait_fd_get()

int rb_sigwait_fd_get ( const rb_thread_t )

◆ rb_sigwait_fd_migrate()

void rb_sigwait_fd_migrate ( rb_vm_t vm)

Definition at line 1026 of file process.c.

References rb_native_mutex_lock(), and rb_vm_struct::waitpid_lock.

◆ rb_sigwait_fd_put()

void rb_sigwait_fd_put ( const rb_thread_t ,
int  fd 
)

◆ rb_sigwait_sleep()

void rb_sigwait_sleep ( const rb_thread_t ,
int  fd,
const rb_hrtime_t  
)

◆ rb_spawn()

rb_pid_t rb_spawn ( int  argc,
const VALUE argv 
)

Definition at line 4476 of file process.c.

◆ rb_spawn_err()

rb_pid_t rb_spawn_err ( int  argc,
const VALUE argv,
char errmsg,
size_t  errmsg_buflen 
)

Definition at line 4470 of file process.c.

◆ rb_syswait()

void rb_syswait ( rb_pid_t  pid)

Definition at line 4343 of file process.c.

References rb_waitpid().

◆ rb_thread_sleep_interruptible()

void rb_thread_sleep_interruptible ( void  )

◆ rb_waitpid()

rb_pid_t rb_waitpid ( rb_pid_t  pid,
int st,
int  flags 
)

Definition at line 1241 of file process.c.

Referenced by rb_syswait().

◆ ruby_waitpid_all()

void ruby_waitpid_all ( rb_vm_t vm)

◆ ruby_waitpid_locked()

rb_pid_t ruby_waitpid_locked ( rb_vm_t vm,
rb_pid_t  pid,
int status,
int  options,
rb_nativethread_cond_t cond 
)

Definition at line 1097 of file process.c.