*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/storage/ipc/ipc.c,v 1.3 1996/07/25 19:45:24 scrappy Exp $
+ * $Header: /cvsroot/pgsql/src/backend/storage/ipc/ipc.c,v 1.4 1996/08/14 05:01:53 scrappy Exp $
*
* NOTES
*
} onexit_list[ MAX_ON_EXITS ];
static int onexit_index;
+static void IpcConfigTip();
typedef struct _PrivateMemStruct {
int id;
if (semId < 0) {
perror("semget");
+ IpcConfigTip();
exitpg(3);
}
for (i = 0; i < semNum; i++) {
errStatus = semctl(semId, 0, SETALL, semun);
if (errStatus == -1) {
perror("semctl");
+ IpcConfigTip();
}
if (removeOnExit)
IpcSemaphoreSet_return = errStatus;
if (errStatus == -1)
+ {
perror("semctl");
+ IpcConfigTip();
+ }
}
/****************************************************************************/
if (errStatus == -1) {
perror("semop");
+ IpcConfigTip();
exitpg(255);
}
}
if (errStatus == -1) {
perror("semop");
+ IpcConfigTip();
exitpg(255);
}
}
fprintf(stderr,"IpcMemoryCreate: memKey=%d , size=%d , permission=%d",
memKey, size , permission );
perror("IpcMemoryCreate: shmget(..., create, ...) failed");
+ IpcConfigTip();
return(IpcMemCreationFailed);
}
fprintf(stderr,"IpcMemoryIdGet: memKey=%d , size=%d , permission=%d",
memKey, size , 0 );
perror("IpcMemoryIdGet: shmget() failed");
+ IpcConfigTip();
return(IpcMemIdGetFailed);
}
/* if ( *memAddress == -1) { XXX ??? */
if ( memAddress == (char *)-1) {
perror("IpcMemoryAttach: shmat() failed");
+ IpcConfigTip();
return(IpcMemAttachFailed);
}
}
#endif /* HAS_TEST_AND_SET */
+
+static void
+IpcConfigTip()
+{
+ fprintf(stderr,"This type of error is usually caused by improper\n");
+ fprintf(stderr,"shared memory or System V IPC semaphore configuration.\n");
+ fprintf(stderr,"See the FAQ for more detailed information\n");
+}