summaryrefslogtreecommitdiff
path: root/ext/pty
AgeCommit message (Collapse)Author
2024-04-27ruby tool/update-deps --fix卜部昌平
2024-04-14[pty] Fix missing `or`Nobuyoshi Nakada
2024-04-14[pty] Fix `ptsname_r` fallbackNobuyoshi Nakada
If `posix_openpt` is available, also `ptsname` should be available.
2024-04-11[pty] Support `ptsname_r` of glibcNobuyoshi Nakada
Although glibc `ptsname_r` man page mentions Tru64 and HP-UX, this function appears to be declared obsolete on both.
2024-04-09[pty] Split `chfunc` into functions in stepsNobuyoshi Nakada
- start a new session - obtain the new controlling terminal - drop privileges - finally, `exec`
2024-04-07Fix a typo, missing `P` in `SETPGRP_VOID`Nobuyoshi Nakada
2024-04-04Revert "hijack SIGCHLD handler for internal use"Nobuyoshi Nakada
This reverts commit 054a412d540e7ed2de63d68da753f585ea6616c3. SIGCHLD `waidpid`, `waitpid_lock` and related code, have been removed at ruby/ruby#7527.
2023-12-18[DOC] Show `PTY.getpty` as an alias of `PTY.spawn`Nobuyoshi Nakada
`:nodoc:` directive does not work at method definition in C, and must be at the implementation function. That is, there is no way to make one method visible and another method sharing the implementation invisible at the same time.
2023-06-01Hide the usage of `rb_io_t` where possible. (#7880)Samuel Williams
This retries the compatible parts of the previously reverted PR so we can continue to update related code without breaking backwards compatibility. Notes: Merged-By: ioquatix <samuel@codeotaku.com>
2023-06-01Revert "Hide most of the implementation of `struct rb_io`. (#6511)"NARUSE, Yui
This reverts commit 18e55fc1e1ec20e8f3166e3059e76c885fc9f8f2. fix [Bug #19704] https://bugs.ruby-lang.org/issues/19704 This breaks compatibility for extension libraries. Such changes need a discussion.
2023-05-30Hide most of the implementation of `struct rb_io`. (#6511)Samuel Williams
* Add rb_io_path and rb_io_open_descriptor. * Use rb_io_open_descriptor to create PTY objects * Rename FMODE_PREP -> FMODE_EXTERNAL and expose it FMODE_PREP I believe refers to the concept of a "pre-prepared" file, but FMODE_EXTERNAL is clearer about what the file descriptor represents and aligns with language in the IO::Buffer module. * Ensure that rb_io_open_descriptor closes the FD if it fails If FMODE_EXTERNAL is not set, then it's guaranteed that Ruby will be responsible for closing your file, eventually, if you pass it to rb_io_open_descriptor, even if it raises an exception. * Rename IS_EXTERNAL_FD -> RUBY_IO_EXTERNAL_P * Expose `rb_io_closed_p`. * Add `rb_io_mode` to get IO mode. --------- Co-authored-by: KJ Tsanaktsidis <ktsanaktsidis@zendesk.com> Notes: Merged-By: ioquatix <samuel@codeotaku.com>
2023-02-28Update the depend filesMatt Valentine-House
Notes: Merged: https://github.com/ruby/ruby/pull/7310
2023-02-27Remove intern/gc.h from Make depsMatt Valentine-House
Notes: Merged: https://github.com/ruby/ruby/pull/7330
2023-02-08Extract include/ruby/internal/attr/packed_struct.hNobuyoshi Nakada
Split `PACKED_STRUCT` and `PACKED_STRUCT_UNALIGNED` macros into the macros bellow: * `RBIMPL_ATTR_PACKED_STRUCT_BEGIN` * `RBIMPL_ATTR_PACKED_STRUCT_END` * `RBIMPL_ATTR_PACKED_STRUCT_UNALIGNED_BEGIN` * `RBIMPL_ATTR_PACKED_STRUCT_UNALIGNED_END` Notes: Merged: https://github.com/ruby/ruby/pull/7268
2022-11-10Transition shape when object's capacity changesJemma Issroff
This commit adds a `capacity` field to shapes, and adds shape transitions whenever an object's capacity changes. Objects which are allocated out of a bigger size pool will also make a transition from the root shape to the shape with the correct capacity for their size pool when they are allocated. This commit will allow us to remove numiv from objects completely, and will also mean we can guarantee that if two objects share shapes, their IVs are in the same positions (an embedded and extended object cannot share shapes). This will enable us to implement ivar sets in YJIT using object shapes. Co-Authored-By: Aaron Patterson <tenderlove@ruby-lang.org> Notes: Merged: https://github.com/ruby/ruby/pull/6699
2022-10-02[DOC] RDoc changes for IO (#6458)Burdette Lamar
Moves Expect library doc into io.c. Changes certain links to local sections, now pointing to sections in doc/io_streams.rdoc. Removes local sections now superseded by sections in doc/io_streams.rdoc. Notes: Merged-By: BurdetteLamar <BurdetteLamar@Yahoo.com>
2022-09-21getenv: is in stdlib.h卜部昌平
getenv is a very basic function that has been in stdlib.h since ISO/IEC 9899:1990. There is absolutely zero need for us to redeclare. pty.c already includes stdlib.h out of the box so we need nothing. Notes: Merged: https://github.com/ruby/ruby/pull/6358
2022-08-18ext/pty/extconf.rb: Try libutil only on OpenBSDYusuke Endoh
icc now seems to provide libutil.so that is not related to pty. This extconf.rb wrongly finds it and adds `-lutil`, but `ruby -rpty` fails because it cannot find libutil.so on the runtime. http://rubyci.s3.amazonaws.com/icc-x64/ruby-master/log/20220815T210005Z.fail.html.gz ``` Exception raised: <#<LoadError: libutil.so: cannot open shared object file: No such file or directory - /home/chkbuild/chkbuild/tmp/build/20220815T210005Z/ruby/.ext/x86_64-linux/pty.so>> ``` This change makes extconf.rb check libutil only on OpenBSD. Notes: Merged: https://github.com/ruby/ruby/pull/6249
2022-07-21Expand tabs [ci skip]Takashi Kokubun
[Misc #18891] Notes: Merged: https://github.com/ruby/ruby/pull/6094
2022-04-13Update PTY.spawn's documentStan Lo
Passing the optional env hash to PTY.spawn has been supported for years, but it's never documented. More info: https://bugs.ruby-lang.org/issues/12312 Notes: Merged: https://github.com/ruby/ruby/pull/5786
2022-02-22[Feature #18249] Update dependenciesPeter Zhu
Notes: Merged: https://github.com/ruby/ruby/pull/5474
2022-01-18[Feature #18491] Drop support for HP-UXPeter Zhu
IA64 support was dropped in ticket #15894, so we can drop support for HP-UX. Notes: Merged: https://github.com/ruby/ruby/pull/5457
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