head 1.3; access; symbols pkgsrc-2013Q2:1.3.0.10 pkgsrc-2013Q2-base:1.3 pkgsrc-2012Q4:1.3.0.8 pkgsrc-2012Q4-base:1.3 pkgsrc-2011Q4:1.3.0.6 pkgsrc-2011Q4-base:1.3 pkgsrc-2011Q2:1.3.0.4 pkgsrc-2011Q2-base:1.3 pkgsrc-2009Q4:1.3.0.2 pkgsrc-2009Q4-base:1.3 pkgsrc-2009Q3:1.2.0.40 pkgsrc-2009Q3-base:1.2 pkgsrc-2009Q2:1.2.0.38 pkgsrc-2009Q2-base:1.2 pkgsrc-2009Q1:1.2.0.36 pkgsrc-2009Q1-base:1.2 pkgsrc-2008Q4:1.2.0.34 pkgsrc-2008Q4-base:1.2 pkgsrc-2008Q3:1.2.0.32 pkgsrc-2008Q3-base:1.2 cube-native-xorg:1.2.0.30 cube-native-xorg-base:1.2 pkgsrc-2008Q2:1.2.0.28 pkgsrc-2008Q2-base:1.2 cwrapper:1.2.0.26 pkgsrc-2008Q1:1.2.0.24 pkgsrc-2008Q1-base:1.2 pkgsrc-2007Q4:1.2.0.22 pkgsrc-2007Q4-base:1.2 pkgsrc-2007Q3:1.2.0.20 pkgsrc-2007Q3-base:1.2 pkgsrc-2007Q2:1.2.0.18 pkgsrc-2007Q2-base:1.2 pkgsrc-2007Q1:1.2.0.16 pkgsrc-2007Q1-base:1.2 pkgsrc-2006Q4:1.2.0.14 pkgsrc-2006Q4-base:1.2 pkgsrc-2006Q3:1.2.0.12 pkgsrc-2006Q3-base:1.2 pkgsrc-2006Q2:1.2.0.10 pkgsrc-2006Q2-base:1.2 pkgsrc-2006Q1:1.2.0.8 pkgsrc-2006Q1-base:1.2 pkgsrc-2005Q4:1.2.0.6 pkgsrc-2005Q4-base:1.2 pkgsrc-2005Q3:1.2.0.4 pkgsrc-2005Q3-base:1.2 pkgsrc-2005Q2:1.2.0.2 pkgsrc-2005Q2-base:1.2 pkgsrc-2005Q1:1.1.1.1.0.20 pkgsrc-2005Q1-base:1.1.1.1 pkgsrc-2004Q4:1.1.1.1.0.18 pkgsrc-2004Q4-base:1.1.1.1 pkgsrc-2004Q3:1.1.1.1.0.16 pkgsrc-2004Q3-base:1.1.1.1 pkgsrc-2004Q2:1.1.1.1.0.14 pkgsrc-2004Q2-base:1.1.1.1 pkgsrc-2004Q1:1.1.1.1.0.12 pkgsrc-2004Q1-base:1.1.1.1 pkgsrc-2003Q4:1.1.1.1.0.10 pkgsrc-2003Q4-base:1.1.1.1 netbsd-1-6-1:1.1.1.1.0.6 netbsd-1-6-1-base:1.1.1.1 netbsd-1-6:1.1.1.1.0.8 netbsd-1-6-RELEASE-base:1.1.1.1 pkgviews:1.1.1.1.0.4 pkgviews-base:1.1.1.1 buildlink2:1.1.1.1.0.2 buildlink2-base:1.1.1.1 netbsd-1-5-PATCH003:1.1.1.1 netbsd-1-5-PATCH001:1.1.1.1 netbsd-1-5-RELEASE:1.1.1.1 netbsd-1-4-PATCH003:1.1.1.1 netbsd-1-4-PATCH002:1.1.1.1 comdex-fall-1999:1.1.1.1 netbsd-1-4-PATCH001:1.1.1.1 netbsd-1-4-RELEASE:1.1.1.1 pkgsrc-base:1.1.1.1 TNF:1.1.1; locks; strict; comment @# @; 1.3 date 2009.11.26.17.04.19; author joerg; state dead; branches; next 1.2; 1.2 date 2005.05.29.14.38.33; author wiz; state Exp; branches; next 1.1; 1.1 date 98.10.21.19.59.30; author garbled; state Exp; branches 1.1.1.1; next ; 1.1.1.1 date 98.10.21.19.59.30; author garbled; state Exp; branches; next ; desc @@ 1.3 log @Remove parallel/glunix. It fails in the patch phase on NetBSD 4 and later. After fixing that, it fails with C++ errors, so it couldn't have been build at least for 3 years. Assume noone cares. @ text @$NetBSD: patch-am,v 1.2 2005/05/29 14:38:33 wiz Exp $ --- glunix/src/rexec/drexec.cc.orig 1997-10-02 21:34:05.000000000 +0200 +++ glunix/src/rexec/drexec.cc @@@@ -306,7 +306,14 @@@@ #include #include #include + +#ifdef __NetBSD__ +#include +#include +#else #include +#endif + #include #include #include @@@@ -353,9 +360,11 @@@@ static Bool FinalizeParentPtyPiping(int static Bool ChildPtyPiping(char *ptyName, char *ptyErrorName, int ptyMasterFd, int ptyErrorMasterFd, MsgRexec_ExecCommand *msg); static int PtyMasterOpen(char *ptyName); -/*static int PtySlaveOpen(char *ptyName, int uid, int gid);*/ +#ifdef __NetBSD__ +static int PtySlaveOpen(char *ptyName, int uid, int gid); +#else static int PtySlaveOpen(char *ptyName, int ptyMasterFd); - +#endif /*****************************************************************************/ // All of the routines on this list are called before this module @@@@ -1141,72 +1150,82 @@@@ ChildPtyPiping(char *ptyName, char *ptyE windowSize = msg->windowSize; // Open the stderr pty +#ifdef __NetBSD__ + if((ptyErrorSlaveFd = PtySlaveOpen(ptyErrorName, msg->uid, msg->gid)) == -1) { +#else if((ptyErrorSlaveFd = PtySlaveOpen(ptyErrorName, ptyErrorMasterFd)) == -1) { +#endif DE("PtySlaveOpen() failed\n"); return False; } close(ptyErrorMasterFd); -/* if(setsid() == -1) { - Debug_Print(MODULE_REXEC, DEBUG_ERROR, "(rexec)ChildPtyPiping: " - "setsid() failed\n"); - return False; - }*/ +#ifdef __NetBSD__ + if(setsid() == -1) { + DE("(rexec)ChildPtyPiping: setsid() failed\n"); + return False; + } +#endif - setpgrp(); + setpgrp(0,0); // Open the stdin/stdout pty +#ifdef __NetBSD__ + if((ptySlaveFd = PtySlaveOpen(ptyName, msg->uid, msg->gid)) == -1) { +#else if((ptySlaveFd = PtySlaveOpen(ptyName, ptyMasterFd)) == -1) { -/* if((ptySlaveFd = PtySlaveOpen(ptyName, msg->uid, msg->gid)) == -1) {*/ +#endif DE("PtySlaveOpen() failed\n"); return False; } close(ptyMasterFd); -/* This should work on BSD, but doesn't on SysV -#if defined(TIOCSCTTY) && !defined(CIBAUD) +#ifdef __NetBSD__ + /* This should work on BSD, but doesn't on SysV*/ if(ioctl(ptySlaveFd, TIOCSCTTY, (char *) 0) == -1) { - DE("cannot set controlling tty: %s\n", strerror(errno)); - return False; + DE("cannot set controlling tty: %s\n", strerror(errno)); + return False; } -#else -#error Nope -#endif */ - +#else (void) ioctl(ptySlaveFd, TCSETSF, (char *)&startupTermios); (void) ioctl(ptySlaveFd, TIOCSWINSZ, (char *)&windowSize); +#endif -/* while(tcsetattr(ptySlaveFd, TCSANOW, &startupTermios) == -1) { - if(errno == EINTR) { - continue; - } else { - * BUGBUG maybe should return failure here? * - DE("ioctl: %s\n", strerror(errno)); - } +#ifdef __NetBSD__ + while(tcsetattr(ptySlaveFd, TCSANOW, &startupTermios) == -1) { + if(errno == EINTR) { + continue; + } else { + /* BUGBUG maybe should return failure here? */ + DE("ioctl: %s\n", strerror(errno)); + } } if(ioctl(ptySlaveFd, TIOCSWINSZ, (char *) &windowSize) == -1) { - * BUGBUG maybe should return failure here? * - DE("ioctl: %s\n", strerror(errno)); - } */ - + /* BUGBUG maybe should return failure here? */ + DE("ioctl: %s\n", strerror(errno)); + } +#else (void) ioctl(ptyErrorSlaveFd, TCSETSF, (char *)&startupTermios); (void) ioctl(ptyErrorSlaveFd, TIOCSWINSZ, (char *)&windowSize); +#endif -/* while(tcsetattr(ptyErrorSlaveFd, TCSANOW, &startupTermios) == -1) { - if(errno == EINTR) { - continue; - } else { - * BUGBUG maybe should return failure here? * - DE("ioctl: %s\n", strerror(errno)); - } +#ifdef __NetBSD__ + while(tcsetattr(ptyErrorSlaveFd, TCSANOW, &startupTermios) == -1) { + if(errno == EINTR) { + continue; + } else { + /* BUGBUG maybe should return failure here? */ + DE("ioctl: %s\n", strerror(errno)); + } } if(ioctl(ptyErrorSlaveFd, TIOCSWINSZ, (char *) &windowSize) == -1) { - * BUGBUG maybe should return failure here? * - DE("ioctl: %s\n", strerror(errno)); - } */ + /* BUGBUG maybe should return failure here? */ + DE("ioctl: %s\n", strerror(errno)); + } +#endif if(msg->validIoFds[IO_INPUT]) { while(dup2(ptySlaveFd, STDIN_FILENO) == -1) { @@@@ -1251,6 +1270,7 @@@@ ChildPtyPiping(char *ptyName, char *ptyE return True; } +#ifndef __NetBSD__ int PtyMasterOpen(char *ptyName) { @@@@ -1271,7 +1291,7 @@@@ PtyMasterOpen(char *ptyName) return ptyMasterFd; } - +#else /****************************************************************************** * PtyMasterOpen -- * This is the actual procedure that opens up a master pty. (BSD STYLE) @@@@ -1284,40 +1304,43 @@@@ PtyMasterOpen(char *ptyName) * * Side effects: ****************************************************************************/ -/*int + +int PtyMasterOpen(char *ptyName) { - int ptyMasterFd; - char *ptr1, *ptr2; - - strcpy(ptyName, "/dev/ptyXY"); - - ASSERT(strlen(ptyName) < PTY_PATH_LENGTH); - - // array index: 0123456789 (for references in following code) - for(ptr1 = "pqrstuvwxyzPQRST"; *ptr1 != 0; ptr1++) { - ptyName[8] = *ptr1; - for(ptr2 = "0123456789abcdef"; *ptr2 != 0; ptr2++) { - ptyName[9] = *ptr2; - - if((ptyMasterFd = open(ptyName, O_RDWR)) == -1) { - if(errno == ENOENT) { - return -1; - } else { - continue; - } - } - - ptyName[5] = 't'; // need to change string to "tty" so that this - // string can be used later to open the slave - // end of the pty by PtyChildOpen - return ptyMasterFd; + int ptyMasterFd; + char *ptr1, *ptr2; + + strcpy(ptyName, "/dev/ptyXY"); + + ASSERT(strlen(ptyName) < PTY_PATH_LENGTH); + + // array index: 0123456789 (for references in following code) + for(ptr1 = "pqrstuvwxyzPQRST"; *ptr1 != 0; ptr1++) { + ptyName[8] = *ptr1; + for(ptr2 = "0123456789abcdef"; *ptr2 != 0; ptr2++) { + ptyName[9] = *ptr2; + + if((ptyMasterFd = open(ptyName, O_RDWR)) == -1) { + if(errno == ENOENT) { + return -1; + } else { + continue; } + } + + ptyName[5] = 't'; // need to change string to "tty" so that this + // string can be used later to open the slave + // end of the pty by PtyChildOpen + return ptyMasterFd; } + } - return -1; -}*/ + return -1; +} +#endif +#ifndef __NetBSD__ int PtySlaveOpen(char *ptyName, int ptyMasterFd) { @@@@ -1364,7 +1387,7 @@@@ PtySlaveOpen(char *ptyName, int ptyMaste return ptySlaveFd; } - +#else /****************************************************************************** * PtySlaveOpen -- * This is the actual procedure that opens up a slave pty. (BSD STYLE) @@@@ -1397,7 +1420,7 @@@@ PtySlaveOpen(char *ptyName, int uid, int return ptySlaveFd; } - +#endif /****************************************************************************** * Rexec_AbortProgramCallback -- * @@@@ -1800,7 +1823,11 @@@@ ChildDeathCallback(int sig, int arg) { /* If it didn't exit, but something else happened (received the SIG_STOP or SIG_CONT possibly) */ +#ifdef __NetBSD__ + if ((WIFSTOPPED(procStat)) || (WIFSIGNALED(procStat))) { +#else if ((WIFSTOPPED(procStat)) || (WIFCONTINUED(procStat))) { +#endif // BUGBUG Shouldn't we signal the startup here???? D5("process status says it didn't exit!\n"); continue; @ 1.2 log @Make build, install and deinstall on NetBSD-2.0/i386. @ text @d1 1 a1 1 $NetBSD: patch-am,v 1.1.1.1 1998/10/21 19:59:30 garbled Exp $ @ 1.1 log @Initial revision @ text @d1 1 a1 1 $NetBSD$ d3 5 a7 3 --- glunix/src/rexec/drexec.cc.orig Thu Oct 2 12:34:05 1997 +++ glunix/src/rexec/drexec.cc Fri Apr 3 16:58:09 1998 @@@@ -308,3 +308,10 @@@@ d18 5 a22 1 @@@@ -355,5 +362,7 @@@@ d32 5 a36 1 @@@@ -1143,4 +1152,8 @@@@ d45 3 a47 1 @@@@ -1150,13 +1163,17 @@@@ d72 3 a74 1 @@@@ -1166,22 +1183,21 @@@@ d111 1 a111 1 @@@@ -1189,16 +1205,18 @@@@ d141 1 a141 1 @@@@ -1206,5 +1224,6 @@@@ d151 5 a155 1 @@@@ -1253,2 +1272,3 @@@@ d159 5 a163 1 @@@@ -1273,3 +1293,3 @@@@ d168 5 a172 1 @@@@ -1286,36 +1306,39 @@@@ d240 5 a244 1 @@@@ -1366,3 +1389,3 @@@@ d249 5 a253 1 @@@@ -1399,3 +1422,3 @@@@ d258 5 a262 1 @@@@ -1802,3 +1825,7 @@@@ d270 2 @ 1.1.1.1 log @Initial import of glunix-1.0a Thanks to Ross for all the help, and Alistair for fixing some brain damage. A Global Layer Unix for NOW. (Network Of Workstations) @ text @@