diff options
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) |