diff options
author | Lennart Poettering <lennart@poettering.net> | 2003-10-17 00:10:14 +0000 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2003-10-17 00:10:14 +0000 |
commit | b299a344ced3a974d74e92da824180052d4c3360 (patch) | |
tree | 2ed40bb0b3f86082e3d10b017f8215199c278b01 /src | |
parent | a0c326671fc3e5ffb185b508752e865bd1c06cdc (diff) |
small fixes
git-svn-id: file:///home/lennart/svn/public/waproamd/trunk@28 022f378f-78c4-0310-b860-d162c87e6274
Diffstat (limited to 'src')
-rw-r--r-- | src/waproamd.c | 9 |
1 files changed, 5 insertions, 4 deletions
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) |