Greetings! OK, tempfile has been tested a little, and is now in do-recompile, but not yet used inside the compiler when executing e.g. (compile 'foo). Have to think about the latter a bit, since we need to keep the gazonk lsp and object files around after the compile in some circumstances (e.g. the build of pcl). The way the 'si::with-temp-file macro works now is to close and delete the temporary file outside of its scope.
Internally, the mkstemp call is used -- this guarantees at the kernel level (I believe) that the returned path was opened as a new file atomically. As this does not allow for pathnames with extensions, we then rename the new handle to the requested extension without closing the handle. This is guaranteed to be atomic too, but what I did not know was that if some other process had the destination path previously opened, they still read the old data after the rename has replaced the contents for new opens -- this is what we want. Here is sample syntax: (with-temp-file (s pn) ("/tmp/foo" "lsp") (prin1 "foo" s) (with-open-file (q pn) (read q))) Hope this works for everybody. Take care, Robert Boyer <[EMAIL PROTECTED]> writes: > Look very much forward to your new tmp work, and all the > other wonderful things you are up to. So many. Utterly > amazing. > > Please feel free to utterly ignore this message. It has > zero priority except to the extent you wish to assign it > one. I fear that I may be more trouble to you than I am > worth with such reports. > > Bob > > ------------------------------------------------------------------------------- > > I just now tried again to build a 2.7.0 big, static, ansi > GCL on elgin, but it broke with almost the same error as > last time, something about a file of yours on elgin's > directory /tmp. Text from the error: > > Callee STORE-CIRCLE sigchange NIL to ((T T > (INTEGER -2147483648 2147483647)) > T), recompiling WIDGET-FUNCTION > ;; Compiling /tmp/recompile.lsp. > Error in SYSTEM::DO-RECOMPILE [or a callee]: Cannot create the file > /tmp/recompile.data. > > Fast links are on: do (si::use-fast-links nil) for debugging > Broken at CONDITIONS:ERROR. Type :H for Help. > 1 (Continue) Retry opening file #P"/tmp/recompile.data". > 2 Retry opening file #P"/tmp/recompile.data". > 3 Retry compiling file "/tmp/recompile.lsp". > 4 Retry compiling file "/tmp/recompile.lsp". > 5 Retry loading file "../tkl.o". > 6 Retry loading file "../tkl.o". > 7 Return to top level. > dbl:TK>> > NIL > dbl:TK>>make[1]: Leaving directory `/v/filer3/v0q027/gcl-2.7.0/gcl-tk' > cd info && make > ------------------------------------------------------------------------------- > > These build-from-scratch runs sure take a while -- a half an > hour of cpu time per try. > > 1607.196u 159.209s 33:30.25 87.8% 0+0k 0+0io 110pf+0w > > ------------------------------------------------------------------------------- > > There is more than 1 megabyte of output to such a make > clean/configure/build. It's not so easy to figure out > whether anything has gone wrong, much less what, has gone > wrong. I count over 600 lines that could or might be easily > interpreted by someone as dumb as me as warnings or errors > in some sense or another. > > Cf. > > http://www.cs.utexas.edu/users/boyer/foo.text > > > ------------------------------------------------------------------------------- > > Here's the /tmp directory, where the collision is apparently > occurring: > > /tmp: > used 1225 available 1925216 > drwxrwxrwt 6 root root 61440 Jun 18 10:26 . > drwxr-xr-x 35 root root 1024 Jun 18 04:51 .. > drwxrwxrwt 2 root root 4096 Jun 16 02:09 .ICE-unix > -rw-r--r-- 1 camm guest 53 Jun 17 13:47 gazonk_12300_0.lsp > -rw-r--r-- 1 camm guest 1248 Jun 17 13:47 gazonk_12300_0.o > drwx------ 3 hunt prof 4096 Jun 12 12:24 gconfd-hunt > drwx------ 2 root root 16384 Mar 10 15:19 lost+found > drwx------ 2 hunt prof 4096 Jun 17 12:33 orbit-hunt > -rw-r--r-- 1 camm guest 242930 Jun 17 14:41 recompile.c > -rw-r--r-- 1 camm guest 120463 Jun 17 14:41 recompile.data > -rw-r--r-- 1 camm guest 17612 Jun 17 14:41 recompile.h > -rw-r--r-- 1 boyer prof 42322 Jun 18 10:26 recompile.lsp > -rw-r--r-- 1 camm guest 502907 Jun 17 14:41 recompile.o > -rw------- 1 boyer prof 196034 Jun 16 08:23 zman8jHCLd > > ------------------------------------------------------------------------------- > > Again, 0 priority for this message, except to the extent it > seems possibly useful to you to work on it. > > Bob > > > > -- Camm Maguire [EMAIL PROTECTED] ========================================================================== "The earth is but one country, and mankind its citizens." -- Baha'u'llah > LocalWords: pn lsp prin foo tmp ansi _______________________________________________ Gcl-devel mailing list Gcl-devel@gnu.org http://lists.gnu.org/mailman/listinfo/gcl-devel