Closed dhorsley closed 2 years ago
added a flock() lib call for testing.
Added LOCK_NB to flock calls. flock() now returns true if it could not perform the lock request, false if it received the lock or a halting error on other errors states, such as file not found and similar.
This is not OS-level locking and is only good for ensuring that similar Za scripts or async threads do not compete with each other for a given file resource.
Closing this ticket for now. The flock work is complete enough for preliminary use and the pidfile generation can be done through user scripting reasonably easily. See the eg/pidof, eg/ps and eg/pidfile examples.