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

338 Коммитов

Автор SHA1 Сообщение Дата
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