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

464 Коммитов

Автор SHA1 Сообщение Дата
kosaki 1d110a14a4 * process.c (before_exec): use sig_do_nothing instead of SIG_DFL
for avoiding a race.
* process.c (sig_do_nothing): new function.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32178 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-06-20 13:55:04 +00:00
akr 7da3ea811e * method.h, internal.h iseq.h: declare internal functions.
* compile.c, eval.c, iseq.c, object.c, parse.y, proc.c, process.c,
  thread.c, vm.c, vm_eval.c, vm_insnhelper.c, vm_method.c: don't
  declare internal functions.

  Note that rb_method_entry_eq() is defined in vm_method.c but
  there was a declaration in proc.c with different const-ness.
  Now it is declared in method.h with same const-ness to the
  definition.

* object.c (rb_mod_module_exec): don't declare functions declared in
  include/ruby/intern.h.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32163 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-06-18 03:49:33 +00:00
akr e7996eb3cc * internal.h: declare internal functions here.
* node.h: declare NODE dependent internal functions here.

* iseq.h: declare rb_iseq_t dependent internal functions here.

* vm_core.h: declare rb_thread_t dependent internal functions here.

* bignum.c, class.c, compile.c, complex.c, cont.c, dir.c, encoding.c,
  enumerator.c, error.c, eval.c, file.c, gc.c, hash.c, inits.c, io.c,
  iseq.c, load.c, marshal.c, math.c, numeric.c, object.c, parse.y,
  proc.c, process.c, range.c, rational.c, re.c, ruby.c, string.c,
  thread.c, time.c, transcode.c, variable.c, vm.c,
  tool/compile_prelude.rb: don't declare internal functions declared
  in above headers.  include above headers if required.

  Note that rb_thread_mark() was declared as
  void rb_thread_mark(rb_thread_t *th) in cont.c but defined as
  void rb_thread_mark(void *ptr) in vm.c.  Now it is declared as
  the later in internal.h.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32156 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-06-17 22:43:38 +00:00
kosaki ecaf7975cd * eval.c: remove rb_thread_stop_timer_thread function declaration.
Instead, include vm_core.h.
* process.c: ditto.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31927 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-06-05 14:35:09 +00:00
kosaki bde7a62f91 * process.c (before_exec, after_exec): change from macro to function.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31762 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-05-28 15:24:18 +00:00
kosaki ed02c4122a * process.c (before_exec, after_exec): change SIGPIPE handler to SIG_DFL
before calling execve(). Because r31760 reintroduced an issue that
  system() may hang up (i.e. [ruby-dev:12261]).
* process.c (save_sigpipe, restore_sigpipe): new.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31761 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-05-28 13:52:03 +00:00
nagachika 537a293669 * process.c (rb_proc_times): improve documentation.
[ruby-core:35785] fixes #4581, reported by Andrew Grimm.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31564 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-05-14 08:47:02 +00:00
drbrain e2b3183fc2 * re.c (Init_Regexp): Document option constants. Patch by Vincent
Batts.  [Ruby 1.9 - Bug #4677]
	* lib/uri/common.rb (module URI):  Documentation for URI.  Patch by
	  Vincent Batts.  [Ruby 1.9- Bug #4677]
	* lib/uri/ftp.rb (module URI):  ditto
	* lib/uri/generic.rb (module URI):  ditto
	* lib/uri/http.rb (module URI):  ditto
	* lib/uri/https.rb (module URI):  ditto
	* lib/uri/ldap.rb (module URI):  ditto
	* lib/uri/ldaps.rb (module URI):  ditto
	* lib/uri/mailto.rb (module URI):  ditto
	* process.c (Init_process):  Document Process constants.  Patch by
	  Vincent Batts.  [Ruby 1.9- Bug #4677]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31536 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-05-12 20:39:11 +00:00
kosaki bd90dc80f2 * process.c (proc_getmaxgroups, proc_setmaxgroups): Process#maxgroups
and Process#maxgroups= now raise NotImplementedError if the
  platform don't support supplementary groups concept.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31090 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-03-10 16:54:02 +00:00
kosaki 4a8cf2d92d * process.c (get_sc_ngroups_max): return -1 if platform don't
support NGROUPS_MAX.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31088 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-03-10 16:26:01 +00:00
kosaki 776156243c * process.c (proc_setgroups): cleanup.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31070 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-03-08 14:52:05 +00:00
nobu 6917c26a7a * process.c (get_sc_ngroups_max): fix indent.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31068 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-03-08 14:40:03 +00:00
kosaki d558bb59c8 * process.c (get_sc_ngroups_max): try to use NGROUPS_MAX at first if
_SC_NGROUP_MAX is not defined.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31067 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-03-08 14:29:22 +00:00
nobu 15f0e53a06 * process.c (proc_setgroups): use getgrnam() if getgrnam_r() is
not available.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31058 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-03-08 00:25:40 +00:00
nobu 487185de67 * process.c: RARRAY_LEN() returns long int.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31057 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-03-08 00:08:16 +00:00
naruse c57118f757 * process.c (get_sc_ngroups_max): define to wrap sysconf(3).
this also supports Windows which doesn't have sysconf(3).

* process.c (maxgroups): use get_sc_ngroups_max.

* process.c (proc_setmaxgroups): ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31055 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-03-07 16:44:36 +00:00
naruse fe8e2dd1e1 * process.c (maxgroups): cast because sysconf(3)'s return value is long.
* process.c (proc_setmaxgroups): ditto.

* process.c (proc_setgroups): cast because RARRAY_LEN() is long.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31053 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-03-07 16:13:57 +00:00
kosaki 52b40be04b small cleanup.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31049 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-03-07 12:54:27 +00:00
kosaki 19a127d0cb * process.c (proc_setgroups): replace getgrnam() with getgrnam_r()
because getgrnam() isn't thread safe.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31048 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-03-07 12:35:45 +00:00
kosaki 1a8ee910f3 * process.c (proc_getmaxgroups, proc_setmaxgroups): refrect
platform maxgroups limitation by default instead hardcoded 65536.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31047 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-03-07 11:58:12 +00:00
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