[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: "unset" return value wrong
From: |
Stephen Gildea |
Subject: |
Re: "unset" return value wrong |
Date: |
Wed, 18 Oct 2000 18:22:03 EDT |
> Unsetting a variable or function that was not previously set
> shall not be considered an error and shall not cause the shell
> to abort.
>
> I contend that this actually refers to the text at the beginning of
> section 3.14, which says that the shell shall abort if a syntax error
> is encountered in any of the special builtin utilities.
I'm not sure about this. Even if unsetting an unset variable were an
error, it would not be a syntax error, so applying 3.14 seems a bit of
a stretch. But I'll bow to your greater shell experience here.
I don't have POSIX.2 in front of me now, so let me quote the Single
UNIX Specification, version 2, issue 5, which was based on POSIX.2,
I think. It says "Read-only variables cannot be unset," and later
that the exit status is non-0 if "At least one name could not be unset."
So putting those two together, I thought that the only error possible
was attempting to unset a read-only variable.
< Stephen
- Prev by Date:
bash compilied for mips-compaq-nonstopux
- Next by Date:
B,U.I-L,D. -Y,O.U- ,C.A-B,L.E- ,B.O-X, .D-E`S`C`R`A`M`B`L`E`R,`,`,`, 2811
- Previous by thread:
Re: "unset" return value wrong
- Next by thread:
bash aborted: block on free list clobbered
- Index(es):