[Ecls-list] directory function and stat system calls

Juan Jose Garcia-Ripoll juanjose.garciaripoll at googlemail.com
Thu Dec 17 22:05:58 UTC 2009


On Wed, Dec 16, 2009 at 6:14 AM, Robert Dodier <robert.dodier at gmail.com>wrote:

> Hello,
>
> We got a report about Maxima calling stat on a lot
> of files when the program is launched.
> Aside from all the files in the Maxima share directory,
> which we expect Maxima to look at, stat was called
> on a lot of other files as well (stuff outside the Maxima
> directory structure).
>

An unfortunate mistake: DIRECTORY used stat() on all entries in a directory,
not only those that matched the mask. It was just a matter of switching
lines. Now things are better. Thanks a lot for reporting.

$ echo '(directory "/Users/jjgarcia/tmp/")(quit)' > foo.lsp; sudo dtrace -n
'pid$target::safe_stat:entry  { printf("%s\n", copyinstr((uintptr_t)arg0));
}' -c "ecl -norc -load foo"
dtrace: description 'pid$target::safe_stat:entry  ' matched 1 probe
;;; Loading #P"/Users/jjgarcia/foo.lsp"
dtrace: pid 39532 has exited
CPU     ID                    FUNCTION:NAME
  0  19180                  safe_stat:entry jjgarcia

  0  19180                  safe_stat:entry tmp


-- 
Instituto de Física Fundamental, CSIC
c/ Serrano, 113b, Madrid 28006 (Spain)
http://juanjose.garciaripoll.googlepages.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.common-lisp.net/pipermail/ecl-devel/attachments/20091217/6e6e6a3e/attachment.html>


More information about the ecl-devel mailing list