[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: fflush & close behavior not well-defined
From: |
Andrew J. Schorr |
Subject: |
Re: fflush & close behavior not well-defined |
Date: |
Mon, 14 Sep 2020 12:41:37 -0400 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
On Mon, Sep 14, 2020 at 11:03:22AM -0500, Neil R. Ormos wrote:
> Is there a way to expose a handle or other
> unambiguous ID corresponding to the most recent
> operation on a file, pipe, or coprocess?
Anything is possible. Behind the scenes, each open file/pipe/coprocess is
represented by a structure, so of course the address of the structure is a
unique identifier. Or one could assign an arbitrary identifier. That's not
hard. Are you suggesting to stick this value somewhere in PROCINFO or some
other global variable every time an I/O occurs? That seems a bit heavyweight
for something nobody actually cares about.
> Then, a user who needs a non-ambiguous call to
> close() or fflush() could pass the handle instead
> of, or in addition to, the current filename
> argument?
I don't see why this is better than enhancing the close & fflush functions to
give them the info they need to find the correct file, but maybe if you flesh
out your idea with an example, I'll understand better.
Regards,
Andy
- fflush & close behavior not well-defined, Andrew J. Schorr, 2020/09/13
- Re: fflush & close behavior not well-defined, arnold, 2020/09/14
- Re: fflush & close behavior not well-defined, Andrew J. Schorr, 2020/09/14
- Re: fflush & close behavior not well-defined, Manuel Collado, 2020/09/14
- Re: fflush & close behavior not well-defined, Andrew J. Schorr, 2020/09/14
- Re: fflush & close behavior not well-defined, Neil R. Ormos, 2020/09/14
- Re: fflush & close behavior not well-defined,
Andrew J. Schorr <=
- Re: fflush & close behavior not well-defined, Neil R. Ormos, 2020/09/14
- Re: fflush & close behavior not well-defined, Andrew J. Schorr, 2020/09/14
- Message not available
- Re: fflush & close behavior not well-defined, Andrew J. Schorr, 2020/09/14
- RE: fflush & close behavior not well-defined, pjfarley3, 2020/09/14
- Re: fflush & close behavior not well-defined, Wolfgang Laun, 2020/09/14
Re: fflush & close behavior not well-defined, Lorenz, 2020/09/15