Patch for AIX by Reza Arbab <arbab@austin.ibm.com>

svn path=/trunk/kdebase/konsole/; revision=66299
wilder-portage
Waldo Bastian 26 years ago
parent 5a18857b42
commit 7efb4cb879
  1. 13
      src/TEPty.C

@ -78,6 +78,11 @@
#include <float.h>
#endif
#ifdef _AIX
#define _ALL_SOURCE
#include <sys/types.h>
#endif
#include <stdlib.h>
#include <stdio.h>
@ -285,7 +290,11 @@ int TEPty::openPty()
#if defined(HAVE_GRANTPT) && defined(HAVE_PTSNAME)
if (ptyfd < 0)
{
#ifdef _AIX
ptyfd = open("/dev/ptc",O_RDWR);
#else
ptyfd = open("/dev/ptmx",O_RDWR);
#endif
if (ptyfd >= 0)
{
strncpy(ttynam, ptsname(ptyfd), 50);
@ -465,7 +474,11 @@ void TEPty::makePty(const char* dev, const char* pgm, QStrList & args, const cha
#endif
int pgrp = getpid(); // This sequence is necessary for
#ifdef _AIX
tcsetpgrp (0, pgrp);
#else
ioctl(0, TIOCSPGRP, (char *)&pgrp); // event propagation. Omitting this
#endif
setpgid(0,0); // is not noticeable with all
close(open(dev, O_WRONLY, 0)); // clients (bash,vi). Because bash
setpgid(0,0); // heals this, use '-e' to test it.

Loading…
Cancel
Save