From: <don...@is...> - 2017-05-30 19:36:04
|
Bruno Haible writes: > Of course you should never build any package as 'root'. An yet there are features that can only be used as root, so if you want to test them you have to test as root. > But what are the "permission denied errors from streams" that you > mention? (WITH-OPEN-FILE (COPY S) (STREAMP COPY)) [OS-FILE-ERROR]: OS-FILE-ERROR(13): Permission denied (STREAMP (SETQ S (MAKE-STREAM :INPUT))) EQL-OK: T (OR (NOT (SEARCH "#P" (PRIN1-TO-STRING S))) (PATHNAMEP (TRUENAME S))) EQL-OK: T (HANDLER-CASE (WRITE-LINE "foo" S) (STREAM-ERROR (C) (PRINC-ERROR C) T)) [SIMPLE-STREAM-ERROR]: WRITE-CHAR on #1=#<INPUT UNBUFFERED FILE-STREAM CHARACTER #P"/dev/fd/0" @1> is illegal EQL-OK: T (WITH-OPEN-FILE (COPY S) (STREAMP COPY)) [OS-FILE-ERROR]: OS-FILE-ERROR(13): Permission denied whereas above returns T as root in this case: [7]> s #<INPUT UNBUFFERED FILE-STREAM CHARACTER #P"/dev/fd/0" @1> (STREAMP (SETQ S (MAKE-STREAM :ERROR))) EQL-OK: T (OR (NOT (SEARCH "#P" (PRIN1-TO-STRING S))) (PATHNAMEP (TRUENAME S))) EQL-OK: T (WRITE-LINE "foo" S) foo EQUAL-OK: "foo" (LET ((*REOPEN-OPEN-FILE* NIL)) (WITH-OPEN-FILE (COPY S :DIRECTION :OUTPUT) (STREAMP COPY))) [OS-FILE-ERROR]: OS-FILE-ERROR(13): Permission denied returns T as root |