Skip to content
This repository was archived by the owner on Jul 5, 2023. It is now read-only.

Commit 5ea956d

Browse files
authored
Do not exit boost on CTRL-C so the signal is only sent to the process being run (#4)
1 parent bebee15 commit 5ea956d

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

boostbuild/main.py

+9
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
import argparse
66
import os
77
import re
8+
import signal
89
from typing import List
910

1011
from colorama import init, Fore
@@ -107,9 +108,17 @@ def get_storage(boost_data: dict, variables: List[str]) -> dict:
107108
return storage
108109

109110

111+
def handler(_signum, _frame):
112+
"""
113+
Handle CTRL-C so the exit signal is sent to the process being executed by boost rather that to boost itself
114+
TODO: can we maybe handle multiple signals to send to boost itself.
115+
"""
116+
117+
110118
def main() -> int:
111119
"""Main function"""
112120
init(autoreset=True)
121+
signal.signal(signal.SIGINT, handler)
113122

114123
parser = init_parser()
115124
args = parser.parse_args()

pyproject.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "boostbuild"
3-
version = "0.1.12"
3+
version = "0.1.13"
44
description = "Boost is a simple build system that aims to create an interface for shell command substitution across different operative systems."
55
authors = ["David Lopez <[email protected]>"]
66
readme = "README.md"

0 commit comments

Comments
 (0)