Changed pidlock to fcntl-based.