[dev] [utmp][PATCH] Return the status of child as status of utmp

From: Roberto E. Vargas Caballero <k0ga_AT_shike2.com>
Date: Thu, 7 Aug 2014 15:51:51 +0200

It makes possible to can know what was the the exit status of the
command passed to utmp.
---
 utmp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/utmp.c b/utmp.c
index 53429a8..de0064d 100644
--- a/utmp.c
+++ b/utmp.c
_AT_@ -80,5 +80,5 @@ main(int argc, char *argv[])
 			perror("error waiting child");
 		delutmp();
 	}
-	return 0;
+	return (WIFEXITED(status)) ? WEXITSTATUS(status) : EXIT_FAILURE;
 }
-- 
1.9.3
Received on Thu Aug 07 2014 - 15:51:51 CEST

This archive was generated by hypermail 2.3.0 : Thu Aug 07 2014 - 16:00:15 CEST