diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2018-07-25 11:44:46 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2018-07-25 11:44:46 -0300 |
commit | e885dee5ab4dbee2457ee2023340e848fdabdef9 (patch) | |
tree | 1b9a4ac5a9a4d62edfcb99d5fc2416794dcef174 /loslib.c | |
parent | ccae0f5aad11b448fa630a41b2c7c54e69d134d8 (diff) | |
download | lua-e885dee5ab4dbee2457ee2023340e848fdabdef9.tar.gz lua-e885dee5ab4dbee2457ee2023340e848fdabdef9.tar.bz2 lua-e885dee5ab4dbee2457ee2023340e848fdabdef9.zip |
File operations try an "emergency collection" when failing
If a file operation fails do to lack of resources (too many open
files or not enough memory), it does a full garbage collection and
tries the operation again. Lack of resources are "too many open
files" (process wise and system wise) and "not enough memory".
The code is full of '#if's because error codes are not part
of the standard ISO C.
Diffstat (limited to 'loslib.c')
-rw-r--r-- | loslib.c | 3 |
1 files changed, 1 insertions, 2 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: loslib.c,v 1.65 2016/07/18 17:58:58 roberto Exp roberto $ | 2 | ** $Id: loslib.c $ |
3 | ** Standard Operating System library | 3 | ** Standard Operating System library |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -10,7 +10,6 @@ | |||
10 | #include "lprefix.h" | 10 | #include "lprefix.h" |
11 | 11 | ||
12 | 12 | ||
13 | #include <errno.h> | ||
14 | #include <locale.h> | 13 | #include <locale.h> |
15 | #include <stdlib.h> | 14 | #include <stdlib.h> |
16 | #include <string.h> | 15 | #include <string.h> |