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


François-Xavier Coudert wrote:
>>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.

If you think that's possible then I agree that this is the right thing to do.

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

I was wondering if the general mechanism was any less ad hoc :-)

- Tobi


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