aspl-lang/aspl

os: add a mechanism for signal handling

开放

#6 创建于 2025年2月11日

 (0 条评论) (0 个反应) (0 位负责人)C (6 个派生)auto 404
enhancementgood first issue

仓库指标

星标
 (30 个星标)
PR 合并指标
 (PR 指标待抓取)

描述

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
}

贡献者指南