keecode logokeecode
71

OS Error

System error

Application

Exit Code Information

Exit Code

71

Name

OS Error

Category

Application

Usage Context

Operating system error detected

Common Usage

Bash Script

#!/bin/bash

if [ condition ]; then
  echo "OS Error"
  exit 71
fi

Check Exit Code

./script.sh
echo $?  # Prints the exit code

# Check if exit code matches
if [ $? -eq 71 ]; then
  echo "OS Error"
fi

Node.js/JavaScript

// Exit with code 71
process.exit(71);

// Or throw error that results in exit code
if (error) {
  console.error('OS Error');
  process.exit(71);
}

Python

import sys

# Exit with code 71
if error:
    print("OS Error")
    sys.exit(71)