aboutsummaryrefslogtreecommitdiffstats
path: root/process.c
Commit message (Collapse)AuthorAgeFilesLines
* * process.c: Fix a typo. MacOS X don't have ENOTSUPP.akr2013-10-151-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43292 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* process.c: remove cloexec settingnobu2013-09-211-4/+0
| | | | | | | | * 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
* * process.c: Remove spaces between SI prefix and unit to followakr2013-09-091-6/+6
| | | | | | | | | | | | | | SI brochure. http://www.bipm.org/en/si/si_brochure/ https://www.nmij.jp/library/units/si/ * time.c: Ditto. * ext/socket/ancdata.c: Ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42897 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * process.c (rb_clock_gettime): Support times() based monotonic clock.akr2013-09-031-0/+38
| | | | | | | | (rb_clock_getres): Ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42795 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * process.c (get_mach_timebase_info): Extracted from rb_clock_gettime.akr2013-09-011-10/+27
| | | | | | | | | (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: suppress warningnobu2013-09-011-4/+2
| | | | | | | * 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_clock_getres): New method.akr2013-08-311-0/+151
| | | | | | | | | | | | | | (timetick2dblnum_reciprocal): New function. * configure.in: Check clock_getres. [ruby-core:56780] [Feature #8809] accepted at DevelopersMeeting20130831Japan https://bugs.ruby-lang.org/projects/ruby/wiki/DevelopersMeeting20130831Japan git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42744 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* fix typokazu2013-08-261-2/+2
| | | | | | * process.c (gcd_timetick_int): Renamed from gcd_timtick_int. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42683 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* [DOC]akr2013-08-241-5/+10
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42678 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* [DOC]akr2013-08-241-13/+16
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42677 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * process.c (rb_clock_gettime): The emulated clock names changed.akr2013-08-241-24/+24
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42675 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * process.c (rb_clock_gettime): Add a cast to fix compile error byakr2013-08-231-1/+1
| | | | | | | | -Werror,-Wshorten-64-to-32. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42672 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* process.c: no symbol cachenobu2013-08-231-0/+2
| | | | | | * 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
* * process.c (reduce_factors): New function.akr2013-08-231-60/+107
| | | | | | | | | | | (timetick2dblnum): Use reduce_factors. (timetick2integer): Ditto. (make_clock_result): Follow the above change. (rb_clock_gettime): Ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42669 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * process.c (timetick_int_t): Renamed from timetick_giga_count_t.akr2013-08-231-43/+41
| | | | | | | | | | | | | | (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
* Fix the previous commit.akr2013-08-231-2/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42667 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * process.c (gcd_ul): New function.akr2013-08-231-59/+147
| | | | | | | | | | | | | (reduce_fraction): Ditto. (reduce_fraction): Ditto. (timetick2dblnum): Ditto. (timetick2integer): Ditto. (make_clock_result): Use timetick2dblnum and timetick2integer. (rb_clock_gettime): Follow the make_clock_result change. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42666 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* process.c: suppress warningsnobu2013-08-231-2/+2
| | | | | | | * 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
* * process.c (rb_clock_gettime): Strip "s" from unit names.akr2013-08-221-12/+12
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42652 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * process.c (unsigned_clock_t): Defined.akr2013-08-221-4/+15
| | | | | | | | | | | (rb_clock_gettime): Consider clock_t overflow for ISO_C_CLOCK_BASED_CLOCK_PROCESS_CPUTIME_ID. * configure.in: Check the size of clock_t. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42651 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Exchange order of ISO_C_CLOCK_BASED_CLOCK_PROCESS_CPUTIME_ID andakr2013-08-211-22/+22
| | | | | | | POSIX_TIMES_BASED_CLOCK_PROCESS_CPUTIME_ID. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42648 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * process.c (rb_clock_gettime): Change emulation symbols forakr2013-08-211-29/+33
| | | | | | | | Process.clock_gettime. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42647 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * process.c (make_clock_result): Extracted from rb_clock_gettime.akr2013-08-211-41/+48
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42645 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * process.c (rb_clock_gettime): clock() based CLOCK_PROCESS_CPUTIME_IDakr2013-08-211-3/+25
| | | | | | | | emulation implemented. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42644 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * process.c (rb_proc_times): Use RB_GC_GUARD to guard objects from GC.akr2013-08-211-6/+11
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42643 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * process.c (get_clk_tck): Extracted from rb_proc_times.akr2013-08-211-15/+45
| | | | | | | | | (rb_clock_gettime): times() based CLOCK_PROCESS_CPUTIME_ID emulation is implemented. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42642 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * process.c: POSIX_GETTIMEOFDAY_CLOCK_REALTIME is renamed toakr2013-08-211-7/+7
| | | | | | | | SUS_GETTIMEOFDAY_CLOCK_REALTIME. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42641 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * process.c (rb_clock_gettime): CLOCK_PROCESS_CPUTIME_ID emulationakr2013-08-211-2/+31
| | | | | | | | using getrusage is implemented. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42640 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* process.c: retry fork if ENOMEMnobu2013-08-191-7/+13
| | | | | | | * process.c (retry_fork): retry with GC if ENOMEM occurred, to free swap/kernel space. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42618 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * process.c (Init_process): Add constants: CLOCK_REALTIME_ALARM andakr2013-08-191-1/+8
| | | | | | | | CLOCK_BOOTTIME_ALARM. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42615 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * process.c (rb_clock_gettime): Rename POSIX_TIME_CLOCK_REALTIME toakr2013-08-181-3/+3
| | | | | | | | ISO_C_TIME_CLOCK_REALTIME. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42607 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * process.c (Init_process): Add constants: CLOCK_REALTIME_COARSE,akr2013-08-181-0/+12
| | | | | | | | CLOCK_MONOTONIC_COARSE and CLOCK_BOOTTIME. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42605 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* [DOC]akr2013-08-171-3/+3
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42595 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * process.c: [DOC] MACH_ABSOLUTE_TIME_CLOCK_MONOTONIC is aneregon2013-08-171-2/+8
| | | | | | | available emulation for a monotonic clock on Darwin. https://developer.apple.com/library/mac/qa/qa1398/_index.html git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42594 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * process.c: revert r42591. Only an emulation is available on Darwin.eregon2013-08-171-2/+2
| | | | | | [ruby-core:56672] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42593 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * process.c (rb_clock_gettime): document CLOCK_REALTIME anderegon2013-08-161-2/+2
| | | | | | CLOCK_MONOTONIC are now available on Darwin. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42591 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* process.c: downcastnobu2013-08-161-1/+2
| | | | | | * process.c (rb_clock_gettime): downcast for I32 environment. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42583 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * process.c (rb_clock_gettime): add CLOCK_MONOTONIC support on OS X.naruse2013-08-151-0/+23
| | | | | | | http://developer.apple.com/library/mac/qa/qa1398/_index.html [Feature #8658] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42573 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * process.c (rb_clock_gettime): [DOC] FreeBSD 7.1 supportsakr2013-08-151-1/+1
| | | | | | | | | CLOCK_THREAD_CPUTIME_ID. http://www.freebsd.org/releases/7.1R/relnotes.html git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42558 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * process.c: [DOC] RDoc formatting of Process.clock_gettimezzak2013-08-121-11/+12
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42533 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* [DOC] update doc.akr2013-08-111-0/+8
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42506 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * process.c (rb_clock_gettime): New method.akr2013-08-111-1/+207
| | | | | | | | | | | This is accepted in the meeting: https://bugs.ruby-lang.org/projects/ruby/wiki/DevelopersMeeting20130809 This method is accepted as a CRuby feature. I.e. Other Ruby implementations don't need to implement it. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42504 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * process.c: [DOC] Document caveats of command form of Process.spawnzzak2013-08-051-1/+9
| | | | | | | with regard to the shell and OS. Patched by Steve Klabnik [Bug #8550] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42391 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * process.c (rb_daemon): daemon(3) is implemented with fork(2).naruse2013-07-111-0/+1
| | | | | | Therefore it needs rb_thread_atfork(). (and revert r41903) git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41910 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* process.c: kill threads in daemon processnobu2013-07-101-1/+1
| | | | | | | * process.c (fork_daemon): kill the other threads all and abandon the kept mutexes. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41886 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* process.c: remove ineffective assignmentnobu2013-06-301-1/+1
| | | | | | | * process.c (rb_exec_fillarg): remove ineffective assignment unless default process encoding is set. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41715 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* win32: UTF-8 spawnnobu2013-06-301-4/+7
| | | | | | | * io.c (spawnv, spawn): use UTF-8 spawn family. [Bug #1771] * process.c (proc_exec_sh, proc_spawn_cmd, proc_spawn_sh): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41709 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* process.c: default process encodingnobu2013-06-301-5/+29
| | | | | | | | | * process.c (EXPORT_STR, EXPORT_DUP): convert to default process encoding if defined. * process.c (check_exec_env_i): convert environment variables too. * process.c (rb_exec_fillarg): convert program path and arguments too. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41701 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* process.c: adjust indentnobu2013-06-301-2/+2
| | | | | | * process.c (exec_arg_data_type): adjust indent. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41700 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * safe.c (rb_set_safe_level, safe_setter): raise an ArgumentErrorshugo2013-06-121-3/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | when $SAFE is set to 4. $SAFE=4 is now obsolete. [ruby-core:55222] [Feature #8468] * object.c (rb_obj_untrusted, rb_obj_untrust, rb_obj_trust): Kernel#untrusted?, untrust, and trust are now deprecated. Their behavior is same as tainted?, taint, and untaint, respectively. * include/ruby/ruby.h (OBJ_UNTRUSTED, OBJ_UNTRUST): OBJ_UNTRUSTED() and OBJ_UNTRUST() are aliases of OBJ_TAINTED() and OBJ_TAINT(), respectively. * array.c, class.c, debug.c, dir.c, encoding.c, error.c, eval.c, ext/curses/curses.c, ext/dbm/dbm.c, ext/dl/cfunc.c, ext/dl/cptr.c, ext/dl/dl.c, ext/etc/etc.c, ext/fiddle/fiddle.c, ext/fiddle/pointer.c, ext/gdbm/gdbm.c, ext/readline/readline.c, ext/sdbm/init.c, ext/socket/ancdata.c, ext/socket/basicsocket.c, ext/socket/socket.c, ext/socket/udpsocket.c, ext/stringio/stringio.c, ext/syslog/syslog.c, ext/tk/tcltklib.c, ext/win32ole/win32ole.c, file.c, gc.c, hash.c, io.c, iseq.c, load.c, marshal.c, object.c, proc.c, process.c, random.c, re.c, safe.c, string.c, thread.c, transcode.c, variable.c, vm_insnhelper.c, vm_method.c, vm_trace.c: remove code for $SAFE=4. * test/dl/test_dl2.rb, test/erb/test_erb.rb, test/readline/test_readline.rb, test/readline/test_readline_history.rb, test/ruby/test_alias.rb, test/ruby/test_array.rb, test/ruby/test_dir.rb, test/ruby/test_encoding.rb, test/ruby/test_env.rb, test/ruby/test_eval.rb, test/ruby/test_exception.rb, test/ruby/test_file_exhaustive.rb, test/ruby/test_hash.rb, test/ruby/test_io.rb, test/ruby/test_method.rb, test/ruby/test_module.rb, test/ruby/test_object.rb, test/ruby/test_pack.rb, test/ruby/test_rand.rb, test/ruby/test_regexp.rb, test/ruby/test_settracefunc.rb, test/ruby/test_struct.rb, test/ruby/test_thread.rb, test/ruby/test_time.rb: remove tests for $SAFE=4. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41259 b2dd03c8-39d4-4d8f-98ff-823fe69b080e