about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--pwait.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/pwait.c b/pwait.c
index 15b4904..2ed699c 100644
--- a/pwait.c
+++ b/pwait.c
@@ -187,6 +187,9 @@ usage:
 		pids[m++] = pid;
 	}
 
+	if (m == 0)
+		exit(1);
+
 	sk_nl = socket(PF_NETLINK, SOCK_DGRAM, NETLINK_CONNECTOR);
 	if (sk_nl == -1) {
 		perror("socket sk_nl error");