Граф коммитов

494 Коммитов

Автор SHA1 Сообщение Дата
matz 1df42597d1 cancel subversion backfire. sorry
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31046 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-03-07 08:44:45 +00:00
matz eb807d42ec * gc.c (rb_gc_set_params): allow GC parameter configuration by
environment variables.  based on a patch from funny-falcon at
  https://gist.github.com/856296, but honors safe level.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31044 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-03-07 08:39:39 +00:00
nobu 7b3c2c28dc * process.c: NUM2RLIM is defined but no getrlimit and setrlimit on
mingw.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31042 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-03-07 00:06:08 +00:00
kosaki c6bb8beb52 * process.c (proc_getgroups): get rid of maxgroups dependency.
ngroups can be calculated dynamically.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31037 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-03-06 15:25:58 +00:00
kosaki b1329e3b63 * configure.in: rlim_t use standard RUBY_REPLACE_TYPE mechanism.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31036 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-03-06 14:47:27 +00:00
kosaki beed971728 * process.c (proc_setmaxgroups): added negative value check.
This was suggested by Daniel Berger. Thanks Daniel!
  [ruby-core:35426][Bug#4467]



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31035 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-03-06 14:28:02 +00:00
kosaki aca674c2e7 * process.c (maxgroups, proc_setmaxgroups): increase max groups
limitation up to 65536.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31034 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-03-06 14:21:31 +00:00
usa 4f8f4a9ee4 * process.c (check_exec_redirect_fd, check_exec_redirect): raise
ArgumentError if fd >= 3 on Windows because the feature is not
  supported.

* test/ruby/test_process.rb (test_execopts_redirect): remove meaningless
  argument.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31017 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-03-03 13:13:10 +00:00
kosaki 411e4a6cf2 * process.c (rb_run_exec_options_err): use MODET2NUM() instead LONG2NUM().
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30822 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-02-08 07:01:23 +00:00
nagachika 012e60f61c * process.c (proc_setgroups): add GC guard to prevent intermediate
variable from GC.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30820 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-02-07 16:01:57 +00:00
kosaki 92c1dfd9d2 * configure.in: Added mode_t type checking.
* process.c (rb_exec_arg_addopt): Use NUM2MODET() instead
	  NUM2LONG because clang makes compile error by this narrowing
	  conversion.
	* process.c (rb_run_exec_options_err): ditto.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30685 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-01-28 02:00:08 +00:00
nobu fa57e46896 * process.c (ALLOC_ARGV_WITH_STR): fix void pointer arithmetic.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30663 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-01-27 03:46:44 +00:00
nobu beec203a1d * process.c (proc_exec_v, rb_proc_exec_n, rb_proc_exec)
(proc_spawn_n, proc_spawn): get rid of too huge alloca().
  [ruby-core:34827], [ruby-core:34833]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30662 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-01-26 23:41:47 +00:00
akr 89f9c4144f update doc.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30417 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-12-29 01:33:28 +00:00
kosaki 5d276ea14a * process.c (before_exec): add small comment.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30387 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-12-26 12:59:19 +00:00
akr a041f129af * process.c: parenthesize macro arguments.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30329 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-12-23 23:46:39 +00:00
nobu 8f5689bf3c * process.c (p_uid_change_privilege, p_gid_change_privilege):
suppress warnings.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29705 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-11-05 22:33:14 +00:00
nobu 340c3b4638 * process.c (rb_fork_err): save errinfo before fdopen.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29701 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-11-05 22:03:54 +00:00
nobu 1cf7194e0c * process.c (proc_spawn_v): should spawn, not exec.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29697 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-11-05 03:18:03 +00:00
nobu d0553ffbb5 * process.c (proc_exec_v, proc_spawn_v): try to execute with sh if
no shebang.  [ruby-core:32745] [EXPERIMENTAL]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29695 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-11-04 16:21:38 +00:00
akr 3f0fd715f4 update document.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29231 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-09-12 00:15:27 +00:00
akr d900ed31f7 * process.c (rlimit_resource_name2int): support more limits:
RLIMIT_MSGQUEUE, RLIMIT_NICE, RLIMIT_RTPRIO, RLIMIT_RTTIME and
  RLIMIT_SIGPENDING.
  (Init_process): ditto.
  patch by Run Paint Run Run.  [ruby-core:32262]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29229 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-09-11 23:38:44 +00:00
akr b4ac655acc * process.c (rlimit_resource_name2int): use STRCASECMP to avoid
ALLOCA_N.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29226 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-09-11 19:28:07 +00:00
nobu aa5c05b8ba * ext/pty/pty.c (chfunc): pass through exceptions.
* io.c (rb_io_bufwrite, rb_io_bufread): added.

* process.c (rb_fork_err): protect from exceptions.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29171 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-09-02 21:40:55 +00:00
naruse 7175a9073e * class.c, compile.c, dir.c, file.c, iseq.c, parse.y, random.c:
clean unused-value warnings.

* cont.c, process.c, vm_exec.h: clean cast warnings.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28762 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-07-27 07:13:43 +00:00
nobu afbd5661a0 * process.c (rb_daemon): split from proc_daemon.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28630 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-07-13 12:31:17 +00:00
nobu 52aa6ab21d * process.c (rb_fork_err): suppress gcc 4.4 warnings.
* random.c (fill_random_seed): ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28629 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-07-13 12:28:37 +00:00
nobu d837ce5eda * process.c (rb_f_spawn): use correct command name for the error
message.  [ruby-dev:41395]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27985 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-05-23 23:16:09 +00:00
marcandre 7729de4d91 * array.c: Documentation: change => in call-seq to ->.
Harmonize "#=>" in examples. [ruby-core:30206]

* bignum.c: ditto

* class.c: ditto

* compar.c: ditto

* cont.c: ditto

* dir.c: ditto

* encoding.c: ditto

* enum.c: ditto

* enumerator.c: ditto

* error.c: ditto

* eval.c: ditto

* file.c: ditto

* gc.c: ditto

* io.c: ditto

* load.c: ditto

* marshal.c: ditto

* math.c: ditto

* numeric.c: ditto

* object.c: ditto

* pack.c: ditto

* proc.c: ditto

* process.c: ditto

* random.c: ditto

* range.c: ditto

* re.c: ditto

* ruby.c: ditto

* signal.c: ditto

* sprintf.c: ditto

* string.c: ditto

* struct.c: ditto

* thread.c: ditto

* time.c: ditto

* transcode.c: ditto

* variable.c: ditto

* vm_eval.c: ditto

* vm_method.c: ditto

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27865 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-05-17 21:07:33 +00:00
mame e181ae5391 * process.c: suppress warning for signed and unsigned type
inconsistency.

* ext/psych/parser.c: ditto.

* ext/sdbm/_sdbm.c: ditto.

* ext/syck/rubyext.c: ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27864 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-05-17 13:21:17 +00:00
marcandre 478c3e080b * eval.c (make_exception, rb_obj_extend): Fix error messages in case of wrong
number of arguments

* file.c (rb_f_test, rb_file_s_umask): ditto

* numeric.c (int_chr, num_step): ditto

* process.c (rb_f_sleep): ditto

* re.c (rb_reg_initialize_m): ditto

* signal.c (rb_f_kill, sig_trap): ditto

* string.c (rb_str_aref_m, rb_str_aset_m, rb_str_count, rb_str_delete_bang,
  rb_str_slice_bang, rb_str_sub_bang, str_gsub): ditto

* proc.c (curry): rdoc fix

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27558 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-04-30 02:40:57 +00:00
mame 8687db60a6 * process.c (rb_f_fork): remove after_exec() which sometimes caused
two timer threads started.  [ruby-core:25217]

* signal.c: use pthread_sigmask() instead of sigprocmask().
  sigprocmask() is unspecified behavior on multi-thread programs.
  [ruby-core:25217]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27464 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-04-23 15:44:19 +00:00
nobu 4dcaa9e5aa * process.c (ruby_setsid): split from proc_setsid.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27170 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-04-01 23:25:10 +00:00
nobu 893c123bfb * process.c (proc_daemon): use EXIT_SUCCESS instead of magic number.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27169 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-04-01 23:24:11 +00:00
nobu 93164bd9d7 * process.c (rb_f_exit_bang, rb_f_exit, rb_f_abort): fix rdoc.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27164 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-04-01 21:59:41 +00:00
knu 635bdf6f13 * process.c (proc_daemon): Process.daemon should raise an error on
failure regardless of whether the implementation uses daemon(3)
  or not. [ruby-dev:40832]



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27106 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-03-30 05:00:15 +00:00
akr 2979842520 rdoc update.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26394 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-01-24 13:20:04 +00:00
usa 96abe7f35e * process.c (save_redirect_fd): consider EBADF that the fd is not used.
[ruby-dev:39938]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26212 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-12-31 05:22:11 +00:00
nobu 561fbde435 * process.c (rb_f_exec): fixed rdoc.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25704 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-11-10 00:01:28 +00:00
nobu ade7714d20 * process.c (rb_f_exec, rb_f_system, rb_f_spawn): mentioned about
the shell to be used when the command line is single string.
  See [ruby-core:26652]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25703 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-11-09 23:23:23 +00:00
nobu 476b3d8f3f * process.c (proc_setgroups): fixed type.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25034 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-09-22 07:14:09 +00:00
nobu 089beb67bd * process.c (run_exec_dup2): fixed type.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25031 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-09-21 21:08:23 +00:00
nobu fe1ce93f52 * compile.c, cont.c, gc.c, insns.def, iseq.c, iseq.h, process.c,
thread.c, vm.c, vm_core.h, vm_dump.c, vm_eval.c,
  vm_insnhelper.c, vm_method.c, template/insns_info.inc.tmpl,
  tool/instruction.rb: fixed types.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25030 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-09-21 20:58:26 +00:00
akr 3aabcaa3da rdoc update.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24499 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-08-11 13:27:46 +00:00
akr fc64028291 * io.c: remove __CHECKER__ test.
* dir.c: ditto.

* dln.c: ditto.

* file.c: ditto.

* process.c: ditto.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23819 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-06-22 12:23:06 +00:00
nobu 1b67ef40c2 * process.c (proc_setegid): define only if needed.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23281 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-04-25 10:28:25 +00:00
nobu 16acb62022 * process.c (proc_seteuid): define only if needed.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23279 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-04-25 09:26:58 +00:00
nobu 1d103770c6 * process.c: fixed types.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23278 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-04-25 09:26:22 +00:00
nobu 9bb7a8ccdd * configure.in (ac_cv_func_daemon): use daemon(3) only on *BSD.
* process.c (proc_daemon): double fork to ensure not having ctty.
  [ruby-core:23311]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23277 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-04-25 09:21:49 +00:00
akr f3d5d707cc * process.c (proc_seteuid_m): defined to use rb_f_notimplement if not
implemented.
  (proc_setegid_m): ditto.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23207 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-04-18 16:41:16 +00:00
akr 1e96c9817e * process.c (proc_setuid): use rb_f_notimplement if not implemented.
(proc_setgid): ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23205 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-04-18 16:04:34 +00:00
akr 05a278b4cd * ext/readline/readline.c: use rb_f_notimplement for methods not
implemented.

* ext/openssl/ossl_engine.c: ditto.

* ext/openssl/ossl_config.c: ditto.

* ext/openssl/ossl_cipher.c: ditto.

* ext/openssl/ossl_pkcs5.c: ditto.

* ext/openssl/ossl_x509ext.c: ditto.

* ext/socket/socket.c: ditto.

* ext/socket/basicsocket.c: ditto.

* ext/socket/ancdata.c: ditto.

* ext/socket/unixsocket.c: ditto.

* ext/iconv/iconv.c: ditto.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23204 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-04-18 14:10:06 +00:00
akr 9fada90406 update rdoc.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23199 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-04-18 09:06:34 +00:00
akr 8e8ae2a9c5 * node.h (rb_notimplement_body_p): declared.
* vm_method.c (Init_eval_method): suppress a warning.

* io.c (rb_io_fsync): use rb_f_notimplement if not implemented.
  (rb_io_close_on_exec_p): ditto.
  (rb_io_set_close_on_exec): ditto.
  (rb_io_fcntl): ditto.
  (rb_f_syscall): ditto.

* dir.c (dir_tell): ditto.
  (dir_seek): ditto.
  (dir_s_chroot): ditto.

* process.c (proc_getpgrp): ditto.
  (proc_setpgrp): ditto.
  (proc_getpgid): ditto.
  (proc_setpgid): ditto.
  (proc_setsid): ditto.
  (proc_getpriority): ditto.
  (proc_setpriority): ditto.
  (proc_getrlimit): ditto.
  (proc_setrlimit): ditto.
  (p_sys_setuid): ditto.
  (p_sys_setruid): ditto.
  (p_sys_seteuid): ditto.
  (p_sys_setreuid): ditto.
  (p_sys_setresuid): ditto.
  (p_sys_setgid): ditto.
  (p_sys_setrgid): ditto.
  (p_sys_setegid): ditto.
  (p_sys_setregid): ditto.
  (p_sys_setreuid): ditto.
  (p_sys_setresgid): ditto.
  (p_sys_issetugid): ditto.
  (proc_getgroups): ditto.
  (proc_setgroups): ditto.
  (proc_initgroups): ditto.
  (proc_daemon): ditto.
  (rb_proc_times): ditto.

* file.c (rb_file_s_lchown): ditto.
  (rb_file_s_link): ditto.
  (rb_file_s_symlink): ditto.
  (rb_file_s_readlink): ditto.
  (rb_file_s_truncate): ditto.
  (rb_file_truncate): ditto.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23197 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-04-16 16:58:06 +00:00
akr 8b27d153d2 * class.c (rb_define_method_id): use rb_define_notimplement_method_id
if rb_f_notimplement is given.
  (rb_define_protected_method): ditto.
  (rb_define_private_method): ditto.
  (rb_define_method): use rb_define_method_id.

* include/ruby/intern.h (rb_f_notimplement): declared.
  (rb_define_notimplement_method_id): declared.

* proc.c (method_inspect): show not-implemented.

* vm_method.c (notimplement_body): new variable.
  (rb_notimplement_body_p): new function.
  (rb_method_boundp): return false if not implemented.
  (rb_f_notimplement): new function.
  (rb_define_notimplement_method_id): new function.

* process.c (rb_f_fork): use rb_f_notimplement if not implemented.

* file.c (rb_file_s_lchmod): use rb_f_notimplement if not implemented.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23192 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-04-16 14:17:14 +00:00
matz 9be62b3b1a * process.c (rb_f_sleep): RDoc disambiguation. [ruby-talk:332632]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23108 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-04-01 04:20:05 +00:00
akr e2dab32d0b update rdoc.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23106 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-03-31 18:49:25 +00:00
knu 8d31e44620 * process.c (Init_process): Better patch for eliminating an
"unused variable".




git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23058 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-03-23 12:53:52 +00:00
nobu f60de59a70 * process.c (rb_exec): prints error message only on platforms
neither close-on-exec nor spawnv is supported.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23024 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-03-20 23:19:52 +00:00
nobu c569163e9e * process.c (rb_spawn_internal): suppressed a warning.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22975 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-03-16 06:22:37 +00:00
nobu 34877b581d * process.c (SAVED_GROUP_ID, p_gid_switch): should be rb_gid_t.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22960 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-03-14 18:30:00 +00:00
akr e368a2e158 * process.c (rb_spawn_internal): use int variable for status.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22950 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-03-14 06:59:55 +00:00
akr ec5e44f2c7 * process.c (rb_f_system): use rb_pid_t for pid.
(rb_spawn_internal): local variable renamed.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22948 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-03-14 05:46:43 +00:00
nobu d7720b2fc0 * process.c (rb_f_sleep): time() needs time_t.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22900 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-03-11 20:16:08 +00:00
nobu da9ffe378f * process.c (rb_waitpid): use wait_each() on no waitpid platforms.
[ruby-dev:38054]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22688 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-03-01 07:15:33 +00:00
nobu 135930e95b * process.c (proc_daemon): stops and restarts timer thread because
daemon(3) implies fork(2).  [ruby-dev:38055]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22687 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-03-01 07:01:03 +00:00
akr 62b787b569 rdoc update.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22595 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-24 11:00:24 +00:00
nobu 8503451387 * process.c (rb_waitpid): last argument was missing.
* process.c (waitall_each): fixed typo.  a patch from shinichiro.h
  <shinichiro.hamaji AT gmail.com> at [ruby-dev:38054].


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22587 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-24 01:49:39 +00:00
akr e5dd6a792d rdoc update.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22557 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-22 16:25:06 +00:00
akr a384273d6d rdoc update.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22554 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-22 14:38:05 +00:00
nobu 3229c32008 * io.c (rb_write_error2, argf_next_argv), process.c (rb_fork_err),
random.c (fill_random_seed): suppress warnings.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22396 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-18 06:21:04 +00:00
nobu 3abae536a6 * process.c (rb_fork): initialization with dynamic values is not
allowed in C89.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22261 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-12 14:26:02 +00:00
azav 7ecbd56af4 Created execl stub as a missing PIPS function
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22092 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-06 12:54:52 +00:00
akr 74063bf4d3 * include/ruby/intern.h (rb_run_exec_options_err): renamed from
rb_run_exec_options.
  (rb_exec_err): renamed from rb_exec.
  (rb_fork_err): renamed from rb_fork.
  (rb_spawn_err): renamed from rb_spawn.
  (rb_run_exec_options): declared with 1.9.1 compatible signature.
  (rb_exec): ditto.
  (rb_fork): ditto.
  (rb_spawn): ditto.

* process.c (rb_run_exec_options_err): renamed from
  rb_run_exec_options.
  (rb_exec_err): renamed from rb_exec.
  (rb_fork_err): renamed from rb_fork.
  (rb_spawn_err): renamed from rb_spawn.
  (rb_run_exec_options): defined.
  (rb_exec): ditto.
  (rb_fork): ditto.
  (rb_spawn): ditto.

* io.c: follow above change.

* ext/pty/pty.c: follow above change.

  [ruby-dev:37893]



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22078 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-05 11:33:19 +00:00
nobu 62734f6db5 * process.c (proc_spawn_v): removed unused variable.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21781 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-26 07:32:53 +00:00
matz c6af6b1b94 * symbian/README.SYMBIAN: symbian support added. great appreciate
to <alexandre.zavorine at symbian.com>.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21513 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-15 01:53:08 +00:00
mame f408202de2 * process.c: use sigaction instead of sigset. [ruby-core:21021]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21275 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-02 13:25:09 +00:00
shyouhei b9cd44cfc1 * process.c (before_exec): it makes no sense for a conditional
expression to return a void value.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21248 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-01 11:53:21 +00:00
yugui b3ff7eb3ef * process.c (rb_waitpid): retries waitpid when EINTR.
[ruby-core:19744].

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21181 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-29 14:41:22 +00:00
nobu a94adfa245 * process.c (after_exec): needs to reset before restart timer
thread.

* thread.c (thread_start_func_2): stops timer thread if forked in
  the new thread.   [ruby-core:19385]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21097 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-27 10:40:57 +00:00
nobu 2d5061bd98 * process.c (after_fork): ignores a termination request in the
parent process.  [ruby-dev:37447]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21076 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-26 20:39:07 +00:00
akr b317b345e8 * process.c (rb_fork): don't propagete an error message if error
buffer not given.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20951 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-23 13:59:10 +00:00
akr 423bbf80d5 * process.c (rb_fork): propagete an error message from child to parent.
(rb_f_exec): show details of error in child process on
  exception.
  (save_redirect_fd): add error message arguments.
  (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.
  (rb_run_exec_options): ditto.
  (rb_exec): ditto.
  (rb_exec_atfork): ditto.
  (rb_spawn_internal): ditto.
  (rb_spawn): ditto.
  (rb_f_system): follow arguments change.
  (proc_daemon): ditto.
  (rb_f_spawn): show details of error in child process on exception.

* io.c (popen_exec): add error message arguments.
  (pipe_open): show details of error in child process on exception.

* include/ruby/intern.h (rb_run_exec_options): add error message
  arguments.
  (rb_exec): ditto.
  (rb_fork): ditto.
  (rb_spawn): ditto.

* ext/pty/pty.c (chfunc): add error message arguments.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20950 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-23 13:15:54 +00:00
akr 6e03277db0 * process.c (forked_child): new variable.
(before_exec): don't call rb_thread_stop_timer_thread if
  forked_child.
  (after_exec): reset forked_child after rb_thread_start_timer_thread.
  (rb_fork): set forked_child just after fork in child.

* ext/pty/pty.c (chfunc): extracted from establishShell.
  (establishShell): use rb_fork.

  [ruby-dev:37418]



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20726 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-13 16:40:01 +00:00
akr 83b37cfc4f rdoc update.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20561 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-06 01:05:57 +00:00
akr 41a3fbff5f rdoc udpate.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20559 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-05 15:09:59 +00:00
akr 1385ce5f89 rdoc update.
prefer :in over STDIN because STDIN.fileno may changed if
STDIN.instance_eval { initialize 1 }.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20543 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-05 10:00:36 +00:00
akr 3406ddcb33 * process.c (run_exec_dup2): !save is false if Qnil.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20542 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-05 09:58:23 +00:00
usa 80a3f22b77 * process.c (run_exec_dup2): need to sort by reverted order when
restoring fds.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20523 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-04 15:35:08 +00:00
akr 49b10fd508 rdoc update.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20522 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-04 15:21:32 +00:00
akr e7562555c4 rdoc update.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20519 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-04 15:03:12 +00:00
akr d681d98052 update rdoc.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20513 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-04 11:45:54 +00:00
akr a112ec787a * process.c (check_exec_fds): resolve cascaded child fd reference.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20511 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-04 10:17:34 +00:00
akr 30b8f1ee2b * process.c (EXEC_OPTION_DUP2_CHILD): defined.
(check_exec_redirect_fd): check :in, :out and :err.
  (check_exec_redirect): check [:child, fd].
  (check_exec_fds): validate EXEC_OPTION_DUP2_CHILD array.
  (run_exec_dup2_child): new function.
  (rb_run_exec_options): call run_exec_dup2_child.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20470 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-03 15:02:10 +00:00
akr ca209c80e9 * process.c (check_exec_redirect): accept :in, :out, :err as redirect
target.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20467 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-03 12:33:37 +00:00
nobu 4d6d0a933e * process.c (rb_fork): stops the timer thread during fork.
[ruby-dev:37117]

* thread.c (rb_thread_start_timer_thread): timer thread needs
  system_working to be set.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20346 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-11-24 15:08:24 +00:00
mame 2f67ef8332 * process.c (run_exec_dup2): fix resource leak.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19730 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-09 14:31:32 +00:00
mame ab2868bfba * process.c (rb_run_exec_options): fix resource leak.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19729 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-09 14:24:15 +00:00
yugui e8ee99ff1a * dln.c: Ruby no longer supports VMS.
* error.c: ditto.

* eval.c: ditto.

* eval_intern.h: ditto.

* include/ruby/defines.h: ditto.

* include/ruby/ruby.h: ditto.

* io.c: ditto.

* process.c: ditto.

* ruby.c: ditto.

* vms/config.h: removed.

* vms/vms.h: ditto.

* vms/vmsruby_private.c: ditto.

* vms/vmsruby_private.h: ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19682 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-04 13:57:06 +00:00
yugui ae7ea3332b * dln.c: Ruby no longer supports MS-DOS.
* ext/sdbm/_sdbm.c: ditto.

* ext/sdbm/sdbm.h: ditto.

* gc.c: ditto.

* hash.c: ditto.

* include/ruby/defines.h: ditto.

* include/ruby/util.h: ditto.

* io.c: ditto.

* process.c: ditto.

* ruby.c: ditto.

* strftime.c: ditto.

* util.c: ditto.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19679 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-04 13:33:22 +00:00
yugui 8dd118c0db * djgpp/GNUmakefile.in: removed. Ruby no longer supports djgpp.
* djgpp/README.djgpp: ditto.

* djgpp/config.hin: ditto.

* djgpp/config.sed: ditto.

* djgpp/configure.bat: ditto.

* djgpp/mkver.sed: ditto.

* ext/Setup.dj: ditto.

* dln.c: removed djgpp supports.

* file.c: ditto.

* gc.c: ditto.

* io.c: ditto.

* process.c: ditto.

* ruby.c: ditto.

* signal.c: ditto.

* util.c: ditto.

* vm_core.h: ditto.

* lib/fileutils.rb: ditto.

* lib/mkmf.rb: ditto.

* ext/socket/socket.c: ditto.

* test/fileutils/test_fileutils.rb: ditto.

* test/ruby/test_env.rb: ditto.

* test/ruby/test_path.rb: ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19678 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-04 13:25:12 +00:00
yugui bbbd9c0b7b * x68/_dtos18.c: removed. Ruby no longer supports human68k.
* x68/_round.c: ditto.

* x68/fconvert.c: ditto.

* x68/select.c: ditto.

* ext/Setup.x68: ditto.

* missing/x68.c: ditto.

* dln.c (dln_find_exe_r): removed human68k supports.
  (dln_find_1): ditto.

* lib/mkmf.rb: ditto.

* ext/extmk.rb (Init_ext): ditto.

* ext/socket/socket.c (init_sock): ditto.

* gc.c (GC_MALLOC_LIMIT): ditto.
  (rb_setjmp, rb_jmpbuf): ditto.
  (mark_current_machine_context): ditto.

* include/ruby/defines.h (PATH_ENV): ditto.

* io.c: ditto.

* process.c: ditto.

* ruby.c: ditto.

* test/ruby/test_env.rb: ditto.

* test/ruby/test_path.rb: ditto.

* LEGAL


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19677 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-04 13:12:13 +00:00
akr 252255cad4 * process.c (check_exec_redirect): don't depend on rb_stdout and
rb_stderr.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19646 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-30 15:21:30 +00:00
usa c27baaa090 * win32/win32.c (getppid): typo. [ruby-dev:36202]
* process.c (get_ppid): mention the return value on Windows.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19243 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-08 09:17:22 +00:00
matz 31b6ea65bb * include/ruby/ruby.h (DBL2NUM): renamed from DOUBLE2NUM.
a patch from Tadashi Saito <shiba at mail2.accsnet.ne.jp>
  in [ruby-dev:36102].

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19160 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-05 18:24:21 +00:00
akr 01acf18704 * include/ruby/io.h (rb_io_modestr_fmode): renamed from
rb_io_mode_flags.
  (rb_io_modestr_oflags): renamed from rb_io_mode_modenum.
  (rb_io_oflags_fmode): renamed from rb_io_modenum_flags.
  (rb_io_mode_flags): defined as a macro.
  (rb_io_modenum_flags): ditto.

* io.c: follow the renaming with consistency.

* process.c (check_exec_redirect): call rb_io_modestr_oflags.

* ext/pty/depend: pty.o depends on io.h.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19153 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-05 11:30:35 +00:00
ko1 204929af9d * include/ruby/signal.h: removed.
* common.mk, class.c, eval.c, eval_intern.h, file.c, gc.c, hash.c,
  io.c, process.c, signal.c: vm_core.h: ditto.
  Some unused external global variables are also removed.
  (rb_prohibit_interrupt, rb_trap_immediate, rb_trap_pending,
  rb_thread_critical)
* ext/openssl/ossl_ssl.c, ext/openssl/ossl_x509store.c,
  ext/readline/readline.c, ext/socket/depend,
  ext/socket/socket.c: ditto.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19080 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-03 08:00:05 +00:00
ko1 ca6a8b1e2c * include/ruby/intern.h: rename RB_UBF_DFL to
RUBY_UBF_IO and RUBY_UBF_PROCESS.
  Because there is no default (universal) unblocking function.
* ext/socket/socket.c, file.c, io.c, process.c, thread.c: ditto.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18985 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-31 07:44:24 +00:00
akr 61acccefb7 * process.c (pst_pid): use rb_attr_get to avoid warning on
Process::Status.allocate.pid.
  (pst_inspect): don't raise if self is not initialized.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18752 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-21 10:18:38 +00:00
nobu 3916eb783c * marshal.c (dump_ensure), process.c (run_exec_dup2),
string.c (rb_str_replace), transcode.c (transcode_dispatch): fixed
  memory leaks.  based on patches from shinichiro.h <shinichiro.hamaji
  AT gmail.com> at [ruby-dev:35751].


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18341 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-04 05:08:57 +00:00
nobu 09a5952737 * process.c (pst_message): removed no longer used variable.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18166 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-07-22 12:55:36 +00:00
nobu 0acca9a826 * compile.c (insn_data_to_s_detail), file.c (rb_stat_inspect),
iseq.c (ruby_iseq_disasm_insn, ruby_iseq_disasm),
  process.c (pst_message), re.c (match_inspect): use rb_str_catf.

* dir.c (dir_inspect), iseq.c (iseq_inspect, insn_operand_intern): use
  rb_sprintf.

* error.c (rb_name_error, rb_raise, rb_loaderror, rb_fatal): use
  rb_vsprintf.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18158 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-07-22 08:53:34 +00:00
nobu 1a5f1a8c69 * vm_core.h (rb_thread_t), vm.c (rb_thread_mark), process.c
(rb_last_status_get, rb_last_status_set, rb_last_status_clear):
  moved last_status from rb_vm_t.  [ruby-dev:35414]

* vm.c (th_init2): initialize last_status with nil.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17985 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-07-10 03:10:00 +00:00
akr b279bf4270 rename rb_pipe_internal to rb_pipe.
use rb_pipe in pipe_nocrash.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17895 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-07-05 14:12:53 +00:00
akr b89bf3f05a update spawn rdoc a bit.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17890 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-07-05 12:25:33 +00:00
shyouhei ddc5f561e7 * process.c (run_exec_rlimit): ISO C90 forbids mixed declarations
and code


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17767 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-07-01 08:31:55 +00:00
shyouhei 3e69e83a62 * include/ruby/ruby.h (enum ruby_special_consts): ISO C forbids
comma at end of enumerator list

 	* include/ruby/ruby.h (enum ruby_value_type): ditto.

	* eval_intern.h (enum): ditto.

	* vm_core.h (enum rb_thread_status): ditto.

	* parse.y (enum lex_state_e): ditto.

	* parse.y (enum string_type): ditto.

	* process.c (enum): ditto.

	* ruby.c (enum dump_flag_bits): ditto.

	* ruby.c (enum disable_flag_bits): ditto.

	* compile.c (iseq_link_element): ditto

	* debug.c (union): ditto.

	* cont.c (enum context_type): ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17766 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-07-01 08:27:58 +00:00
ko1 002fb8f747 * process.c (Init_process): fix to avoid a warning.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17722 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-06-29 17:13:37 +00:00
ko1 285066dd0b * configure.in: need a ",".
* process.c (rb_fork): check CANNOT_FORK_WITH_PTHREAD macro.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17593 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-06-26 21:53:40 +00:00
usa d3a0ef8198 * include/ruby/win32.h, win32/win32.c (rb_w32_getppid): now support
getppid() on win32 (but only Win2k or later).

	* process.c (get_ppid): remove win32 special logic.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17553 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-06-24 02:14:00 +00:00
akr 7ba5c4e83b * process.c (Init_process): Process::Status#to_int removed.
(PST2INT): defined.
  (pst_to_s): use PST2INT.
  (pst_inspect): ditto.
  (pst_equal): ditto.
  (pst_bitand): ditto.
  (pst_rshift): ditto.
  (pst_wifstopped): ditto.
  (pst_wstopsig): ditto.
  (pst_wifsignaled): ditto.
  (pst_wtermsig): ditto.
  (pst_wifexited): ditto.
  (pst_wexitstatus): ditto.
  (pst_success_p): ditto.
  (pst_wcoredump): ditto.
  (rb_f_system): ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17490 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-06-20 14:00:35 +00:00
nobu a54cbe65a9 * process.c (rb_detach_process): store detached process ID in the
thread local storage.  moved from lib/open3.rb.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17469 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-06-20 03:40:02 +00:00
usa a556543f74 * process.c (rb_f_fork): NetBSD 4.0 or later can fork.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17454 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-06-19 18:27:14 +00:00
usa a5c9928320 * process.c (run_exec_pgroup): C99 ism.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16770 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-06-03 04:36:28 +00:00
usa 888c935930 * process.c (rb_spawn_internal): set last_status when status == -1
because there is no path to set it on win32. this patch is derived
	  from [ruby-core:16787], submitted by Luis Lavena <luislavena at
	  gmail.com>



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16470 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-19 04:26:43 +00:00
usa 9416fedc28 * process.c, include/ruby/intern.h (rb_run_exec_options): externed.
* process.c (save_redirect_fd, save_env_i, save_env, run_exec_dup2,
	  run_exec_open, run_exec_pgroup, run_exec_rlimit, rb_run_exec_options):
	  save parent's process environments.
	  !!!remark!!! these are not thread-safe.

	* process.c (rb_spawn_internal): remove calling run_exec_options()
	  because cannot restore after spawn. we'll fix this later.

	* io.c (pipe_open): ditto.

	* test/ruby/test_process.rb (test_execopts_env): upcase environment
	  variable name for case insensitive platforms.

	* win32/win32.c (init_env): set USER environment variable only when
	  USERNAME is available.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16395 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-12 14:15:32 +00:00
usa 8d72d7bd2a * process.c (rb_spawn_internal): remove calling run_exec_options()
because cannot restore after spawn. we'll fix this later.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16390 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-12 10:07:00 +00:00
usa ad72d1d3a2 * process.c (rb_spawn_internal): need to call run_exec_options() before
spawn if the platform doesn't have fork. [ruby-dev:34647]



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16389 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-12 09:17:58 +00:00
akr 14a97fd48a * thread.c (thread_cleanup_func_before_exec): extracted from
thread_cleanup_func not to touch pthread data.
  pthread_cond_destroy in forked process may cause deadlock on
  Debian GNU/Linux Etch on x86, x86-64 and IA64.
  this doesn't cause resource leak because the process will exec soon.
  (terminate_atfork_before_exec_i): defined.
  (rb_thread_atfork_before_exec): defined.

* include/ruby/intern.h (rb_thread_atfork_before_exec): declared.

* process.c (rb_exec_atfork): call rb_thread_atfork_before_exec
  instead of rb_thread_atfork.

* io.c (popen_exec): call rb_thread_atfork_before_exec instead of
  rb_thread_atfork.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16355 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-11 04:15:29 +00:00
nobu 4264ca9436 * dln.c (dln_find_exe_r, dln_find_file_r): reentrant versions.
* file.c (rb_find_file_ext, rb_find_file), process.c (proc_exec_v),
  (rb_proc_exec, proc_spawn_v, proc_spawn), ruby.c (process_options):
  use reentrant versions.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16319 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-07 21:43:54 +00:00
akr 36cb003300 * process.c (check_exec_redirect_fd): prohibit duplex IO.
(check_exec_fds): record maxhint even if close_others is not
  specified.
  (rb_exec_arg_fixup): renamed from rb_exec_arg_fix.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16235 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-04-30 05:40:19 +00:00
usa 6837681a4c * process.c (rb_exec_arg_addopt, rb_exec_arg_addopt): now can specify
close_exec on having no fork environment (but still meaningless).



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16225 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-04-28 03:50:14 +00:00
akr 1414a7a8e2 * process.c (run_exec_options): don't call FIX2INT for nil.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16224 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-04-28 02:13:24 +00:00
akr 59ba2bf0b6 * include/ruby/intern.h (rb_exec_arg_init): declared.
(rb_exec_arg_addopt): delared.
  (rb_exec_arg_fix): declared.
  (rb_exec_initarg): removed.
  (rb_exec_getargs): removed.
  (rb_exec_initarg2): removed.

* io.c (struct popen_arg): make execarg as a pointer.
  (popen_exec): follow popen_arg change.
  (pipe_open): add eargp argument.  extract argc and argv from eargp.
  use rb_exec_arg_addopt to add redirect options.
  (pipe_open_v): set up struct rb_exec_arg.
  (pipe_open_s): set up struct rb_exec_arg.

* process.c (rb_exec_arg_addopt): new function extracted from
  check_exec_options_i.
  (check_exec_options_i): use rb_exec_arg_addopt.
  (rb_check_exec_options): opthash is always a hash now.
  (rb_exec_getargs): make it static.
  (rb_exec_fillarg): renamed from rb_exec_initarg2.  don't set up
  redirect_fds.
  (rb_exec_arg_init): new function.
  (rb_exec_arg_fix): new function.
  (rb_f_exec): use rb_exec_arg_init and rb_exec_arg_fix.  use
  rb_exec_arg_addopt to set close_others option.
  (run_exec_options): make close_others by default.
  (rb_spawn_internal): use rb_exec_arg_init and rb_exec_arg_fix.  use
  rb_exec_arg_addopt to set close_others option.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16222 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-04-28 00:11:46 +00:00
akr 514715250a * include/ruby/intern.h (rb_hash_dup): declared.
* hash.c (rb_hash_dup): new function.

* process.c (rb_spawn_internal): don't modify option hash.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16210 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-04-26 12:52:25 +00:00
nobu c59277cf39 * process.c (rb_cProcessTms, rb_cProcessStatus): renamed.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16200 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-04-26 08:31:13 +00:00
akr 8e8095dd88 update spawn rdoc.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16197 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-04-25 17:01:57 +00:00
akr fe9b92f149 * process.c (rb_spawn_internal): new function to specify
default_close_others.
  (rb_spawn): specify default_close_others true.
  (rb_f_system): call rb_spawn_internal with default_close_others as
  false.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16195 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-04-25 15:50:24 +00:00
nobu 0023e16865 * process.c (rb_spawn): rb_exec_initarg() returns new argc and argv in
earg.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16192 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-04-25 06:35:48 +00:00
nobu d90fe02fb6 * process.c: suppress warning.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16191 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-04-25 05:45:28 +00:00
usa 62da750abe * include/ruby/win32.h: define mode_t for umask.
* process.c (check_exec_options_i, check_exec_fds, run_exec_options):
	  support "close_others" only when fork(2) is available.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16189 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-04-25 01:55:22 +00:00
akr 70c177c5f7 fix argument type.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16186 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-04-24 15:34:15 +00:00
akr 34bb79c031 * process.c: include sys/stat.h for umask.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16185 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-04-24 15:16:38 +00:00
akr 278b63a3e4 * include/ruby/intern.h (rb_env_clear): declared.
(rb_io_mode_modenum): declared.
  (rb_close_before_exec): declared.
  (struct rb_exec_arg): add options and redirect_fds field.
  (rb_check_argv): removed.
  (rb_exec_initarg): declared.
  (rb_exec_getargs): declared.
  (rb_exec_initarg2): declared.
  (rb_fork): add third argument: fds.

* io.c (max_file_descriptor): new static variable to record maximum
  file descriptor ruby used.
  (UPDATE_MAXFD): new macro.
  (UPDATE_MAXFD_PIPE): new macro.
  (rb_io_mode_modenum): externed.
  (rb_sysopen): update max_file_descriptor.
  (rb_close_before_exec): new function.
  (popen_exec): redirection removed because it is done by extended
  spawn mechanism.
  (pipe_open): generate a hash for spawn options to specify
  redirections.
  (pipe_open_v): use rb_exec_getargs.
  (pipe_open_s): use rb_exec_getargs.
  (rb_io_initialize): update max_file_descriptor..

* process.c (hide_obj): new function.
  (check_exec_redirect_fd): new function.
  (check_exec_redirect): new function.
  (check_exec_options_i): new function.
  (check_exec_fds): new function.
  (rb_check_exec_options): new function.
  (check_exec_env_i): new function.
  (rb_check_exec_env): new function.
  (rb_exec_getargs): new function.
  (rb_exec_initarg2): new function.
  (rb_exec_initarg): new function.
  (rb_f_exec): use rb_exec_initarg.
  (intcmp): new function.
  (run_exec_dup2): new function.
  (run_exec_close): new function.
  (run_exec_open): new function.
  (run_exec_pgroup): new function.
  (run_exec_rlimit): new function.
  (run_exec_options): new function.
  (rb_exec): call run_exec_options.
  (move_fds_to_avoid_crash): new function.
  (pipe_nocrash): new function.
  (rb_fork): use pipe_nocrash to avoid file descriptor conflicts.
  (rb_spawn): use rb_exec_initarg.
  (rlimit_resource_name2int): extracted from rlimit_resource_type.
  (rlimit_type_by_hname): new function.
  (rlimit_type_by_lname): new function.
  (rlimit_resource_type): use rlimit_type_by_hname.
  (proc_daemon): add fds argument for rb_fork.

* hash.c (rb_env_clear): renamed from env_clear and externed.

[ruby-dev:34086]



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16183 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-04-24 14:46:39 +00:00
nobu 89c408704b * enumerator.c (enumerator_each, enumerator_with_index): suppress
warnings.

* pack.c (pack_unpack): ditto.

* process.c (rb_syswait): ditto.

* re.c (rb_reg_prepare_enc, rb_reg_prepare_re,
  rb_reg_adjust_startpos): ditto.

* regparse.c (onig_name_to_group_numbers): ditto.

* missing/vsnprintf.c (BSD_vfprintf): ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16156 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-04-22 13:49:43 +00:00
akr 30d2565b4e * process.c (rlimit_resource_value): use NUM2RLIM.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15827 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-03-22 17:53:07 +00:00
akr 861219ce4a fix doc.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15734 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-03-09 01:04:46 +00:00
matz 39787ea14d * numeric.c (fix_to_s): avoid rb_scan_args() when no argument
given. 
* bignum.c (rb_big_to_s): ditto.
* enum.c (enum_first): ditto.
* eval_jump.c (rb_f_catch): ditto.
* io.c (rb_obj_display): ditto.
* class.c (rb_obj_singleton_methods): ditto.
* object.c (rb_class_initialize): ditto.
* random.c (rb_f_srand): ditto.
* range.c (range_step): ditto.
* re.c (rb_reg_s_last_match): ditto.
* string.c (rb_str_to_i): ditto.
* string.c (rb_str_each_line): ditto.
* string.c (rb_str_chomp_bang): ditto.
* string.c (rb_str_sum): ditto.

* string.c (str_modifiable): declare inline.
* string.c (str_independent): ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15691 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-03-05 05:22:17 +00:00
akr 84c9041f9b * process.c (Init_process): share bignum objects for RLIM_INFINITY,
RLIM_SAVED_MAX and RLIM_SAVED_CUR if they are equal.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15596 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-02-25 04:58:47 +00:00
akr 310735aa4a * process.c (rlimit_resource_type): new function.
(rlimit_resource_value): new function.
  (proc_getrlimit): use rlimit_resource_type to accept
  symbol and string as resource type.
  (proc_setrlimit): use rlimit_resource_type and rlimit_resource_value
  to accept symbol and string as resource type and values.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15579 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-02-22 16:12:32 +00:00
nobu 1af31107c9 * configure.in: moved broken syscall checks from process.c etc.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14989 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-01-11 03:27:46 +00:00
akr 6cdef2dc7e * $Date$ keyword removed to avoid inclusion of locale dependent
string.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14912 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-01-06 15:49:38 +00:00
akr 041e829127 * include/ruby/encoding.h (rb_isascii): defined.
(rb_isalnum): ditto.
  (rb_isalpha): ditto.
  (rb_isblank): ditto.
  (rb_iscntrl): ditto.
  (rb_isdigit): ditto.
  (rb_isgraph): ditto.
  (rb_islower): ditto.
  (rb_isprint): ditto.
  (rb_ispunct): ditto.
  (rb_isspace): ditto.
  (rb_isupper): ditto.
  (rb_isxdigit): ditto.
  (rb_tolower): ditto.
  (rb_toupper): ditto.

* include/ruby/st.h (st_strcasecmp): declared.
  (st_strncasecmp): ditto.

* st.c (type_strcasehash): use st_strcasecmp instead of strcasecmp.
  (st_strcasecmp): defined.
  (st_strncasecmp): ditto.

* include/ruby/ruby.h: include include/ruby/encoding.h.
  (ISASCII): use rb_isascii.
  (ISPRINT): use rb_isprint.
  (ISSPACE): use rb_isspace.
  (ISUPPER): use rb_isupper.
  (ISLOWER): use rb_islower.
  (ISALNUM): use rb_isalnum.
  (ISALPHA): use rb_isalpha.
  (ISDIGIT): use rb_isdigit.
  (ISXDIGIT): use rb_isxdigit.
  (TOUPPER): defined.
  (TOLOWER): ditto.
  (STRCASECMP): ditto.
  (STRNCASECMP): ditto.

* dir.c, encoding.c, file.c, hash.c, process.c, ruby.c, time.c,
  transcode.c, ext/readline/readline.c: use locale insensitive
  functions.  [ruby-core:14662]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14829 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-01-01 12:24:04 +00:00
akr 58d8e1450f fix typos.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14814 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-12-31 12:55:50 +00:00
akr cd047935e4 enable document of Kernel#system.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14528 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-12-23 15:39:09 +00:00
ko1 de1dbf4829 * process.c (rb_f_fork): Unsupport Kernel.fork() on NetBSD.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14487 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-12-22 10:16:39 +00:00
matz da42035b09 * signal.c (ruby_signal): use SA_SIGINFO if available.
[ ruby-Patches-6418 ]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14057 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-11-30 14:49:45 +00:00
matz d154b1c346 * process.c (rb_f_system): returns nil on execution failure.
[ruby-core:13715]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13990 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-11-20 18:21:39 +00:00
ko1 3453b2bd0e * gc.h, vm_core.h: decl of rb_gc_save_machine_context()
should be at vm_core.h.
* include/ruby/ruby.h, intern.h: remove type rb_thread_t.
* include/ruby/intern.h: change rb_unblock_function_t,
  rb_unblock_function_t.
* file.c, process.c: apply above changes.
* thread.c, thread_pthread.ci, thread_win32.ci: ditto.
* io.c: support blocking open (2). [ruby-core:13614]



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13984 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-11-20 10:47:53 +00:00
ko1 25c0cb981a * include/ruby/ruby.h: introduce 2 macros:
RFLOAT_VALUE(v), DOUBLE2NUM(dbl).
  Rename RFloat#value -> RFloat#double_value.
  Do not touch RFloat#double_value directly.
* bignum.c, insns.def, marshal.c, math.c, numeric.c, object.c,
  pack.c, parse.y, process.c, random.c, sprintf.c, string.c,
  time.c: apply above changes.
* ext/dl/mkcallback.rb, ext/json/ext/generator/generator.c:
  ditto.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13913 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-11-13 16:00:53 +00:00
akr 8c3658fd1b * process.c (pst_to_s): returns a string such as "pid 10220 exit 1"
instead of "256".  [ruby-dev:32053]
  (pst_inspect): change format
  "#<Process::Status: pid=10220,exited(1)>" to
  "#<Process::Status: pid 10220 exit 1>".


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13703 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-10-15 01:31:11 +00:00
usa 57831cebe1 * process.c (Init_process): win32 has our own WNOHANG definition, so
remove unnecessary #ifdef guard.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13626 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-10-04 11:47:18 +00:00
nobu 4d1450fc96 * process.c (rb_waitpid): no needs to poll. [ruby-dev:31871]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13526 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-09-26 18:17:43 +00:00
nobu bf6575ef62 * io.c (popen_exec), process.c (rb_spawn): stop other threads before
exec.  [ruby-core:08262]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13471 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-09-20 08:28:03 +00:00
ko1 6244e502cc * thread.c: fix Mutex to be interruptable lock.
* thread_win32.ci, thread_win32.h, thread_pthread.ci, thread_pthread.h:
  prepare native_cond_*() which are based on pthread_cond_*() spec.
* prelude.rb: fix Mutex#synchronize method.
* vm_core.h, include/ruby/intern.h: change unblock function interface
  (to pass some user data).
* file.c, process.c: ditto.
* benchmark/bm_vm2_mutex.rb: add a benchmark for mutex.
* benchmark/bm_vm3_thread_mutex.rb: add a benchmark for mutex
  with contension.
* benchmark/run.rb: fix to remove ENV['RUBYLIB'] for matzruby.
* test/ruby/test_thread.rb: add a test.
* common.mk: fix benchmark options.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13290 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-08-27 16:48:14 +00:00
matz a25fbe3b3e * encoding.c: provide basic features for M17N.
* parse.y: encoding aware parsing.

* parse.y (pragma_encoding): encoding specification pragma.

* parse.y (rb_intern3): encoding specified symbols.

* string.c (rb_str_length): length based on characters.  
  for older behavior, bytesize method added.

* string.c (rb_str_index_m): index based on characters.  rindex as
  well.

* string.c (succ_char): encoding aware succeeding string.

* string.c (rb_str_reverse): reverse based on characters.

* string.c (rb_str_inspect): encoding aware string description.

* string.c (rb_str_upcase_bang): encoding aware case conversion.
  downcase, capitalize, swapcase as well.

* string.c (rb_str_tr_bang): tr based on characters.  delete,
  squeeze, tr_s, count as well.

* string.c (rb_str_split_m): split based on characters.

* string.c (rb_str_each_line): encoding aware each_line.

* string.c (rb_str_each_char): added.  iteration based on
  characters.

* string.c (rb_str_strip_bang): encoding aware whitespace
  stripping.  lstrip, rstrip as well.

* string.c (rb_str_justify): encoding aware justifying (ljust,
  rjust, center).

* string.c (str_encoding): get encoding attribute from a string. 

* re.c (rb_reg_initialize): encoding aware regular expression

* sprintf.c (rb_str_format): formatting (i.e. length count) based
  on characters.

* io.c (rb_io_getc): getc to return one-character string.
  for older behavior, getbyte method added.

* ext/stringio/stringio.c (strio_getc): ditto.

* io.c (rb_io_ungetc): allow pushing arbitrary string at the
  current reading point.

* ext/stringio/stringio.c (strio_ungetc): ditto.

* ext/strscan/strscan.c: encoding support.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13261 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-08-25 03:29:39 +00:00
nobu 42850db14b * configure.in (group_member): check if presents.
* configure.in (XCFLAGS): add _GNU_SOURCE on linux.

* file.c (group_member): use system routine if available.

* process.c: moved _GNU_SOURCE macro to Makefile.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13240 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-08-23 08:25:12 +00:00
nobu 115a3d21e4 * eval_error.ci (ruby_error_print): call error_print.
* eval_jump.ci, process.c (rb_exit, rb_f_exit, rb_f_abort): moved.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13102 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-08-18 07:44:51 +00:00
nobu 6e0c6ac3be * process.c (detach_process_watcher): should not pass the pointer
to an auto variable to the thread to be created.  pointed and
  fix by KUBO Takehiro <kubo at jiubao.org>  [ruby-dev:30618]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13101 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-08-18 06:59:54 +00:00
ko1 686535d403 * process.c (proc_geteuid): fix strange cast. [ruby-dev:31417]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12935 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-08-15 04:42:19 +00:00
ko1 6b6bf4dd48 * blockinlining.c: remove "yarv" prefix.
* array.c, numeric.c: ditto.
* insnhelper.ci, insns.def, vm_evalbody.ci: ditto.
* yarvcore.c: removed.
* yarvcore.h: renamed to core.h.
* cont.c, debug.c, error.c, process.c, signal.c : ditto.
* ext/probeprofiler/probeprofiler.c: ditto.
* id.c, id.h: added.
* inits.c: ditto.
* compile.c: rename internal functions.
* compile.h: fix debug flag.
* eval.c, object.c, vm.c: remove ruby_top_self.
  use rb_vm_top_self() instead.
* eval_intern.h, eval_load: ditto.
* gc.c: rename yarv_machine_stack_mark() to
  rb_gc_mark_machine_stack().
* insnhelper.h: remove unused macros.
* iseq.c: add iseq_compile() to create iseq object
  from source string.
* proc.c: rename a internal function.
* template/insns.inc.tmpl: remove YARV prefix.
* thread.c:
* vm.c (rb_iseq_eval): added.
* vm.c: move some functions from yarvcore.c.
* vm_dump.c: fix to remove compiler warning.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12741 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-07-12 04:25:46 +00:00
nobu 883fadf9af * process.c (proc_getgroups): use GIDT2NUM for rb_gid_t.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12629 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-06-26 07:39:04 +00:00
ko1 f58eb1e276 * eval.c: remove ruby_current_node and change eval() prototype.
fix to use rb_sourcefile/line() instead of ruby_sourcefile/line.
* error.c, eval_error.ci, eval_load.c, eval_safe.ci, gc.c,
  include/ruby/intern.h, parse.y, process.c, ruby.c: ditto.
* vm.c: fix spaces.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12608 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-06-24 20:33:04 +00:00
ko1 97ba019c94 * vm.c: some refactoring.
* rename th_* to vm_*.
  * remove unused variables functions.
  * add prototypes.
* blockinlining.c, compile.c, cont.c, eval.c, eval_intern.h,
  eval_jump.h, eval_load.c, inits.c, insns.def, iseq.c, parse.y,
  proc.c, process.c, signal.c, thread.c, vm.c, vm_dump.c,
  vm_evalbody.ci, yarvcore.c, yarvcore.h: ditto.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12603 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-06-24 15:42:41 +00:00
ryan 8964a01bae Fixed [UG]ID::eid=. Fixes bug # 10370
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12520 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-06-12 02:32:28 +00:00
nobu 2b592580bf * include/ruby: moved public headers.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12501 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-06-10 03:06:15 +00:00
nobu e1aec4aed8 * process.c (rb_fork): flush stdouts always before fork(2).
fixed: [ruby-dev:30612]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12103 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-03-20 00:12:51 +00:00
nobu c034fce5ce * process.c (rb_waitpid_blocking, rb_waitpid): use UBF feature.
* thread_win32.ci (rb_w32_wait_events_blocking): blocking version.

* win32/win32.c (waitpid): use rb_w32_wait_events_blocking().




git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11862 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-02-24 09:43:40 +00:00
nobu bf6efa76c0 * configure.in (pid_t, uid_t, gid_t): check if defined.
* intern.h, process.c, rubyio.h, ext/etc/etc.c, ext/pty/pty.c: use
  rb_{pid,uid,gid}_t instead of plain int.  [ruby-dev:30376]

* ext/etc/extconf.rb (PIDT2NUM, NUM2PIDT, UIDT2NUM, NUM2UIDT, GIDT2NUM,
  NUM2GIDT): moved to configure.in.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11769 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-02-18 04:11:57 +00:00
ko1 ea2dd2e805 * process.c: fix to use rb_status_line_set/get/clear().
* eval_intern.h: fix line break.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11659 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-02-08 06:48:34 +00:00
ko1 44aef0b53f * this commit is a result of refactoring. only renaming functions,
moving definitions place, add/remove prototypes, deleting
  unused variables and removing yarv.h.
  This commit doesn't change any behavior of ruby/vm.
* yarv.h, common.mk: remove yarv.h (contents are moved to yarvcore.h).
* error.c, eval_intern.h: include yarvcore.h instead yarv.h
* rename some functions:
  * debug.[ch]: debug_*() -> ruby_debug_*()
  * iseq.c: iseq_*() -> rb_iseq_*(), ruby_iseq_disasm()
  * iseq.c: node_name() -> ruby_node_name()
  * vm.c: yarv_check_redefinition_opt_method() ->
    rb_vm_check_redefinition_opt_method()
* some refactoring with checking -Wall.
* array.c: remove rb_ary_ptr() (unused) and remove unused
  local variables.
* object.c: add a prototype of rb_mod_module_exec().
* eval_intern.h (ruby_cref): set it inline.
* eval_load.c (rb_load), yarvcore.c: yarv_load() -> rb_load_internal().
* parse.y: add a prototype of rb_parse_in_eval() (in eval.c).
* process.c: add a prototype of rb_thread_stop_timer_thread() (in thread.c).
* thread.c: remove raw_gets() function (unused) and fix some format
  mismatch (format mismatchs have remained yet. this is todo).
* thread.c (rb_thread_wait_fd_rw): fix typo on label name.
* thread_pthread.ci: comment out codes with USE_THREAD_CACHE.
* vm.c (rb_svar, rb_backref_get, rb_backref_get,
  rb_lastline_get, rb_lastline_set) : moved from yarvcore.c.
* vm.c (yarv_init_redefined_flag): add a prototype and rename
  yarv_opt_method_table to vm_opt_method_table.
* vm.c (rb_thread_eval): moved from yarvcore.c.
* yarvcore.c: remove unused global variables and fix to use nsdr().



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11652 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-02-07 01:25:05 +00:00
ko1 8ee7d0767f * blockinlining.c, compile.c, compile.h, error.c, eval.c,
eval_intern.h, eval_jump.h, eval_load.c, eval_method.h,
  eval_safe.h, gc.c, insnhelper.h, insns.def, iseq.c, proc.c,
  process.c, signal.c, thread.c, thread_pthread.ci, thread_win32.ci,
  vm.c, vm.h, vm_dump.c, vm_evalbody.ci, vm_macro.def,
  yarv.h, yarvcore.h, yarvcore.c: change type and macro names:
  * yarv_*_t -> rb_*_t
  * yarv_*_struct -> rb_*_struct
  * yarv_tag -> rb_vm_tag
  * YARV_* -> RUBY_VM_*
* proc.c, vm.c: move functions about env object creation
  from proc.c to vm.c.
* proc.c, yarvcore.c: fix rb_cVM initialization place.
* inits.c: change Init_ISeq() order (after Init_VM).
* ruby.h, proc.c: change declaration place of rb_cEnv
  from proc.c to ruby.c.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11651 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-02-06 19:00:03 +00:00
ko1 27172b8e6f * intern.h: prepare rb_last_status_get() and rb_last_status_set().
Use these functions instead of rb_last_status ([ruby-dev:30264]).
* process.c: define above functions.
* ext/pty/pty.c: use above functins.
* io.c (pipe_finalize): ditto.
* process.c: ditto.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11633 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-02-05 16:22:38 +00:00
ko1 025cfde57d * eval_thread.c, common.mk: remove eval_thread.c.
* yarvcore.c: rename cYarvThread to rb_cThread.
* gc.c: remove YARV_* prefix.
* gc.h: add an include guard and prototype of rb_gc_set_stack_end().
* inits.c: fix to ANSI prototype style and reorder Init_*().
* io.c (pipe_finalize): TODO: comment out last_status.
* process.c, yarvcore.h: fix to use yarv_vm_t#last_status instead of
  rb_last_status and make last_status_get() to access $?.
* yarvcore.c (vm_mark): mark yarv_vm_t#last_status.
* ruby.h: add declarations of rb_cISeq and rb_cVM.
* thread.c: move eval_thread.c codes to thread.c and remove yarv_*
  function prefix.
* thread.c (thread_start_func_2): use yarv_thread_t#first_func if
  it is not null.
* vm.c: fix copyright year.
* yarvcore.c (Init_vm): rename to Init_VM().



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11631 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-02-05 12:21:01 +00:00
ko1 84f8da1157 * thread.c (rb_thread_stop_timer_thread(), rb_thread_reset_timer_thread(),
rb_thread_start_timer_thread()): added.
* thread_pthread.ci: add a native_thread_join() and move
  rb_thread_reset_timer_thread() definition to thread.c.
* thread_win32.ci: ditto
* process.c: fix before_exec(), after_exec() to stop timer thread
  (and restart timer thread if exec failed).  and fix to reset
  timer thread information when forked child process starts
  (to fix [ruby-core:09822]).



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11509 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-01-07 09:47:52 +00:00
ko1 a3e1b1ce7e * Merge YARV
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11439 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-12-31 15:02:22 +00:00
matz 52817c3654 * lib/cgi.rb (CGI::out): specify -x option for nkf.
* lib/cgi.rb (CGI::out): should not convert utf-8 implicitly using
  NKF.  it is too Japanese centric.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10853 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-09-04 07:40:46 +00:00
matz 2156870525 * ruby.h (struct RArray): embed small arrays.
(RARRAY_LEN): defined for accessing array members.
  (RARRAY_PTR): ditto.

* array.c: use RARRAY_LEN and RARRAY_PTR.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10833 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-09-02 14:42:08 +00:00
usa 5b5e4a6fc1 * file.c (test_identical, rb_file_s_truncate): use RSTRING_PTR and
RSTRING_STR.

* io.c (pipe_open, rb_io_reopen): ditto.

* process.c (proc_spawn_n, rb_spawn): ditto.

* util.c (ruby_add_suffix): ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10811 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-08-31 11:24:44 +00:00
matz 54af80844f * ruby.h (struct RString): embed small strings.
(RSTRING_LEN): defined for accessing string members.
  (RSTRING_PTR): ditto.

* string.c: use RSTRING_LEN and RSTRING_PTR.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10810 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-08-31 10:47:44 +00:00
nobu efff5bc946 * process.c (proc_setuid, proc_setgid, proc_seteuid, proc_setegid):
get rid of bogus implementations on Mac OS X.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10733 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-08-16 02:46:10 +00:00
akr 1f84a162df ansificated.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10724 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-08-13 09:44:16 +00:00
matz cb657243da * process.c (rb_proc_times): rename hz to hertz to avoid name
crash on AIX.  [ruby-dev:29126]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10595 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-07-25 04:58:15 +00:00
usa 553bba0b47 * process.c (rb_f_system): shouldn't block SIGCHLD if it's not
exist.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10564 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-07-18 14:55:28 +00:00
matz 6b87ac68db * process.c (rb_f_system): block SIGCHLD during the process
execution, like glibc system(3) does.  [ruby-talk:202361]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10563 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-07-18 14:36:15 +00:00
matz ddbebabd25 * process.c (rb_f_system): call rb_sys_fail(0) if rb_last_status
is nil.  [ruby-talk:202361]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10555 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-07-18 05:48:01 +00:00
nobu ac2348271a * process.c (rb_proc_times): use sysconf(_SC_CLK_TCK) value prior to
HZ and CLK_TCK.  fixed: [ruby-talk:200293]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10476 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-07-06 14:30:20 +00:00
akr bd7bd6427b Define Process.getrlimit and Process.setrlimit even if
getrlimit and setrlimit are not exist.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10274 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-06-15 06:43:29 +00:00
matz 9b383bd6cf * sprintf.c (rb_str_format): allow %c to print one character
string (e.g. ?x).

* lib/tempfile.rb (Tempfile::make_tmpname): put dot between
  basename and pid.  [ruby-talk:196272]
* parse.y (do_block): remove -> style block.

* parse.y (parser_yylex): remove tLAMBDA_ARG.

* eval.c (rb_call0): binding for the return event hook should have
  consistent scope.  [ruby-core:07928]

* eval.c (proc_invoke): return behavior should depend whether it
  is surrounded by a lambda or a mere block.

* eval.c (formal_assign): handles post splat arguments.

* eval.c (rb_call0): ditto.

* st.c (strhash): use FNV-1a hash.

* parse.y (parser_yylex): removed experimental ';;' terminator.

* eval.c (rb_node_arity): should be aware of post splat arguments.

* eval.c (rb_proc_arity): ditto.

* parse.y (f_args): syntax rule enhanced to support arguments
  after the splat.

* parse.y (block_param): ditto for block parameters.

* parse.y (f_post_arg): mandatory formal arguments after the splat
  argument.

* parse.y (new_args_gen): generate nodes for mandatory formal
  arguments after the splat argument.

* eval.c (rb_eval): dispatch mandatory formal arguments after the
  splat argument.

* parse.y (args): allow more than one splat in the argument list.

* parse.y (method_call): allow aref [] to accept all kind of
  method argument, including assocs, splat, and block argument.

* eval.c (SETUP_ARGS0): prepare block argument as well.

* lib/mathn.rb (Integer): remove Integer#gcd2. [ruby-core:07931]

* eval.c (error_line): print receivers true/false/nil specially.

* eval.c (rb_proc_yield): handles parameters in yield semantics.

* eval.c (nil_yield): gives LocalJumpError to denote no block
  error.

* io.c (rb_io_getc): now takes one-character string.

* string.c (rb_str_hash): use FNV-1a hash from Fowler/Noll/Vo
  hashing algorithm.

* string.c (rb_str_aref): str[0] now returns 1 character string,
  instead of a fixnum.	[Ruby2]

* parse.y (parser_yylex): ?c now returns 1 character string,
  instead of a fixnum.	[Ruby2]

* string.c (rb_str_aset): no longer support fixnum insertion.

* eval.c (umethod_bind): should not update original class.
  [ruby-dev:28636]

* eval.c (ev_const_get): should support constant access from
  within instance_eval().  [ruby-dev:28327]

* time.c (time_timeval): should round for usec floating
  number.  [ruby-core:07896]

* time.c (time_add): ditto.

* dir.c (sys_warning): should not call a vararg function
  rb_sys_warning() indirectly.	[ruby-core:07886]

* numeric.c (flo_divmod): the first element of Float#divmod should
  be an integer. [ruby-dev:28589]

* test/ruby/test_float.rb: add tests for divmod, div, modulo and remainder.

* re.c (rb_reg_initialize): should not allow modifying literal
  regexps.  frozen check moved from rb_reg_initialize_m as well.

* re.c (rb_reg_initialize): should not modify untainted objects in
  safe levels higher than 3.

* re.c (rb_memcmp): type change from char* to const void*.

* dir.c (dir_close): should not close untainted dir stream.

* dir.c (GetDIR): add tainted/frozen check for each dir operation.

* lib/rdoc/parsers/parse_rb.rb (RDoc::RubyParser::parse_symbol_arg):
  typo fixed.  a patch from Florian Gross <florg at florg.net>.

* eval.c (EXEC_EVENT_HOOK): trace_func may remove itself from
  event_hooks.	no guarantee for arbitrary hook deletion.
  [ruby-dev:28632]

* util.c (ruby_strtod): differ addition to minimize error.
  [ruby-dev:28619]

* util.c (ruby_strtod): should not raise ERANGE when the input
  string does not have any digits.  [ruby-dev:28629]

* eval.c (proc_invoke): should restore old ruby_frame->block.
  thanks to ts <decoux at moulon.inra.fr>.  [ruby-core:07833]
  also fix [ruby-dev:28614] as well.

* signal.c (trap): sig should be less then NSIG.  Coverity found
  this bug.  a patch from Kevin Tew <tewk at tewk.com>.
  [ruby-core:07823]

* math.c (math_log2): add new method inspired by
  [ruby-talk:191237].

* math.c (math_log): add optional base argument to Math::log().
  [ruby-talk:191308]

* ext/syck/emitter.c (syck_scan_scalar): avoid accessing
  uninitialized array element.	a patch from Pat Eyler
  <rubypate at gmail.com>.  [ruby-core:07809]

* array.c (rb_ary_fill): initialize local variables first.  a
  patch from Pat Eyler <rubypate at gmail.com>.	 [ruby-core:07810]

* ext/syck/yaml2byte.c (syck_yaml2byte_handler): need to free
  type_tag.  a patch from Pat Eyler <rubypate at gmail.com>.
  [ruby-core:07808]

* ext/socket/socket.c (make_hostent_internal): accept ai_family
  check from Sam Roberts <sroberts at uniserve.com>.
  [ruby-core:07691]

* util.c (ruby_strtod): should not cut off 18 digits for no
  reason.  [ruby-core:07796]

* array.c (rb_ary_fill): internalize local variable "beg" to
  pacify Coverity.  [ruby-core:07770]

* pack.c (pack_unpack): now supports CRLF newlines.  a patch from
  <tommy at tmtm.org>.	[ruby-dev:28601]

* applied code clean-up patch from Stefan Huehner
  <stefan at huehner.org>.  [ruby-core:07764]

* lib/jcode.rb (String::tr_s): should have translated non
  squeezing character sequence (i.e. a character) as well.  thanks
  to Hiroshi Ichikawa <gimite at gimite.ddo.jp> [ruby-list:42090]

* ext/socket/socket.c: document update patch from Sam Roberts
  <sroberts at uniserve.com>.  [ruby-core:07701]

* lib/mathn.rb (Integer): need not to remove gcd2.  a patch from
  NARUSE, Yui <naruse at airemix.com>.	[ruby-dev:28570]

* parse.y (arg): too much NEW_LIST()

* eval.c (SETUP_ARGS0): remove unnecessary access to nd_alen.

* eval.c (rb_eval): use ARGSCAT for NODE_OP_ASGN1.
  [ruby-dev:28585]

* parse.y (arg): use NODE_ARGSCAT for placeholder.

* lib/getoptlong.rb (GetoptLong::get): RDoc update patch from
  mathew <meta at pobox.com>.  [ruby-core:07738]

* variable.c (rb_const_set): raise error when no target klass is
  supplied.  [ruby-dev:28582]

* prec.c (prec_prec_f): documentation patch from
  <gerardo.santana at gmail.com>.  [ruby-core:07689]

* bignum.c (rb_big_pow): second operand may be too big even if
  it's a Fixnum.  [ruby-talk:187984]

* README.EXT: update symbol description.  [ruby-talk:188104]

* COPYING: explicitly note GPLv2.  [ruby-talk:187922]

* parse.y: remove some obsolete syntax rules (unparenthesized
  method calls in argument list).

* eval.c (rb_call0): insecure calling should be checked for non
  NODE_SCOPE method invocations too.

* eval.c (rb_alias): should preserve the current safe level as
  well as method definition.

* process.c (rb_f_sleep): remove RDoc description about SIGALRM
  which is not valid on the current implementation. [ruby-dev:28464]

 Thu Mar 23 21:40:47 2006  K.Kosako  <sndgk393 AT ybb.ne.jp>

* eval.c (method_missing): should support argument splat in
  super.  a bug in combination of super, splat and
  method_missing.  [ruby-talk:185438]

* configure.in: Solaris SunPro compiler -rapth patch from
  <kuwa at labs.fujitsu.com>.  [ruby-dev:28443]

* configure.in: remove enable_rpath=no for Solaris.
  [ruby-dev:28440]

* ext/win32ole/win32ole.c (ole_val2olevariantdata): change behavior
  of converting  OLE Variant object with VT_ARRAY|VT_UI1 and Ruby
  String object.

* ruby.1: a clarification patch from David Lutterkort
  <dlutter at redhat.com>.  [ruby-core:7508]

* lib/rdoc/ri/ri_paths.rb (RI::Paths): adding paths from rubygems
  directories.	a patch from Eric Hodel <drbrain at segment7.net>.
  [ruby-core:07423]

* eval.c (rb_clear_cache_by_class): clearing wrong cache.

* ext/extmk.rb: use :remove_destination to install extension libraries
  to avoid SEGV.  [ruby-dev:28417]

* eval.c (rb_thread_fd_writable): should not re-schedule output
  from KILLED thread (must be error printing).

* array.c (rb_ary_flatten_bang): allow specifying recursion
  level.  [ruby-talk:182170]

* array.c (rb_ary_flatten): ditto.

* gc.c (add_heap): a heap_slots may overflow.  a patch from Stefan
  Weil <weil at mail.berlios.de>.

* eval.c (rb_call): use separate cache for fcall/vcall
  invocation.

* eval.c (rb_eval): NODE_FCALL, NODE_VCALL can call local
  functions.

* eval.c (rb_mod_local): a new method to specify newly added
  visibility "local".

* eval.c (search_method): search for local methods which are
  visible only from the current class.

* class.c (rb_class_local_methods): a method to list local methods.

* object.c (Init_Object): add BasicObject class as a top level
  BlankSlate class.

* ruby.h (SYM2ID): should not cast to signed long.
  [ruby-core:07414]

* class.c (rb_include_module): allow module duplication.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10235 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-06-09 21:20:17 +00:00
aamine baf0ba4588 * process.c: new method Process.exec. [ruby-dev:28107]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9744 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-12-27 05:10:38 +00:00