On Jul 19, 2009, at 2:30 AM, Charles Forsyth wrote:
perhaps i've been asleep at the swtch, but i don't recall seing writes
on closed channels terminate programs with a note.

sys: write on closed pipe

mainly to kill off a pipeline when the thing at the end has finished.
i think that might be the only instance where a note is used.

I had considered this theory. And it definitely explains why such
a behavior would be beneficial for the pipelined jobs. What
makes me unhappy, though, is that for things that are *not*
connected to the pipe, but rather to a different kind of channel,
it makes things more difficult without any clear benefit.

Even for the pipelined case -- consider what happens when the
thing at the beginning exits: the next consumer has to be aware
of EOF condition first (and if it skips over EOF of the read returning
-1). The consumers are offered a chance to shutting down
gracefully, where the producers are not.

Why inequality?

Thanks,
Roman.


Reply via email to