Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use rb_fork_ruby for --help pager #7833

Merged
merged 1 commit into from
May 21, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 3 additions & 1 deletion ruby.c
Original file line number Diff line number Diff line change
Expand Up @@ -1824,6 +1824,8 @@ env_var_truthy(const char *name)
}
#endif

rb_pid_t rb_fork_ruby(int *status);

static VALUE
process_options(int argc, char **argv, ruby_cmdline_options_t *opt)
{
Expand Down Expand Up @@ -1860,7 +1862,7 @@ process_options(int argc, char **argv, ruby_cmdline_options_t *opt)
#ifdef HAVE_WORKING_FORK
int fds[2];
if (rb_pipe(fds) == 0) {
rb_pid_t pid = rb_fork();
rb_pid_t pid = rb_fork_ruby(NULL);
if (pid > 0) {
/* exec PAGER with reading from child */
dup2(fds[0], 0);
Expand Down