fix(pid): add a lock to ensure one agent is running

should return enotimpl for windows?