Please ignore last two messages, I figured out what I was doing wrong. With soft limit < hard limit, setrlimit behaves as it should. Sorry for the noise on the list.