svn commit: r257597 - in head: lib/libc/sys sys/kern

Jilles Tjoelker jilles at FreeBSD.org
Sun Nov 3 23:06:25 UTC 2013


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);
 


More information about the svn-src-all mailing list