7 Commits (next)

Author SHA1 Message Date
Sayan Nandan baaa36d336
Improve help message generation and allow env var for password 7 months ago
Sayan Nandan 3cdd814067
Ensure PID locks prevent corruption 10 months ago
Sayan Nandan 6e680b33e5 Add native file locks for unix and windows systems
This commit implements file locks for unix-based systems and windows
systems. This is done by using platform-specific `__sys` modules for
locking, trying to lock and unlocking files.

A build script was added for unix-systems that make use of the
flock-posix.c file
3 years ago
Sayan Nandan aca9888109 Remove fscposix and begin adding native impls
This commit removes the fscposix.c file and begins implementing native
file locking mechanisms for each platform (supported platforms)

BSD-style `flock`s were added
3 years ago
Sayan Nandan 8e41cab99a Re-compile fscposix.c if it changes 3 years ago
Sayan Nandan 83911af208 Only run build.rs for fscposix.c on unix systems 3 years ago
Sayan Nandan a9710587bb Add advisory locking for POSIX systems
This commit adds a basic implementation of POSIX advisory record locking
which sets a lock on the `data.bin` file when the database server starts
and releases the lock when it terminates. This is just done for
compliance to let other processes know that we don't want them to use
the file.

However, the result depends entirely on the process that wants to do
'something' with the file. It is the responsibility of the process to
ensure that it respects the file lock.

Also, exclusive locks aren't perfect on Linux, so we can't rely on them.
See discussion #123 for more information.
3 years ago