plan 9 kernel history: overview | file list | diff list

1992/0428/port/pgrp.c (diff list | history)

1992/0321/sys/src/9/port/pgrp.c:74,941992/0428/sys/src/9/port/pgrp.c:74,97 (short | long | prev | next)
1990/1110    
} 
 
void 
pgrpnote(Pgrp *pg, char *a, long n, int flag) 
1992/0428    
pgrpnote(ulong noteid, char *a, long n, int flag) 
1990/1110    
{ 
	int i; 
	Proc *p; 
1992/0428    
	Proc *p, *ep; 
1990/1110    
	char buf[ERRLEN]; 
 
	if(n >= ERRLEN-1) 
1990/11211    
		error(Etoobig); 
1992/0428    
 
1991/0318    
	memmove(buf, a, n); 
1990/1110    
	buf[n] = 0; 
	p = proctab(0); 
1991/1112    
	for(i=0; i<conf.nproc; i++, p++) { 
		if(p->pgrp == pg && p->kp == 0) { 
1992/0428    
	ep = p+conf.nproc; 
	for(; p < ep; p++) { 
		if(p->state == Dead) 
			continue; 
		if(p->noteid == noteid && p->kp == 0) { 
1991/1216    
			qlock(&p->debug); 
1990/1110    
			if(p->pid==0 || p->pgrp!=pg){ 
1992/0428    
			if(p->pid==0 || p->noteid != noteid){ 
1991/1216    
				qunlock(&p->debug); 
1990/1110    
				continue; 
			} 


source code copyright © 1990-2005 Lucent Technologies; see license
Plan 9 distribution
comments to russ cox (rsc@swtch.com)