On Tue 13 Dec 2011 11:15, ri...@happyleptic.org writes: > I'm a little worried by the amount of file descriptors left opened > after the objcode is mmaped. > I saw this "note to self" from objcodes.c: > > /* FIXME: we leak ourselves and the file descriptor. but then again so does > > dlopen(). */ > > So apparently the author was well aware of the problem but decided to > ignore it, despite the fd being used nowhere as far as I can see > (also, I don't understand the remark about dlopen leaking a fd). > > Anyway, the attached patch (which closes the fd and stores -1 inplace > of it in the cell) seams to works and seams to fix the issue (ie. no more > pending opened fd for .go files)
If you close the fd, isn't the memory unmapped? Isn't that a bad thing? Maybe I was just under a big misconception here :) Andy -- http://wingolog.org/