Yes. Linux has a broken get/setrlimit() interface; it is specified
in other systems and in the XPG4.2 and XPG5 standards as an
unsigned integral type.
|>
|> 2) Is there a solution for machines where sizeof(long)==4?
|>
|> One approach would be to make RLIMIT_AS work in units of KB.
|> The only objection I can think of, is that it would then differ
|> from the other size-oriented limits, and that would be a bad thing.
Fix <include/linux/resource.h>:
*** /tmp/r.h Fri Mar 5 13:46:54 1999
--- /tmp/r1.h Fri Mar 5 13:47:38 1999
***************
*** 37,47 ****
long ru_nivcsw; /* involuntary " */
};
! #define RLIM_INFINITY ((long)(~0UL>>1))
struct rlimit {
! long rlim_cur;
! long rlim_max;
};
#define PRIO_MIN (-20)
--- 37,50 ----
long ru_nivcsw; /* involuntary " */
};
!
! typedef unsigned long rlim_t;
!
! #define RLIM_INFINITY ((rlim_t)(~0UL>>1))
struct rlimit {
! rlim_t rlim_cur;
! rlim_t rlim_max;
};
#define PRIO_MIN (-20)
---Note that there are additional changes required for the LFS stuff (rlim64_t, etc).
scott lurndal silicon graphics, inc. (I speak for myself)
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/