https://gitlab.synchro.net/main/sbbs/-/commit/b7bd03313a6f8156f03c69a0
Modified Files:
src/sbbs3/ftpsrvr.c main.cpp nopen.c nopen.h
Log Message:
Have fmutex_open()/close() accept a fmutex_t* argument
This is needed for *nix where normal (i.e. not Samba-mount) file behavior requires that we manually unlink() the file, but not until just before closing it. So we have to keep track of the file name and the 'auto_remove' desire of the caller. This is not necessary when the file is on a Linux-smbfs, but we need to work as expected on normal/local *nix file systems too.
This solves atomic lock file removal for *nix, but does not gaurantee lock file cleanup upon ungraceful process termination (e.g. crash). At least in this particular case, Windows beats UNIX.