From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-io0-f178.google.com ([209.85.223.178]) by ur; Wed May 17 11:46:37 EDT 2017 Received: by mail-io0-f178.google.com with SMTP id o12so11898511iod.3 for <9front@9front.org>; Wed, 17 May 2017 08:46:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tesio-it.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=rqhTOV7Obz6D9b8FiJ6mrPOd2Op0YuqTbDkNDqKkexM=; b=TN+dVnZgceRRv0s9tYvwOniF+lTVQI6Mrf6d0qAuSRh7sVfTECPxD1rmSWfCW/4vBt OxrmXWzHyRwCxwNistzbHtXDnyCZH+UGeAcuTWot2gTpYRczT7wx4lOQ2HcnGAOMBzSM 8O0wO6xk1v2Enz8XkGuIAb8Ip8oPOx+sAqTP88UNRHpuJgSjWsVU2CGRW4GR+OhQ/28R qfj91CPMbk/G/+LDG2npzYRslcREEq77CNyLYdldB3+RH6dpZ+5rNL2aAXNFrvehRTCm nvLeOXcrGA/bC4huLJXcPbIiOQ9E4vD8ho0WTUBdH9wDfkgQKc5HMZHU/N+2TJ1vRUoS +5KQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=rqhTOV7Obz6D9b8FiJ6mrPOd2Op0YuqTbDkNDqKkexM=; b=mb56Hd31JO7765xKbAlCfVjUtcW+Tc0FqR1xKzwNAHEr2WgVIOKkHKPYIRjz2CCL8d 9avT3MC7FiJ4coCj6VDTh4mEaOk2U5NqJEB7WsVdqEA5TfTdtNHbJ64YyR4C2DRcHKx6 i21X1JNHqTen/MIIKeTnQJ2WuUljrw3xEVAA0I5s6P5g5obWGmWjFuMIUhb4TKdCE75f eDH2AeGsluV0oZc9tTToEkuc0JaaQsdqw6IS/EY7p2pZ0rgMg7eM1IS8ENi8rOZxbZm6 GOO5atyffXLLY/yB0MK3eN+9nPbjGJfSWTchjtTEHmiCon8snrjdVsbypWAIGjZSKOjC rqNg== X-Gm-Message-State: AODbwcCoDiUSu7bKnqNjPgCsVytupceNO/oDwszAvJSK7Gf1OgWepw2P n6RGuV08hK1zm29W/0wg2btHgETroL87 X-Received: by 10.107.16.142 with SMTP id 14mr4622610ioq.134.1495035992097; Wed, 17 May 2017 08:46:32 -0700 (PDT) MIME-Version: 1.0 Received: by 10.107.33.13 with HTTP; Wed, 17 May 2017 08:46:31 -0700 (PDT) In-Reply-To: References: From: Giacomo Tesio Date: Wed, 17 May 2017 17:46:31 +0200 Message-ID: Subject: Re: [9fans] Blocking on write To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net> Cc: 9front@9front.org Content-Type: multipart/alternative; boundary="001a113fe4e83c851a054fba3141" List-ID: <9front.9front.org> List-Help: X-Glyph: ➈ X-Bullshit: non-blocking cache map/reduce method database-aware database --001a113fe4e83c851a054fba3141 Content-Type: text/plain; charset="UTF-8" In Jehanne, I decided to test both: if the queue is not closed there's no need to check up->errstr. Thanks for your help! Giacomo 2017-05-15 18:12 GMT+02:00 Charles Forsyth : > > On 15 May 2017 at 16:46, Giacomo Tesio wrote: > >> Shouldn't the waserror code check that the queue has been actually closed? > > > Either that or check errstr against Ehungup, since that's the exact error > it incurred. > The latter has the advantage of not obscuring a different error if the > pipe is closed > between the write and waserror, but with pipes there's not much except > interrupt, I suppose, > so it seems a minor race and perhaps the qclosed check is adequate. > --001a113fe4e83c851a054fba3141 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
In Jehanne, I decided to test both: if the queue= is not closed there's no need to check up->errstr.

Tha= nks for your help!


Giacomo

2017-05-15 18:12 GMT+02:00 Charles Fors= yth <charles.forsyth@gmail.com>:

On 15 May 2017 at 16:46, Giacomo Tesio <gia= como@tesio.it> wrote:
Shoul= dn't the waserror code check that the queue has been actually closed?

Either that or check errstr against Ehungup, si= nce that's the exact error it incurred.
The latter has the advantage of not obscuring a different error if the pip= e is closed
between the write and waserror,= but with pipes there's not much except interrupt, I suppose,
so it seems a minor race and perhaps the qclosed che= ck is adequate.

--001a113fe4e83c851a054fba3141--