Ruby  2.5.0dev(2017-10-22revision60238)
Data Structures | Macros | Typedefs | Functions | Variables
process.c File Reference
#include "internal.h"
#include "ruby/io.h"
#include "ruby/thread.h"
#include "ruby/util.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  waitpid_arg
 
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 preserving_errno(stmts)   do {int saved_errno = errno; stmts; errno = saved_errno;} while (0)
 
#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_status   ruby_static_id_status
 
#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 before_fork_ruby()   before_exec()
 
#define after_fork_ruby()   (rb_threadptr_pending_interrupt_clear(GET_THREAD()), after_exec())
 
#define try_with_sh(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 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_GETTIMEOFDAY_BASED_CLOCK_REALTIME   ID2SYM(id_GETTIMEOFDAY_BASED_CLOCK_REALTIME)
 
#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)
 
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)
 
VALUE rb_execarg_new (int argc, const VALUE *argv, int accept_shell)
 
struct rb_execargrb_execarg_get (VALUE execarg_obj)
 
VALUE rb_execarg_init (int argc, const VALUE *orig_argv, int accept_shell, VALUE execarg_obj)
 
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)
 
char * rb_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))
 
VALUE rb_clock_gettime (int argc, VALUE *argv)
 
VALUE rb_clock_getres (int argc, VALUE *argv)
 
void InitVM_process (void)
 
void Init_process (void)
 

Variables

ID ruby_static_id_status
 
VALUE rb_mProcess
 
VALUE rb_mProcUID
 
VALUE rb_mProcGID
 
VALUE rb_mProcID_Syscall
 

Macro Definition Documentation

◆ after_fork_ruby

#define after_fork_ruby ( )    (rb_threadptr_pending_interrupt_clear(GET_THREAD()), after_exec())

Definition at line 1208 of file process.c.

◆ ALWAYS_NEED_ENVP

#define ALWAYS_NEED_ENVP   0

Definition at line 293 of file process.c.

◆ before_fork_ruby

#define before_fork_ruby ( )    before_exec()

Definition at line 1207 of file process.c.

◆ CHILD_ERRMSG_BUFLEN

#define CHILD_ERRMSG_BUFLEN   80

Referenced by rb_f_exec().

◆ DIV

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

Definition at line 7063 of file process.c.

◆ ENVMATCH

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

Definition at line 1942 of file process.c.

◆ ERRMSG

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

Definition at line 2621 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 2622 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 2623 of file process.c.

◆ EXIT_FAILURE

#define EXIT_FAILURE   1

Definition at line 43 of file process.c.

Referenced by rb_f_abort().

◆ EXIT_SUCCESS

#define EXIT_SUCCESS   0

Definition at line 40 of file process.c.

◆ EXPORT_DUP

#define EXPORT_DUP (   str)    rb_str_dup(str)

Definition at line 1384 of file process.c.

◆ EXPORT_STR

#define EXPORT_STR (   str)    (str)

Definition at line 1383 of file process.c.

◆ FINISH_GETGRNAM

#define FINISH_GETGRNAM   /* do nothing */

Definition at line 240 of file process.c.

◆ FINISH_GETPWNAM

#define FINISH_GETPWNAM   /* do nothing */

Definition at line 197 of file process.c.

◆ id_status

#define id_status   ruby_static_id_status

Definition at line 285 of file process.c.

◆ MAXPATHLEN

#define MAXPATHLEN   1024

Definition at line 59 of file process.c.

◆ MUL_OVERFLOW_TIMETICK_P

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

Definition at line 6965 of file process.c.

◆ NDIV

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

Definition at line 7062 of file process.c.

◆ OBJ2GID

#define OBJ2GID (   id)    NUM2GIDT(id)

Definition at line 242 of file process.c.

◆ OBJ2GID1

#define OBJ2GID1 (   id)    NUM2GIDT(id)

Definition at line 241 of file process.c.

◆ OBJ2UID

#define OBJ2UID (   id)    NUM2UIDT(id)

Definition at line 199 of file process.c.

◆ OBJ2UID1

#define OBJ2UID1 (   id)    NUM2UIDT(id)

Definition at line 198 of file process.c.

◆ p_gid_from_name [1/2]

#define p_gid_from_name   p_gid_from_name

Definition at line 245 of file process.c.

◆ p_gid_from_name [2/2]

#define p_gid_from_name   rb_f_notimplement

Definition at line 245 of file process.c.

◆ P_NOWAIT

#define P_NOWAIT   _P_NOWAIT

Definition at line 1393 of file process.c.

◆ p_sys_issetugid

#define p_sys_issetugid   rb_f_notimplement

Definition at line 5729 of file process.c.

◆ p_sys_setegid

#define p_sys_setegid   rb_f_notimplement

Definition at line 5643 of file process.c.

◆ p_sys_seteuid

#define p_sys_seteuid   rb_f_notimplement

Definition at line 5263 of file process.c.

◆ p_sys_setgid

#define p_sys_setgid   rb_f_notimplement

Definition at line 5599 of file process.c.

◆ p_sys_setregid

#define p_sys_setregid   rb_f_notimplement

Definition at line 5672 of file process.c.

◆ p_sys_setresgid

#define p_sys_setresgid   rb_f_notimplement

Definition at line 5701 of file process.c.

◆ p_sys_setresuid

#define p_sys_setresuid   rb_f_notimplement

Definition at line 5322 of file process.c.

◆ p_sys_setreuid

#define p_sys_setreuid   rb_f_notimplement

Definition at line 5292 of file process.c.

◆ p_sys_setrgid

#define p_sys_setrgid   rb_f_notimplement

Definition at line 5621 of file process.c.

◆ p_sys_setruid

#define p_sys_setruid   rb_f_notimplement

Definition at line 5241 of file process.c.

◆ p_sys_setuid

#define p_sys_setuid   rb_f_notimplement

Definition at line 5219 of file process.c.

◆ p_uid_from_name [1/2]

#define p_uid_from_name   p_uid_from_name

Definition at line 202 of file process.c.

◆ p_uid_from_name [2/2]

#define p_uid_from_name   rb_f_notimplement

Definition at line 202 of file process.c.

◆ parent_redirect_close

#define parent_redirect_close (   fd)    close_unless_reserved(fd)

Definition at line 403 of file process.c.

◆ parent_redirect_open

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

Definition at line 402 of file process.c.

◆ PREPARE_GETGRNAM

#define PREPARE_GETGRNAM   /* do nothing */

Definition at line 239 of file process.c.

◆ PREPARE_GETPWNAM

#define PREPARE_GETPWNAM   /* do nothing */

Definition at line 196 of file process.c.

◆ preserving_errno

#define preserving_errno (   stmts)    do {int saved_errno = errno; stmts; errno = saved_errno;} while (0)

Definition at line 153 of file process.c.

◆ proc_daemon

#define proc_daemon   rb_f_notimplement

Definition at line 6086 of file process.c.

◆ proc_getgroups

#define proc_getgroups   rb_f_notimplement

Definition at line 5877 of file process.c.

◆ proc_getmaxgroups

#define proc_getmaxgroups   rb_f_notimplement

Definition at line 5977 of file process.c.

◆ proc_getpgid

#define proc_getpgid   rb_f_notimplement

Definition at line 4499 of file process.c.

◆ proc_getpgrp

#define proc_getpgrp   rb_f_notimplement

Definition at line 4446 of file process.c.

◆ proc_getpriority

#define proc_getpriority   rb_f_notimplement

Definition at line 4649 of file process.c.

◆ proc_getrlimit

#define proc_getrlimit   rb_f_notimplement

Definition at line 4937 of file process.c.

◆ proc_getsid

#define proc_getsid   rb_f_notimplement

Definition at line 4555 of file process.c.

◆ proc_initgroups

#define proc_initgroups   rb_f_notimplement

Definition at line 5957 of file process.c.

◆ proc_setegid_m

#define proc_setegid_m   rb_f_notimplement

Definition at line 6473 of file process.c.

◆ proc_seteuid_m

#define proc_seteuid_m   rb_f_notimplement

Definition at line 6343 of file process.c.

◆ proc_setgid

#define proc_setgid   rb_f_notimplement

Definition at line 5787 of file process.c.

◆ proc_setgroups

#define proc_setgroups   rb_f_notimplement

Definition at line 5926 of file process.c.

◆ proc_setmaxgroups

#define proc_setmaxgroups   rb_f_notimplement

Definition at line 6009 of file process.c.

◆ proc_setpgid

#define proc_setpgid   rb_f_notimplement

Definition at line 4524 of file process.c.

◆ proc_setpgrp

#define proc_setpgrp   rb_f_notimplement

Definition at line 4474 of file process.c.

◆ proc_setpriority

#define proc_setpriority   rb_f_notimplement

Definition at line 4680 of file process.c.

◆ proc_setrlimit

#define proc_setrlimit   rb_f_notimplement

Definition at line 5013 of file process.c.

◆ proc_setsid

#define proc_setsid   rb_f_notimplement

Definition at line 4613 of file process.c.

◆ proc_setuid

#define proc_setuid   rb_f_notimplement

Definition at line 5381 of file process.c.

◆ PST2INT

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

Definition at line 518 of file process.c.

◆ rb_f_fork

#define rb_f_fork   rb_f_notimplement

Definition at line 3729 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 6951 of file process.c.

◆ redirect_cloexec_dup

#define redirect_cloexec_dup (   oldfd)    rb_cloexec_dup(oldfd)

Definition at line 399 of file process.c.

◆ redirect_cloexec_dup2

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

Definition at line 400 of file process.c.

◆ redirect_close

#define redirect_close (   fd)    close_unless_reserved(fd)

Definition at line 401 of file process.c.

◆ redirect_dup

#define redirect_dup (   oldfd)    dup(oldfd)

Definition at line 397 of file process.c.

◆ redirect_dup2

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

Definition at line 398 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)

Referenced by rb_clock_getres().

◆ RUBY_GETTIMEOFDAY_BASED_CLOCK_REALTIME

#define RUBY_GETTIMEOFDAY_BASED_CLOCK_REALTIME   ID2SYM(id_GETTIMEOFDAY_BASED_CLOCK_REALTIME)

◆ 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 6964 of file process.c.

◆ TIMETICK_INT_MAX

#define TIMETICK_INT_MAX   LONG_MAX

Definition at line 6963 of file process.c.

◆ TIMETICK_INT_MIN

#define TIMETICK_INT_MIN   LONG_MIN

Definition at line 6962 of file process.c.

◆ try_with_sh

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

Definition at line 1238 of file process.c.

◆ USE_SPAWNV

#define USE_SPAWNV   0

Definition at line 1390 of file process.c.

◆ WEXITSTATUS

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

Definition at line 116 of file process.c.

◆ WIFEXITED

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

Definition at line 107 of file process.c.

◆ WIFSIGNALED

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

Definition at line 110 of file process.c.

◆ WIFSTOPPED

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

Definition at line 113 of file process.c.

◆ WSTOPSIG

#define WSTOPSIG   WEXITSTATUS

Definition at line 122 of file process.c.

◆ WTERMSIG

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

Definition at line 119 of file process.c.

Typedef Documentation

◆ sig_t

typedef void(* sig_t) (int)

Definition at line 257 of file process.c.

◆ timetick_int_t

typedef long timetick_int_t

Definition at line 6961 of file process.c.

◆ unsigned_clock_t

typedef unsigned int unsigned_clock_t

Definition at line 250 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 8012 of file process.c.

◆ InitVM_process()

void InitVM_process ( void  )

Definition at line 7594 of file process.c.

References rb_define_virtual_variable(), and rb_last_status_get().

◆ rb_clock_getres()

VALUE rb_clock_getres ( int  argc,
VALUE argv 
)

◆ rb_clock_gettime()

VALUE rb_clock_gettime ( int  argc,
VALUE argv 
)

◆ rb_detach_process()

VALUE rb_detach_process ( rb_pid_t  pid)

Definition at line 1097 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 3150 of file process.c.

References NULL, rb_execarg_run_options(), and rb_execarg::use_shell.

◆ 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 1928 of file process.c.

References Qnil, rb_hash_tbl_raw(), RHASH_EMPTY_P, and st_foreach.

◆ rb_execarg_get()

struct rb_execarg* rb_execarg_get ( VALUE  execarg_obj)

Definition at line 2268 of file process.c.

References TypedData_Get_Struct.

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

◆ rb_execarg_init()

VALUE rb_execarg_init ( int  argc,
const VALUE orig_argv,
int  accept_shell,
VALUE  execarg_obj 
)

Definition at line 2276 of file process.c.

References ALLOCV_N, argv, rb_execarg::argv_buf, env, MEMCPY, Qnil, and rb_execarg_get().

◆ rb_execarg_new()

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

Definition at line 2257 of file process.c.

References rb_cData, and TypedData_Make_Struct.

Referenced by rb_f_exec().

◆ rb_execarg_parent_end()

void rb_execarg_parent_end ( VALUE  execarg_obj)

Definition at line 2496 of file process.c.

◆ rb_execarg_parent_start()

void rb_execarg_parent_start ( VALUE  execarg_obj)

Definition at line 2457 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 2293 of file process.c.

References NIL_P, and rb_execarg_get().

◆ rb_exit()

void rb_exit ( int  status)

◆ rb_f_abort()

VALUE rb_f_abort ( int  argc,
const VALUE argv 
)

◆ rb_f_exec()

VALUE rb_f_exec ( int  argc,
const VALUE argv 
)

Definition at line 2596 of file process.c.

References CHILD_ERRMSG_BUFLEN, err, rb_execarg_get(), rb_execarg_new(), and TRUE.

◆ rb_f_exit()

VALUE rb_f_exit ( int  argc,
const VALUE argv 
)

Definition at line 3838 of file process.c.

References rb_check_arity.

◆ rb_last_status_clear()

void rb_last_status_clear ( void  )

Definition at line 494 of file process.c.

References GET_THREAD, and Qnil.

◆ rb_last_status_get()

VALUE rb_last_status_get ( void  )

Definition at line 479 of file process.c.

References GET_THREAD.

Referenced by InitVM_process().

◆ rb_last_status_set()

void rb_last_status_set ( int  status,
rb_pid_t  pid 
)

Definition at line 485 of file process.c.

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

◆ rb_proc_exec()

int rb_proc_exec ( const char *  str)

Definition at line 1322 of file process.c.

◆ rb_spawn()

rb_pid_t rb_spawn ( int  argc,
const VALUE argv 
)

Definition at line 4012 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 4006 of file process.c.

◆ rb_syswait()

void rb_syswait ( rb_pid_t  pid)

Definition at line 3891 of file process.c.

References rb_waitpid().

◆ rb_waitpid()

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

Definition at line 902 of file process.c.

Referenced by rb_syswait().

Variable Documentation

◆ rb_mProcess

VALUE rb_mProcess

Definition at line 7582 of file process.c.

◆ rb_mProcGID

VALUE rb_mProcGID

Definition at line 7584 of file process.c.

◆ rb_mProcID_Syscall

VALUE rb_mProcID_Syscall

Definition at line 7585 of file process.c.

◆ rb_mProcUID

VALUE rb_mProcUID

Definition at line 7583 of file process.c.