File descriptors in Phab applications

I have just tracked down a bug in my code in a Phab application. In the
startup routine I had used up just about all of the applications file
descriptors (even though there are 512 of them I had used about 508) this
resulted in the limit being exceeded as the remainder of the widgets in the
application were created, i.e. the shared memory regions in DB containers
etc.

The result was an application that worked but had broken widgets in that the
strings in button and similar widgets were drawn in the top right hand
corner instead of the centre. The application did however run.

Does that mean that the Phab routines that require file descriptors do not
detect the lack of descriptors when they are all used up ?

Steve

Hi Stephen,

A possible workaround for this would be in the build image to increase the number
of file descriptors. The default is 512 but can be increased to as high as 2000.

You would change the Proc32 line to include the -p option

$ Proc32 -v3 -l $(lnode) -p num_procs

Then make the image and replace your current boot image.

Hope this helps
Regards
Brenda


Stephen F Terrell <stephen@trsystem.demon.co.uk> wrote:

I have just tracked down a bug in my code in a Phab application. In the
startup routine I had used up just about all of the applications file
descriptors (even though there are 512 of them I had used about 508) this
resulted in the limit being exceeded as the remainder of the widgets in the
application were created, i.e. the shared memory regions in DB containers
etc.

The result was an application that worked but had broken widgets in that the
strings in button and similar widgets were drawn in the top right hand
corner instead of the centre. The application did however run.

Does that mean that the Phab routines that require file descriptors do not
detect the lack of descriptors when they are all used up ?

Steve