summaryrefslogtreecommitdiff
path: root/ext/pty
AgeCommit message (Collapse)Author
2021-11-21Update dependenciesNobuyoshi Nakada
2021-10-05ruby tool/update-deps --fix卜部昌平
Notes: Merged: https://github.com/ruby/ruby/pull/4909
2021-04-13dependency updates卜部昌平
Notes: Merged: https://github.com/ruby/ruby/pull/4371
2021-02-08Revert a part of "[DOC] refined" [ci skip]Nobuyoshi Nakada
This reverts commit 478716f49a19cdd86f629c6a0673c1ff53630c96 partially -- "Removed unnecessary parentheses" part -- because of a lambda, see 9e25eb308d4fae9a10e120c2b4601916cc38336c.
2021-02-07[DOC] refinedNobuyoshi Nakada
* Adjusted indentation in license section, and used "(c)" * Commented out invalid syntax to enable highlighting * Removed unnecessary parentheses
2021-01-05[DOC] Fix grammar: "is same as" -> "is the same as"Marcus Stollsteimer
2020-08-27sed -i '/rmodule.h/d'卜部昌平
Notes: Merged: https://github.com/ruby/ruby/pull/3347
2020-08-27sed -i '/r_cast.h/d'卜部昌平
Notes: Merged: https://github.com/ruby/ruby/pull/3346
2020-08-27sed -i '\,2/extern.h,d'卜部昌平
Notes: Merged: https://github.com/ruby/ruby/pull/3338
2020-08-24Update PTY.open documentation to document it yields a single argument [ci skip]Jeremy Evans
For a regular block, accepting two arguments is fine as the array will be autosplatted. However, a lambda that accepts two arguments will not work. We could change the implementation to yield two arguments instead of an array with a single argument, but that would be less backwards compatible. I'm only changing the call-seq to be precise, other examples pass a literal block that accepts two arguments, and I left those alone as that will be the most common usage. Fixes [Bug #17094]
2020-07-28Use https instead of httpKazuhiro NISHIYAMA
2020-05-11sed -i 's|ruby/impl|ruby/internal|'卜部昌平
To fix build failures. Notes: Merged: https://github.com/ruby/ruby/pull/3079
2020-05-11sed -i s|ruby/3|ruby/impl|g卜部昌平
This shall fix compile errors. Notes: Merged: https://github.com/ruby/ruby/pull/3079
2020-05-01[pty] do not check openpty twice if found in util libraryNobuyoshi Nakada
2020-04-08Merge pull request #2991 from shyouhei/ruby.h卜部昌平
Split ruby.h Notes: Merged-By: shyouhei <shyouhei@ruby-lang.org>
2019-12-31Updated dependencies on internal/warnings.hNobuyoshi Nakada
Needed for `UNALIGNED_MEMBER_ACCESS` using `COMPILER_WARNING_`* macros. Notes: Merged: https://github.com/ruby/ruby/pull/2799
2019-12-26update dependencies卜部昌平
Notes: Merged: https://github.com/ruby/ruby/pull/2711
2019-12-26decouple internal.h headers卜部昌平
Saves comitters' daily life by avoid #include-ing everything from internal.h to make each file do so instead. This would significantly speed up incremental builds. We take the following inclusion order in this changeset: 1. "ruby/config.h", where _GNU_SOURCE is defined (must be the very first thing among everything). 2. RUBY_EXTCONF_H if any. 3. Standard C headers, sorted alphabetically. 4. Other system headers, maybe guarded by #ifdef 5. Everything else, sorted alphabetically. Exceptions are those win32-related headers, which tend not be self- containing (headers have inclusion order dependencies). Notes: Merged: https://github.com/ruby/ruby/pull/2711
2019-08-27rb_ensure now free from ANYARGS卜部昌平
After 5e86b005c0f2ef30df2f9906c7e2f3abefe286a2, I now think ANYARGS is dangerous and should be extinct. This commit deletes ANYARGS from rb_ensure, which also revealed many arity / type mismatches.
2019-07-14Include ruby/assert.h in ruby/ruby.h so that assertions can be thereNobuyoshi Nakada
2019-03-06Fix PTY.open on OpenBSD [Bug #15607]naruse
From: Jeremy Evans <code@jeremyevans.net> git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67183 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-02-08Removed moving toplevel header since r12501nobu
Moving public headers was 12-years ago, no depend files would expect ruby.h in the top source directory now. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67033 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-11-16[doc] Fix grammar typo in Pty_init() docstring [ci skip]k0kubun
[Fix GH-2014] From: Olle Jonsson <olle.jonsson@gmail.com> git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65758 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-09-18pty.c: typonobu
* ext/pty/pty.c (chfunc): fix a typo of an operator. pointed out by jaruga (Jun Aruga) at [ruby-core:89058]. [Bug #15116] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64771 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-09-18pty.c: more difensivenobu
* ext/pty/pty.c (chfunc): should not close the slave fd if it is 0..2. [ruby-core:89043] [Bug #15116] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64766 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-07-24UNREACHABLE_RETURNnobu
* include/ruby/ruby.h (UNREACHABLE_RETURN): UNREACHABLE at the end of non-void functions. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64025 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-07-22Remove needless `nacl` checkkazu
`nacl` support already removed by https://github.com/ruby/ruby/pull/1726. [Fix GH-1920] From: yuuji.yaginuma <yuuji.yaginuma@gmail.com> git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64013 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-07-05unrevert r63852 but keep SIGCHLD path disabled for win32normal
Reading win32/win32.c waitpid implementation, maybe waitpid(-1, ...) on that platform will never conflict with mjit use of waitpid. In any case, I've added WAITPID_USE_SIGCHLD macro to vm_core.h so it can be easy for Linux/BSD users to test (hopefully!) win32-compatible code. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63855 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-07-04Revert r63758 and related commitsnaruse
The change is unstable on Windows. Please re-commit it when it correctly supports Windows. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63852 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-06-27hijack SIGCHLD handler for internal usenormal
Use a global SIGCHLD handler to guard all callers of rb_waitpid. To work safely with multi-threaded programs, we introduce a VM-wide waitpid_lock to be acquired BEFORE fork/vfork spawns the process. This is to be combined with the new ruby_waitpid_locked function used by mjit.c in a non-Ruby thread. Ruby-level SIGCHLD handlers registered with Signal.trap(:CHLD) continues to work as before and there should be no regressions in any existing use cases. Splitting the wait queues for PID > 0 and groups (PID <= 0) ensures we favor PID > 0 callers. The disabling of SIGCHLD in rb_f_system is longer necessary, as we use deferred signal handling and no longer make ANY blocking waitpid syscalls in other threads which could "beat" the waitpid call made by rb_f_system. We prevent SIGCHLD from firing in normal Ruby Threads and only enable it in the timer-thread, to prevent spurious wakeups from in test/-ext-/gvl/test_last_thread.rb with MJIT enabled. I've tried to guard as much of the code for RUBY_SIGCHLD==0 using C "if" statements rather than CPP "#if" so to reduce the likelyhood of portability problems as the compiler will see more code. We also work to suppress false-positives from Process.wait(-1, Process::WNOHANG) to quiets warnings from spec/ruby/core/process/wait2_spec.rb with MJIT enabled. Lastly, we must implement rb_grantpt for ext/pty. We need a MJIT-compatible way of supporting grantpt(3) which may spawn the `pt_chown' binary and call waitpid(2) on it. [ruby-core:87605] [Ruby trunk Bug#14867] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63758 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-05-23ext/pty/pty.c: I_FIND before I_PUSH if possiblengoto
* ext/pty/pty.c: Check whether each STREAMS module is already pushed or not by using I_FIND ioctl call, before pushing it by using I_PUSH. Solved test failure on Solaris. On a Solaris 10 machine, ioctl I_PUSH "ldterm" twice was the cause of duplicated "\r". [Bug #14786] [ruby-dev:50552] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63495 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-01-24process.c: add :exception option to Kernel.#systemk0kubun
to raise error when it fails. [Feature 14386] [GH-1795] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62025 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-01-09Include ruby/{io,encoding}.h before internal.hkazu
because of r61712 and r61713 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61725 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-10-21Replace `to_a[1..-1]` on a MatchData with `captures`knu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60228 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-10-21Remove redundant calls of String#chrknu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60227 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-09-27pty.c: shrink repeated device namesnobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60044 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-22ruby tool/update-deps --fixshyouhei
Onigumo 6 (r57045) introduced new onigumo.h header file, which is required from quite much everywhere. This commit adds necessary dependencies. Note: ruby/oniguruma.h now includes onigumo.h, ruby/io.h includes oniguruma.h, ruby/encoding.h also includes oniguruma.h, and internal.h includes encoding.h. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58054 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-02-04ext/pty: Specify frozen_string_literal: true.kazu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57527 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-04-30pty.c: dry upnobu
* ext/pty/pty.c (establishShell): gather initializations by the default shell path. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54823 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-04-30pty.c: user shellnobu
* ext/pty/pty.c (establishShell): honor USER environment variable and login name over uid, one pid can be shared by some login names. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54822 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-04-30pty.c: portabilitiesnobu
* ext/pty/pty.c (no_mesg): define only if used. * ext/pty/pty.c (pty_check): some flags may not be defined. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54820 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-04-11Update dependencies.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54544 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-18* ext/pty/pty.c: fix double words typo.hsbt
[ci skip][fix GH-1157] Patch by @jwworth git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53176 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-16handle ext/ as r53141naruse
g -L frozen_string_literal ext/**/*.rb|xargs ruby -Ka -e'ARGV.each{|fn|puts fn;open(fn,"r+"){|f|s=f.read.sub(/\A(#!.*\n)?(#.*coding.*\n)?/,"\\&# frozen_string_literal: false\n");f.rewind;f.write s}}' git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53143 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-07-19pty.c: fix example typo [ci skip]nobu
* ext/pty/pty.c: [DOC] fix example typo, an old name at move from PTY.open. [Fix GH-972] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51297 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-04-09* internal.h (rb_execarg_parent_end): Declared.akr
* process.c: "spawn" opens files in the parent process. (check_exec_redirect): Add an placeholder for fd in parameters for fd_open. (check_exec_fds_1): Delete fd_open condition. (check_exec_fds): Don't call check_exec_fds_1 with fd_open. (rb_execarg_parent_start): Open files specified as "spawn" options and add "dup2" options. (rb_execarg_parent_end): New function to close opened fds. (run_exec_open): Removed. (rb_execarg_run_options): Don't call run_exec_open. (rb_spawn_internal): Call rb_execarg_parent_end. * io.c (pipe_open): Call rb_execarg_parent_end. * ext/pty/pty.c (establishShell): Call rb_execarg_parent_end. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50194 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-04-09* internal.h (rb_execarg_parent_start): Renamed from rb_execarg_fixup.akr
* process.c: Follows the above change. * io.c: Ditto. * ext/pty/pty.c: Ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50193 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-02-27* ext/pty/pty.c: AIX supports autopush. Patch by Perry Smith ↵odaira
[ruby-core:58539] [Bug #9144] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49776 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-01-11[DOC]akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49213 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-19Update dependencies.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48898 b2dd03c8-39d4-4d8f-98ff-823fe69b080e