-
-
Notifications
You must be signed in to change notification settings - Fork 29
Closed
Description
There are two problems, fixing either of them will solve this -
\UFSCloseFiletests for already-closed by whether or not the(UFSSTREAM UNIXNAME)field isNIL, but fails to set theUNIXNAMEtoNILonce the stream has been closed by the SUBR that does the OS related work.- A more correct way to test for a closed stream is whether the
(STREAM ACCESS)field isNIL, as done in\GETSTREAM
I propose changing the code to test for either (STREAM ACCESS) OR the UNIXNAME being NIL (implies already closed), and also setting the UNIXNAME to NIL after the file has been closed by the SUBR.
There's another minor design flaw - the underlying subr code doesn't distinguish between being passed NIL and 0 for the file descriptor - had it done that it would have been much more obvious that there was a problem, compared to the current behavior of just closing stdin (fd 0).
Metadata
Metadata
Assignees
Labels
No labels