Add missing PRIOCNTL_HACK stuff here
authorTom Yu <tlyu@mit.edu>
Mon, 16 Feb 2004 06:28:44 +0000 (06:28 +0000)
committerTom Yu <tlyu@mit.edu>
Mon, 16 Feb 2004 06:28:44 +0000 (06:28 +0000)
ticket: new
target_version: 1.3.2
tags: pullup
component: krb5-build

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16085 dc483132-0cff-0310-8789-dd5450dbe970

src/kadmin/ChangeLog
src/kadmin/configure.in
src/kadmin/passwd/unit-test/ChangeLog
src/kadmin/passwd/unit-test/Makefile.in
src/kadmin/passwd/unit-test/config/unix.exp

index 1e05162d6a3b033fdc27e1ae1d908f2376633ec7..e083337316460706f6bf6aaca3dda01a9ca27899 100644 (file)
@@ -1,3 +1,7 @@
+2004-02-16  Tom Yu  <tlyu@mit.edu>
+
+       * configure.in: Invoke KRB5_AC_PRIOCNTL_HACK.
+
 2003-12-27  Ken Raeburn  <raeburn@mit.edu>
 
        * Makefile.in (LOCAL_SUBDIRS): Fix typo in last (undocumented)
index 11f4a9e704a1a169e37b22888217b03be6451e80..d9d5873546cdd5252b53d00744630d10e0a4a054 100644 (file)
@@ -60,6 +60,7 @@ if test "$TCL_LIBS" != "" ;  then
 fi
 AC_SUBST(DO_ALL)
 KRB5_BUILD_PROGRAM
+KRB5_AC_PRIOCNTL_HACK
 dnl
 K5_GEN_FILE(testing/scripts/env-setup.sh:testing/scripts/env-setup.shin)
 V5_AC_OUTPUT_MAKEFILE(. cli dbutil passwd passwd/unit-test ktutil server  testing testing/scripts testing/util)
index 59b8db71f1584c110fec4a365165d8b73b7de8f7..a7b9083c690cc532a8f40525060b6c26f861d135 100644 (file)
@@ -1,3 +1,9 @@
+2004-02-16  Tom Yu  <tlyu@mit.edu>
+
+       * Makefile.in (unit-test-body): Add PRIOCNTL_HACK.
+
+       * config/unix.exp: Add PRIOCNTL_HACK.
+
 2003-05-09  Tom Yu  <tlyu@mit.edu>
 
        * kpasswd.0/changing.exp: Replace ovpasswd with kpasswd.
index 2a9fbee7c1f879ef7b16c92168724849f7a60273..5445a2811e49eefe0eac9842555f4c56c31ea10b 100644 (file)
@@ -15,7 +15,8 @@ unit-test-ok:: unit-test-setup unit-test-body unit-test-cleanup
 unit-test-body::       
        $(ENV_SETUP) $(RUNTEST) --tool kpasswd KPASSWD=../kpasswd \
                KINIT=$(BUILDTOP)/clients/kinit/kinit \
-               KDESTROY=$(BUILDTOP)/clients/kdestroy/kdestroy
+               KDESTROY=$(BUILDTOP)/clients/kdestroy/kdestroy \
+               PRIOCNTL_HACK=@PRIOCNTL_HACK@
 
 unit-test-setup::
        $(ENV_SETUP) $(START_SERVERS)
index c77aa016a363d077a272b9fd3d057939bf259e1d..bd8382e19e222289b667a112460e8f033cd8dc3b 100644 (file)
@@ -1,3 +1,41 @@
+# Hack around Solaris 9 kernel race condition that causes last output
+# from a pty to get dropped.
+if { $PRIOCNTL_HACK } {
+    catch {exec priocntl -s -c FX -m 30 -p 30 -i pid [getpid]}
+    rename spawn oldspawn
+    proc spawn { args } {
+       upvar 1 spawn_id spawn_id
+       set newargs {}
+       set inflags 1
+       set eatnext 0
+       foreach arg $args {
+           if { $arg == "-ignore" \
+                    || $arg == "-open" \
+                    || $arg == "-leaveopen" } {
+               lappend newargs $arg
+               set eatnext 1
+               continue
+           }
+           if [string match "-*" $arg] {
+               lappend newargs $arg
+               continue
+           }
+           if { $eatnext } {
+               set eatnext 0
+               lappend newargs $arg
+               continue
+           }
+           if { $inflags } {
+               set inflags 0
+               set newargs [concat $newargs {priocntl -e -c FX -p 0}]
+           }
+           lappend newargs $arg
+       }
+       set pid [eval oldspawn $newargs]
+       return $pid
+    }
+}
+
 #
 # kpasswd_version -- extract and print the version number of kpasswd
 #