[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: wait_reading_process_ouput hangs in certain cases (w/ patches)
From: |
Eli Zaretskii |
Subject: |
Re: wait_reading_process_ouput hangs in certain cases (w/ patches) |
Date: |
Sat, 04 Nov 2017 14:11:55 +0200 |
> Cc: address@hidden
> From: Matthias Dahl <address@hidden>
> Date: Mon, 30 Oct 2017 10:48:05 +0100
>
> > But if the wrong call to accept-process-output have read the process
> > output, it could have also processed it and delivered the results to
> > the wrong application, no?
>
> Given that fact that a filter is registered for a given process, and
> thus it is this filter that gets called whenever process output is ready
> and needs to be processed, a timer or filter would have to replace that
> filter with its own through set-process-filter for this to happen. And
> that is something I would clearly consider a bug, since no filter or
> timer should do something like that.
>
> Naturally there is also the weird case when accept-process-output was
> called from a hook by some package which expects that data and needs it
> but doesn't consider that a timer could get called during that time and
> the package itself has a timer setup that will also interact with that
> very same process, trying to read data back from some interaction with
> it. That will naturally fail as well... either way, with or without my
> patch. And again, I would consider this a bug.
OK. I think I'm okay with your patches, but IMO they need a minor
improvement: instead of setting got_some_output to an arbitrary value
of 1, the code should set it to the increment of the bytes read from
the sub-process. This is what we do when we actually read from the
process, and I think this scenario should behave the same. WDYT?
With that change, it's okay to commit this to the master branch.
Thanks.
- Re: wait_reading_process_ouput hangs in certain cases (w/ patches), Matthias Dahl, 2017/11/03
- Re: wait_reading_process_ouput hangs in certain cases (w/ patches),
Eli Zaretskii <=
- Re: wait_reading_process_ouput hangs in certain cases (w/ patches), Matthias Dahl, 2017/11/06
- Re: wait_reading_process_ouput hangs in certain cases (w/ patches), Matthias Dahl, 2017/11/07
- Re: wait_reading_process_ouput hangs in certain cases (w/ patches), Eli Zaretskii, 2017/11/07
- Re: wait_reading_process_ouput hangs in certain cases (w/ patches), Matthias Dahl, 2017/11/10
- Re: wait_reading_process_ouput hangs in certain cases (w/ patches), Eli Zaretskii, 2017/11/10
- Re: wait_reading_process_ouput hangs in certain cases (w/ patches), Paul Eggert, 2017/11/12
- Re: wait_reading_process_ouput hangs in certain cases (w/ patches), Eli Zaretskii, 2017/11/12