Does shmget(key, 0,0) always return shmid if there is shared memory
identifier associated with that key?

#define KEY 11235
void server()
{
int shmid = shmget(KEY, 1024, 644); // success
// ...
}

void client()
{
int shmid = shmget(KEY, 0, 0); // Does it return shmid obtained in
server()?
// ...
}

Alex Vinokur