eban
d84edcfd73
* process.c (rb_f_exec): should check whether prog is NULL.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7165 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-11-01 02:49:06 +00:00
matz
8db864c999
* io.c (rb_f_open): create copy of popen specifier. [ruby-dev:24656]
...
* string.c (rb_str_locktmp): lock string temporarily.
* string.c (str_independent): add tmplock check.
* io.c (io_write): lock output string temporarily.
[ruby-dev:24649]
* io.c (io_write): use rb_str_locktmp().
* io.c (read_all): ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7162 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-10-31 17:37:52 +00:00
naruse
a8966861e8
On NetBSD don't use setruid() and setrgid().
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7158 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-10-31 14:37:08 +00:00
matz
fbb88b011a
* io.c (rb_io_mode_flags): preserve append mode flag.
...
[ruby-dev:24436]
* io.c (rb_io_modenum_mode): do not use external output buffer.
* string.c (rb_str_justify): differ pointer retrieval to prevent
padding string modification. [ruby-dev:24434]
* range.c (range_each_func): allow func to terminate loop by
returning RANGE_EACH_BREAK.
* range.c (member_i): use RANGE_EACH_BREAK. [ruby-talk:114959]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6999 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-10-06 07:40:06 +00:00
matz
1b4d97ddba
* string.c (rb_str_sum): string may be altered. [ruby-dev:24381]
...
* eval.c (rb_f_eval): defer pointer retrieval to prevent unsafe
sourcefile string modification. [ruby-dev:24373]
* io.c (io_read): block string buffer modification during
rb_io_fread() by freezing it temporarily. [ruby-dev:24366]
* io.c (rb_io_s_popen): mode argument may be altered.
[ruby-dev:24375]
* file.c (rb_file_s_basename): ext argument may be altered.
[ruby-dev:24377]
* enum.c (enum_sort_by): use NODE instead of 2 element arrays.
[ruby-dev:24378]
* string.c (rb_str_chomp_bang): StringValue() may change the
receiver. [ruby-dev:24371]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6976 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-10-01 15:56:05 +00:00
dave
141dae12c5
Add documentation to fork()
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6943 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-09-21 15:13:53 +00:00
akr
44abd80865
* ext/zlib/zlib.c (gzfile_read_raw): call readpartial at first.
...
(Zlib::GzipReader#readpartial): new method.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6923 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-09-19 18:42:32 +00:00
nobu
c0a2f6effe
* process.c (rb_proc_exec): label cannot precede variable declarations.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6844 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-09-01 10:28:45 +00:00
nobu
e8d486e119
* process.c (rb_proc_exec): strip trailing spaces. [ruby-dev:24143]
...
* win32/win32.c (CreateChild): ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6823 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-08-27 01:14:30 +00:00
matz
67232b2151
* io.c (rb_io_reopen): should clear allocated OpenFile. pointed
...
out by Guy Decoux. [ruby-core:03288]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6781 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-08-17 09:02:40 +00:00
matz
eabd490119
* re.c (rb_reg_match_m): add optional second argugment "pos" to
...
specify match start point. [ruby-core:03203]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6658 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-07-17 06:28:10 +00:00
nobu
63dedc7de4
* io.c (rb_io_popen): update the document for the first argument and
...
exceptions.
* process.c (rb_f_exec, rb_f_system): update the document for
exceptions.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6540 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-06-29 01:17:39 +00:00
ocean
45c445941b
* process.c: Recover wrongly removed spaces at end of the lines.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6185 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-04-21 02:50:15 +00:00
ocean
1f4513af45
* process.c(rb_spawn): fix SEGV at "p system('command line here')"
...
(may happen only in bccwin32) [ruby-dev:23380]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6183 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-04-21 01:28:19 +00:00
nobu
d0f38773d1
* process.c (pst_success_p): new method Process::Status#success?.
...
[ruby-dev:23385]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6170 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-04-15 15:02:12 +00:00
nobu
b3db09df79
* process.c (pst_success_p): new method Process::Status#success?.
...
[ruby-dev:23385]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6165 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-04-15 10:53:12 +00:00
nobu
d952e33003
* array.c, enum.c, eval.c, file.c, io.c, numeric.c, object.c, prec.c,
...
process.c, re.c, string.c: typos in RDoc comments. [ruby-core:02783]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6158 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-04-14 04:06:52 +00:00
nobu
846f087a07
* process.c (rb_exec): follow older behavior if close-on-exec is not
...
available.
* process.c (rb_fork): protect from exceptions while waiting failed
process, if status is given.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6046 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-03-29 11:17:21 +00:00
nobu
5aad820604
* io.c (pipe_open): erred program name should be reported by
...
exceptions, instead of the first argument.
* process.c (rb_spawn): ditto.
* process.c (proc_spawn_v): use first argument as program name.
* win32/win32.c (rb_w32_aspawn): ditto.
* win32/win32.c (CreateChild): search executable file if no program
name given.
* lib/drb/extservm.rb (invoke_service_command): use Process.spawn.
[ruby-dev:23103]
* lib/rdoc/ri/ri_display.rb (setup_pager): use IO.popen.
[ruby-dev:23086], [ruby-dev:23103]
* lib/rdoc/diagram.rb (convert_to_png): ditto.
* lib/rdoc/generators/chm_generator.rb (compile_project): ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5872 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-03-02 07:30:35 +00:00
nobu
1eafe8b157
* process.c (rb_f_exec): get rid of SEGV when exec failed for command
...
in single string.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5834 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-02-25 17:35:13 +00:00
nobu
56e2c5243f
* process.c (rb_f_exec): get rid of SEGV when exec failed.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5833 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-02-25 17:19:16 +00:00
nobu
03d8c88b87
* configure.in: check functions, fork spawnv.
...
* io.c (rb_io_s_popen): accept argv not only single command line.
* process.c (rb_proc_exec_n): export.
* process.c (rb_check_argv): check if arguments are safe to invoke.
* process.c (rb_fork): retry to fork.
* process.c (rb_spawn): spawn child process asynchronously.
* process.c (rb_f_system): raise an exception if the command could not
execute.
* win32/win32.c (rb_w32_argv_size): count necessary size for joined
arguments.
* win32/win32.c (rb_w32_join_argv): join arguments with quoting.
* win32/win32.c (rb_w32_pipe_exec, rb_w32_spawn, rb_w32_aspawn):
accept program name adding to command line.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5725 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-02-16 06:45:32 +00:00
nobu
4f5b070378
* process.c (detach_process_watcher): return the last status.
...
[ruby-dev:22841]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5656 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-02-09 07:30:17 +00:00
dave
b4d94277bb
Add HTML formatter to ri
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5440 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-01-11 17:34:05 +00:00
eban
973c2ad00d
* eval.c, object.c, process.c, re.c: don't use C++ style comments.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5412 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-01-08 02:21:28 +00:00
dave
88c127c19b
Finish documenting internal stuff. See Changelog for other details
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5364 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-01-02 06:01:12 +00:00
eban
79444dbdb9
* win32/win32.h: define execv() using do_aspawn().
...
* process.c (proc_exec_v): remove #ifdef's which stopped needing.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5153 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-12-10 04:00:07 +00:00
nobu
e788706235
* eval.c (rb_f_exit), process.c (rb_f_exit_bang): use VALUEs not but
...
TYPEs.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5041 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-11-27 15:47:33 +00:00
nobu
99fb5f4871
* eval.c (rb_f_exit), process.c (rb_f_exit_bang): treat true as
...
success, false as failure. [ruby-dev:22067]
* eval.c (rb_f_abort, rb_thread_switch), process.c (rb_f_system): use
ANSI macro instead of hard coded value.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5040 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-11-27 15:34:53 +00:00
matz
a4934a42cb
* io.c (read_all): fptr->f may be NULL, if IO is closed in the
...
signal handler.
* io.c (io_read): ditto.
* string.c (get_pat): remove 1.8.0 warning code.
* string.c (rb_str_match): extend warning until 1.8.2.
* string.c (rb_str_match2): ditto.
* class.c (class_instance_method_list): remove 1.8.0 warnings.
method_list now recurs. [ruby-dev:21816]
* class.c (rb_obj_singleton_methods): ditto.
* array.c (rb_ary_select): remove select with block.
[ruby-dev:21824]
* hash.c (rb_hash_select): ditto.
* hash.c (env_select): ditto.
* re.c (match_select): ditto.
* struct.c (rb_struct_select): ditto.
* process.c (check_uid_switch): remove duplicated error messages.
* process.c (check_gid_switch): ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4892 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-11-04 09:13:57 +00:00
usa
f1ab0d3cab
* process.c (rb_f_system): fixed lack of security check before
...
calling do_spawn() on win32. [ruby-talk:84555]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4861 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-10-30 00:34:30 +00:00
matz
1184373d86
* string.c (str_new4): should not preserve FL_TAINT status in the
...
internal shared string. [ruby-dev:21601]
* string.c (rb_str_new4): ditto.
* eval.c: use EXIT_SUCCESS and EXIT_FAILURE for exit values.
* process.c: ditto. [ruby-dev:38521]
* lib/debug.rb (debug_command): should enter emacs mode when
assigned any value to the environment variable "EMACS".
On Meadow, (getenv "EMACS") is "meadow".
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4749 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-10-13 13:05:24 +00:00
nobu
5c547fd3e2
* signal.c (ruby_signal_name): adjust to the prototype.
...
* process.c (pst_inspect): ditto.
* ext/etc/etc.c (Init_etc): typo.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4641 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-10-01 15:14:23 +00:00
akr
77d7066abe
* process.c (pst_inspect): describe stopped process "stopped".
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4632 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-09-30 02:31:24 +00:00
matz
13ac4447f6
* eval.c (rb_eval): while/until should not capture break unless
...
they are destination of the break.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4629 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-09-30 00:21:14 +00:00
matz
4699b4afbb
* eval.c (rb_thread_atfork): wrong format specifier.
...
[ruby-dev:21428]
* process.c (pst_inspect): better description.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4617 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-09-29 02:44:49 +00:00
eban
6f8f8959b7
* process.c (p_gid_sw_ensure): return VALUE.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4471 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-08-31 13:57:38 +00:00
nagai
803a130207
* process.c (p_gid_sw_ensure): lack of function type
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4469 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-08-31 13:29:54 +00:00
nagai
24ff3f4448
* doc/ChangeLog-1.8.0: add changes of Ruby/Tk
...
* ext/tcltklib/tcltklib.c : some methods have no effect if on slave-IP
* ext/tcltklib/tcltklib.c : can create a interpreter without Tk
* ext/tcltklib/tcltklib.c : bug fix on handling exceptions
* ext/tcltklib/MANUAL.euc : modify
* ext/tk/lib/tk.rb : freeze some core modules
* ext/tk/lib/multi-tk.rb : more secure
* ext/tk/lib/tk.rb: TkVariable.new(array) --> treat the array as the
Tk's list
* ext/tk/lib/tk.rb: improve accessibility of TkVariable object
* ext/tk/lib/tk.rb, ext/tk/lib/tkfont.rb, ext/tk/lib/tkcanvas.rb,
ext/tk/lib/tktext.rb : fix bug of font handling
* ext/tk/lib/tkfont.rb TkFont.new() accepts compound fonts
* process.c: bug fix
* process.c: add rb_secure(2) to methods of Process::{UID,GID,Sys}
* process.c: deny handling IDs during evaluating the block given to
the Process::{UID,GID}.switch method
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4456 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-08-29 08:34:14 +00:00
nagai
c1c4b6b501
* modify macro to detect 'MacOS X' based on [ruby-talk:77849]
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4293 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-08-03 02:55:52 +00:00
nagai
baf02b9a63
* (bug fix) preprocessor errors occur on OpenBSD-current
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4276 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-08-01 18:51:10 +00:00
matz
85911c410a
* ext/socket/socket.c (tcp_s_gethostbyname): was using
...
uninitialized size_t value. [ruby-talk:76946]
* Minor cleanups.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4156 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-07-25 05:36:55 +00:00
matz
5dd2b7102c
* gcc -Wall clean-up.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4151 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-07-24 18:33:50 +00:00
nagai
fd46a1da0a
process.c : unify indentation
...
configure.in : add --enable-setreuid option
tcltklib.c : TclTkIp.new accepts 'ip-name' and 'options'
( e.g. TclTkIp.new('FOO', '-geometry 500x200 -use 0x2200009') )
tk.rb : support arguments of TclTkIp.new
( see TkCore::IP_NAME, TkCore::IP_OPTS )
tk*.rb : preparations for multi-Tk interpreter support
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4127 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-07-23 16:07:35 +00:00
nagai
3e8d70c95c
process.c, configure.in :
...
* add a module for raw syscalls to control UID/GID
* add modules for portable UID/GID control
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4119 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-07-23 02:39:46 +00:00
matz
9ef8a2a5db
* lib/matrix.rb: remove elements conversion to_f, to_i, to_r.
...
* lib/cgi/session/pstore.rb: add new file.
* process.c (proc_getgroups, proc_setmaxgroups): fix typo.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4072 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-07-15 07:35:14 +00:00
matz
373a59b95b
* lib/irb.rb (IRB::Irb::eval_input): warn and exit if $SAFE >=3
...
after input evaluation.
* lib/irb.rb (IRB::Irb::eval_input): untaint input string. now
irb works for levels 1 and 2.
* ext/syck/rubyext.c (syck_loader_transfer): should not use
rb_cProc directly, since type_proc may be Proc, Block, or
Method.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3931 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-06-10 05:22:17 +00:00
nobu
1fe598da35
* configure.in: checks presence of grp.h and setgroups().
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3921 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-06-09 10:02:36 +00:00
nobu
31094808f9
* process.c (proc_getgroups, proc_setgroups): raise
...
NotImplementedError unless available. [ruby-talk:73014]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3920 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-06-09 04:27:17 +00:00
matz
9481face42
* parse.y (value_expr0): class and module statements should not be
...
warned for "void value expression". [ruby-talk:72989]
* gc.c (add_final): should determine type by respond_to?
* gc.c (define_final): ditto.
* io.c (rb_io_ctl): should not depend on respond_to?
* range.c (range_step): rb_check_string_type().
* process.c (proc_setgroups): new functions.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3918 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-06-07 15:34:31 +00:00