9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: Giacomo Tesio <giacomo@tesio.it>
To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net>
Subject: Re: [9fans] read9pmsg usage
Date: Wed, 12 Aug 2015 02:21:38 +0200	[thread overview]
Message-ID: <CAHL7psFCnVy9Bi6Wf1tXx_v4mQoGGAs7upE0j2Ofc-MnOp6u9g@mail.gmail.com> (raw)
In-Reply-To: <CAOw7k5h7o+pCy5TABBtXRgBATqPsRac45_WXttevGzbqLvTg+w@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1586 bytes --]

2015-08-11 17:48 GMT+02:00 Charles Forsyth <charles.forsyth@gmail.com>:

>
> On 10 August 2015 at 15:11, Giacomo Tesio <giacomo@tesio.it> wrote:
>
>> /*
>>  * reading from a pipe or a network device
>>  * will give an error after a few eof reads.
>>  * however, we cannot tell the difference
>>  * between a zero-length read and an interrupt
>>  * on the processes writing to us,
>>  * so we wait for the error.
>>  */
>>
>>
> it's doubly odd, because there's no reason for an interrupted writer to go
> to the lengths of writing an empty record as a consequence of being
> interrupted. it will waserror out in the writer, so why should an empty
> Block end up on the underlying Queue?
>

Ah, if only git existed when that comment was written! :-D

When I read that comment I though of a remote user space writer, whose
kernel (an old plan9 version?) on process interrupt gracefully send EOFs to
all chan open for write.

However I wasn't able to find anything concrete prove of this behavior in
the codebase (but maybe I looked at the wrong places)


> In fact, an interrupted writer in devmnt will start the flush(5) protocol,
> so it will be writing Tflush, not empty records.
>

This is interesting too: I thought that Tflush were for requests that had
not yet been completed. But the interrupted writer could be just waiting. I
mean the chan is open, but its last Twrite has already been replied with a
Rwrite.

In this case, sending a EOF on behalf of a process could have sense... or
not? Probably depends on the interrupt.


Giacomo

[-- Attachment #2: Type: text/html, Size: 2483 bytes --]

  reply	other threads:[~2015-08-12  0:21 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-10 14:11 Giacomo Tesio
2015-08-10 14:22 ` erik quanstrom
2015-08-10 14:35   ` Giacomo Tesio
2015-08-10 14:54     ` Charles Forsyth
2015-08-10 15:40       ` Charles Forsyth
2015-08-10 20:17       ` Giacomo Tesio
2015-08-10 20:33         ` Charles Forsyth
2015-08-11 15:48 ` Charles Forsyth
2015-08-12  0:21   ` Giacomo Tesio [this message]
2015-08-12  7:25     ` David du Colombier
2015-08-12  9:18       ` Giacomo Tesio
2015-08-12 17:17         ` Charles Forsyth

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAHL7psFCnVy9Bi6Wf1tXx_v4mQoGGAs7upE0j2Ofc-MnOp6u9g@mail.gmail.com \
    --to=giacomo@tesio.it \
    --cc=9fans@9fans.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).