mirror of
https://sourceware.org/git/glibc.git
synced 2024-11-26 15:00:06 +00:00
2001-10-07 Roland McGrath <roland@frob.com>
* sysdeps/mach/hurd/setrlimit.c (__setrlimit): Never return ENOSYS.
This commit is contained in:
parent
1c92cebb26
commit
2e342fe623
@ -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.
|
This file is part of the GNU C Library.
|
||||||
|
|
||||||
The GNU C Library is free software; you can redistribute it and/or
|
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;
|
lim = *rlimits;
|
||||||
|
|
||||||
if (lim.rlim_max != RLIM_INFINITY)
|
/* 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
|
||||||
/* We have no enforceable resource limits. */
|
life easier for programs that expect normal behavior. */
|
||||||
errno = ENOSYS;
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (lim.rlim_cur > lim.rlim_max)
|
if (lim.rlim_cur > lim.rlim_max)
|
||||||
lim.rlim_cur = lim.rlim_max;
|
lim.rlim_cur = lim.rlim_max;
|
||||||
|
Loading…
Reference in New Issue
Block a user