shm_open question...

bridged with qdn.public.qnxrtp.porting
Post Reply
kc

shm_open question...

Post by kc » Wed Oct 02, 2002 4:17 pm

Hi all,

Actually this is related to the previous problem "subject: select problem".
I found that after I have called shm_open with different shared memory
objects more than 27 times, thing gets corrupted, and it seems always
affecting the same place and the same routine. This in turn messes up the
"select" call. Is there any limit on how many time shm_open could be
called?

Thanks
kc

Sean Boudreau

Re: shm_open question...

Post by Sean Boudreau » Wed Oct 02, 2002 5:24 pm

Beware of the FD_SETSIZE. See <sys/select.h>. The default
is 32 meaning that if you try to select() on an fd with
numerical value > 31, weird things can happen. Try something
like:

#define FD_SETSIZE 128
#include <sys/select.h>
...
...

-seanb

kc <kclee@netnobound.com> wrote:
Hi all,

Actually this is related to the previous problem "subject: select problem".
I found that after I have called shm_open with different shared memory
objects more than 27 times, thing gets corrupted, and it seems always
affecting the same place and the same routine. This in turn messes up the
"select" call. Is there any limit on how many time shm_open could be
called?

Thanks
kc

kc

Re: shm_open question...

Post by kc » Wed Oct 02, 2002 9:08 pm

I have been struggling with this problem for couple days already.
Thanks for reminding me about that. Everything is working fine now.

Thanks again.
kc


Sean Boudreau wrote:
Beware of the FD_SETSIZE. See <sys/select.h>. The default
is 32 meaning that if you try to select() on an fd with
numerical value > 31, weird things can happen. Try something
like:

#define FD_SETSIZE 128
#include <sys/select.h
..
..

-seanb

kc <kclee@netnobound.com> wrote:
Hi all,

Actually this is related to the previous problem "subject: select
problem". I found that after I have called shm_open with different shared
memory objects more than 27 times, thing gets corrupted, and it seems
always affecting the same place and the same routine. This in turn messes
up the "select" call. Is there any limit on how many time shm_open could
be called?

Thanks
kc

Post Reply

Return to “qdn.public.qnxrtp.porting”