From ef61313366e6ca42298c4a48ecbe50c50c125b12 Mon Sep 17 00:00:00 2001 From: Xi Ruoyao Date: Sun, 18 Jul 2021 01:04:22 +0800 Subject: do not use UID hack for tester It's causing "root-tester namesis" (both have UID 0) if the tty is owned by root. To fix bash test, use Expect to spawn a new PTY for it. --- chapter08/bash.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'chapter08') diff --git a/chapter08/bash.xml b/chapter08/bash.xml index bb0f2b0fb..99ee2e3f4 100644 --- a/chapter08/bash.xml +++ b/chapter08/bash.xml @@ -76,8 +76,8 @@ Now, run the tests as the tester user: -su tester << EOF -PATH=$PATH make tests < $(tty) +su -s /usr/bin/expect tester << EOF +spawn make tests; expect EOF; EOF Install the package: -- cgit v1.2.3-54-g00ecf