It's known as justice IF the pirate has been tried in court prior to execution, otherwise it's generally referred to as 'state sanctioned murder' to execute without trial.
Sorry Chum.....it is justice if they are shot out of hand upon being apprehended. Otherwise it is a Criminal Justice Proceeding if it involves a Court. Law is administered in Court....not Justice....that is done on the spot.