This version of this document is no longer maintained. For the latest documentation, see http://www.qnx.com/developers/docs. |
Return the value of a configurable system limit
#include <unistd.h> #include <limits.h> long sysconf( int name );
libc
Use the -l c option to qcc to link against this library. This library is usually included automatically.
The sysconf() function returns the value of a configurable system limit indicated by name.
Configurable limits are defined in <confname.h>, and contain at least the following values:
The requested configurable system limit. If name isn't defined for the system, -1 is returned.
#include <stdio.h> #include <stdlib.h> #include <limits.h> #include <unistd.h> int main( void ) { printf( "_SC_ARG_MAX = %ld\n", sysconf( _SC_ARG_MAX ) ); return EXIT_SUCCESS; }
Safety: | |
---|---|
Cancellation point | No |
Interrupt handler | No |
Signal handler | Yes |
Thread | Yes |
getconf in the Utilities Reference
Understanding System Limits chapter of the Neutrino User's Guide