summaryrefslogtreecommitdiffstats
path: root/process.c
Commit message (Collapse)AuthorAgeFilesLines
* fix typo(?).usa2004-09-221-1/+0
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_8@6948 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Add documentation to fork()dave2004-09-211-2/+14
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_8@6943 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/irb/ruby-lex.rb (RubyLex::identify_string): %s string do notmatz2004-07-221-0/+4
| | | | | | | process expression interpolation. [ruby-talk:106691] git-svn-id: http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_8@6684 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * process.c (rb_f_system): not need to call last_status_set() anyusa2004-07-211-3/+1
| | | | | | | longer on _WIN32. git-svn-id: http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_8@6682 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * process.c (pst_success_p): new method Process::Status#success?.nobu2004-04-151-0/+1
| | | | | | | [ruby-dev:23385] git-svn-id: http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_8@6170 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * process.c (pst_success_p): new method Process::Status#success?.nobu2004-04-151-1/+21
| | | | | | | [ruby-dev:23385] git-svn-id: http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_8@6169 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * array.c, enum.c, eval.c, file.c, io.c, numeric.c, object.c, prec.c,nobu2004-04-141-1/+1
| | | | | | | process.c, re.c, string.c: typos in RDoc comments. [ruby-core:02783] git-svn-id: http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_8@6158 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Add HTML formatter to ridave2004-01-111-4/+0
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_8@5440 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c, object.c, process.c, re.c: don't use C++ style comments.eban2004-01-081-3/+3
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_8@5413 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Finish documenting internal stuff. See Changelog for other detailsdave2004-01-021-3/+1004
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_8@5364 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * win32/win32.h: define execv() using do_aspawn().eban2003-12-101-4/+0
| | | | | | | * process.c (proc_exec_v): remove #ifdef's which stopped needing. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@5153 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (rb_f_exit), process.c (rb_f_exit_bang): use VALUEs not butnobu2003-11-271-2/+2
| | | | | | | TYPEs. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@5041 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (rb_f_exit), process.c (rb_f_exit_bang): treat true asnobu2003-11-271-14/+19
| | | | | | | | | | 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: http://svn.ruby-lang.org/repos/ruby/trunk@5040 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * io.c (read_all): fptr->f may be NULL, if IO is closed in thematz2003-11-041-96/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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: http://svn.ruby-lang.org/repos/ruby/trunk@4892 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * process.c (rb_f_system): fixed lack of security check beforeusa2003-10-301-0/+1
| | | | | | | calling do_spawn() on win32. [ruby-talk:84555] git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@4861 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * string.c (str_new4): should not preserve FL_TAINT status in thematz2003-10-131-1/+8
| | | | | | | | | | | | | | | | | 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: http://svn.ruby-lang.org/repos/ruby/trunk@4749 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * signal.c (ruby_signal_name): adjust to the prototype.nobu2003-10-011-2/+2
| | | | | | | | | * process.c (pst_inspect): ditto. * ext/etc/etc.c (Init_etc): typo. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@4641 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * process.c (pst_inspect): describe stopped process "stopped".akr2003-09-301-2/+2
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@4632 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (rb_eval): while/until should not capture break unlessmatz2003-09-301-1/+8
| | | | | | | they are destination of the break. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@4629 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (rb_thread_atfork): wrong format specifier.matz2003-09-291-1/+43
| | | | | | | | | [ruby-dev:21428] * process.c (pst_inspect): better description. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@4617 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * process.c (p_gid_sw_ensure): return VALUE.eban2003-08-311-2/+2
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@4471 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * process.c (p_gid_sw_ensure): lack of function typenagai2003-08-311-0/+1
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@4469 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * doc/ChangeLog-1.8.0: add changes of Ruby/Tknagai2003-08-291-11/+177
| | | | | | | | | | | | | | | | | | | | | | * 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: http://svn.ruby-lang.org/repos/ruby/trunk@4456 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * modify macro to detect 'MacOS X' based on [ruby-talk:77849]nagai2003-08-031-1/+1
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@4293 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * (bug fix) preprocessor errors occur on OpenBSD-currentnagai2003-08-011-4/+4
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@4276 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/socket/socket.c (tcp_s_gethostbyname): was usingmatz2003-07-251-1/+2
| | | | | | | | | uninitialized size_t value. [ruby-talk:76946] * Minor cleanups. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@4156 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * gcc -Wall clean-up.matz2003-07-241-2/+2
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@4151 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* process.c : unify indentationnagai2003-07-231-262/+264
| | | | | | | | | | | | 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: http://svn.ruby-lang.org/repos/ruby/trunk@4127 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* process.c, configure.in :nagai2003-07-231-5/+784
| | | | | | | | * add a module for raw syscalls to control UID/GID * add modules for portable UID/GID control git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@4119 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/matrix.rb: remove elements conversion to_f, to_i, to_r.matz2003-07-151-3/+3
| | | | | | | | | * lib/cgi/session/pstore.rb: add new file. * process.c (proc_getgroups, proc_setmaxgroups): fix typo. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@4072 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/irb.rb (IRB::Irb::eval_input): warn and exit if $SAFE >=3matz2003-06-101-0/+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: http://svn.ruby-lang.org/repos/ruby/trunk@3931 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * configure.in: checks presence of grp.h and setgroups().nobu2003-06-091-2/+2
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@3921 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * process.c (proc_getgroups, proc_setgroups): raisenobu2003-06-091-0/+12
| | | | | | | NotImplementedError unless available. [ruby-talk:73014] git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@3920 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y (value_expr0): class and module statements should not bematz2003-06-071-0/+92
| | | | | | | | | | | | | | | | | 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: http://svn.ruby-lang.org/repos/ruby/trunk@3918 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * eval.c (load_dyna): clear ruby_errinfo. (ruby-bugs-ja PR#409)matz2003-03-201-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | * io.c (read_all): make str empty if given. (ruby-bugs-ja PR#408) * io.c (io_read): ditto. * io.c (rb_io_sysread): ditto. * range.c: do not override min and max. * sprintf.c (remove_sign_bits): octal left most digit for negative numbers may be '3'. (ruby-bugs-ja PR#407) * sprintf.c (rb_f_sprintf): should prefix sign bits if bignum is negative, using sign_bits(). * eval.c (avalue_to_mrhs): split argument passing and assignment conversion. * eval.c (svalue_to_mrhs): ditto. * eval.c (avalue_to_svalue): avalue_to_svalue([[1,2]]) should be [[1,2]], not [1,2] to wrap-around. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@3584 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * parse.y (dsym): :"symbol string" style should not contain `\0'.matz2003-03-071-0/+28
| | | | | | | | | | | | | | | | | * process.c (proc_detach): new method Proc#detach(pid) which create background watcher thread to issue waitpid. [new] * process.c (rb_detach_process): utility function to detach process from C code. * ext/pty/pty.c (pty_finalize_syswait): terminate watcher thread, and detach child process (by creating new idle waitpid watcher thread). * ext/pty/pty.c (pty_syswait): may lost signal stopped child. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@3561 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Updated Copyrights of Matz to 2003.michal2003-01-161-1/+1
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@3345 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * hash.c (env_clear): new Hash compatible method.matz2003-01-071-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * hash.c (env_shift): ditto. * hash.c (env_invert): ditto. * hash.c (env_replace): ditto. * hash.c (env_update): ditto. * array.c (rb_ary_join): dispatch based on "to_str". * array.c (rb_ary_times): ditto. * array.c (rb_ary_equal): ditto. * process.c (rb_f_exec): dispatch based on "to_ary". * eval.c (umethod_bind): exact class match is not required. relax the restriction to subclasses. * eval.c (rb_eval): call "inherited" before executing class body. * class.c (rb_define_class): call "inherited" after defining the constant. * class.c (rb_define_class_under): ditto. * eval.c (massign): expand first element if RHS is an array and its size is 1, and LHS has concrete assignment target (i.e. LHS has target(s) other than *var). * eval.c (massign): avoid unnecessary avalue/svalue conversion. * eval.c (rb_yield_0): ditto * array.c (rb_ary_update): do not allocate unused array if rpl is nil (i.e. merely removing elements). * io.c (io_read): should resize supplied string if it's shorter than expected. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@3307 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * process.c (proc_exec_v): follow to proc_spawn_v(). call do_aspawn()usa2003-01-061-13/+19
| | | | | | | | | | | | | on Win32. * process.c (rb_proc_exec): call do_spawn() on Win32. * win32/win32.c, win32/win32.h (do_spawn, do_aspawn): add mode flag. * process.c (proc_spawn_v, rb_f_system): follow above change. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@3298 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * process.c (rb_proc_exec): use same logic as DJGPP on win32 ports.usa2003-01-041-3/+3
| | | | | | | | | | | | | | | * process.c (rb_f_system): ditto. * win32/win32.c, win32/win32.h (do_aspawn): [new]. for arrayed arguments. * win32/win32.c (CreateChild): add new argument for real filename of executing process. * win32/win32.c (NtHasRedirection, pipe_exec): follow above change. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@3283 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * process.c (rb_proc_times): need to initialize first.nobu2003-01-031-8/+5
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@3279 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * process.c (rb_proc_times): avoid WindowsXP crash using volatilematz2003-01-011-4/+8
| | | | | | | variables. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@3274 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * Makefile.in, {win32,bcc32}/Makefile.sub: add new target:eban2002-12-311-40/+33
| | | | | | | | | | | | | | | what-where, no-install. * mkconfig.rb: add const: CROSS_COMPILING. * ext/extmk.rb: no-install support. add MAKEDIRS macro. * lib/mkmf.rb: add !ifdef .. !endif for Borland make. * process.c: improve DJGPP support. system "ls", "-l". git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@3259 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * configure.in, defines.h, dir.c, dir.h, dln.c, error.c,uema22002-12-151-6/+6
| | | | | | | | | | | | | | | eval.c, file.c, hash.c, io.c, main.c, missing.c, process.c, ruby.c, rubysig.h, signal.c, st.c, util.c, util.h, bcc/Makefile.sub, win32/Makefile.sub, win32/win32.h, ext/Win32API/Win32API.c, ext/socket/getaddrinfo.c, ext/socket/getnameinfo.c, ext/socket/socket.c, ext/tcltklib/stubs.c : replace "NT" with "_WIN32", add DOSISH_DRIVE_LETTER * wince/exe.mak : delete \r at the end of lines. * wince/mswince-ruby17.def : delete rb_obj_become git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@3148 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * sprintf.c (rb_f_sprintf): preceding ".." for negative numbersmatz2002-12-101-20/+33
| | | | | | | | | | | | | | | | | | | | | | | | still left; removed. * sprintf.c (rb_f_sprintf): should not prepend '0' if width > prec for example "%5.3d". * process.c (Init_process): add Process.exit and Process.abort * pack.c (utf8_to_uv): raise ArgumentError for malformed/redundant UTF-8 sequences. * process.c (last_status_set): add pid attribute to Process::Status. * pack.c (uv_to_utf8): limit maximum length of the encoded string to 6 bytes, even when the platform supports 8 bytes long integers. * pack.c (utf8_to_uv): do not decode sequences longer than 6 bytes. * object.c (copy_object): use "copy_object" method, not "become". git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@3123 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* WinCE patch mergedmatz2002-12-021-6/+6
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@3106 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* move struct timeval to missing.hmichal2002-09-171-10/+0
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@2873 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Int vs Long cleanup #3 (ruby-core:352)michal2002-08-281-11/+4
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@2754 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* *.c: Int vs Long cleanupmichal2002-08-211-6/+4
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@2734 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * string.c (rb_str_slice_bang): if there's no correspondingmatz2002-07-111-5/+7
| | | | | | | | | | | | | | | | | | | | substring, slice! should return nil without exception. * array.c (rb_ary_insert): type fixed. * string.c (rb_str_split_m): accept separator value nil as well. * string.c (rb_str_become): was leaking memory. * class.c (rb_include_module): should not alter other classes/modules by inclusion. by this fix, local order may not be preserved for some cases. * class.c (include_class_new): module may be T_ICLASS; retrieve original module information. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@2632 b2dd03c8-39d4-4d8f-98ff-823fe69b080e