summaryrefslogtreecommitdiffstats
path: root/src/aeswepd.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/aeswepd.c')
-rw-r--r--src/aeswepd.c9
1 files changed, 5 insertions, 4 deletions
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) {