Too many open files client server

Hi Community !!

I’ try to send via Message Passing ( MsgSend() ) from a client to a server.
Output ist on the Parallel Port.


    delay(DELAY);
    out.inout = 'o';
    out.offset = 0;
    out.outbyte = 0x00;
    serverpid = name_open("paralp_serv6", 0);
   
    MsgSend(serverpid, &out, sizeof(out), NULL, 0);
    delay(DELAY);
    out.inout = 'o';
    out.offset = 0;
    out.outbyte = 0xFF;
    serverpid = name_open("paralp_serv6", 0);

    
    MsgSend(serverpid, &out, sizeof(out), NULL, 0);

But the problem is following,
i.e. to send over 40s I need a delay of 40 ms

delay(DELAY);

If I dont have this delay following error occurs

        Too many open files

Whats the reason for this and how is it possible to work without delay

You need to call name_open only once, everytime you call name_open you are consuming a file descriptor.

Thank You mario
this works perfect !!!

But in QNX4 it is possible with “qnx_name_locate()”
Why?

No file descriptor?