summaryrefslogtreecommitdiff
path: root/process.c
AgeCommit message (Collapse)Author
2005-03-04* array.c: replace rb_protect_inspect() and rb_inspecting_p() bymatz
rb_exec_recursive() in eval.c. * eval.c (rb_exec_recursive): new function. * array.c (rb_ary_join): use rb_exec_recursive(). * array.c (rb_ary_inspect, rb_ary_hash): ditto. * file.c (rb_file_join): ditto. * hash.c (rb_hash_inspect, rb_hash_to_s, rb_hash_hash): ditto. * io.c (rb_io_puts): ditto. * object.c (rb_obj_inspect): ditto * struct.c (rb_struct_inspect): ditto. * lib/set.rb (SortedSet::setup): a hack to shut up warning. [ruby-talk:132866] * lib/time.rb (Time::strptime): add new function. inspired by [ruby-talk:132815]. * lib/parsedate.rb (ParseDate::strptime): ditto. * regparse.c: move st_*_strend() functions from st.c. fixed some potential memory leaks. * exception error messages updated. [ruby-core:04497] * ext/socket/socket.c (Init_socket): add bunch of Socket constants. Patch from Sam Roberts <sroberts@uniserve.com>. [ruby-core:04409] * array.c (rb_ary_s_create): no need for negative argc check. [ruby-core:04463] * array.c (rb_ary_unshift_m): ditto. * lib/xmlrpc/parser.rb (XMLRPC::FaultException): make it subclass of StandardError class, not Exception class. [ruby-core:04429] * parse.y (fcall_gen): lvar(arg) will be evaluated as lvar.call(arg) when lvar is a defined local variable. [new] * object.c (rb_class_initialize): call inherited method before calling initializing block. * eval.c (rb_thread_start_1): initialize newly pushed frame. * lib/open3.rb (Open3::popen3): $? should not be EXIT_FAILURE. fixed: [ruby-core:04444] * eval.c (is_defined): NODE_IASGN is an assignment. * ext/readline/readline.c (Readline.readline): use rl_outstream and rl_instream. [ruby-dev:25699] * ext/etc/etc.c (Init_etc): sGroup needs HAVE_ST_GR_PASSWD check [ruby-dev:25675] * misc/ruby-mode.el: [ruby-core:04415] * lib/rdoc/generators/html_generator.rb: [ruby-core:04412] * lib/rdoc/generators/ri_generator.rb: ditto. * struct.c (make_struct): fixed: [ruby-core:04402] * ext/curses/curses.c (window_color_set): [ruby-core:04393] * ext/socket/socket.c (Init_socket): SO_REUSEPORT added. [ruby-talk:130092] * object.c: [ruby-doc:818] * parse.y (open_args): fix too verbose warnings for the space before argument parentheses. [ruby-dev:25492] * parse.y (parser_yylex): ditto. * parse.y (parser_yylex): the first expression in the parentheses should not be a command. [ruby-dev:25492] * lib/irb/context.rb (IRB::Context::initialize): [ruby-core:04330] * object.c (Init_Object): remove Object#type. [ruby-core:04335] * st.c (st_foreach): report success/failure by return value. [ruby-Bugs-1396] * parse.y: forgot to initialize parser struct. [ruby-dev:25492] * parse.y (parser_yylex): no tLABEL on EXPR_BEG. [ruby-talk:127711] * document updates - [ruby-core:04296], [ruby-core:04301], [ruby-core:04302], [ruby-core:04307] * dir.c (rb_push_glob): should work for NUL delimited patterns. * dir.c (rb_glob2): should aware of offset in the pattern. * string.c (rb_str_new4): should propagate taintedness. * env.h: rename member names in struct FRAME; last_func -> callee, orig_func -> this_func, last_class -> this_class. * struct.c (rb_struct_set): use original method name, not callee name, to retrieve member slot. [ruby-core:04268] * time.c (time_strftime): protect from format modification from GC finalizers. * object.c (Init_Object): remove rb_obj_id_obsolete() * eval.c (rb_mod_define_method): incomplete subclass check. [ruby-dev:25464] * gc.c (rb_data_object_alloc): klass may be NULL. [ruby-list:40498] * bignum.c (rb_big_rand): should return positive random number. [ruby-dev:25401] * bignum.c (rb_big_rand): do not use rb_big_modulo to generate random bignums. [ruby-dev:25396] * variable.c (rb_autoload): [ruby-dev:25373] * eval.c (svalue_to_avalue): [ruby-dev:25366] * string.c (rb_str_justify): [ruby-dev:25367] * io.c (rb_f_select): [ruby-dev:25312] * ext/socket/socket.c (sock_s_getservbyport): [ruby-talk:124072] * struct.c (make_struct): [ruby-dev:25249] * dir.c (dir_open_dir): new function. [ruby-dev:25242] * io.c (rb_f_open): add type check for return value from to_open. * lib/pstore.rb (PStore#transaction): Use the empty content when a file is not found. [ruby-dev:24561] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8068 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-12-27* process.c (NUM2RLIM, RLIM2NUM): Without SIZEOF_RLIM_T is not error.usa
fixed: [ruby-dev:25346] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7659 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-12-23* process.c (SIZEOF_RLIM_T): err if size of rlim_t is not set.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7643 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-12-23* process.c (proc_setgroups): check if the argument lenght isnobu
modified. fixed: [ruby-dev:25285] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7642 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-12-08* process.c (rb_spawn): support for DJGPP.eban
* lib/mkmf.rb (VPATH): specify the implicit path separator for DJGPP. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7507 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-12-06* process.c (proc_setgroups): [ruby-dev:25081]matz
* re.c (rb_reg_eqq): document fix. [ruby-talk:122541] * io.c (io_fread): take VALUE argument. * ext/socket/socket.c (sock_connect): use rb_str_new4(). [ruby-dev:25052] * eval.c (rb_yield_0): [ruby-dev:25051] * io.c (io_write): remove rb_str_locktmp(). [ruby-dev:25050] * io.c (io_fwrite): takes VALUE string as an argument. [ruby-dev:25050] * ext/socket/socket.c (sock_connect): remove rb_str_locktmp(). [ruby-dev:25050] * ext/socket/socket.c (udp_connect): [ruby-dev:25045] * ext/socket/socket.c (udp_bind): ditto. * ext/socket/socket.c (udp_send): ditto. * ext/socket/socket.c (bsock_send): ditto. * ext/socket/socket.c (s_recvfrom): ditto. * hash.c (rb_hash_hash): should provide "hash" method where "eql?" is redefined. [ruby-talk:122482] * ext/socket/socket.c (bsock_setsockopt): [ruby-dev:25039] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7482 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-12-06* configure.in (ac_cv_sizeof_rlim_t): setup for DJGPP.eban
* io.c (is_socket, shutdown): define dummy macros for DJGPP. * process.c: use SIZEOF_RLIM_T instead of HAVE_RLIM_T for DJGPP. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7480 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-12-06* rubyio.h, intern.h, io.c, file.c, process.c, ext/socket/socket.c,akr
ext/pty/pty.c, ext/io/wait/wait.c, ext/openssl/ossl_ssl.c: Use own buffering mechanism instead of stdio. * io.c, ext/stringio/stringio.c, test/ruby/ut_eof.rb: EOF flag removed. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7473 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-11-18* process.c (proc_getpgrp): prohibit for $SAFE=2.matz
[ruby-dev:24899] * process.c (get_pid): ditto. [ruby-dev:24904] * process.c (get_ppid): ditto. * array.c (rb_ary_delete): defer rb_ary_modify() until actual modification. [ruby-dev:24901] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7306 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-11-17* process.c (proc_getrlimit, proc_setrlimit): add rb_secure(2) toakr
methods of Process.{getrlimit,setrlimit} patched by Kazuhiro NISHIYAMA <zn@mbf.nifty.com> git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7299 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-11-14* process.c (proc_getrlimit): new function for Process.getrlimit.akr
(proc_setrlimit): new function for Process.setrlimit. [ruby-dev:24834] * configure.in: check rlim_t and its size. check setrlimit. * ruby.h (NUM2ULL): new macro. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7264 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-11-01* process.c (rb_f_exec): should check whether prog is NULL.eban
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7165 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-10-31* io.c (rb_f_open): create copy of popen specifier. [ruby-dev:24656]matz
* 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-31On NetBSD don't use setruid() and setrgid().naruse
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7158 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-10-06* io.c (rb_io_mode_flags): preserve append mode flag.matz
[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-01* string.c (rb_str_sum): string may be altered. [ruby-dev:24381]matz
* 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-09-21Add documentation to fork()dave
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6943 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-09-19* ext/zlib/zlib.c (gzfile_read_raw): call readpartial at first.akr
(Zlib::GzipReader#readpartial): new method. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6923 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-09-01* process.c (rb_proc_exec): label cannot precede variable declarations.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6844 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-08-27* process.c (rb_proc_exec): strip trailing spaces. [ruby-dev:24143]nobu
* win32/win32.c (CreateChild): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6823 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-08-17* io.c (rb_io_reopen): should clear allocated OpenFile. pointedmatz
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-07-17* re.c (rb_reg_match_m): add optional second argugment "pos" tomatz
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-06-29* io.c (rb_io_popen): update the document for the first argument andnobu
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-04-21* process.c: Recover wrongly removed spaces at end of the lines.ocean
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6185 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-04-21* process.c(rb_spawn): fix SEGV at "p system('command line here')"ocean
(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-15* process.c (pst_success_p): new method Process::Status#success?.nobu
[ruby-dev:23385] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6170 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-04-15* process.c (pst_success_p): new method Process::Status#success?.nobu
[ruby-dev:23385] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6165 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-04-14* array.c, enum.c, eval.c, file.c, io.c, numeric.c, object.c, prec.c,nobu
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-03-29* process.c (rb_exec): follow older behavior if close-on-exec is notnobu
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-02* io.c (pipe_open): erred program name should be reported bynobu
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-02-25* process.c (rb_f_exec): get rid of SEGV when exec failed for commandnobu
in single string. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5834 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-02-25* process.c (rb_f_exec): get rid of SEGV when exec failed.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5833 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-02-16* configure.in: check functions, fork spawnv.nobu
* 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-09* process.c (detach_process_watcher): return the last status.nobu
[ruby-dev:22841] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5656 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-01-11Add HTML formatter to ridave
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5440 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-01-08* eval.c, object.c, process.c, re.c: don't use C++ style comments.eban
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5412 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-01-02Finish documenting internal stuff. See Changelog for other detailsdave
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5364 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-12-10* win32/win32.h: define execv() using do_aspawn().eban
* 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-11-27* eval.c (rb_f_exit), process.c (rb_f_exit_bang): use VALUEs not butnobu
TYPEs. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5041 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-11-27* eval.c (rb_f_exit), process.c (rb_f_exit_bang): treat true asnobu
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-04* io.c (read_all): fptr->f may be NULL, if IO is closed in thematz
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-10-30* process.c (rb_f_system): fixed lack of security check beforeusa
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-13* string.c (str_new4): should not preserve FL_TAINT status in thematz
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-01* signal.c (ruby_signal_name): adjust to the prototype.nobu
* 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-09-30* process.c (pst_inspect): describe stopped process "stopped".akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4632 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-09-30* eval.c (rb_eval): while/until should not capture break unlessmatz
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-29* eval.c (rb_thread_atfork): wrong format specifier.matz
[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-08-31* process.c (p_gid_sw_ensure): return VALUE.eban
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4471 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-08-31* process.c (p_gid_sw_ensure): lack of function typenagai
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4469 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-08-29* doc/ChangeLog-1.8.0: add changes of Ruby/Tknagai
* 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