Greetings! Robert Boyer <[EMAIL PROTECTED]> writes:
> I got a few socket examples to work. Hurray for me! > > But I'd appreciate if you'd send me code for the following very simple socket > application. I can't seem to get IO to work at all. And as usual, trying to > see what processes are saying to one another while debugging is excruciatingly > difficult. > > I'd like you to define > > (defun in-the-background-compile-these-files (l) ...) > > to compile all the files named in the list l in separate GCLs in parallel in > the background, sending the output for each compilation process to some text > file based on the file name given. No particular return value required. No > waiting or listening needed. So if have a multi-core processor, I should see > compilations running in parallel while I happily continue hacking in the > current GCL. > > I bet this application will be of interest to many GCL users. > How about this: (si::p-let ((a (with-open-file (s "/tmp/out1" :direction :output) (let ((*standard-output* s)) (compile-file "/tmp/foo1.lsp")))) (b (with-open-file (s "/tmp/out2" :direction :output) (let ((*standard-output* s)) (compile-file "/tmp/foo2.lsp"))))) (values a b)) #P"/tmp/foo1.o" #P"/tmp/foo2.o" > Don't know if we should formalize this and include it in GCL or not. Thoughts most welcome. Just a note -- the default standard input and standard output are closed in the child to avoid confusion. These are unix file descriptors 0 and 1 (and 2 for stderr). Other open files are shared as with any other object in memory. Don't know if this is a problem. Also, we should close not unix file descriptor 0 et. al., but *terminal-io* (I suppose). Take care, > Thanks, > > Bob > > > > > -- Camm Maguire [EMAIL PROTECTED] ========================================================================== "The earth is but one country, and mankind its citizens." -- Baha'u'llah _______________________________________________ Gcl-devel mailing list Gcl-devel@gnu.org http://lists.gnu.org/mailman/listinfo/gcl-devel