Close stream FD on ovni_thread_free()

This is required on FS like NFS as the cache coherence model states that
only after the file is closed the changes are actually propagated to the
server. It is not recomended to use NFS as OVNI_TMPDIR anyway.

Fixes: https://pm.bsc.es/gitlab/rarias/ovni/-/issues/168
This commit is contained in:
Rodrigo Arias 2023-12-14 15:40:13 +01:00
parent bf2b4af15a
commit 0496aeffc6
2 changed files with 8 additions and 0 deletions

View File

@ -26,6 +26,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Emulation models now have a semantic version (X.Y.Z) instead of just a number. - Emulation models now have a semantic version (X.Y.Z) instead of just a number.
- Install ovniver with the runpath set. - Install ovniver with the runpath set.
### Fixed
- Close stream FD on `ovni_thread_free()`.
## [1.4.1] - 2023-11-16 ## [1.4.1] - 2023-11-16
### Changed ### Changed

View File

@ -593,6 +593,10 @@ ovni_thread_free(void)
thread_metadata_store(); thread_metadata_store();
free(rthread.evbuf); free(rthread.evbuf);
rthread.evbuf = NULL;
close(rthread.streamfd);
rthread.streamfd = -1;
} }
int int