summaryrefslogtreecommitdiff
path: root/io.c
AgeCommit message (Collapse)Author
2009-02-09* io.c (io_encoding_set): ignore second argument when external andnaruse
internal are same. [ruby-dev:37939] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22146 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-08* io.c (rb_io_s_binread): ensures file path. [ruby-dev:37940]nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22121 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-06* io.c (io_fread): use rb_io_wait_readable for retryakr
avoid Errno::EINTR on ruby -e 'trap(:CHLD) {}; spawn("sleep 1"); STDIN.read' git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22099 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-06(pipe_open) [__SYMBIAN32__]: fixed compile time error azav
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22096 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-05* include/ruby/intern.h (rb_run_exec_options_err): renamed fromakr
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-04rdoc update.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22037 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-31rdoc update.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21910 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-22 * revert previous revision. it's already out-of-date.usa
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21735 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-22 * include/ruby/win32.h, win32/win32.c (rb_w32_is_valid_fd): new functionusa
to validate fd. * io.c (rb_io_initialize): check fd with above function. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21734 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-21* io.c (rb_io_ungetbyte, rb_io_ungetc): allows nil to reset EOFnobu
flag with ungetting nothing. * ruby.c (load_file_internal): rests EOF flag to make possible to load from stdin after reading data. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21718 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-21* io.c (rb_io_ungetbyte, rb_io_ungetc): clears EOF flag.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21715 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-21* include/ruby/io.h (typedef struct rb_io_t):nobu
* io.c (flush_before_seek): * io.c (io_fillbuf): * io.c (io_fread): * io.c (io_getpartial): * ruby.c (load_file_internal): git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21709 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-15rdoc update.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21531 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-15 * io.c (pipe_open): revert a part of previous commit. it may be ausa
mistake. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21515 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-15* symbian/README.SYMBIAN: symbian support added. great appreciatematz
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-14* io.c (rb_io_wait_readable, rb_io_wait_writable): need rb_fd_ptr.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21504 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-14* io.c (appendline): reformed.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21503 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-14* io.c (rb_io_s_pipe): reduced nest of rb_ensure of main block.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21502 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-13 * io.c (io_reopen, rb_io_init_copy): should register fptr to pipe_listusa
when copying pipe fptr. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21495 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-13 * io.c (rb_io_close_read): call rb_io_fptr_cleanup() instead ofusa
fptr_finalize() because the fptr has special finalizser if it is a pipe. [ruby-dev:37757] (3) git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21492 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-13 * io.c (rb_io_initialize): workaround for Windows. [ruby-dev:37686]usa
(also see [ruby-dev:37721]) git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21491 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
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