From 7751cdbdaebaf85c0fd6d1480fe3ae3cc81eee32 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Fri, 17 Oct 2003 00:10:23 +0000 Subject: small fixes git-svn-id: file:///home/lennart/svn/public/aeswepd/trunk@32 022f378f-78c4-0310-b860-d162c87e6274 --- src/aeswepd.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'src/aeswepd.c') diff --git a/src/aeswepd.c b/src/aeswepd.c index 2975647..1f74c64 100644 --- a/src/aeswepd.c +++ b/src/aeswepd.c @@ -506,12 +506,13 @@ void parse_args(int argc, char *argv[]) { if (_check) { pid_t pid = daemon_pid_file_is_running(); - if (pid == (pid_t) -1) + if (pid == (pid_t) -1 || pid == 0) { printf("aeswepd not running.\n"); - else + exit(255); + } else { printf("aeswepd process for device %s running as pid %u.\n", interface_name, pid); - - exit(pid == 0 ? 255 : 0); + exit(0); + } } if (_list_keys) { -- cgit