summaryrefslogtreecommitdiff
path: root/process.c
AgeCommit message (Collapse)Author
2024-01-29[DOC] Move "Execution Shell on Windows" under "Execution Shell"Nobuyoshi Nakada
2024-01-24[DOC] Elaborate exceptional behaviors on WindowsNobuyoshi Nakada
2024-01-24[DOC] Tips for space containing `exe_path`Nobuyoshi Nakada
2024-01-24[DOC] Add Argument `args` subsectionNobuyoshi Nakada
2024-01-24[DOC] Separate standard shells per platformsNobuyoshi Nakada
2024-01-24[DOC] Move `exe_path` example to `Process` module documentNobuyoshi Nakada
Exchanged with `Kernel.spawn`, like as `Kernel.exec` and `Kernel.system`. This description should be common for these methods.
2024-01-24[DOC] Correction for Process.spawn docBurdette Lamar
2024-01-21[DOC] `echo` command may not be a shell built-inNobuyoshi Nakada
2024-01-12s/SafeStringValue/StringValue/Xavier Noria
The macro SafeStringValue() became just StringValue() in c5c05460ac2, and it is deprecated nowadays. This patch replaces remaining macro usage. Some occurrences are left in ext/stringio and ext/win32ole, they should be fixed upstream. The macro itself is not deleted, because it may be used in extensions.
2024-01-01[DOC] Fix wrong description about Process.waitpid2 (#9401)Takuya Aramaki
2023-12-25Resurrect a deprecated code for fixing tests for nowTakashi Kokubun
Revert "Remove deprecated code to fix RUBY_DEBUG build failures" This reverts commit 9614bea2cd59902a051a7387e354e23a52fe5396. And changed 3.4 to 3.5. To be fixed properly later.
2023-12-25Remove deprecated code to fix RUBY_DEBUG build failuresTakashi Kokubun
2023-12-20KQueue support for M:N threadsJP Camara
* Allows macOS users to use M:N threads (and technically FreeBSD, though it has not been verified on FreeBSD) * Include sys/event.h header check for macros, and include sys/event.h when present * Rename epoll_fd to more generic kq_fd (Kernel event Queue) for use by both epoll and kqueue * MAP_STACK is not available on macOS so conditionall apply it to mmap flags * Set fd to close on exec * Log debug messages specific to kqueue and epoll on creation * close_invalidate raises an error for the kqueue fd on child process fork. It's unclear rn if that's a bug, or if it's kqueue specific behavior Use kq with rb_thread_wait_for_single_fd * Only platforms with `USE_POLL` (linux) had changes applied to take advantage of kernel event queues. It needed to be applied to the `select` so that kqueue could be properly applied * Clean up kqueue specific code and make sure only flags that were actually set are removed (or an error is raised) * Also handle kevent specific errnos, since most don't apply from epoll to kqueue * Use the more platform standard close-on-exec approach of `fcntl` and `FD_CLOEXEC`. The io-event gem uses `ioctl`, but fcntl seems to be the recommended choice. It is also what Go, Bun, and Libuv use * We're making changes in this file anyways - may as well fix a couple spelling mistakes while here Make sure FD_CLOEXEC carries over in dup * Otherwise the kqueue descriptor should have FD_CLOEXEC, but doesn't and fails in assert_close_on_exec
2023-12-14[DOC] Adjust some new features wording/examples. (#9183)Victor Shepelev
* Reword Range#overlap? docs last paragraph. * Docs: add explanation about Queue#freeze * Docs: Add :rescue event docs for TracePoint * Docs: Enhance Module#set_temporary_name documentation * Docs: Slightly expand Process::Status deprecations * Fix MatchData#named_captures rendering glitch * Improve Dir.fchdir examples * Adjust Refinement#target docs
2023-11-22Embed exec_arg objectsJean Boussier
They are very ephemeral, so avoiding the malloc churn is desirable.
2023-11-21Make Process::Status embeddedJean Boussier
These are not very common, but they're very easy to convert.
2023-11-08[DOC] RDoc for module Process (#8847)Burdette Lamar
2023-11-06Align comment [ci skip]Nobuyoshi Nakada
2023-10-12M:N thread scheduler for RactorsKoichi Sasada
This patch introduce M:N thread scheduler for Ractor system. In general, M:N thread scheduler employs N native threads (OS threads) to manage M user-level threads (Ruby threads in this case). On the Ruby interpreter, 1 native thread is provided for 1 Ractor and all Ruby threads are managed by the native thread. From Ruby 1.9, the interpreter uses 1:1 thread scheduler which means 1 Ruby thread has 1 native thread. M:N scheduler change this strategy. Because of compatibility issue (and stableness issue of the implementation) main Ractor doesn't use M:N scheduler on default. On the other words, threads on the main Ractor will be managed with 1:1 thread scheduler. There are additional settings by environment variables: `RUBY_MN_THREADS=1` enables M:N thread scheduler on the main ractor. Note that non-main ractors use the M:N scheduler without this configuration. With this configuration, single ractor applications run threads on M:1 thread scheduler (green threads, user-level threads). `RUBY_MAX_CPU=n` specifies maximum number of native threads for M:N scheduler (default: 8). This patch will be reverted soon if non-easy issues are found. [Bug #19842]
2023-10-03[DOC] State the precision of `Process.times` as platform-definedNobuyoshi Nakada
Remove the bad example that can lead to misunderstanding as if this precision is defined in Ruby.
2023-10-01[DOC] Another example for spawn (#8575)Burdette Lamar
2023-09-27[DOC] Fix minor inconsistenciesBurdetteLamar
2023-09-26[DOC] Fix link in process.cPeter Zhu
2023-09-26[DOC] Refactor doc in process.cBurdetteLamar
2023-09-15Process.warmup: invoke `malloc_trim` if availableJean Boussier
Similar to releasing free GC pages, releasing free malloc pages reduce the amount of page faults post fork.
2023-09-14[Bug #19868] Deprecate `Process::Status#&` and `Process::Status#>>`Nobuyoshi Nakada
Notes: Merged: https://github.com/ruby/ruby/pull/8392
2023-09-14[Bug #19868] Suggest other Process::Status method for `&` and `>>`Nobuyoshi Nakada
`Process::Status#&` and `Process::Status#>>` are provided only for the backward compatibility with older Ruby than 1.8 where `$?` was a `Fixnum`, and the knowledge about internals of system dependent macros is necessary to use them. Modern programs and libraries should not need these methods. Notes: Merged: https://github.com/ruby/ruby/pull/8392
2023-09-14Negative value to Process::Status method for compatibilityNobuyoshi Nakada
Notes: Merged: https://github.com/ruby/ruby/pull/8392
2023-09-12[DOC] RDoc for Process::Status (#8416)Burdette Lamar
Notes: Merged-By: peterzhu2118 <peter@peterzhu.ca>
2023-09-07[DOC] Fix up Process::Status#>>Nobuyoshi Nakada
2023-09-06[DOC] Rdoc for Process::Status (#8386)Burdette Lamar
Notes: Merged-By: peterzhu2118 <peter@peterzhu.ca>
2023-09-05[DOC] Fix for RDoc for Process.kill (#8370)Burdette Lamar
Notes: Merged-By: peterzhu2118 <peter@peterzhu.ca>
2023-09-05[DOC] Fix up markupNobuyoshi Nakada
2023-09-05[DOC] Fix signal listNobuyoshi Nakada
- Signal names can be symbols, as stated above. - Supported signals and those values are platform dependent. - Key sequences to send signal are configurable. - Fix description of signal 0. Co-authored-by: Peter Zhu <peter@peterzhu.ca> Notes: Merged: https://github.com/ruby/ruby/pull/8367 Merged-By: nobu <nobu@ruby-lang.org>
2023-09-04[DOC] RDoc for process.c (#8366)Burdette Lamar
Notes: Merged-By: peterzhu2118 <peter@peterzhu.ca>
2023-09-03[DOC] Process doc (#8363)Burdette Lamar
Notes: Merged-By: peterzhu2118 <peter@peterzhu.ca>
2023-09-02[DOC] RDoc for process.cBurdetteLamar
Notes: Merged: https://github.com/ruby/ruby/pull/8361
2023-09-02[DOC] RDoc for process.c (#8358)Burdette Lamar
Notes: Merged-By: peterzhu2118 <peter@peterzhu.ca>
2023-09-02[DOC] RDoc for process.c (#8353)Burdette Lamar
Notes: Merged-By: peterzhu2118 <peter@peterzhu.ca>
2023-08-31[DOC] RDoc for #spawn (#8342)Burdette Lamar
Notes: Merged-By: peterzhu2118 <peter@peterzhu.ca>
2023-08-31[DOC] RDoc for Kernel#system (#8309)Burdette Lamar
Notes: Merged-By: peterzhu2118 <peter@peterzhu.ca>
2023-08-29Expose `rb_process_status_wait` and hide `rb_process_status_waitv`. (#8316)Samuel Williams
Notes: Merged-By: ioquatix <samuel@codeotaku.com>
2023-08-29Validate the typed data before dereferencing the internal struct. (#8315)Samuel Williams
Notes: Merged-By: ioquatix <samuel@codeotaku.com>
2023-08-27[DOC] More on method exec (#8302)Burdette Lamar
Notes: Merged-By: peterzhu2118 <peter@peterzhu.ca>
2023-08-27Free all empty heap pages in Process.warmupPeter Zhu
This commit adds `free_empty_pages` which frees all empty heap pages and moves the number of pages freed to the allocatable pages counter. This is used in Process.warmup to improve performance because page invalidation from copy-on-write is slower than allocating a new page. Notes: Merged: https://github.com/ruby/ruby/pull/8257
2023-08-24[DOC] RDoc for Process (#8282)Burdette Lamar
Notes: Merged-By: peterzhu2118 <peter@peterzhu.ca>
2023-08-24[DOC] Process doc (#8279)Burdette Lamar
Notes: Merged-By: peterzhu2118 <peter@peterzhu.ca>
2023-08-24Fix compile error on older systems without clock_get*Bo Anderson
Notes: Merged: https://github.com/ruby/ruby/pull/8256
2023-08-23[DOC] RDoc for Process (#8253)Burdette Lamar
Notes: Merged-By: peterzhu2118 <peter@peterzhu.ca>
2023-08-07[DOC] RDoc for Process (#8179)Burdette Lamar
Notes: Merged-By: peterzhu2118 <peter@peterzhu.ca>