List Info

Thread: file: trunk r51831 - /trunk/main/manager.c




file: trunk r51831 - /trunk/main/manager.c
user name
2007-01-23 21:36:09
asterisk-commitslists.digium.com wrote: > Author: file > Date: Tue Jan 23 18:22:50 2007 > New Revision: 51831 > > URL: http://svn.digium.com/view/asterisk?view=rev&rev=51831 > Log: > Close file after we do the translation, and map memory for both reading/writing. (issue #8886 reported by cwegener) I'm curious as to why these changes were found necessary... we don't write into the mmap-ed area, so PROT_WRITE should not be necessary. Also, fclose() closes the 'FILE *' we opened on top of the fd, but should not cause the fd to be closed underneath... so I don't understand how moving the fclose() helped at all. Obviously these are not big changes so I'm not asking for justification, more out of curiosity _______________________________________________ --Bandwidth and Colocation provided by Easynews.com -- asterisk-dev mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-dev
Re: file: trunk r51831 - /trunk/main/manager.c
user name
2007-01-24 12:39:03
Kevin P. Fleming wrote:
> I'm curious as to why these changes were found
necessary... we don't
> write into the mmap-ed area, so PROT_WRITE should not
be necessary.

Not exactly true, there is at least a strsep which writes
into the 
mmaped area.

> Also, fclose() closes the 'FILE *' we opened on top of
the fd, but
> should not cause the fd to be closed underneath... so I
don't understand
> how moving the fclose() helped at all.

Without moving the fclose the mmap would fail and everything
would 
explode. Something must be happening underneath... or else
I'm just crazy.

> Obviously these are not big changes so I'm not asking
for justification,
> more out of curiosity 

Curiosity killed the internet connection! er wait no.
_______________________________________________
--Bandwidth and Colocation provided by Easynews.com --

asterisk-dev mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-dev

[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )