summaryrefslogtreecommitdiff
path: root/process.c
AgeCommit message (Collapse)Author
2013-08-18* process.c (rb_clock_gettime): Rename POSIX_TIME_CLOCK_REALTIME toakr
ISO_C_TIME_CLOCK_REALTIME. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42607 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-08-18* process.c (Init_process): Add constants: CLOCK_REALTIME_COARSE,akr
CLOCK_MONOTONIC_COARSE and CLOCK_BOOTTIME. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42605 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-08-17[DOC]akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42595 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-08-17* process.c: [DOC] MACH_ABSOLUTE_TIME_CLOCK_MONOTONIC is aneregon
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
2013-08-17* process.c: revert r42591. Only an emulation is available on Darwin.eregon
[ruby-core:56672] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42593 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-08-16* process.c (rb_clock_gettime): document CLOCK_REALTIME anderegon
CLOCK_MONOTONIC are now available on Darwin. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42591 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-08-16process.c: downcastnobu
* 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
2013-08-15* process.c (rb_clock_gettime): add CLOCK_MONOTONIC support on OS X.naruse
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
2013-08-15* process.c (rb_clock_gettime): [DOC] FreeBSD 7.1 supportsakr
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
2013-08-12* process.c: [DOC] RDoc formatting of Process.clock_gettimezzak
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42533 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-08-11[DOC] update doc.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42506 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-08-11* process.c (rb_clock_gettime): New method.akr
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
2013-08-05* process.c: [DOC] Document caveats of command form of Process.spawnzzak
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
2013-07-11* process.c (rb_daemon): daemon(3) is implemented with fork(2).naruse
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
2013-07-10process.c: kill threads in daemon processnobu
* 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
2013-06-30process.c: remove ineffective assignmentnobu
* 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
2013-06-30win32: UTF-8 spawnnobu
* 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
2013-06-30process.c: default process encodingnobu
* 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
2013-06-30process.c: adjust indentnobu
* 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
2013-06-12* safe.c (rb_set_safe_level, safe_setter): raise an ArgumentErrorshugo
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
2013-06-07* internal.h (numberof): Gathered from various files.akr
* array.c, math.c, thread_pthread.c, iseq.c, enum.c, string.c, io.c, load.c, compile.c, struct.c, eval.c, gc.c, parse.y, process.c, error.c, ruby.c: Remove the definitions of numberof. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41142 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-04adjust stylenobu
* process.c (rb_execarg_get): adjust style. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41059 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-03add some rdocnaruse
* add reference to spawn to fork * add an example which runs ruby git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41043 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-02fill rdocsnobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41027 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-05-31* process.c: Improve Process::exec documentationzzak
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41003 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-05-30* process.c: RDoc on Process.spawnzzak
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40991 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-05-30Update doc.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40987 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-05-26* hash.c (rb_hash_tbl_raw), internal.h: added.ko1
Returns st_table without shading hash. * array.c: use rb_hash_tbl_raw() for read-only purpose. * compile.c (iseq_compile_each): ditto. * gc.c (count_objects): ditto. * insns.def: ditto. * process.c: ditto. * thread.c (clear_coverage): ditto. * vm_insnhelper.c: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40937 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-05-19fix typos inspired by r40825kazu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40829 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-05-19fix typos. Patch by k_takata.ktsj
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40825 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-05-13* include/ruby/ruby.h: constify RBasic::klass and addko1
RBASIC_CLASS(obj) macro which returns a class of `obj'. This change is a part of RGENGC branch [ruby-trunk - Feature #8339]. * object.c: add new function rb_obj_reveal(). This function reveal interal (hidden) object by rb_obj_hide(). Note that do not change class before and after hiding. Only permitted example is: klass = RBASIC_CLASS(obj); rb_obj_hide(obj); .... rb_obj_reveal(obj, klass); TODO: API design. rb_obj_reveal() should be replaced with others. TODO: modify constified variables using cast may be harmful for compiler's analysis and optimizaton. Any idea to prohibt inserting RBasic::klass directly? If rename RBasic::klass and force to use RBASIC_CLASS(obj), then all codes such as `RBASIC(obj)->klass' will be compilation error. Is it acceptable? (We have similar experience at Ruby 1.9, for example "RARRAY(ary)->ptr" to "RARRAY_PTR(ary)". * internal.h: add some macros. * RBASIC_CLEAR_CLASS(obj) clear RBasic::klass to make it internal object. * RBASIC_SET_CLASS(obj, cls) set RBasic::klass. * RBASIC_SET_CLASS_RAW(obj, cls) same as RBASIC_SET_CLASS without write barrier (planned). * RCLASS_SET_SUPER(a, b) set super class of a. * array.c, class.c, compile.c, encoding.c, enum.c, error.c, eval.c, file.c, gc.c, hash.c, io.c, iseq.c, marshal.c, object.c, parse.y, proc.c, process.c, random.c, ruby.c, sprintf.c, string.c, thread.c, transcode.c, vm.c, vm_eval.c, win32/file.c: Use above macros and functions to access RBasic::klass. * ext/coverage/coverage.c, ext/readline/readline.c, ext/socket/ancdata.c, ext/socket/init.c, * ext/zlib/zlib.c: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40691 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-05-13* *.c, parse.y, insns.def: use RARRAY_AREF/ASET macroko1
instead of using RARRAY_PTR(). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40690 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-05-12* process.c: move '#define SPAWNV 1' to win32/Makefile.sub.kosaki
* win32/Makefile.sub: see above. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40667 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-05-02process.c: fix failed status with spawnvnobu
* process.c (proc_spawn_cmd_internal, proc_spawn_sh): spawn() with P_NOWAIT returns process ID, so it must not be set as a status. * process.c (rb_spawn_process): set failed status on error on platforms using spawnv not only on Windows. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40552 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-05-01process.c: rb_daemon should not raisenobu
* process.c (rb_daemon): should not raise exceptions, since proc_daemon() will deal with errors. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40534 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-04-27* process.c (obj2gid): Don't call endgrnam() if not exist.akr
Bionic (Android's libc) don't have endgrnam(). * configure.in: Check endgrnam function. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40501 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-04-03* process.c: Describe the behavior which Ruby invokes a commandlineakr
directly without shell if the commandline is simple enough. [ruby-core:50459] [Bug #7489] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40083 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-03-21use rb_pid_t instead of pid_t.kazu
* process.c (rb_execarg_addopt, run_exec_pgroup): use rb_pid_t instead of pid_t. * ext/pty/pty.c (raise_from_check, pty_check): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39868 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-03-10* process.c (setup_communication_pipe): remove unused function.kosaki
it was unintentionally added r39683. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39694 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-03-10* thread_pthread.c (rb_thread_create_timer_thread): factor outkosaki
creating communication pipe logic into separate function. * thread_pthread.c (setup_communication_pipe): new helper function. * thread_pthread.c (set_nonblock): moves a definition before setup_communication_pipe. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39683 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-03-06process.c: fix error messagenobu
* process.c (check_exec_redirect_fd): fix error message for unknown symbol. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39612 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-03-05use INT2FIX(0) instead of INT2NUM(0).kazu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39604 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-02-21* file.c (RB_MAX_GROUPS): moved tokosaki
* internal.h (RB_MAX_GROUPS): here. * file.c (rb_group_member): use RB_MAX_GROUPS instead of RUBY_GROUP_MAX. They are the same. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39352 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-02-08process.c: ix typonobu
* process.c (USE_GETPWNAM_R): fix typo. _SC_GETPW_R_SIZE_MAX instead of same macro twice. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39146 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-02-07* process.c (obj2gid): use getgrnum_r() only if getgrnam_r() andakr
_SC_GETGR_R_SIZE_MAX is available. MirOS BSD (MirBSD 10 GENERIC#1382 i386) have getgrnam_r() but no _SC_GETGR_R_SIZE_MAX. (obj2uid): use getpwnam_r() only if getpwnam_r() and _SC_GETPW_R_SIZE_MAX is available. This is consistency for obj2gid. MirOS BSD have neither getpwnam_r() nor _SC_GETPW_R_SIZE_MAX. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39136 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-01-15process.c: suppress warningsnobu
* process.c (p_uid_change_privilege, p_gid_change_privilege): suppress set-but-unsed warnings. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38836 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-12-23* thread.c: rename methods:ko1
from Thread.async_interrupt_timing to Thread.handle_interrupt, from Thread.async_interrupted? to Thread.pending_interrupt?. Also rename option from `defer' to `never'. [ruby-core:51074] [ruby-trunk - Feature #6762] * vm_core.c, thread.c: rename functions and data structure `async_errinfo' to `pending_interrupt'. * thread.c: add global variables sym_immediate, sym_on_blocking and sym_never. * cont.c, process.c, vm.c, signal.c: ditto. * lib/sync.rb, lib/thread.rb: catch up this renaming. * test/ruby/test_thread.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38577 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-12-02* array.c, enum.c, insns.def, io.c, numeric.c, parse.y, process.c,ko1
range.c: use prepared IDs. A patch from charliesome (Charlie Somerville). [Bug #7495] * common.mk: add dependency to id.h. * common.mk: replace ID_H_INCLUDES with id.h. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38143 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-11-24* process.c (proc_getsid): adds new method for getting session id.kosaki
Contributed from fumiyas (Fumiyasu SATOH). Thank you! [Feature #6757] [ruby-dev:45977] * configure.in: adds getsid check. * test/ruby/test_process.rb (TestProcess#test_setsid): new test for the above. * NEWS: news for the above. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37825 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-10-30* process.c (redirect_dup2): set standard handles when new fd is stdio,usa
because if there is no allocated console at the moment Windows does not automatically associate it for child process's standard handle. this is adhoc workaround. reported by Martin Thiede at [ruby-core:48542] [Bug #7239]. * io.c (rb_cloexec_dup2): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37388 b2dd03c8-39d4-4d8f-98ff-823fe69b080e