1
0
mirror of https://github.com/DoctorWkt/pdp7-unix.git synced 2026-02-01 22:42:59 +00:00

pbsh.s: try making shell interruptable when reading from a file

This commit is contained in:
Phil Budne
2016-03-29 11:04:28 -04:00
parent 2982aaf18f
commit b655c9df57

View File

@@ -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