fd5449f452
Needs rebuild to check against XFree 4.3.0.
40 lines
965 B
Plaintext
40 lines
965 B
Plaintext
$OpenBSD: patch-kdesu_process_cpp,v 1.4 2003/04/05 14:53:39 espie Exp $
|
|
--- kdesu/process.cpp.orig Sun Mar 2 20:00:58 2003
|
|
+++ kdesu/process.cpp Sun Mar 30 16:24:08 2003
|
|
@@ -38,6 +38,9 @@
|
|
#include <stropts.h>
|
|
#include <sys/stream.h>
|
|
#endif
|
|
+#ifdef __OpenBSD__
|
|
+#include <sys/ioctl.h>
|
|
+#endif
|
|
|
|
#ifdef __OpenBSD__
|
|
#include <sys/ioctl.h>
|
|
@@ -369,8 +372,13 @@ int PtyProcess::waitForChild()
|
|
while (1)
|
|
{
|
|
tv.tv_sec = 1; tv.tv_usec = 0;
|
|
- FD_SET(m_Fd, &fds);
|
|
- ret = select(m_Fd+1, &fds, 0L, 0L, &tv);
|
|
+ if (m_Fd != -1)
|
|
+ {
|
|
+ FD_SET(m_Fd, &fds);
|
|
+ ret = select(m_Fd+1, &fds, 0L, 0L, &tv);
|
|
+ }
|
|
+ else
|
|
+ ret = 0;
|
|
if (ret == -1)
|
|
{
|
|
if (errno == EINTR) continue;
|
|
@@ -457,6 +465,9 @@ int PtyProcess::SetupTTY(int fd)
|
|
ioctl(slave, I_PUSH, "ptem");
|
|
ioctl(slave, I_PUSH, "ldterm");
|
|
|
|
+#endif
|
|
+#ifdef __OpenBSD__
|
|
+ ioctl(slave, TIOCSCTTY, (char *)NULL);
|
|
#endif
|
|
|
|
#ifdef __OpenBSD__
|