summaryrefslogtreecommitdiff
path: root/io.c
AgeCommit message (Collapse)Author
2009-01-05* io.c (rb_close_before_exec): more heuristics to detect maximum fd.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21347 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-03* io.c (maygvl_copy_stream_wait_read): renamed to add prefix toakr
express GVL state. (nogvl_copy_stream_wait_write): ditto. (nogvl_copy_stream_sendfile): ditto. (maygvl_copy_stream_read): ditto. (nogvl_copy_stream_write): ditto. (nogvl_copy_stream_read_write): ditto. (nogvl_copy_stream_func): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21288 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-31rdoc update.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21213 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-31update rdoc.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21211 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-31* io.c (copy_stream_body): don't check to_io becauseakr
Zlib::GzipWriter#to_io returns the underlying IO. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21209 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-29revert previous changes.naruse
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21147 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-29* file.c (rb_get_path): move encoding conversion of file pathnaruse
from rb_scan_open_args. * io.c (rb_scan_open_args): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21146 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-26* io.c (fptr_finalize): don't allocate objects if noraise.akr
(finish_writeconv): add noalloc argument to be able to avoid object allocation. (finish_writeconv_arg): introduced again. (finish_writeconv_sync): follow the above change. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21068 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-26* io.c (fptr_finalize): close the IO object even if finish_writeconv orakr
flush is failed. (finish_writeconv): don't raise. return errno or exception. (finish_writeconv_arg): removed. (finish_writeconv_sync): follow finish_writeconv change. * transcode.c (rb_econv_make_exception): new function. * include/ruby/encoding.h (rb_econv_make_exception): declared. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21059 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-25* io.c (rb_io_s_pipe): unused variable removed.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21045 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-25* io.c (pipe_close): removed.akr
(pipe_yield): defined. (rb_io_s_pipe): use pipe_yield. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20992 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-25* io.c (rb_io_initialize): check fd validity. [ruby-dev:36646]akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20990 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-25* io.c (flush_before_seek): check io_fflush result.akr
(rb_io_check_readable): ditto. (rb_io_flush): ditto. (rb_io_fsync): ditto. (remain_size): ditto. (rb_io_write_nonblock): ditto. (finish_writeconv): ditto. (fptr_finalize): ditto. (io_reopen): ditto. (rb_io_reopen): ditto. (copy_stream_body): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20989 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-25* io.c (io_fflush): flush write buffer without write lock inmatz
finalizers. [ruby-dev:37572] * io.c (rb_io_fptr_finalize): clear write lock before finalizing. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20988 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-25* io.c (fptr_finalize): close the IO object even if close(2) is failed.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20987 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-25* io.c: sorry, wrong commit. orzusa
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20983 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-25 * io.c (rb_io_flush): fsync() after buffer is flushed on win32.usa
[ruby-core:20043] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20982 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-23* io.c (rb_io_init_copy): call io_seek only if io_tell succeeds.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20954 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-23* process.c (rb_fork): propagete an error message from child to parent.akr
(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* io.c: rdoc for File::open and 1.9 feature in file modes.yugui
* transcode.c: rdoc for String#encode git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20946 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-23* io.c (rb_io_inspect): show fd number if there is no pathname.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20940 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-23 * io.c (pipe_open): need to initialize args.usa
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20934 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-23* io.c (pipe_close): fix coding style. [ruby-dev:37554]akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20928 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-22rdoc update.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20917 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-22* io.c (rb_io_s_pipe): IO.pipe can take a block.akr
(pipe_close): new function. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20916 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-20* dln.c (dln_find_1): supplements an extension for executablenobu
files on DOSish platforms. * io.c (pipe_open): use rb_w32_aspawn() for array form. * win32/win32.c (rb_w32_pipe_exec): no longer used. * win32/win32.c (rb_w32_spawn, rb_w32_aspawn): deals with batch files and commands with extensions. [ruby-core:20695] * win32/win32.c (has_redirection): supports environment variables references. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20892 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-19* io.c (rb_io_extract_encoding_option): "internal_encoding: nil"matz
to specify no-transcoding. and other corner case fixed. [ruby-dev:37496] * hash.c (rb_hash_lookup2): new function to look-up hash with default value. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20870 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-10rdoc update.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20617 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-04* io.c (io_binwrite): arg.offset should be updated after retry.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20532 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-04 * win32/win32.c (rb_w32_read): ERROR_BROKEN_PIPE is not a real errorusa
at this point. * io.c (pipe_open): use rb_w32_spawn() instead of rb_w32_pipe_exec() to use our own redirection scheme. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20528 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-04rdoc update.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20522 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-03update rdoc.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20472 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-03* io.c (rb_io_getc, rb_io_readchar): documentation correction fromnobu
Emiel van de Laar. [ruby-core:20212] * ext/stringio/stringio.c (strio_ungetbyte): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20458 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-11-07* include/ruby/io.h (rb_io_t): added write_lock to serialize.nobu
[ruby-core:19668] * gc.c (gc_mark_children): mark write_lock. * gc.c (rb_gc_call_finalizer_at_exit): Mutex also needs to be deferred. * io.c (io_fflush, io_binwrite, fptr_finalize): serializes writing. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20144 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-29* io.c (rb_io_rewind): should reset fptr->readconv if it'smatz
available. * io.c (more_char): clear readconv at EOF. * test/ruby/test_file.rb: should not read after EOF. use rewind instead. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20045 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-28 * io.c (extract_binmode): new function to extract binmode/textmodeusa
options from hash. * io.c (rb_io_extract_modeenc): use above function. * io.c (rb_io_s_pipe): recognize binmode/textmode options. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19996 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-28 * io.c (make_readconv): now can specify the size of cbuf.usa
* io.c (read_all, appendline, io_getc, rb_io_ungetc): follow above change. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19994 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-27* io.c (argf_init): initial value of $. should be 0.nobu
see [ruby-dev:36937]. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19964 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-27 * io.c (read_all): the 3rd argument maybe Qnil.usa
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19956 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-26* io.c (read_all): use the given buffer to read when needs readconv.nobu
based on the patch by wanabe <s.wanabe AT gmail.com> at [ruby-dev:36931]. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19943 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-22* io.c (pipe_open): remove unnecessary flush before fork.matz
a patch from Kazuhiro NISHIYAMA <zn at mbf.nifty.com> in [ruby-dev:36840]. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19888 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-21* io.c (open_key_args): should adjust argc, argv in structmatz
foreach_arg. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19873 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-21* ext/zlib/zlib.c: remove obsolete prototype macros.matz
* ext/zlib/zlib.c (struct gzfile): add encoding field to gzfile structure. * ext/zlib/zlib.c (rb_gzreader_getc): now works on characters. * ext/zlib/zlib.c (rb_gzreader_getbyte): new method to retrieve single byte. * ext/zlib/zlib.c (rb_gzreader_readbyte): ditto. * ext/zlib/zlib.c (rb_gzreader_each_byte): renamed from each_char * ext/zlib/zlib.c (rb_gzreader_ungetc): allow unget strings. * ext/zlib/zlib.c (rb_gzreader_ungetbyte): renamed from ungetc. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19869 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-21* io.c, include/ruby/intern.h (rb_io_ascii8bit_binmode): externed.shugo
* ext/socket/socket.c (init_sock): use rb_io_ascii8bit_binmode() instead of rb_io_binmode(). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19868 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-21* io.c (rb_file_open_internal): should initialize fmode before using.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19865 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-20* io.c (rb_io_extract_modeenc): plain rb/wb should set ASCII-8BITmatz
to the external_encoding. * io.c (rb_file_open_internal): ditto. * io.c (NEED_WRITECONV): no conversion when the external_encoding is ASCII-8BIT. * io.c (do_writeconv): skip ASCII-8BIT. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19862 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-20* io.c (rb_io_ascii8bit_binmode): renamed from rb_io_binmode.akr
(rb_io_binmode): don't change encoding conversion. (rb_io_binmode_m): call rb_io_ascii8bit_binmode. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19860 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-18rdoc update.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19829 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-16* io.c (rb_io_binmode): reset encoding conversion.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19807 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-16* io.c (rb_getc, rb_io_fread, rb_io_fwrite, rb_read_pending):mame
remove deprecated functions which do not work. [ruby-dev:36697] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19805 b2dd03c8-39d4-4d8f-98ff-823fe69b080e