summaryrefslogtreecommitdiffstats
path: root/lib/libc
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libc')
-rw-r--r--lib/libc/compat-43/killpg.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/libc/compat-43/killpg.c b/lib/libc/compat-43/killpg.c
index 75b1ad98a8d..3506b8e2b44 100644
--- a/lib/libc/compat-43/killpg.c
+++ b/lib/libc/compat-43/killpg.c
@@ -37,7 +37,7 @@
int
killpg(pid_t pgid, int sig)
{
- if (pgid == 1) {
+ if (pgid < 0 || pgid == 1) {
errno = ESRCH;
return (-1);
}