diff options
author | Petr Uzel | 2011-02-03 15:04:54 +0100 |
---|---|---|
committer | Karel Zak | 2011-02-08 15:21:49 +0100 |
commit | 2d16924217d2d8ed41e56695f6e3ce827ca77d03 (patch) | |
tree | 4270847afa25e5fb24db4245e0256caaf824f078 /misc-utils/uuidd.c | |
parent | uuidd: use daemon(3) library function (diff) | |
download | kernel-qcow2-util-linux-2d16924217d2d8ed41e56695f6e3ce827ca77d03.tar.gz kernel-qcow2-util-linux-2d16924217d2d8ed41e56695f6e3ce827ca77d03.tar.xz kernel-qcow2-util-linux-2d16924217d2d8ed41e56695f6e3ce827ca77d03.zip |
uuidd: use die() where possible
Signed-off-by: Petr Uzel <petr.uzel@suse.cz>
Diffstat (limited to 'misc-utils/uuidd.c')
-rw-r--r-- | 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 0d6139605..79c52b19f 100644 --- a/misc-utils/uuidd.c +++ b/misc-utils/uuidd.c @@ -277,10 +277,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"); } /* @@ -333,8 +331,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) { |