From 96362b54e9c2162fe10fd1cfe029bcc8e203b135 Mon Sep 17 00:00:00 2001
From: ctyunsystem <ctyuncommiter05@chinatelecom.cn>
Date: Tue, 5 Jul 2022 10:13:58 +0800
Subject: [PATCH 2/2] fix probably restore cc symbol link fail when kill patch
 building uncourteous

---
 src/libcare-patch-make | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/libcare-patch-make b/src/libcare-patch-make
index 03aa1d6..3cd2fe9 100755
--- a/src/libcare-patch-make
+++ b/src/libcare-patch-make
@@ -109,6 +109,8 @@ recover_cc_symbolink() {
 	ln -s $REAL_CC $SYMBOLINK_CC
 }
 
+trap "recover_cc_symbolink" SIGINT SIGTERM SIGQUIT
+
 build_objects() {
 	restore_origs
 
-- 
2.27.0

