| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
Include the failed clock argument in the error message from
`Process.clock_gettime` and `Process.clock_getres`.
|
|
|
|
|
|
| |
Since Ruby 2.7 it prints the message and backtrace of $!
Fixes [Bug #19578]
|
|
|
|
|
|
|
|
| |
This reverts commit 87253d047ce35e7836b6f97edbb4f819879a3b25.
Revert "Implement `Process.warmup`"
This reverts commit ba6ccd871442f55080bffd53e33678c0726787d2.
|
|
|
|
|
|
|
|
|
|
|
|
| |
[Feature #18885]
For now, the optimizations performed are:
- Run a major GC
- Compact the heap
- Promote all surviving objects to oldgen
Other optimizations may follow.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
[Feature #19443]
Until recently most libc would cache `getpid()` so this was a cheap check to make.
However as of glibc version 2.25 the PID cache is removed and calls to getpid() always
invoke the actual system call which significantly degrades the performance of existing applications.
The reason glibc removed the cache is that some libraries were bypassing fork(2)
by issuing system calls themselves, causing stale cache issues.
That isn't a concern for Ruby as bypassing MRI's primitive for forking would
render the VM unusable, so we can safely cache the PID.
|
|
|
|
|
|
|
| |
rb_pid_t is 32 bits on some platforms, which will cause a warning on GCC
due to POSFIXABLE always returning true.
include/ruby/internal/arithmetic/fixnum.h:43:31: warning: comparison is always true due to limited range of data type [-Wtype-limits]
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
[Feature #19443]
It's not uncommon for database client and similar network libraries
to protect themselves from Process.fork by regularly checking Process.pid
Until recently most libc would cache `getpid()` so this was a cheap
check to make.
However as of glibc version 2.25 the PID cache is removed and calls to
`getpid()` always invoke the actual system call which significantly degrades
the performance of existing applications.
The reason glibc removed the cache is that some libraries were bypassing
`fork(2)` by issuing system calls themselves, causing stale cache issues.
That isn't a concern for Ruby as bypassing MRI's primitive for forking
would render the VM unusable, so we can safely cache the PID.
|
|
|
|
|
|
|
| |
* Remove `waitpid_lock` and related code.
* Remove un-necessary test.
* Remove `rb_thread_sleep_interruptible` dead code.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Revert "Remove special handling of `SIGCHLD`. (#7482)"
This reverts commit 44a0711eab7fbc71ac2c8ff489d8c53e97a8fe75.
* Revert "Remove prototypes for functions that are no longer used. (#7497)"
This reverts commit 4dce12bead3bfd91fd80b5e7195f7f540ffffacb.
* Revert "Remove SIGCHLD `waidpid`. (#7476)"
This reverts commit 1658e7d96696a656d9bd0a0c84c82cde86914ba2.
* Fix change to rjit variable name.
|
| |
|
| |
|
|
|
|
|
|
|
| |
* Remove `waitpid_lock` and related code.
* Remove un-necessary test.
* Remove `rb_thread_sleep_interruptible` dead code.
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
| |
The last part of the sentence was accidentally put in enumeration, It
made an impression that it's one of the rules, not the result of
applying the rules.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Replacing `...` with `*pids` seems to clarify the expected variadic arguments.
Note that the expected arguments are two or more with a signal and pids.
That is, the method must have at least one pid, which cannot be omitted:
```console
% ruby -e 'Process.kill(0)'
-e:1:in `kill': wrong number of arguments (given 1, expected 2+) (ArgumentError)
from -e:1:in `<main>'
```
|
| |
|
|
|
|
|
|
| |
The forked child process is a grandchild process from the viewpoint of
the process which invoked the caller process. That means the child is
detached at that point, and it does not need to fork twice.
|
|
|
|
|
|
|
|
|
|
|
| |
First, rb_mjit_fork should call rb_thread_atfork to stop threads after
fork in the child process. Unfortunately, we cannot use rb_fork_ruby to
prevent this kind of mistakes because MJIT needs special handling of
waiting_pid and mjit_pause/resume.
Second, mjit_waitpid_finished should be checked regardless of
trap_interrupt. It doesn't seem like the flag is not set when SIGCHLD is
handled for an MJIT child process.
|
|
|
|
| |
This takes care of signal_self_pipe and other things.
|
| |
|
|
|
|
|
|
| |
The argument of `rb_syswait` is now `rb_pid_t` which may differ from
`int`. Also it is an undefined behavior to take the result of casted
void function (in `rb_protect`).
|
|
|
|
| |
`proc_syswait` will be called with a `VALUE` argument.
|
|
|
|
|
|
|
|
|
| |
As discussed in [Bug #18911], I'm adding some documentation to
`Process._fork` to clarify that it is not expected to cover
calls to `Process.daemon`.
[Bug #18911]: https://bugs.ruby-lang.org/issues/18911
Co-authored-by: Yusuke Endoh <mame@ruby-lang.org>
|
|
|
|
| |
[Misc #18891]
|
| |
|
| |
|
|
|
| |
[Misc #18830]
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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>
|
|
|
|
| |
Fixes [Misc #18610]
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Clarifies security vulnerabilities for commands.
Treats:
Kernel.system
Kernel.` (backtick)
IO.popen
IO.read
IO.write
IO.binread
IO.binwrite
IO.readlines
IO.foreach
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
* 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.
|
|
|
|
|
| |
IA64 support was dropped in ticket #15894, so we can drop support for
HP-UX.
|
| |
|
|
|
| |
Co-authored-by: Nobuyoshi Nakada <nobu@ruby-lang.org>
|
|
|
|
|
|
|
| |
* Some code replace and using RBOOL macro
* Fix indent
* Using RBOOL in syserr_eqq function
|