Skip to content
Snippets Groups Projects
Commit ac9c138a authored by Rob Swindell's avatar Rob Swindell :speech_balloon:
Browse files

Add FILE_RETRY_ERRNO() definition, to be used in sopen()/lock() loops

Note: EBUSY was added to the list of errno values that should cause a retry
as observed on Vertrauen, running sbbs-linux on a Samba mount, opening
locked files can return failure (-1) with errno = EBUSY, e.g.
evnt BBS Events !ERROR 16 (Device or resource busy) in logon.cpp line 616 (logonstats) reading "system stats" access=0

This was apparently resolved by adding EBUSY (16) the values that trigger an sopen()
retry (i.e. from [f]nopen()).
parent 31ae05c1
No related branches found
No related tags found
No related merge requests found
......@@ -144,6 +144,9 @@
#define CLOSE_OPEN_FILE(x) do { if((x) >= 0) { close(x); (x) = -1; } } while(0)
#define FCLOSE_OPEN_FILE(x) do { if((x) != NULL) { fclose(x); (x) = NULL; } } while(0)
// These errno values should trigger sopen() and lock() retries, within limits
#define FILE_RETRY_ERRNO(x) ((x)==EACCES || (x)==EAGAIN || (x)==EDEADLOCK || (x)==EBUSY)
/**************/
/* Prototypes */
/**************/
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment