this way we can signal it directly to amke sure it exits cleanly.
Depending on the implementation, local state locks may be reentrant within the same process. Use a separate process to test locked state files.