From 2fbee76ff768c94df12636108226ed0ce8ef5f59 Mon Sep 17 00:00:00 2001 From: David du Colombier <0intro@gmail.com> Date: Fri, 25 Jan 1991 00:00:00 +0000 Subject: [PATCH] Plan 9 from Bell Labs 1991-01-25 --- port/devpipe.c | 1 + port/pgrp.c | 7 +++---- power/main.c | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/port/devpipe.c b/port/devpipe.c index c827fcf165afc04c77c90c4e3c76c88b9e163c89..82bdeb6bb45cc2b11a9dd81d085e1304f8e02edc 100644 --- a/port/devpipe.c +++ b/port/devpipe.c @@ -78,6 +78,7 @@ pipeattach(char *spec) lock(&pipealloc); if(pipealloc.free == 0){ unlock(&pipealloc); + close(c); error(Enopipe); } p = pipealloc.free; diff --git a/port/pgrp.c b/port/pgrp.c index 3f397c08f29a2728ca1b44d6620a9df38d4f1626..6035ecf599d53b2d2e2bd07a18865e37dcfe832c 100644 --- a/port/pgrp.c +++ b/port/pgrp.c @@ -72,11 +72,10 @@ pgrpnote(Pgrp *pg, char *a, long n, int flag) unlock(&p->debug); continue; } - if(waserror()){ - unlock(&p->debug); - continue; + if(!waserror()){ + postnote(p, 0, buf, flag); + poperror(); } - postnote(p, 0, buf, flag); unlock(&p->debug); } } diff --git a/power/main.c b/power/main.c index a759a867fa72ea3abdc510472b782c79a5debacb..2b0e4f828f30fe1ee7bac208775b4da973b108b0 100644 --- a/power/main.c +++ b/power/main.c @@ -629,10 +629,10 @@ confinit(void) conf.nurp = 25; conf.nqueue = 5 * conf.nstream; conf.nblock = 10 * conf.nstream; - conf.npipe = conf.nstream/2; confread(); + conf.npipe = conf.nstream/2; /* must be after confread */ if(conf.nmach > MAXMACH) panic("confinit"); conf.copymode = 1; /* copy on reference */