summaryrefslogtreecommitdiff
path: root/process.c
AgeCommit message (Collapse)Author
2022-04-13[ci skip] Fix docsPeter Zhu
2022-04-08Fix some RDoc links (#5778)Burdette Lamar
Notes: Merged-By: BurdetteLamar <BurdetteLamar@Yahoo.com>
2022-03-30Prefix ccan headers (#4568)Nobuyoshi Nakada
* Prefixed ccan headers * Remove unprefixed names in ccan/build_assert * Remove unprefixed names in ccan/check_type * Remove unprefixed names in ccan/container_of * Remove unprefixed names in ccan/list Co-authored-by: Samuel Williams <samuel.williams@oriontransfer.co.nz> Notes: Merged-By: ioquatix <samuel@codeotaku.com>
2022-03-07[DOC] Fix documentation typo for Process#clock_gettimeThierry Joyal
Fixes [Misc #18610] Notes: Merged: https://github.com/ruby/ruby/pull/5625
2022-02-19Use symbols for clock IDs if `clockid_t` is not numericNobuyoshi Nakada
Notes: Merged: https://github.com/ruby/ruby/pull/5574
2022-02-19Set static IDs to same name variablesNobuyoshi Nakada
Notes: Merged: https://github.com/ruby/ruby/pull/5574
2022-02-18Enhanced RDoc concerning command injection (#5537)Burdette Lamar
Clarifies security vulnerabilities for commands. Treats: Kernel.system Kernel.` (backtick) IO.popen IO.read IO.write IO.binread IO.binwrite IO.readlines IO.foreach Notes: Merged-By: BurdetteLamar <BurdetteLamar@Yahoo.com>
2022-01-21Accurately report VM memsizeKevin Newton
Currently the calculation only counts the size of the struct. This commit adds the size of the associated st tables, id tables, and linked lists. Still missing is the size of the ractors and (potentially) the size of the object space. Notes: Merged: https://github.com/ruby/ruby/pull/5428
2022-01-19[DOC] Enhanced Process.groups relatedNobuyoshi Nakada
* On some platforms (e.g., macOS), the user's default group access list may exceed `NGROUPS_MAX`. * Use upcase "GID" instead of "gid" for other than variable names.
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
2022-01-17Replace to RBOOL macroS-H-GAMELINKS
Notes: Merged: https://github.com/ruby/ruby/pull/5449
2021-12-15[DOC] Fix docs rendering for Process._fork [ci skip]Matheus Richard
Co-authored-by: Nobuyoshi Nakada <nobu@ruby-lang.org> Notes: Merged: https://github.com/ruby/ruby/pull/5270 Merged-By: nobu <nobu@ruby-lang.org>
2021-11-09Some codes replace to `RBOOL` macro (#5023)S.H
* Some code replace and using RBOOL macro * Fix indent * Using RBOOL in syserr_eqq function Notes: Merged-By: nobu <nobu@ruby-lang.org>
2021-10-25process.c: Add Process._fork (#5017)Yusuke Endoh
* process.c: Add Process._fork This API is supposed for application monitoring libraries to hook fork event. [Feature #17795] Co-authored-by: Nobuyoshi Nakada <nobu@ruby-lang.org> Notes: Merged-By: mame <mame@ruby-lang.org>
2021-10-19Fill pid and error in the statusNobuyoshi Nakada
2021-09-22Rework order of operations to better handle last_status.Samuel Williams
Notes: Merged: https://github.com/ruby/ruby/pull/4595
2021-09-22Add support for non-blocking `Kernel.system`.Samuel Williams
Notes: Merged: https://github.com/ruby/ruby/pull/4595
2021-09-14Handle overwriting Object::ENV in spawnJeremy Evans
Instead of looking for Object::ENV (which can be overwritten), directly look for the envtbl variable. As that is static in hash.c, and the lookup code is in process.c, add a couple non-static functions that will return envtbl (or envtbl#to_hash). Fixes [Bug #18164] Notes: Merged: https://github.com/ruby/ruby/pull/4834
2021-09-05Replace RBOOL macroS-H-GAMELINKS
Notes: Merged: https://github.com/ruby/ruby/pull/4791
2021-08-28Add Windows as a supported OS for Process.clock_gettime [ci skip]Lars Kanis
Notes: Merged: https://github.com/ruby/ruby/pull/4782
2021-08-16`popen()` is not available on emscriptenNobuyoshi Nakada
Notes: Merged: https://github.com/ruby/ruby/pull/4745
2021-08-16Suppress unused-variable warningsNobuyoshi Nakada
Notes: Merged: https://github.com/ruby/ruby/pull/4745
2021-08-03[DOC] mention how the command is passed to the shell [ci skip]Nobuyoshi Nakada
2021-07-31[DOC] Fix Process::exec documentation [ci skip]Nobuyoshi Nakada
Shell reserved words and special built-in commands can be placed at only the beginning of the command (except for leading white spaces).
2021-07-30[DOC] Fix Process::exec documentation [ci skip]Nobuyoshi Nakada
The environment variable `RUBYSHELL` is used only on Windows, as well as `COMSPEC`. Notes: Merged: https://github.com/ruby/ruby/pull/4694
2021-07-22Remove unneeded function declarationsS.H
Notes: Merged: https://github.com/ruby/ruby/pull/4665 Merged-By: nobu <nobu@ruby-lang.org>
2021-07-15process.c: Call rb_thread_atfork in rb_fork_rubyYusuke Endoh
All occurrences of rb_fork_ruby are followed by a call rb_thread_fork in the created child process. This is refactoring and a potential preparation for [Feature #17795]. (rb_fork_ruby may be wrapped by Process._fork_.)
2021-07-01Replace copy coroutine with pthread implementation.Samuel Williams
2021-02-09Expose scheduler as public interface & bug fixes. (#3945)Samuel Williams
* Rename `rb_scheduler` to `rb_fiber_scheduler`. * Use public interface if available. * Use `rb_check_funcall` where possible. * Don't use `unblock` unless the fiber was non-blocking. Notes: Merged-By: ioquatix <samuel@codeotaku.com>
2020-12-24Updated access to Process::Status attributesNobuyoshi Nakada
pst_pid() no longer returns Qnil even if the receiver is not initialized.
2020-12-24Store errno in struct rb_process_statusNobuyoshi Nakada
To propagate errno in the fiber thread scheduler hook. Returns nil when no terminated process. Notes: Merged: https://github.com/ruby/ruby/pull/3998
2020-12-22Struct::Tms: delete卜部昌平
Has been deprecated since 44c53ee473d3b3973cb5c3ce03fbf4f280fd75ff. Notes: Merged: https://github.com/ruby/ruby/pull/3969
2020-12-21Fixed indefinite articles before "Integer" [ci skip]Nobuyoshi Nakada
2020-12-19Remove unused variableRadosław Bułat
Notes: Merged: https://github.com/ruby/ruby/pull/3934
2020-12-18Revert "Better cooperation between public/protected/private with attr* and ↵Yusuke Endoh
alias_method" This reverts commit 81739ad4fdfcc86a769056fec352f27c686fba1b.
2020-12-17Better cooperation between public/protected/private with attr* and alias_methodRadosław Bułat
Notes: Merged: https://github.com/ruby/ruby/pull/3757
2020-12-16Fixed marshal compatibility of Process::StatusNobuyoshi Nakada
2020-12-12[DOC] Process::Status.wait return nil if no child processes [ci skip]Nobuyoshi Nakada
2020-12-11RDoc states that Process::Status.wait returns nil if cannot waitNobuyoshi Nakada
2020-12-11[DOC] Fixed the RDoc location of Process::Status.wait [ci skip]Nobuyoshi Nakada
2020-12-11[DOC] Moved RDoc of abort [ci skip]Nobuyoshi Nakada
2020-12-09Tweaked `Process::Status.wait`Nobuyoshi Nakada
* revert `rb_last_status_set` * renamed the new function as `rb_process_status_new` * `rb_process_status_new` always freezes the return value * marked `Process::Status.wait` as EXPERIMENTAL, as it has not been discussed totally yet.
2020-12-09Add support for non-blocking `Process.wait`.Samuel Williams
Notes: Merged: https://github.com/ruby/ruby/pull/3853
2020-12-07Revert getaddrinfo_a()Masaki Matsushita
getaddrinfo_a() gets stuck after fork(). To avoid this, we need 1 second sleep to wait for internal worker threads of getaddrinfo_a() to be finished, but that is unacceptable. [Bug #17220] [Feature #17134] [Feature #17187]
2020-12-06Call cleanup function for getaddrinfo_a(3) only before fork()Masaki Matsushita
Previously, rb_getaddrinfo_a_before_exec() is called from before_exec(). However, the function needs to be called only before fork(). The change moves it to before_fork().
2020-12-04Add a hook before fork() for getaddrinfo_a()Masaki Matsushita
We need stop worker threads in getaddrinfo_a() before fork(). This change adds a hook before fork() that cancel all outstanding requests and wait for all ongoing requests. Then, it waits for all worker threads to be finished. Fixes [Bug #17220]
2020-11-22Remove obsoleted internal/mjit.h inclusionTakashi Kokubun
:bow:
2020-11-18fix public interfaceKoichi Sasada
To make some kind of Ractor related extensions, some functions should be exposed. * include/ruby/thread_native.h * rb_native_mutex_* * rb_native_cond_* * include/ruby/ractor.h * RB_OBJ_SHAREABLE_P(obj) * rb_ractor_shareable_p(obj) * rb_ractor_std*() * rb_cRactor and rm ractor_pub.h and rename srcdir/ractor.h to srcdir/ractor_core.h (to avoid conflict with include/ruby/ractor.h) Notes: Merged: https://github.com/ruby/ruby/pull/3775
2020-11-07Rename to `Fiber#set_scheduler`.Samuel Williams
Notes: Merged: https://github.com/ruby/ruby/pull/3742
2020-10-27freeze Process::StatusKoichi Sasada
It seems immutable information. Notes: Merged: https://github.com/ruby/ruby/pull/3671