-/*
- * Increment attach count on fork
- */
-shmfork(mp, ischild)
- register struct mapmem *mp;
-{
- if (!ischild)
- shmsegs[mp->mm_id % SHMMMNI].shm_nattch++;
+ /*
+ * Copy parents descriptive information
+ */
+ size = shminfo.shmseg * sizeof(struct shmdesc);
+ shmd = (struct shmdesc *)malloc(size, M_SHM, M_WAITOK);
+ bcopy((caddr_t)rip->p_shm, (caddr_t)shmd, size);
+ rpp->p_shm = (caddr_t)shmd;
+ /*
+ * Increment reference counts
+ */
+ for (size = 0; size < shminfo.shmseg; size++, shmd++)
+ if (shmd->shmd_uva)
+ shmsegs[shmd->shmd_id % SHMMMNI].shm_nattch++;