summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--usr.bin/pmdb/pmdb.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/usr.bin/pmdb/pmdb.c b/usr.bin/pmdb/pmdb.c
index 70f032d452c..d3ac2763a4e 100644
--- a/usr.bin/pmdb/pmdb.c
+++ b/usr.bin/pmdb/pmdb.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pmdb.c,v 1.21 2007/08/06 19:16:05 sobrado Exp $ */
+/* $OpenBSD: pmdb.c,v 1.22 2008/05/01 21:18:13 miod Exp $ */
/*
* Copyright (c) 2002 Artur Grabowski <art@openbsd.org>
* All rights reserved.
@@ -186,6 +186,9 @@ main(int argc, char **argv)
if (ps.ps_state == TERMINATED)
break;
+ if (ps.ps_state == NONE || ps.ps_state == LOADED)
+ continue;
+
if (wait(&status) == 0)
err(1, "wait");
if (WIFEXITED(status)) {