summaryrefslogtreecommitdiff
path: root/ext/pty
AgeCommit message (Collapse)Author
2011-10-31* include/ruby/intern.h (rb_fd_fix_cloexec): renamed fromakr
rb_fd_set_cloexec. * io.c: follow the above renaming. * ext/pty/pty.c: ditto. * ext/socket/init.c: ditto. * ext/socket/socket.c: ditto. * ext/socket/ancdata.c: ditto. * ext/socket/unixsocket.c: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33585 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-10-31* ext/pty/pty.c (get_device_once): use O_CLOEXEC for posix_openpt ifakr
available. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33580 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-10-29* include/ruby/intern.h (rb_cloexec_dup): declared.akr
* io.c (rb_cloexec_dup): new function. (ruby_dup): use rb_cloexec_dup. * ext/pty/pty.c (pty_getpty): use rb_cloexec_dup. * ext/openssl/ossl_bio.c (ossl_obj2bio): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33553 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-10-29* process.c (ruby_setsid): use rb_cloexec_open.akr
(rb_daemon): ditto. * ruby.c (load_file_internal): ditto. * file.c (rb_file_s_truncate): ditto. (file_load_ok): ditto. * random.c (fill_random_seed): ditto. * ext/pty/pty.c (chfunc): ditto. (get_device_once): ditto. * ext/io/console/console.c (console_dev): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33550 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-10-24* ext/pty/pty.c (get_device_once): delay rb_fd_set_cloexec() untilakr
grantpt() on Solaris. grantpt() doesn't work with CLOEXEC on Solaris 10. reported by Naohisa GOTO. [ruby-dev:44688] [Bug #5475] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33519 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-10-22* include/ruby/intern.h (rb_fd_set_cloexec): declared.akr
* io.c (rb_fd_set_cloexec): new function. (ruby_dup): call rb_fd_set_cloexec to set close-on-exec flag. (rb_sysopen_internal): ditto. (rb_pipe): ditto. (io_reopen): ditto. (io_cntl): ditto. * process.c (rb_f_exec): change the default :close_others option to true. (rb_f_system): ditto. (move_fds_to_avoid_crash): call rb_fd_set_cloexec to set close-on-exec flag. (ruby_setsid): ditto. (rb_daemon): ditto. * thread_pthread.c (rb_thread_create_timer_thread): call rb_fd_set_cloexec to set close-on-exec flag. * ruby.c (load_file_internal): ditto. * file.c (rb_file_s_truncate): ditto. (file_load_ok): ditto. * random.c (fill_random_seed): ditto. * ext/pty/pty.c (chfunc): ditto. (get_device_once): ditto. * ext/openssl/ossl_bio.c (ossl_obj2bio): ditto. * ext/socket/init.c (rsock_socket): ditto. (rsock_s_accept_nonblock): ditto. (rsock_s_accept): ditto. * ext/socket/socket.c (rsock_sock_s_socketpair): ditto. * ext/socket/ancdata.c (discard_cmsg): ditto. (make_io_for_unix_rights): ditto. * ext/socket/unixsocket.c (unix_recv_io): ditto. * ext/io/console/console.c (console_dev): ditto. [ruby-core:38140] [Feature #5041] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33507 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-10-14* ext/pty/pty.c (pty_check): should return nil until the childnobu
terminates or stops. [ruby-dev:44600] [Bug #2642] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33468 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-08-26* ext/pathname/lib/pathname.rb: Fix typos and grammar mistakes. Patchdrbrain
by Luke Gruber. [#5203] * ext/pty/lib/expect.rb: ditto * lib/mathn.rb: ditto * lib/net/http.rb: ditto * lib/open-uri.rb: ditto * lib/ostruct.rb: ditto * lib/tempfile.rb: ditto * lib/thread.rb: ditto * lib/weakref.rb: ditto * sample/webrick/httpproxy.rb: ditto git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33086 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-07-20* include/ruby/intern.h (rb_update_max_fd): declaration moved fromakr
internal.h. * file.c: ditto. * io.c: call rb_update_max_fd for each new fds. * process.c: ditto. * random.c: ditto. * ruby.c: ditto. * ext/io/console/console.c: ditto. * ext/openssl/ossl_bio.c: ditto. * ext/pty/pty.c: ditto. * ext/socket/init.c: ditto. * ext/socket/socket.c: ditto. * ext/socket/ancdata.c: ditto. * ext/socket/unixsocket.c: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32587 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-05-31 * ext/pty/pty.c (pty_check): Restore "not reached" comment.drbrain
[Ruby 1.9 - Bug #4756] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31877 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-05-22* ext: remove trailing spaces.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31689 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-05-22 * ext/pty/pty.c: Improve documentaton. Patch by David Copeland.drbrain
[Ruby 1.9 - Bug #4756] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31688 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-05-15* remove trailing spaces.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31573 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-02-09* ext/pty/pty.c: parenthesize macro arguments.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30831 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-02-06* ext/pty/pty.c (chfunc): suppress a warning.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30808 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-12-25 * ext/pty/pty.c (chfunc): Added rb_thread_atfork_before_exec().kosaki
We must reinitialize GVL when new process creation. Otherwise we may meet an insane deadlock. [Bug #4121][ruby-dev:42686] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30350 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-09-02* ext/pty/pty.c (chfunc): pass through exceptions.nobu
* io.c (rb_io_bufwrite, rb_io_bufread): added. * process.c (rb_fork_err): protect from exceptions. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29171 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-09-02* ext/pty/pty.c (chfunc): restore errno from SystemCallError andnobu
propagate proper exception to the parent. [ruby-dev:41965] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29169 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-07.cvsignore: have not been used already. [Bug #3468]nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28898 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-07-13* ext/pty/pty.c (establishShell): chfunc must not raise anynobu
exceptions. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28627 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-06-23* ext/pty: moved documents and samples to the appropriate places.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28400 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-06-23* NEWS (ptr): new method and deprecated methods. [ruby-dev:41681]nobu
* ext/pty/{README,README.ja}: ditto. * ext/pty/pty.c (pty_check): add rdoc. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28399 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-05-09update doc.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27710 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-05-09revert previous doc. change.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27693 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-05-08update doc.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27674 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-04-09* ext/pty/lib/expect.rb: preserve buffer read, instead of discard.mame
based on a patch from Luiz Angelo Daros de Luca in [ruby-core:23464]. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27277 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-04-09* ext/pty/lib/expect.rb: raise an error when argument is unexpectedmame
type. based on a patch from Luiz Angelo Daros de Luca in [ruby-core:23464]. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27276 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-04-09* ext/pty/lib/expect.rb: add rdoc. based on a patch from Luiz Angelomame
Daros de Luca in [ruby-core:23464]. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27274 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-03-01* ext/pty/pty.c (pty_open): refine the path for master IO.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26790 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-02-28* ext/pty/pty.c (get_device_once): raise on error when fail isnobu
non-zero. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26786 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-01-25* ext/pty/pty.c (pty_check): needs WNOHANG to poll, return $?, andnobu
call raise_from_check() with pid_t. [ruby-dev:40141] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26402 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-06-26* ext/pty/pty.c (pty_getpty): check dup failure.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23861 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-05-22update rdoc.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23544 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-03-06* {ext,lib,test}/**/*.rb: removed trailing spaces.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22784 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-05* ext/pty/pty.c (chfunc): type fixed.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22084 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
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-18rdoc update.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20863 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-17rdoc update.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20852 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-17* ext/pty/extconf.rb: check util.h for OpenBSD.akr
* ext/pty/pty.c: include util.h if available. fix variable name. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20846 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-16* ext/pty/pty.c (getDevice): add nomesg argument.akr
(get_device_once): add nomesg argument. chmod slave tty to 0600 if nomesg. more error tests. (no_mesg): new function. (pty_open): make slave tty's mode 0600. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20795 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-16* ext/pty/extconf.rb: check posix_openpt.akr
* ext/pty/pty.c (get_device_once): use posix_openpt if available. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20793 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-15* ext/pty/pty.c (pty_open): set FMODE_SYNC and FMODE_DUPLEX.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20763 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-15* ext/pty/pty.c (pty_open): new method PTY.open.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20761 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-15* ext/pty/pty.c (get_device_once): use DEVICELEN instead ofakr
sizeof SlaveName. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20759 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-15* ext/pty/pty.c (chfunc): make it static.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20758 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-15* ext/pty/pty.c (child_info): add slavename.akr
(chfunc): use slavename. (establishShell): set slavename. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20757 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-13* process.c (forked_child): new variable.akr
(before_exec): don't call rb_thread_stop_timer_thread if forked_child. (after_exec): reset forked_child after rb_thread_start_timer_thread. (rb_fork): set forked_child just after fork in child. * ext/pty/pty.c (chfunc): extracted from establishShell. (establishShell): use rb_fork. [ruby-dev:37418] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20726 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-12-02* ext/pty/pty.c (Init_pty): fix typo.mame
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20449 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-11-21* ext/pty/pty.c (get_device_once): abandon asynchronous exceptionmatz
that might cause serious problem if a program terminated early. asynchronous exception is a very bad thing anyway. use Process.waitpid(pid) or PTY.check(pid) to poll program termination. if PTY.check is called with optional second argument being true, it raises an exception same as one from previous behavior. [incompatible] fix: [ruby-core:19583] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20298 b2dd03c8-39d4-4d8f-98ff-823fe69b080e