kern

diff src/proc.c @ 96:07fe6a614185

filesystem
author John Tsiombikas <nuclear@member.fsf.org>
date Thu, 15 Dec 2011 04:39:00 +0200
parents 7ff2b4971216
children
line diff
     1.1 --- a/src/proc.c	Sun Dec 11 21:15:35 2011 +0200
     1.2 +++ b/src/proc.c	Thu Dec 15 04:39:00 2011 +0200
     1.3 @@ -77,6 +77,8 @@
     1.4  	p->id = 1;
     1.5  	p->parent = 0;	/* no parent for init */
     1.6  
     1.7 +	p->umask = 022;
     1.8 +
     1.9  	p->ticks_left = TIMESLICE_TICKS;
    1.10  	p->next = p->prev = 0;
    1.11  
    1.12 @@ -168,6 +170,8 @@
    1.13  	/* copy file table */
    1.14  	memcpy(p->files, parent->files, sizeof p->files);
    1.15  
    1.16 +	p->umask = parent->umask;
    1.17 +
    1.18  	/* allocate a kernel stack for the new process */
    1.19  	if((p->kern_stack_pg = pgalloc(KERN_STACK_SIZE / PGSIZE, MEM_KERNEL)) == -1) {
    1.20  		return -EAGAIN;