diff options
| author | Tom Yu <tlyu@mit.edu> | 2004-02-13 03:19:30 +0000 |
|---|---|---|
| committer | Tom Yu <tlyu@mit.edu> | 2004-02-13 03:19:30 +0000 |
| commit | b65814e4bc39a01bab8f93e2b995cdc3ebef8e1f (patch) | |
| tree | 32462be4232cb29d3ce1fb845a1bd96cc8747f8e /src/lib/rpc | |
| parent | 3772bd7c1af805fd40d5996681a1eea1c0ac8f0a (diff) | |
| download | krb5-b65814e4bc39a01bab8f93e2b995cdc3ebef8e1f.tar.gz krb5-b65814e4bc39a01bab8f93e2b995cdc3ebef8e1f.tar.xz krb5-b65814e4bc39a01bab8f93e2b995cdc3ebef8e1f.zip | |
priocntl workaround for Solaris 9 pty-close bug
Implement gross hack to use priocntl to work around the Solaris 9
pty-close bug. Run expect at a higher class "FX" priority than
spawned processes, which run at a lower class "FX" priority. "make
check" needs to start from a process which has FX priority >= 30 and
FX priority limit >= 30. Thanks to Bill Sommerfeld for the hints.
ticket: new
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16069 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src/lib/rpc')
| -rw-r--r-- | src/lib/rpc/unit-test/ChangeLog | 7 | ||||
| -rw-r--r-- | src/lib/rpc/unit-test/Makefile.in | 1 | ||||
| -rw-r--r-- | src/lib/rpc/unit-test/config/unix.exp | 38 | ||||
| -rw-r--r-- | src/lib/rpc/unit-test/configure.in | 1 |
4 files changed, 47 insertions, 0 deletions
diff --git a/src/lib/rpc/unit-test/ChangeLog b/src/lib/rpc/unit-test/ChangeLog index 1d6c648b76..c87dade474 100644 --- a/src/lib/rpc/unit-test/ChangeLog +++ b/src/lib/rpc/unit-test/ChangeLog @@ -1,3 +1,10 @@ +2004-02-12 Tom Yu <tlyu@mit.edu> + + * configure.in: Invoke KRB5_AC_PRIOCNTL_HACK. + + * config/unix.exp (PRIOCNTL_HACK): Wrap "spawn" to do priocntl + things to work around Solaris 9 pty-close bug. + 2003-12-02 Ken Raeburn <raeburn@mit.edu> * lib/helpers.exp (expect_kadm_ok, eof_client): Accept and ignore diff --git a/src/lib/rpc/unit-test/Makefile.in b/src/lib/rpc/unit-test/Makefile.in index a9ed5c3d7c..a4c2fc52d4 100644 --- a/src/lib/rpc/unit-test/Makefile.in +++ b/src/lib/rpc/unit-test/Makefile.in @@ -54,6 +54,7 @@ unit-test-body: $(RUNTEST) SERVER=./server CLIENT=./client \ KINIT=$(BUILDTOP)/clients/kinit/kinit \ KDESTROY=$(BUILDTOP)/clients/kdestroy/kdestroy \ + PRIOCNTL_HACK=@PRIOCNTL_HACK@ \ PASS="$(PASS)" --tool rpc_test $(RUNTESTFLAGS) ; \ then \ echo Cleaning up... ; \ diff --git a/src/lib/rpc/unit-test/config/unix.exp b/src/lib/rpc/unit-test/config/unix.exp index 49ae4d1653..8b7df9f163 100644 --- a/src/lib/rpc/unit-test/config/unix.exp +++ b/src/lib/rpc/unit-test/config/unix.exp @@ -9,6 +9,44 @@ set kdestroy $KDESTROY set hostname [exec hostname] +# 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 eq "-ignore" || + $arg eq "-open" || + $arg eq "-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 + } +} + # this will initialize the database and keytab load_lib "helpers.exp" diff --git a/src/lib/rpc/unit-test/configure.in b/src/lib/rpc/unit-test/configure.in index 68ac8d1086..d06cb6fb87 100644 --- a/src/lib/rpc/unit-test/configure.in +++ b/src/lib/rpc/unit-test/configure.in @@ -25,4 +25,5 @@ changequote([, ]) AC_SUBST(PASS) dnl CHECK_SIGNALS +KRB5_AC_PRIOCNTL_HACK V5_AC_OUTPUT_MAKEFILE |
