How Ecasound Interactive Mode Handles Ctrl+C

Ecasound’s interactive mode intercepts user keyboard interrupts like Ctrl+C to ensure non-destructive session handling and uninterrupted audio control. Instead of killing the application outright as it would in standard terminal operations, interactive mode traps the interrupt signal, halts any active audio processing or playback, and safely returns control to the interactive prompt.

Signal Interception via SIGINT

When running Ecasound in interactive mode (EIAM), the software installs a dedicated signal handler for SIGINT (the POSIX signal triggered by Ctrl+C). Under standard command-line execution, a SIGINT forces Ecasound to immediately flush buffers, close open files, and terminate the process. In interactive mode, this signal is caught and repurposed to manage the engine state rather than terminating the runtime environment.

Behavior During Engine Execution

If an audio chain setup is actively processing, recording, or playing back, pressing Ctrl+C executes an engine-stop routine:

Behavior at the Idle Prompt

If the engine is stopped and the user is sitting at the interactive prompt:

Exiting Interactive Mode

Because Ctrl+C is reserved for stopping processing and clearing input, terminating Ecasound requires intentional exit routines. Users must type quit, q, or send an End-Of-File signal (Ctrl+D) at an empty prompt. This design prevents accidental session loss during complex multi-track configurations and live performance scenarios.