LINUX: Use correct type of error in flock code