aboutsummaryrefslogtreecommitdiffstats
path: root/io.c
Commit message (Collapse)AuthorAgeFilesLines
* * io.c (Init_IO): add constant File::NOATIME. [ruby-core:23194]kazu2009-05-111-0/+3
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23392 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * io.c (pipe_open): should be rb_pid_t.nobu2009-05-071-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23355 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * io.c: fixed types.nobu2009-04-261-61/+85
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23289 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * io.c (io_reopen): keeps pathv for prep_stdio. [ruby-dev:38131]nobu2009-04-261-2/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23287 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * node.h (rb_notimplement_body_p): declared.akr2009-04-161-20/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * vm_method.c (Init_eval_method): suppress a warning. * io.c (rb_io_fsync): use rb_f_notimplement if not implemented. (rb_io_close_on_exec_p): ditto. (rb_io_set_close_on_exec): ditto. (rb_io_fcntl): ditto. (rb_f_syscall): ditto. * dir.c (dir_tell): ditto. (dir_seek): ditto. (dir_s_chroot): ditto. * process.c (proc_getpgrp): ditto. (proc_setpgrp): ditto. (proc_getpgid): ditto. (proc_setpgid): ditto. (proc_setsid): ditto. (proc_getpriority): ditto. (proc_setpriority): ditto. (proc_getrlimit): ditto. (proc_setrlimit): ditto. (p_sys_setuid): ditto. (p_sys_setruid): ditto. (p_sys_seteuid): ditto. (p_sys_setreuid): ditto. (p_sys_setresuid): ditto. (p_sys_setgid): ditto. (p_sys_setrgid): ditto. (p_sys_setegid): ditto. (p_sys_setregid): ditto. (p_sys_setreuid): ditto. (p_sys_setresgid): ditto. (p_sys_issetugid): ditto. (proc_getgroups): ditto. (proc_setgroups): ditto. (proc_initgroups): ditto. (proc_daemon): ditto. (rb_proc_times): ditto. * file.c (rb_file_s_lchown): ditto. (rb_file_s_link): ditto. (rb_file_s_symlink): ditto. (rb_file_s_readlink): ditto. (rb_file_s_truncate): ditto. (rb_file_truncate): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23197 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * thread.c (rb_thread_fd_select): new function to call selectmatz2009-04-011-5/+5
| | | | | | | | | | using rb_fdset_t. * io.c (select_internal): use rb_thread_fd_select instead of rb_thread_select. based on the patch from Kengo Matsuyama. [ruby-dev:38221] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23109 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* rdoc update.akr2009-03-281-0/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23092 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * io.c (rb_io_inspect): Cannot access fptr->fd if fptr is NULL.knu2009-03-241-1/+2
| | | | | | | | | This fixes a coredump caused by: ruby -e "class X < IO; def initialize; end; end; p X.new.inspect" git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23061 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * io.c (pipe_open): should pass program name even if multiplenobu2009-03-201-1/+1
| | | | | | | arguments are given. fix for TestProcess::test_argv0. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23022 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * io.c (rb_mWaitReadable): defined.akr2009-03-191-8/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (rb_mWaitWritable): defined. (io_getpartial): extend IO::WaitReadable on EWOULDBLOCK and EAGAIN. (rb_io_write_nonblock): extend IO::WaitWritable on EWOULDBLOCK and EAGAIN. * error.c (make_errno_exc): extracted from rb_sys_fail. (rb_mod_sys_fail): new function. * include/ruby/ruby.h (rb_mod_sys_fail): declared. (rb_mWaitReadable): declared. (rb_mWaitWritable): declared. * ext/socket/init.c (rsock_s_recvfrom_nonblock): extend IO::WaitReadable on EWOULDBLOCK and EAGAIN. (rsock_s_accept_nonblock): extend IO::WaitReadable on EWOULDBLOCK, EAGAIN, ECONNABORTED and EPROTO. * ext/socket/socket.c (sock_connect_nonblock): extend IO::WaitWritable on EINPROGRESS. * ext/socket/ancdata.c (bsock_sendmsg_internal): extend IO::WaitWritable on EWOULDBLOCK and EAGAIN. (bsock_recvmsg_internal): extend IO::WaitReadable on EWOULDBLOCK and EAGAIN. * ext/openssl/ossl_ssl.c (ossl_ssl_read_internal): raise SSLError extended by IO::WaitReadable/IO::WaitWritable on SSL_ERROR_WANT_READ/SSL_ERROR_WANT_WRITE. * ext/openssl/ossl.c (ossl_make_error): extracted from ossl_raise. (ossl_exc_new): new function. * ext/openssl/ossl.h (ossl_exc_new): declared. * lib/net/protocol.rb (rbuf_fill): rescue IO::WaitReadable and IO::WaitWritable. [ruby-core:22539], [ruby-dev:38140] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23006 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* rdoc update.akr2009-03-171-5/+5
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22994 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* rdoc update.akr2009-03-171-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22993 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* rdoc update.akr2009-03-171-4/+42
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22985 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * io.c (nogvl_copy_stream_read_write, copy_stream_body): use size_t.nobu2009-03-121-2/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22915 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * array.c, bignum.c, dln.c, error.c, gc.c, io.c, marshal.c,nobu2009-03-121-2/+2
| | | | | | | | | | numeric.c, pack.c, strftime.c, string.c, thread.c, transcode.c, transcode_data.h, util.c, variable.c, vm_dump.c, include/ruby/encoding.h, missing/crypt.c, missing/vsnprintf.c: suppress VC type warnings. [ruby-core:22726] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22914 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * io.c (copy_stream_fallback_body): off_t may be larger than long.nobu2009-03-111-3/+3
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22902 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * include/ruby/win32.h (rb_w32_wopen): prototype forgotten.usa2009-02-261-10/+4
| | | | | | | | | * io.c (rb_sysopen_internal): shouldn't replace undefined chars in this case. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22637 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * io.c (sysopen_func, rb_sysopen_internal, rb_sysopen): open fileusa2009-02-251-14/+46
| | | | | | | | | | | | | | | | | | | by UTF-16'ed filename on Windows. * io.c (rb_file_open_generic, rb_io_s_sysopen, rb_io_reopen, argf_next_argv): follow above change. * io.c (rb_scan_open_args): no longer need to convert filepath here on Windows. * win32/wio32.c (rb_w32_wopen): new function to open file by UTF-16'ed filename. * win32/win32.c (rb_w32_open): call rb_w32_open(). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22626 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * io.c (rb_io_getline_1): enables limit even if rs is given.nobu2009-02-251-15/+17
| | | | | | | [ruby-core:22434] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22610 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* rdoc update.akr2009-02-221-2/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22555 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* stripped trailing spaces.nobu2009-02-221-24/+24
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22552 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * io.c (io_getpartial): error message describes what should beakr2009-02-211-1/+7
| | | | | | | | | | | | | | | | | waited after nonblocking error. (rb_io_write_nonblock): ditto. * ext/socket/init.c (s_recvfrom_nonblock): ditto. (s_accept_nonblock): ditto. * ext/socket/socket.c (sock_connect_nonblock): ditto. * ext/socket/ancdata.c (bsock_sendmsg_internal): ditto. (bsock_recvmsg_internal): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22486 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * io.c (pipe_open): sarg is always used unless HAVE_FORK.nobu2009-02-181-2/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22398 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * io.c (rb_write_error2, argf_next_argv), process.c (rb_fork_err),nobu2009-02-181-4/+4
| | | | | | | random.c (fill_random_seed): suppress warnings. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22396 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * io.c (io_encoding_set): ignore second argument when external andnaruse2009-02-091-0/+4
| | | | | | internal are same. [ruby-dev:37939] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22146 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * io.c (rb_io_s_binread): ensures file path. [ruby-dev:37940]nobu2009-02-081-0/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22121 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * io.c (io_fread): use rb_io_wait_readable for retryakr2009-02-061-0/+3
| | | | | | | 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
* (pipe_open) [__SYMBIAN32__]: fixed compile time error azav2009-02-061-0/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22096 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * include/ruby/intern.h (rb_run_exec_options_err): renamed fromakr2009-02-051-8/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* rdoc update.akr2009-02-041-2/+0
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22037 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* rdoc update.akr2009-01-311-0/+11
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21910 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * revert previous revision. it's already out-of-date.usa2009-01-221-4/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21735 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * include/ruby/win32.h, win32/win32.c (rb_w32_is_valid_fd): new functionusa2009-01-221-2/+4
| | | | | | | | | | 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
* * io.c (rb_io_ungetbyte, rb_io_ungetc): allows nil to reset EOFnobu2009-01-211-2/+2
| | | | | | | | | | 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
* * io.c (rb_io_ungetbyte, rb_io_ungetc): clears EOF flag.nobu2009-01-211-1/+4
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21715 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * include/ruby/io.h (typedef struct rb_io_t):nobu2009-01-211-3/+15
| | | | | | | | | | | * 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
* rdoc update.akr2009-01-151-10/+13
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21531 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * io.c (pipe_open): revert a part of previous commit. it may be ausa2009-01-151-6/+3
| | | | | | | | mistake. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21515 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * symbian/README.SYMBIAN: symbian support added. great appreciatematz2009-01-151-3/+10
| | | | | | to <alexandre.zavorine at symbian.com>. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21513 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * io.c (rb_io_wait_readable, rb_io_wait_writable): need rb_fd_ptr.nobu2009-01-141-2/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21504 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * io.c (appendline): reformed.nobu2009-01-141-14/+9
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21503 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * io.c (rb_io_s_pipe): reduced nest of rb_ensure of main block.nobu2009-01-141-3/+7
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21502 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * io.c (io_reopen, rb_io_init_copy): should register fptr to pipe_listusa2009-01-131-0/+8
| | | | | | | | when copying pipe fptr. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21495 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * io.c (rb_io_close_read): call rb_io_fptr_cleanup() instead ofusa2009-01-131-1/+1
| | | | | | | | | 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
* * io.c (rb_io_initialize): workaround for Windows. [ruby-dev:37686]usa2009-01-131-0/+6
| | | | | | | | (also see [ruby-dev:37721]) git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21491 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * io.c (rb_close_before_exec): more heuristics to detect maximum fd.akr2009-01-051-1/+6
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21347 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * io.c (maygvl_copy_stream_wait_read): renamed to add prefix toakr2009-01-031-17/+17
| | | | | | | | | | | | | 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
* rdoc update.akr2008-12-311-0/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21213 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* update rdoc.akr2008-12-311-0/+5
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21211 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * io.c (copy_stream_body): don't check to_io becauseakr2008-12-311-4/+2
| | | | | | | 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