[PATCH 2/7] uuidd: use die() where possible

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: Petr Uzel <petr.uzel@xxxxxxx>
---
 misc-utils/uuidd.c |   10 ++++------
 1 files changed, 4 insertions(+), 6 deletions(-)

diff --git a/misc-utils/uuidd.c b/misc-utils/uuidd.c
index c5c58ae..f61c8cd 100644
--- a/misc-utils/uuidd.c
+++ b/misc-utils/uuidd.c
@@ -271,10 +271,8 @@ static void server_loop(const char *socket_path, const char *pidfile_path,
 	 */
 	while (!debug && s <= 2) {
 		s = dup(s);
-		if (s < 0) {
-			perror("dup");
-			exit(1);
-		}
+		if (s < 0)
+			die("dup");
 	}
 
 	/*
@@ -327,8 +325,8 @@ static void server_loop(const char *socket_path, const char *pidfile_path,
 		if (ns < 0) {
 			if ((errno == EAGAIN) || (errno == EINTR))
 				continue;
-			perror("accept");
-			exit(1);
+			else
+				die("accept");
 		}
 		len = read(ns, &op, 1);
 		if (len != 1) {
-- 
1.7.1

--
To unsubscribe from this list: send the line "unsubscribe util-linux" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux