(OBJ2GID1): Defined even if getgrnam_r is not usable.
This fixes compilation error on Android.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45541 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* process.c (obj2uid, obj2gid): now getpwnam_r() and getgrnam_r()
may need larger buffers than sysconf values, so retry with
expanding the buffer when ERANGE is returned.
[ruby-core:61325] [Bug #9600]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45290 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* process.c (obj2uid, obj2gid): need capacity as buffer size, not
length.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45289 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* process.c (GETPW_R_SIZE_INIT, GETGR_R_SIZE_INIT): sysconf values
are not maximum sizes, but initial sizes.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45288 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* process.c (OBJ2UID1, OBJ2GID1): separate from OBJ2UID and
OBJ2GID respectively, need given buffers.
* process.c (OBJ2UID, OBJ2GID): no longer need PREPARE_GETPWNAM
and PREPARE_GETGRNAM.
* process.c (obj2uid, obj2gid): use tmp buffer instead of alloca
to get rid of potential stack overflow.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45287 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
0001-process.c-avoid-EINTR-from-Process.spawn.patch written by
Eric Wong in [Bug #8770].
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44727 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* process.c (send_child_error): retry write on EINTR to fix
occasional Errno::EINTR from Process.spawn.
* process.c (recv_child_error): retry read on EINTR to fix
occasional Errno::EINTR from Process.spawn.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44706 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
signal is sent to the parent process while Ruby is forking in IO.popen.
Patch by Scott Francis. Closes GH-513.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44687 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* process.c (rb_execarg_fixup): use RHASH_TBL_RAW and insert write
barriers where appropriate
* vm.c (kwmerge_i): use RHASH_TBL_RAW
* vm.c (HASH_ASET): use rb_hash_aset instead of calling directly into
st_insert
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44052 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* include/ruby/ruby.h (RB_BLOCK_CALL_FUNC_ARGLIST): for declaration
argument list of rb_block_call_func.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43910 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* process.c (Init_process): rename Struct::Tms as Process::Tms. keep
the former defined for the backward compatibility, for the time
being.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43438 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* process.c (rb_fork_internal): remove cloexec setting on pipes
created by rb_cloexec_pipe. patch by normalperson (Eric Wong) at
[ruby-core:56523]. [Bug #8769]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43008 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
(rb_clock_gettime): Use get_mach_timebase_info.
(rb_clock_getres): Support MACH_ABSOLUTE_TIME_BASED_CLOCK_MONOTONIC.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42763 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* process.c (rb_clock_getres): move conditionally used variable to the
proper block.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42757 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* process.c (rb_intern): no symbol cache while initialization.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42671 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
(gcd_timtick_int): Renamed from gcd_ul and make the arguments
timetick_giga_count_t.
(reduce_fraction): Make the arguments timetick_int_t.
(timetick2integer): Ditto.
(make_clock_result): Ditto.
(timetick2dblnum): Fix the return type.
(rb_clock_gettime): Use timetick_int_t.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42668 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* process.c (rb_clock_gettime): cast for tv_nsec explicitly to
suppress warnings by VC.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42657 b2dd03c8-39d4-4d8f-98ff-823fe69b080e