hi all,
in the course of trying to find the filehandle-leak bug in Gem i found a weird problem with open_via_path().
can anybody find anything wrong with the attached code? if not, try the attached patch as well.
everything works fine on linux, but on w32 i cannot close the file-handle anymore (i get an errno of EBADF, which means that fd isn't a valid open file descriptor). which in turn results in a filehandle leak.
i notice that hardly anyone (esp. Pd itself) uses open_via_path(). is there a reason for that? is it buggy? (couldn't find anything wrong though)
i use it quite a lot, e.g. in [msgfile]; i guess nobody ever tried to open > 1000 files with msgfile on w32, so the error never appeared...
fgamsdr IOhannes
#N canvas 355 251 450 300 10; #X obj 165 160 findfile; #X obj 165 113 until; #X msg 165 132 symbol findfile-test.pd; #X msg 165 90 100; #X connect 1 0 2 0; #X connect 2 0 0 0; #X connect 3 0 1 0;