|
8 | 8 | *
|
9 | 9 | *
|
10 | 10 | * IDENTIFICATION
|
11 |
| - * $Header: /cvsroot/pgsql/src/backend/storage/ipc/ipc.c,v 1.57 2000/12/11 00:49:52 tgl Exp $ |
| 11 | + * $Header: /cvsroot/pgsql/src/backend/storage/ipc/ipc.c,v 1.58 2000/12/30 01:20:55 tgl Exp $ |
12 | 12 | *
|
13 | 13 | * NOTES
|
14 | 14 | *
|
@@ -272,9 +272,14 @@ InternalIpcSemaphoreCreate(IpcSemaphoreKey semKey,
|
272 | 272 | /*
|
273 | 273 | * Fail quietly if error indicates a collision with existing set.
|
274 | 274 | * One would expect EEXIST, given that we said IPC_EXCL, but perhaps
|
275 |
| - * we could get a permission violation instead? |
| 275 | + * we could get a permission violation instead? Also, EIDRM might |
| 276 | + * occur if an old set is slated for destruction but not gone yet. |
276 | 277 | */
|
277 |
| - if (errno == EEXIST || errno == EACCES) |
| 278 | + if (errno == EEXIST || errno == EACCES |
| 279 | +#ifdef EIDRM |
| 280 | + || errno == EIDRM |
| 281 | +#endif |
| 282 | + ) |
278 | 283 | return -1;
|
279 | 284 | /*
|
280 | 285 | * Else complain and abort
|
@@ -516,9 +521,14 @@ InternalIpcMemoryCreate(IpcMemoryKey memKey, uint32 size, int permission)
|
516 | 521 | /*
|
517 | 522 | * Fail quietly if error indicates a collision with existing segment.
|
518 | 523 | * One would expect EEXIST, given that we said IPC_EXCL, but perhaps
|
519 |
| - * we could get a permission violation instead? |
| 524 | + * we could get a permission violation instead? Also, EIDRM might |
| 525 | + * occur if an old seg is slated for destruction but not gone yet. |
520 | 526 | */
|
521 |
| - if (errno == EEXIST || errno == EACCES) |
| 527 | + if (errno == EEXIST || errno == EACCES |
| 528 | +#ifdef EIDRM |
| 529 | + || errno == EIDRM |
| 530 | +#endif |
| 531 | + ) |
522 | 532 | return NULL;
|
523 | 533 | /*
|
524 | 534 | * Else complain and abort
|
|
0 commit comments