Thread (30 messages) flat view 30 messages, 3 authors, 10d ago
COOLING10d REVIEWED: 1 (0M)

Revision v2 of 2 in this series; 1 review trailer.

Revisions (2)
  1. v1 [diff vs current]
  2. v2 current

[PATCH v2 01/13] graph: do not call printf in signal

From: Stephen Hemminger <stephen@networkplumber.org>
Date: 2026-09-07 17:05:10
Subsystem: the rest · Maintainer: Linus Torvalds

Printf is not signal safe and calling it in a signal handler
get flagged as an error by GCC analyzer.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Bruce Richardson <redacted>
---
 app/graph/main.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/app/graph/main.c b/app/graph/main.c
index 56294f2693..d36d60bf94 100644
--- a/app/graph/main.c
+++ b/app/graph/main.c
@@ -49,10 +49,8 @@ static struct app_params {
 static void
 signal_handler(int signum)
 {
-	if (signum == SIGINT || signum == SIGTERM) {
-		printf("\n\nSignal %d received, preparing to exit...\n", signum);
+	if (signum == SIGINT || signum == SIGTERM)
 		force_quit = true;
-	}
 }
 
 static int
-- 
2.53.0
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help