aspl-lang/aspl

os: add a mechanism for signal handling

Aperta

#6 aperta il 11 feb 2025

 (0 commenti) (0 reazioni) (0 assegnatari)C (6 fork)auto 404
enhancementgood first issue

Metriche repository

Star
 (30 stelle)
Metriche merge PR
 (Metriche PR in attesa)

Descrizione

There is currently no way to handle system-signals in ASPL without custom implementation calls. I think this feature should be part of the standard library.

Example usage:

import os

os.register_signal_handler(Signal.Interrupt, callback(){
    print("SIGINT detected...")
    // TODO: Do something here
}

Guida contributor