bug-gnu-utils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: ERRNO not getting cleared


From: Aharon Robbins
Subject: Re: ERRNO not getting cleared
Date: Mon, 13 Oct 2003 10:01:39 +0200

> Date: Sun, 12 Oct 2003 07:56:26 -0400
> Subject: ERRNO not getting cleared
> From: Jim Hart <address@hidden>
>
> localhost ~/lib bash2.05$ awk 'BEGIN{close("something");print 
> ERRNO;"ls"|getline;print $0;print ERRNO}'
> close of redirection that was never opened
> Makefile
> close of redirection that was never opened
> localhost ~/lib bash2.05$ awk --version
> GNU Awk 3.1.1
>
> As the above code snippet demonstrates, the ERRNO variable isn't 
> getting cleared when a related I/O is successful. I apologize if this 
> is already fixed in a newer version.

ERRNO is like the C errno variable.  It is only set upon an error
and not otherwise cleared unless user-level code clears it.  I
have updated the documentation to state this explicitly.

Thanks,

Arnold




reply via email to

[Prev in Thread] Current Thread [Next in Thread]