Another fix to inheriting shared segments. Do the copy on write

thing if needed.
Submitted by:	Alan Cox <alc@cs.rice.edu>
This commit is contained in:
John Dyson 1997-01-31 04:10:41 +00:00
parent e381d7a250
commit 5069bf5747

View File

@ -2157,7 +2157,15 @@ vmspace_fork(vm1)
old_entry->start));
old_entry->object.vm_object = object;
old_entry->offset = (vm_offset_t) 0;
}
} else if (old_entry->eflags & MAP_ENTRY_NEEDS_COPY) {
vm_object_shadow(&old_entry->object.vm_object,
&old_entry->offset,
OFF_TO_IDX(old_entry->end -
old_entry->start));
old_entry->eflags &= ~MAP_ENTRY_NEEDS_COPY;
object = old_entry->object.vm_object;
}
/*
* Clone the entry, referencing the sharing map.