Help about mmap function under QNX

I have a parent process which creates a shared memory using shm_open and 2
children processes.
When I use fork() to create children and I use mmap inside them all works
fine.
If I use spawn() I have the following error : “Not supported”
what does it mean?
I know that spawn should not destroy any fd.Is it true?
Please help me

Angelo <angelo.iorio1977@libero.it> wrote:

I have a parent process which creates a shared memory using shm_open and 2
children processes.
When I use fork() to create children and I use mmap inside them all works
fine.
If I use spawn() I have the following error : “Not supported”
what does it mean?
I know that spawn should not destroy any fd.Is it true?
Please help me

Not enough information here – there are lots of things that could
have gone wrong.

What/where do you get “not supported” – on the spawn call? On the
later mmap() call?

How do you setup the fds to be inheritted? If you set the FD_CLOEXEC
flag, they will be closed at exec/spawn time.

How does the spawned child get/try to get the fd to use on the mmap() call?

-David

QNX Training Services
http://www.qnx.com/support/training/
Please followup in this newsgroup if you have further questions.