aspl-lang/aspl

os: add a mechanism for signal handling

Open

#6 opened on Feb 11, 2025

View on GitHub
 (0 comments) (0 reactions) (0 assignees)C (6 forks)auto 404
enhancementgood first issue

Repository metrics

Stars
 (30 stars)
PR merge metrics
 (PR metrics pending)

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
}

Contributor guide