Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 142249

Summary: bash built-in ulimit command does not recognize the -r and -e options
Product: Gentoo Linux Reporter: Chris <chris.kcat>
Component: New packagesAssignee: Gentoo's Team for Core System packages <base-system>
Status: RESOLVED INVALID    
Severity: major    
Priority: High    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description Chris 2006-07-31 01:15:21 UTC
Or any options involving newer Linux kernel options. First problem being that 2.6.11 is the latest stable kernel headers, so I had to unmask the 2.6.16 headers. I noticed that one of the patches adds the -r and -e options, so I rebuilt bash with the newer kernel headers installed. However, even after rebuilding bash and starting a new bash session, the -r and -e options weren't available.

I traced the problem to the fact that bash was only looking at sys/resource.h, but to get the RLIMIT defines you need to include linux/resource.h (or more specificly, asm-generic/resource.h, but that's included by asm/resource.h which is included by linux/resource.h). sys/resource.h only includes bits/resource.h (neither of which contain RLIMIT defines), and not the Linux-specific ones.

I'd say this is a pretty major bug, as there's no other way, that I'm aware of, to set the rt priority/niceness limits without making your own program to call the setrlimit function (not to mention it makes the aforementioned ulimit patch completely useless as-is).
Comment 1 SpanKY gentoo-dev 2006-07-31 21:00:29 UTC
has nothing to do with linux-headers

your glibc needs to define that value in bits/resource.h