Pidfile locking with O_EXCL