Sample program

The following example shows the source code that you can use to increase the hard limit:

#include <sys/time.h>
 #include <sys/resource.h>
 #include <sys/types.h>
 ** define MAX_CONNECTIONS to a number less than
 ** 10000. The number defined will then become the maximum
 ** number of connections allowed by an Adaptive Server.
 #define MAX_CONNECTIONS 9999
 extern int errno;
 char **argv;
     struct rlimit rlp;
     uid_t uid;
     rlp.rlim_cur = MAX_CONNECTIONS;
     rlp.rlim_max = MAX_CONNECTIONS;
  /* set the number of open file desriptors to
     if (setrlimit (RLIMIT_NOFILE,&rlp) == -1)
   /* reset the user id to disable superuser
     privileges */
     uid = getuid();
   /* run the program indicated as arguments to
     this program */
     execv(*++argv, argv);

For additional information on user connections, see the System Administration Guide.