Expose rb_process_status_wait and hide rb_process_status_waitv. (#8316)

This commit is contained in:
Samuel Williams 2023-08-29 22:24:55 +12:00 committed by GitHub
parent 0744da1b3b
commit e46e48d690
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
Notes: git 2023-08-29 10:25:17 +00:00
Merged-By: ioquatix <samuel@codeotaku.com>
2 changed files with 10 additions and 1 deletions

View File

@ -30,6 +30,15 @@ RBIMPL_SYMBOL_EXPORT_BEGIN()
/* process.c */
/**
* Wait for the specified process to terminate, reap it, and return its status.
*
* @param[in] pid The process ID to wait for.
* @param[in] flags The flags to pass to waitpid(2).
* @return VALUE An instance of Process::Status.
*/
VALUE rb_process_status_wait(rb_pid_t pid, int flags);
/**
* Sets the "last status", or the `$?`.
*

View File

@ -1197,7 +1197,7 @@ rb_process_status_wait(rb_pid_t pid, int flags)
* This is an EXPERIMENTAL FEATURE.
*/
VALUE
static VALUE
rb_process_status_waitv(int argc, VALUE *argv, VALUE _)
{
rb_check_arity(argc, 0, 2);