diff options
author | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2022-08-07 00:02:38 +0900 |
---|---|---|
committer | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2022-08-07 00:02:38 +0900 |
commit | e545cfad20eccf72f0b7d02660ceb56ec0f1dcf7 (patch) | |
tree | c398966a0ebf7555b2f9e1f8f930d795dd41e407 /process.c | |
parent | f245b425af2e560a85edac85ad4426a04b01e4de (diff) |
Stop using casted `rb_syswait` as `proc_syswait`
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`).
Diffstat (limited to 'process.c')
-rw-r--r-- | process.c | 6 |
1 files changed, 1 insertions, 5 deletions
@@ -3773,16 +3773,12 @@ rb_exec_atfork(void* arg, char *errmsg, size_t errmsg_buflen) return rb_exec_async_signal_safe(arg, errmsg, errmsg_buflen); /* hopefully async-signal-safe */ } -#if SIZEOF_INT == SIZEOF_VALUE -#define proc_syswait (VALUE (*)(VALUE))rb_syswait -#else static VALUE proc_syswait(VALUE pid) { - rb_syswait((int)pid); + rb_syswait((rb_pid_t)pid); return Qnil; } -#endif static int move_fds_to_avoid_crash(int *fdp, int n, VALUE fds) |