This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [gfortran] patch PR 20788


I think it's pointless to add avoid_mmap to fd_to_stream's interface, and
would prefer if you explicitly checked for the affected three units in that
function.  Or is it likely that there will be other cases where this is necessary?

There are cases where a simple check on the fd number (is that what you suggest) is not enough: if someone wants to dup the file descriptor for stdin/stdout/stderr in the library in the future, or if we discover other cases where mmap should be avoided.


In brief: I think a more general mechanism is not something we should replace with an _ad hoc_ check.

The patch is of course correct, and you can leave it installed if you don't
agree with me.

I'm sorry it got applied (I thought I had checked which files would be commited, but it looks like monday will always be monday).


FX


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]