• src/sbbs3/userdat.c src/x

    From Rob Swindell (on Debian L@VERT to Git commit to main/sbbs/m on Thu Dec 5 17:00:00 2024
    https://gitlab.synchro.net/main/sbbs/-/commit/03b84df8570435f0e0e2c346
    Modified Files:
    src/sbbs3/userdat.c src/xpdev/filewrap.c filewrap.h
    Log Message:
    Add/use xp_lockfile() to support blocking file range/region lock acquisition

    Under heavy loads, I've found periodic non-blocking lock attempts just aren't reliable enough: in particular, on Vertrauen, the guest user account record
    in the user.tab file gets read and written-to A LOT (updating stats), and
    under heavy loads (especially with hundreds of web client sessions), I'd get timeouts attempting to lock the guest record in the user.tab (after about a minute of periodic retries) - so let's just block "forever" to get the user record lock (or until signaled or notified of a deadlock). With this change, I've not had any user.tab lock errors or apparent deadlocks.

    Let the underlying OS/filesystem handle queuing and deadlock detection,
    when supported. lock() still behaves as before: non-blocking lock attempt.