From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on gnuweeb.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=5.0 tests=ALL_TRUSTED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NO_DNS_FOR_FROM,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.6 Received: from integral2.. (unknown [125.160.108.65]) by gnuweeb.org (Postfix) with ESMTPSA id A0E2A7F9AE; Sun, 26 Jun 2022 05:56:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gnuweeb.org; s=default; t=1656223017; bh=/oFKNf8LBIDxNgeeokwMVU4jF+n+eEnk2PWHZ9ysMVo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=fB7nWTclx4LnASMj8otmB4jG77NT81APZSoLOZ614QufcC1FAbgYoklfgE1FDvw3j ECU/XMf/TWI7eW6SXCgAXeJI8bA9TgfeI/f6OQxBlWaSj5CNG5cmRcQBiq/62r1wXv dTGz3JYQgVp3einUrm/CFUotOExsX3BbnrEmpyxnWXgkX4GwL4JKy3cPMwg9k/n2fI +EYPNpq4klZWTYHkH1qog7ATk9SNgi9e9WbkBJZCuohsmu2BtwXKiHeoNFJX4qLkmW U1XK9175wjmsRf387jDIhTtg0p/jmG3HG+tPYcUxQOHmWdTmm95LFeA0mTp+OJPaYY xdlVn/mAoOoBw== From: Ammar Faizi To: GNU/Weeb Mailing List Cc: Ammar Faizi , Arthur Lapz , Sprite , Yonle Subject: [PATCH gwhttpd 4/7] gwhttpd: Add log in the interrupt handler Date: Sun, 26 Jun 2022 12:56:31 +0700 Message-Id: <20220626055634.676175-5-ammarfaizi2@gnuweeb.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220626055634.676175-1-ammarfaizi2@gnuweeb.org> References: <20220626055634.676175-1-ammarfaizi2@gnuweeb.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit List-Id: Print a log message that we are interrupted, this makes the app user friendly because the user can explicitly see from the output that the app is interrupted. Signed-off-by: Ammar Faizi --- gwhttpd.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gwhttpd.cpp b/gwhttpd.cpp index afe4c3a..ce280de 100644 --- a/gwhttpd.cpp +++ b/gwhttpd.cpp @@ -67,6 +67,8 @@ static struct server_state *g_state; static void interrupt_handler(int sig) { + putchar('\n'); + printf("Got signal: %d\n", sig); if (!g_state) return; -- Ammar Faizi