From owner-svn-src-head@FreeBSD.ORG Sun Nov 3 23:06:25 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id B6A83D7; Sun, 3 Nov 2013 23:06:25 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id A3A4D28C9; Sun, 3 Nov 2013 23:06:25 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rA3N6PeC084928; Sun, 3 Nov 2013 23:06:25 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rA3N6PZY084926; Sun, 3 Nov 2013 23:06:25 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201311032306.rA3N6PZY084926@svn.freebsd.org> From: Jilles Tjoelker Date: Sun, 3 Nov 2013 23:06:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r257597 - in head: lib/libc/sys sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 03 Nov 2013 23:06:25 -0000 Author: jilles Date: Sun Nov 3 23:06:24 2013 New Revision: 257597 URL: http://svnweb.freebsd.org/changeset/base/257597 Log: kqueue: Change error for kqueues rlimit from EMFILE to ENOMEM and document this error condition in the kqueue(2) manual page. Discussed with: kib Modified: head/lib/libc/sys/kqueue.2 head/sys/kern/kern_event.c Modified: head/lib/libc/sys/kqueue.2 ============================================================================== --- head/lib/libc/sys/kqueue.2 Sun Nov 3 22:57:59 2013 (r257596) +++ head/lib/libc/sys/kqueue.2 Sun Nov 3 23:06:24 2013 (r257597) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd January 21, 2013 +.Dd November 4, 2013 .Dt KQUEUE 2 .Os .Sh NAME @@ -532,6 +532,13 @@ system call fails if: .Bl -tag -width Er .It Bq Er ENOMEM The kernel failed to allocate enough memory for the kernel queue. +.It Bq Er ENOMEM +The +.Dv RLIMIT_KQUEUES +rlimit +(see +.Xr getrlimit 2 ) +for the current user would be exceeded. .It Bq Er EMFILE The per-process descriptor table is full. .It Bq Er ENFILE Modified: head/sys/kern/kern_event.c ============================================================================== --- head/sys/kern/kern_event.c Sun Nov 3 22:57:59 2013 (r257596) +++ head/sys/kern/kern_event.c Sun Nov 3 23:06:24 2013 (r257597) @@ -712,7 +712,7 @@ sys_kqueue(struct thread *td, struct kqu RLIMIT_KQUEUES))) { PROC_UNLOCK(p); crfree(cred); - return (EMFILE); + return (ENOMEM); } PROC_UNLOCK(p);