From b655c9df5798cab015bb47d2c22d22b90c5447d2 Mon Sep 17 00:00:00 2001 From: Phil Budne Date: Tue, 29 Mar 2016 11:04:28 -0400 Subject: [PATCH] pbsh.s: try making shell interruptable when reading from a file --- src/other/pbsh.s | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/other/pbsh.s b/src/other/pbsh.s index 9d0aab4..b10343f 100644 --- a/src/other/pbsh.s +++ b/src/other/pbsh.s @@ -52,19 +52,17 @@ " argptr, and copy the names up). maxargs=10 - lac d1 - sys intrp " make shell uninterruptable - " see if reading from a special file - cla; sys seek; 1; 0 " try seeking stdin forward + cla; sys seek; 1; 0 " try seeking stdin forward one word sna " new offset non-zero? jmp 1f " no: input is a special file (ttyin,keyboard) dzm prompt " yes: regular file, kill prompt cla; sys seek; 0; 0 " seek file back to start jmp newline -" stdin is a special file, see if superuser -1: sys getuid +1: lac d1 + sys intrp " make shell uninterruptable + sys getuid sma " <0? jmp newline " no lac hash " yes: superuser