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 [36.81.65.188]) by gnuweeb.org (Postfix) with ESMTPSA id E028C7E330; Fri, 8 Jul 2022 12:10:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gnuweeb.org; s=default; t=1657282246; bh=/oFKNf8LBIDxNgeeokwMVU4jF+n+eEnk2PWHZ9ysMVo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=l0dpSGkr76dWI5/vqDU7VTn7ox0NCnZhLOgAfVKmMu/tp6RCGvbC6ltJcEWXJr/Tn rgB5icrcooKeefKZOSIGsE+5sjyfQihgnBaIF6fPa7H79JRr7sR8nz3Vn6nuNyQ4UL 5DW1vemrLjzEZtNUMrHKi7v8d3ApBsPxH1L23K/n1txZ7MvNrgPu1ohMLbUdaW6ke2 dL53hFJdhyOuTpfDNSamv6CJxYlmSnXbj/pndSDC17Y2wb2obltzYTR6jhJZq+F8Ks uQ7W9H8DWSLB9EH/WvhjXGP3s3bf5ln930Y17H3TV9HLTT/xwf7m5Y83X6h7CP400b Y6VkV8CKJqaMA== From: Ammar Faizi To: GNU/Weeb Mailing List Cc: Ammar Faizi , Alviro Iskandar Setiawan , Arthur Lapz , Fernanda Ma'rouf , Sprite , Yonle Subject: [PATCH gwhttpd 04/14] gwhttpd: Add log in the interrupt handler Date: Fri, 8 Jul 2022 19:10:15 +0700 Message-Id: <20220708121025.926162-5-ammarfaizi2@gnuweeb.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220708121025.926162-1-ammarfaizi2@gnuweeb.org> References: <20220708121025.926162-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