clear alias in close before resetting the stream to null (#1231)
This commit is contained in:
@@ -2728,12 +2728,12 @@ impl Machine {
|
||||
}
|
||||
|
||||
if !stream.is_stdin() && !stream.is_stdout() && !stream.is_stderr() {
|
||||
let close_result = stream.close();
|
||||
|
||||
if let Some(alias) = stream.options().get_alias() {
|
||||
self.indices.stream_aliases.remove(&alias);
|
||||
}
|
||||
|
||||
let close_result = stream.close();
|
||||
|
||||
if let Err(_) = close_result {
|
||||
let stub = functor_stub(atom!("close"), 1);
|
||||
let addr = stream_as_cell!(stream);
|
||||
|
||||
Reference in New Issue
Block a user