From b299a344ced3a974d74e92da824180052d4c3360 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Fri, 17 Oct 2003 00:10:14 +0000 Subject: small fixes git-svn-id: file:///home/lennart/svn/public/waproamd/trunk@28 022f378f-78c4-0310-b860-d162c87e6274 --- src/waproamd.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/waproamd.c b/src/waproamd.c index 51532a8..33df905 100644 --- a/src/waproamd.c +++ b/src/waproamd.c @@ -594,12 +594,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("waproamd not running.\n"); - else + exit(255); + } else { printf("waproamd process for device %s running as pid %u.\n", interface_name, pid); - - exit(pid == 0 ? 255 : 0); + exit(0); + } } if (!use_syslog) -- cgit