Skip to content

fatal error conditions should return a non-zero status code (Linux, maybe MacOS) #84

@bxparks

Description

@bxparks

Problem

When spasm-ng detects a fatal error condition, which almost always generates incorrect machine code, the spasm executable seems to always return a 0 "success" status code (at least on Linux).

It is very easy to miss the fatal error message. A non-zero status code would make it far easier for the user to detect the fatal error:

  1. The shell can be configured to indicate a failed command loudly to the user (using a custom prompt for example),
  2. If the spasm is executed through a Makefile, the make command will terminate the workflow, perform any necessary clean up of intermediary files, and print a fatal error message to the user.

This problem also prevents the creation of a Continuous Integration (CI) pipeline for assembly programs, using GitHub Actions for example. Because the automation tool cannot detect a fatal error condition.

Expectation

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions