about summary refs log tree commit diff
diff options
context:
space:
mode:
authorRoland McGrath <roland@gnu.org>2001-10-10 20:10:51 +0000
committerRoland McGrath <roland@gnu.org>2001-10-10 20:10:51 +0000
commit2e342fe6232d8d5ad7820defef9c8f8c3c1dc825 (patch)
tree2b50bb7459acbe66eeb218fc85ed5100db9f6706
parent1c92cebb26a62dbf3dc3d5d53a1aa52782dbe015 (diff)
downloadglibc-2e342fe6232d8d5ad7820defef9c8f8c3c1dc825.tar.gz
glibc-2e342fe6232d8d5ad7820defef9c8f8c3c1dc825.tar.xz
glibc-2e342fe6232d8d5ad7820defef9c8f8c3c1dc825.zip
2001-10-07 Roland McGrath <roland@frob.com>
	* sysdeps/mach/hurd/setrlimit.c (__setrlimit): Never return ENOSYS.
-rw-r--r--sysdeps/mach/hurd/setrlimit.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/sysdeps/mach/hurd/setrlimit.c b/sysdeps/mach/hurd/setrlimit.c
index 8f3db529f8..29f91cf926 100644
--- a/sysdeps/mach/hurd/setrlimit.c
+++ b/sysdeps/mach/hurd/setrlimit.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991,92,93,94,97,98,2000 Free Software Foundation, Inc.
+/* Copyright (C) 1991,92,93,94,97,98,2000,01 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -38,12 +38,9 @@ __setrlimit (enum __rlimit_resource resource, const struct rlimit *rlimits)
 
   lim = *rlimits;
 
-  if (lim.rlim_max != RLIM_INFINITY)
-    {
-      /* We have no enforceable resource limits.  */
-      errno = ENOSYS;
-      return -1;
-    }
+  /* Even though most limits do nothing, there is no inheritance, and hard
+     limits are not really hard, we just let any old call succeed to make
+     life easier for programs that expect normal behavior.  */
 
   if (lim.rlim_cur > lim.rlim_max)
     lim.rlim_cur = lim.rlim_max;