Please note that as of October 24, 2014, the Nokia Developer Wiki will no longer be accepting user contributions, including new entries, edits and comments, as we begin transitioning to our new home, in the Windows Phone Development Wiki. We plan to move over the majority of the existing entries over the next few weeks. Thanks for all your past and future contributions.

Archived:Open C - Proper error code returned from S60 3rd Edition when shared memory is created twice with different size (Known Issue)

From Wiki
Jump to: navigation, search

Archived.pngArchived: This article is archived because it is not considered relevant for third-party developers creating commercial solutions today. If you think this article is still relevant, let us know by adding the template {{ReviewForRemovalFromArchive|user=~~~~|write your reason here}}.

Article Metadata
Tested with
Devices(s): All (S60 3rd Edition)
Platform(s): S60 3rd Edition (initial release, FP1, FP2)
S60 3rd Edition FP2
S60 3rd Edition FP1
S60 3rd Edition (initial release)
Created: User:Technical writer 1 (20 Aug 2008)
Last edited: hamishwillee (08 Aug 2012)


In the next Open C release, EEXIST is returned to the user instead of EINVAL when a user attempts to create a shared memory segment (shmget) twice while specifying different sizes for the segments.

This binary incompatible change is to improve the performance and better adhere to POSIX standards.

How to reproduce

  int shm_id ;
if ((shm_id = shmget(1000, 100, 512))== -1) {
printf("shared memory create failed with errno %d\n", errno);
if ((shm_id = shmget(1000, 200, 1536))== -1) {
/* now returns with errno = 17 ( not errno = 22 ) */
printf("Shared memory create failed with errno %d\n", errno);


Open C applications should be ready to handle the change in returned error value.

This page was last modified on 8 August 2012, at 02:06.
31 page views in the last 30 days.

Was this page helpful?

Your feedback about this content is important. Let us know what you think.


Thank you!

We appreciate your feedback.