#ifndef INTERNAL_PROCESS_H /* -*- C -*- */ #define INTERNAL_PROCESS_H /** * @file * @brief Internal header for Process. * @author \@shyouhei * @copyright This file is a part of the programming language Ruby. * Permission is hereby granted, to either redistribute and/or * modify this file, provided that the conditions mentioned in the * file COPYING are met. Consult the file for details. */ #include "ruby/config.h" /* for rb_pid_t */ #include /* for size_t */ #ifdef HAVE_SYS_TYPES_H # include /* for mode_t */ #endif #ifdef _WIN32 # include "ruby/win32.h" /* for mode_t */ #endif #include "ruby/ruby.h" /* for VALUE */ #include "internal/imemo.h" /* for RB_IMEMO_TMPBUF_PTR */ #define RB_MAX_GROUPS (65536) struct waitpid_state; struct rb_execarg { union { struct { VALUE shell_script; } sh; struct { VALUE command_name; VALUE command_abspath; /* full path string or nil */ VALUE argv_str; VALUE argv_buf; } cmd; } invoke; VALUE redirect_fds; VALUE envp_str; VALUE envp_buf; VALUE dup2_tmpbuf; unsigned use_shell : 1; unsigned pgroup_given : 1; unsigned umask_given : 1; unsigned unsetenv_others_given : 1; unsigned unsetenv_others_do : 1; unsigned close_others_given : 1; unsigned close_others_do : 1; unsigned chdir_given : 1; unsigned new_pgroup_given : 1; unsigned new_pgroup_flag : 1; unsigned uid_given : 1; unsigned gid_given : 1; unsigned exception : 1; unsigned exception_given : 1; struct waitpid_state *waitpid_state; /* for async process management */ rb_pid_t pgroup_pgid; /* asis(-1), new pgroup(0), specified pgroup (0