Details
[Home]
Issue of the Implementation # S0167
Brief
ulimit(UL_SETFSIZE) does not return the integer part of the new file size limit divided by 512
Detailed Description
According to POSIX and therefore to LSB, function ulimit(UL_SETFSIZE) shall return "the integer part of the new file size limit divided by 512". In glibc this function always returns 0 upon successful completion. The code below demonstrates that ulimit(UL_SETFSIZE, 10000) returns 0 while the limit is changed to 10000 as required.
Problem location(s) in the standard
Linux Standard Base Core Specification 3.1, Chapter 13. Base Libraries, 13.5. Interface Definitions for libc, description of ulimit() function. that refers The Open Group Base Specifications Issue 6 IEEE Std 1003.1, 2004 Edition (SUS 3.0), System Interfaces, description of functions ulimit().
Example
#include <ulimit.h> #include <stdio.h> int main( int argc, char ** argv ) { long res; res=ulimit(UL_GETFSIZE); printf("Result of ulimit(UL_GETFSIZE): %ld\n", res); res=ulimit(UL_SETFSIZE, 10000); printf("Result of ulimit(UL_SETFSIZE, 10000): %ld\n", res); res=ulimit(UL_GETFSIZE); printf("Result of ulimit(UL_GETFSIZE): %ld\n", res); return 0; }
Component
glibc
Accepted
Red Hat Bugzilla, 6947
Status
Fixed in glibc-2.9
[Home]