Path: utzoo!attcan!uunet!bywater!arnor!entwash.watson.ibm.com!wlm From: wlm@entwash.watson.ibm.com (Bill Moran) Newsgroups: comp.unix.aix Subject: Re: X11R4 xterm problem Message-ID: <1990Sep30.214909.21727@arnor.uucp> Date: 30 Sep 90 21:49:09 GMT References: <8632@ncar.ucar.edu> Sender: news@arnor.uucp (NNTP News Poster) Reply-To: wlm@entwash.watson.ibm.com (Bill Moran) Organization: IBM TJ Watson Home for Tired Hackers Lines: 162 Errrrr, the no access to tty means that you didn't port X11R4. Porting means you got it *working* not that you made it compile. Xload needs to be ported, as the AIX kernal doesn't keep the load average information needed. My understanding is that is is due to the crazy security classifications. To make xload work, you need to calculate the load average yourself. If you have BSD sourcesm it is easy to look in the kernel, figure out how they do it, and then you simply need to do the same thing. I would include the code to do this, but since it is derivative of the BSD kernel code, that would probably be a no-no. As for xterm.... the changes needed are something like: *** main.c Thu Jul 26 23:03:23 1990 --- main.c.orig Thu Jul 26 18:37:12 1990 *************** *** 1,5 **** #ifndef lint ! static char rcs_id[] = "$XConsortium: main.c,v 1.145 90/01/11 14:22:31 jim Exp $"; #endif /* lint */ /* --- 1,5 ---- #ifndef lint ! static char rcs_id[] = "$XConsortium: main.c,v 1.144 89/12/20 21:39:07 jim Exp $"; #endif /* lint */ /* *************** *** 79,89 **** #define HAS_UTMP_UT_HOST #define HAS_BSD_GROUPS #endif - #ifdef AIXV3 - #define HAS_UTMP_UT_HOST - #define HAS_BSD_GROUPS - #define USE_SYSV_UTMP - #endif #ifdef macII #define HAS_UTMP_UT_HOST #define HAS_BSD_GROUPS --- 79,84 ---- *************** *** 931,951 **** /* got one! */ return(0); #else /* not (umips && SYSTYPE_SYSV) */ - #ifdef AIXV3 - struct stat fstat_buf; - char *name; - int temptty; - - *pty = open ("/dev/ptc", O_RDWR); - if ((*pty < 0) || ((name = ttyname(*pty)) == NULL)) { - return(1); - } - strcpy( ttydev, name ); - strcpy( ptydev, name ); - ptydev[7] = 'c'; - ttydev[7] = 's'; - return(0); - #else #ifdef CRAY for (; devindex < 256; devindex++) { sprintf (ttydev, "/dev/ttyp%03d", devindex); --- 926,931 ---- *************** *** 980,986 **** (void) letter++; } #endif /* CRAY else not CRAY */ - #endif /* AIXV3 else not AIXV3 /* We were unable to allocate a pty master! Return an error * condition and let our caller terminate cleanly. */ --- 960,965 ---- *************** *** 1459,1468 **** (void) setpgrp(); #endif /* USE_SYSV_PGRP */ while (1) { - #ifdef AIXV3 - setsid(); - #endif - #ifdef TIOCNOTTY if ((tty = open ("/dev/tty", 2)) >= 0) { ioctl (tty, TIOCNOTTY, (char *) NULL); --- 1438,1443 ---- *************** *** 1806,1813 **** tslot = ttyslot(); added_utmp_entry = False; { ! if ((pw = getpwuid(screen->uid)) && ! !resource.utmpInhibit && (i = open(etc_utmp, O_WRONLY)) >= 0) { bzero((char *)&utmp, sizeof(struct utmp)); (void) strncpy(utmp.ut_line, --- 1781,1788 ---- tslot = ttyslot(); added_utmp_entry = False; { ! if (!resource.utmpInhibit && ! (pw = getpwuid(screen->uid)) && (i = open(etc_utmp, O_WRONLY)) >= 0) { bzero((char *)&utmp, sizeof(struct utmp)); (void) strncpy(utmp.ut_line, *************** *** 1877,1883 **** (void) setgid (screen->gid); #ifdef HAS_BSD_GROUPS ! if (geteuid() == 0 && pw) initgroups (pw->pw_name, pw->pw_gid); #endif (void) setuid (screen->uid); --- 1852,1858 ---- (void) setgid (screen->gid); #ifdef HAS_BSD_GROUPS ! if (geteuid() == 0) initgroups (pw->pw_name, pw->pw_gid); #endif (void) setuid (screen->uid); *************** *** 1963,1982 **** /* fix pts sh hanging around */ signal (SIGHUP, SIG_DFL); #endif ! #ifdef AIXV3 ! /* The AIXV3.1 "rsh" command turns off INTR in sigmask. We ! must turn it back on. No you cannot solve this by calling ! signal(SIGINT,SIG_DFL). Tried. ! -- Dan Greening dgreen@ibm.com */ ! { ! extern int sigprocmask(); ! int mask; ! sigset_t set, oset; ! ! sigemptyset(&set); ! sigprocmask(SIG_SETMASK,&set,&oset); ! } ! #endif /* AIXV3 */ #ifdef UTMP if(((ptr = getenv("SHELL")) == NULL || *ptr == 0) && ((pw == NULL && (pw = getpwuid(screen->uid)) == NULL) || --- 1938,1944 ---- /* fix pts sh hanging around */ signal (SIGHUP, SIG_DFL); #endif ! #ifdef UTMP if(((ptr = getenv("SHELL")) == NULL || *ptr == 0) && ((pw == NULL && (pw = getpwuid(screen->uid)) == NULL) || ------------------- Bill Moran