| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37166 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
|
| |
* process.c (rb_execarg_addopt, rb_execarg_run_options): add :uid and
:gid options. [ruby-core:47414] [Feature #6975]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37124 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
| |
by Takashi Toyoshima <toyoshim@gmail.com>
https://github.com/ruby/ruby/pull/178
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36940 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
|
|
|
|
| |
* process.c (rb_last_status_clear): exported.
(rb_f_system): call rb_last_status_clear.
* io.c (rb_f_backquote): call rb_last_status_clear.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36849 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
|
| |
[ruby-talk:398687]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36848 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
| |
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36799 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
|
|
| |
* io.c (rb_io_check_io): make public.
* process.c (check_exec_redirect): try conversion to IO on redirect
parameters. [ruby-core:44181] [Bug #6269]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36551 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
rb_thread_s_check_interrupt): added for
Thread.control_intgerrupt and Thread.check_interrupt.
See details on rdoc.
I'll make an ticket for this feature.
* test/ruby/test_thread.rb: add a test for Thread.control_intgerrupt.
* thread.c (rb_threadptr_raise): make a new exception object
even if argc is 0.
* thread.c (rb_thread_kill): kill thread immediately if target thread
is current thread.
* vm_core.h (RUBY_VM_CHECK_INTS_BLOCKING): added.
CHECK_INTS while/after blocking operation.
* vm_core.h (RUBY_VM_CHECK_INTS): require rb_thread_t ptr.
* cont.c (fiber_switch): use replaced RUBY_VM_CHECK_INTS().
* eval.c (ruby_cleanup): ditto.
* insns.def: ditto.
* process.c (rb_waitpid): ditto.
* vm_eval.c (vm_call0): ditto.
* vm_insnhelper.c (vm_call_method): ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36470 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Async events such as an exception throwed by Thread#raise,
Thread#kill and thread termination (after main thread termination)
will be queued to th->async_errinfo_queue.
- clear: clear the queue.
- enque: enque err object into queue.
- deque: deque err object from queue.
- active_p: return 1 if the queue should be checked.
rb_thread_t#thrown_errinfo was removed.
* vm_core.h: add declarations of rb_threadptr_async_errinfo_*.
remove rb_thread_t#thrown_errinfo field and
add rb_thread_t#async_errinfo_queue (queue body: Array),
rb_thread_t#async_errinfo_queue_checked (flag),
rb_thread_t#async_errinfo_mask_stack(Array, not used yet).
* vm.c (rb_thread_mark): fix a mark function.
* cont.c (rb_fiber_start): enque an error.
* process.c (after_fork): clear async errinfo queue.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36430 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
|
|
| |
* io.c (sysopen_func, rb_sysopen_internal): cast through VALUE to get
rid of warnings. fixup of r36355.
* process.c (rb_waitpid_blocking, rb_waitpid): ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36361 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
|
|
| |
* include/ruby/thread.h: new header file for thread stuff.
* thread.c (rb_thread_call_without_gvl): export. [Feature#4328]
returns void* instead of VALUE. [Feature #5543]
* thread.c (rb_thread_blocking_region): deprecate. [ruby-core:46295]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36355 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
|
|
|
|
| |
* ext/socket/rubysocket.h: ditto.
* ext/tk/stubs.c: ditto.
* io.c: ditto.
* process.c: ditto.
* signal.c: ditto.
* vm_dump.c: ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36346 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
| |
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36245 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
| |
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36232 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* io.c (is_popen_fork): check if fork and raise NotImplementedError if
unavailable.
* io.c (rb_io_s_popen): allow environment variables hash and exec
options as flat parameters, not in an array arguments.
[Feature#6651] [EXPERIMENTAL]
* process.c (rb_execarg_extract_options): extract exec options, but no
exceptions on non-exec options and returns them as a Hash.
* process.c (rb_execarg_setenv): set environment variables.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36229 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
|
|
| |
* class.c (rb_scan_args): use rb_check_hash_type.
* process.c (rb_exec_getargs): ditto.
* sprintf.c (get_hash): ditto.
* string.c (rb_str_sub_bang, str_gsub): ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36220 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
| |
* process.c (check_exec_fds): separate check_exec_fds_1() since
nonstatic initializer of an aggregate type is not allowed by C89.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36208 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
| |
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36206 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
|
| |
* process.c: follow the rb_execarg change.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36204 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
|
|
|
|
| |
warning.
(save_env): ditto.
[ruby-core:45797] reported by Luis Lavena.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36203 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
fields.
* process.c (EXEC_OPTION_NEW_PGROUP): removed.
(proc_spawn_cmd): take a struct rb_execarg argument.
use the new fields.
(rb_execarg_addopt): use the new fields.
(rb_spawn_process): follow the proc_spawn_cmd change.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36202 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
fd_dup2_child fields.
* process.c (EXEC_OPTION_DUP2): removed.
(EXEC_OPTION_CLOSE): removed.
(EXEC_OPTION_OPEN): removed.
(EXEC_OPTION_DUP2_CHILD): removed.
(mark_exec_arg): mark the new fields.
(check_exec_redirect1): change condition for default option.
(check_exec_redirect): take a struct rb_execarg argument.
use the new fields.
(rb_execarg_addopt): follow the check_exec_redirect change.
(check_exec_fds): use the new fields.
(save_redirect_fd): ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36201 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
| |
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36200 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
|
| |
check_exec_redirect.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36199 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
|
| |
(rb_execarg_run_options): ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36198 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* process.c (EXEC_OPTION_ENV): removed.
(mark_exec_arg): mark env_modification field.
(rb_exec_fillarg): update the new field, instead of options array.
(rb_execarg_fixup): use the new field.
(save_env): ditto.
(rb_execarg_run_options): ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36197 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* process.c (EXEC_OPTION_RLIMIT): removed.
(mark_exec_arg): mark rlimit_limits field.
(rb_execarg_addopt): update the new fields, instead of options array.
(run_exec_rlimit): use the new field.
(rb_execarg_run_options): clear sarg using MEMZERO. use the new
field.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36196 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
|
|
|
|
| |
* process.c (EXEC_OPTION_CHDIR): removed.
(mark_exec_arg): mark chdir_dir field.
(rb_execarg_addopt): update the new fields, instead of options array.
(rb_execarg_run_options): use the new fields.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36195 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
close_others_maxhint fields.
* process.c (EXEC_OPTION_CLOSE_OTHERS): removed.
(rb_execarg_addopt): update the new fields, instead of options array.
(check_exec_fds): take eargp as an argument. update the
close_others_maxhint field.
(rb_execarg_fixup): follow the argument change of check_exec_fds.
(rb_execarg_run_options): use the new fields.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36194 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
|
|
|
|
|
| |
unsetenv_others_do fields.
* process.c (EXEC_OPTION_UNSETENV_OTHERS): removed.
(rb_execarg_addopt): update the new fields, instead of options array.
(rb_execarg_fixup): use the new fields.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36193 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
| |
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36192 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
|
|
|
| |
consistently for saving process attributes.
* io.c: ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36191 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
|
|
|
|
|
| |
consistently except for saving process attributes.
* io.c: ditto.
* ext/pty/pty.c: ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36189 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
|
|
|
|
|
| |
* process.c (EXEC_OPTION_PGROUP): removed.
(rb_execarg_addopt): update the new fields, instead of options array.
(run_exec_pgroup): take a struct rb_execarg argument. refer the new
fields.
(rb_execarg_run_options): follow run_exec_pgroup change.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36181 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
field for saving process attribute changing functions.
(save_redirect_fd): take a struct rb_execarg argument.
(run_exec_dup2): ditto.
(run_exec_close): ditto.
(run_exec_open): ditto.
(run_exec_dup2_child): ditto.
(run_exec_pgroup): ditto.
(run_exec_rlimit): ditto.
(save_env): ditto.
(rb_execarg_run_options): follow the above functions change.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36178 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
| |
* process.c (rb_exec_async_signal_safe): use a constant expression
instead of a macro.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36173 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
struct rb_execarg.
(rb_exec_arg_addopt): follow the rb_execarg_addopt change.
(check_exec_options_i): ditto.
* io.c (pipe_open): follow the rb_execarg_addopt change.
* internal.h (rb_execarg_addopt): follow the definition change.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36167 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
|
|
|
| |
struct rb_execarg.
(rb_check_exec_options): ditto.
(check_exec_options_i): ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36166 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
|
|
| |
instead of rb_run_exec_options_err.
(rb_spawn_process): ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36165 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
|
|
| |
struct rb_execarg.
(rb_execarg_init): follow the rb_exec_fillarg change.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36164 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
|
|
|
|
|
| |
struct rb_execarg.
(rb_execarg_new): follow the rb_execarg_init change.
(rb_exec_arg_init): ditto.
* internal.h (rb_execarg_init): follow the definition change.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36162 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
| |
* process.c (rb_spawn_internal): fix type of a local variable.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36160 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
struct rb_execarg.
* internal.h (rb_execarg_fixup): follow the definition change.
* io.c (pipe_open): follow rb_execarg_fixup change.
* ext/pty/pty.c (establishShell): ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36157 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
|
|
|
|
|
| |
fields.
* process.c (STATIC_ASSERT): removed.
(rb_execarg_addopt): follow the rb_execarg change.
(rb_execarg_run_options): ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36154 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
struct rb_exec_arg in intern.h.
* include/ruby/intern.h (struct rb_exec_arg): refer Data object which
contains struct rb_execarg.
* process.c: use struct rb_execarg instead of struct rb_exec_arg
except functions declared in intern.h.
(rb_exec_arg_addopt): extract a pointer to struct rb_execarg from
struct rb_exec_arg.
(rb_exec_arg_init): ditto.
(rb_exec_arg_fixup): ditto.
(rb_run_exec_options_err): ditto.
(rb_run_exec_options): ditto.
(rb_exec_err): ditto.
(rb_exec): ditto.
* io.c: use struct rb_execarg instead of struct rb_exec_arg.
* ext/pty/pty.c: ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36153 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(rb_execarg_get): ditto.
* process.c (mark_exec_arg): new function.
(free_exec_arg): ditto.
(memsize_exec_arg): ditto.
(exec_arg_data_type): defined.
(rb_execarg_new): new function.
(rb_execarg_get): ditto.
(rb_f_exec): use rb_execarg_new.
(rb_spawn_internal): ditto.
(rb_f_spawn): ditto.
* io.c (pipe_open_v): use rb_execarg_new.
(pipe_open_s): ditto.
* ext/pty/pty.c (establishShell): use rb_execarg_new.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36152 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
|
| |
* process.c (rb_execarg_addopt): always make Fixnum, and ignore higher
bits in too large umask value.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36148 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
| |
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36135 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
|
|
|
|
|
| |
* process.c (rb_execarg_run_options): do not call any methods in the
async-signal-safe function. mask has been checked with NUM2MODET()
already and converted with LONG2NUM().
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36134 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|
|
|
|
| |
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36085 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
|