Skip to main content

another_server_using_storage

Function another_server_using_storage 

Source
fn another_server_using_storage(data_dir: Option<&Path>) -> bool
Expand description

Whether another waratah server is already serving THIS data dir: the pidfile there names a live pid that is not ours. The pidfile is the existing cross-process channel (waratah start and standalone write one and remove it on exit), so a live foreign pid is a server on the same storage. A memory backend shares no storage — each process owns its store — so None finds nothing to detect. Our own pid is the pidfile this process just wrote, not a peer.