On 5/4/21 10:06 AM, Koichi Murase wrote:

Let's take a step back. I think we can make the code simpler and still
handle all the cases we need to. I don't think tape devices are worth
worrying about.

The issue with the BSDs and terminal devices is that the current code
only checks for -1/ESPIPE, but they return a different value for errno
(EINVAL? I forget.) I believe AIX returns something else. Rather than
check for specific errno values, we can just decide not to buffer input
if lseek fails for any reason.

OK.  I agree with this direction.  The attached file is my current
patch for (2) and (3) with the above strategy (no check for ESPIPE).

I used a combination of the simpler approach and the fstat/S_ISREG
strategy you suggested in your previous email.


By the way, I'm sorry but there was a typo in my previous mail:

(3) Suggestion: change the order of `run_callback' and `zsyncfd'?

I noticed that `zsyncfd' is called before `run_callback':

This is a typo of "`zsyncfd' is called **after** `run_callback'".

I don't think this will make much of a difference -- it never has,
and the state of the file during the callback's execution isn't
defined -- but I made this change. Changing entrenched behavior is
always a tricky business. We'll see how it goes.


--
``The lyf so short, the craft so long to lerne.'' - Chaucer
                 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU    c...@case.edu    http://tiswww.cwru.edu/~chet/

Reply via email to