ftruncate () in 6.1 & shmen_open () in 6.0 (6.1?)

Hi, All:

I am having a problem in using ftruncate () in QNX 6.1. Here is a simple
test I did: I opened a file of 1K size with “write-only” under QNX 6.0, I
could expand it to 16K without problem; then I tried the same thing under
6.1, it tells me error; and then I changed the flag as “write-read”, it
tells me OK, but nothing happened to my file.

BTW, under 6.0, I used shmen_open () to open a shared memory object as
“read_only”, then use ftrucate () over it. It should report error, but it
didn’t, why? Did shmen_open () open the shared memory object as “writable”
when we want it “read-only”?

Thanks.

Xuedong