aspl-lang/aspl

os: add a mechanism for signal handling

Aberta

#6 aberto em 11 de fev. de 2025

 (0 comentário) (0 reação) (0 responsável)C (6 forks)auto 404
enhancementgood first issue

Métricas do repositório

Stars
 (30 estrelas)
Métricas de merge de PR
 (Métricas PR pendentes)

Description

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
}

Guia do colaborador