Mark cached pid if necessary
This commit is contained in:
parent
1aa2555044
commit
758e4db551
@ -9055,5 +9055,10 @@ Init_process(void)
|
||||
#endif
|
||||
define_id(hertz);
|
||||
|
||||
/* pid_t must be signed, since fork() can return -1 */
|
||||
const rb_pid_t half_max_pidt = (rb_pid_t)1 << (sizeof(rb_pid_t) * CHAR_BIT - 2);
|
||||
const rb_pid_t max_pidt = 2 * (half_max_pidt - 1) + 1;
|
||||
if (!POSFIXABLE(max_pidt)) rb_gc_register_address(&cached_pid);
|
||||
|
||||
InitVM(process);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user