From 8a77011c10b05815f7d7cb903b2ff05d2552d644 Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Mon, 1 Oct 2012 01:38:11 -0400 Subject: [PATCH] slattach: pass up exit status of shell command This is partially to fix a build warning: slattach.c: In function 'main': slattach.c:771:9: warning: ignoring return value of 'system', declared with attribute warn_unused_result [-Wunused-result] And partially because I think it's the right thing to do. Otherwise there's no way for people to check the exit status of the command they told slattach to run. Signed-off-by: Mike Frysinger --- slattach.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/slattach.c b/slattach.c index 6d21465..4132fd2 100644 --- a/slattach.c +++ b/slattach.c @@ -768,7 +768,7 @@ main(int argc, char *argv[]) tty_close(); if(extcmd) /* external command on exit */ - system(extcmd); + exit(system(extcmd)); } exit(0); } -- 2.7.4