mirror of
https://gitlab.com/embeddable-common-lisp/ecl.git
synced 2026-01-23 13:01:42 -08:00
Prevent crash from #267.
This commit is contained in:
parent
055fad4f5d
commit
cbb4e47d00
1 changed files with 2 additions and 0 deletions
|
|
@ -2611,6 +2611,8 @@ safe_fclose(FILE *stream)
|
|||
{
|
||||
const cl_env_ptr the_env = ecl_process_env();
|
||||
int output;
|
||||
/* If someone have closed our fd, do nothing. See #267. */
|
||||
unlikely_if (fileno(stream) == -1) return 0;
|
||||
ecl_disable_interrupts_env(the_env);
|
||||
output = fclose(stream);
|
||||
ecl_enable_interrupts_env(the_env);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue