~kris/9p

9hist

e6e81ff8b3af3d1c38ce54365a810c7c1ebdb201 — David du Colombier 32 years ago 3d2b230
Plan 9 from Bell Labs 1994-01-06
2 files changed, 11 insertions(+), 2 deletions(-)

M port/portdat.h
M port/sysproc.c
M port/portdat.h => port/portdat.h +2 -1
@@ 315,7 315,8 @@ enum
	SG_PHYSICAL	= 05,
	SG_SHDATA	= 06,

	SG_RONLY	= 040,		/* Segment is read only */
	SG_RONLY	= 0040,		/* Segment is read only */
	SG_CEXEC	= 0100,		/* Detach at exec */
};

#define PG_ONSWAP	1

M port/sysproc.c => port/sysproc.c +9 -1
@@ 330,7 330,15 @@ sysexec(ulong *arg)
	 */
	for(i = SSEG; i <= BSEG; i++) {
		putseg(up->seg[i]);
		up->seg[i] = 0;	    /* prevent a second free if we have an error */
		/* prevent a second free if we have an error */
		up->seg[i] = 0;
	}
	for(i = BSEG+1; i < NSEG; i++) {
		s = up->seg[i];
		if(s != 0 && (s->type&SG_CEXEC)) {
			putseg(s);
			up->seg[i] = 0;
		}
	}

	/*