OS X dislikes us calling the setuid or setgid syscalls when not
privileged, even if we try to set ourselves to the _same_ uid/gid.
Since I don't anticipate this code needing to run setuid on OS X, and
since I do anticipate wanting to handle multiple ptys in a single
process so that pty_pre_init would be useless anyway, the simplest fix
seems to me to be just conditioning out the whole of pty_pre_init
completely.
}
#endif
+#ifndef NO_PTY_PRE_INIT
static void sigchld_handler(int signum)
{
if (write(pty_signal_pipe[1], "x", 1) <= 0)
/* not much we can do about it */;
}
+#endif
#ifndef OMIT_UTMP
static void fatal_sig_handler(int signum)
*/
void pty_pre_init(void)
{
+#ifndef NO_PTY_PRE_INIT
+
Pty pty;
#ifndef OMIT_UTMP
}
#endif
}
+
+#endif /* NO_PTY_PRE_INIT */
+
}
int pty_real_select_result(Pty pty, int event, int status)