Board: [fsxNet] Mystic BBS discussion/support Subject: Only one door per node From: Goose (21:1/177) Date: Thu Nov 05, 2026 11:23 Hi Gods69, Yeah, the wiki semaphore trick has exactly that problem: if the door crashes, the file sticks around and the door is dead until someone deletes it by hand. On Linux there's a cleaner way: wrap the door with flock. The kernel releases the lock as soon as the process dies, crash or not. No stale lock left behind. Example for a D3 menu command: /usr/bin/flock -n /mystic/locks/mygame.lock /path/to/yourdoor %P Create /mystic/locks/ once. The lock file itself can stay on disk; what matters is the active hold. With -n, flock fails immediately if another node already holds it, so the door never starts twice. You can then show a short "busy, try later" message (e.g. with a menu ACS / !E check, or by checking flock's exit code in a tiny wrapper). Tiny wrapper if you want the busy message: #!/bin/sh LOCK=/mystic/locks/mygame.lock DOOR=/path/to/yourdoor if ! flock -n "$LOCK" "$DOOR" "$@"; then echo "Sorry, that door is already in use. Try again later." sleep 2 fi Point D3 at the wrapper instead of the door binary. Same idea works for DD doors too. If you want to stay with the wiki semaphore method, a wrapper that checks whether the door process is still alive and deletes a stale semaphore first also works. flock is just more robust. Cheers Goose --- Mystic BBS v1.12 A48 (Linux/64) * Origin: Goosenet BBS (21:1/177) .