Project

General

Profile

Bug #18811 » pty.c.patch

hspem (Per-Erik Martin), 06/07/2022 07:15 AM

View differences:

ext/pty/pty.c 2022-06-02 13:42:42.561435096 +0200
carg.slave = slave;
carg.slavename = SlaveName;
errbuf[0] = '\0';
#if !defined(TIOCSCTTY)
/* E.g. AIX, chfunc will close and reopen the slave anyway */
close(slave);
#endif
pid = rb_fork_async_signal_safe(&status, chfunc, &carg, Qnil, errbuf, sizeof(errbuf));
if (pid < 0) {
......
rb_sys_fail(errbuf[0] ? errbuf : "fork failed");
}
#if defined(TIOCSCTTY)
close(slave);
#endif
rb_execarg_parent_end(carg.execarg_obj);
info->child_pid = pid;
(2-2/2)