Re: [PATCH] Add explicit close to t/syn/file.t tests
Andy Dougherty [EMAIL PROTECTED] wrote: I don't know why this didn't show up anywhere else, but on Solaris 8 with perl5.00503, the imcc/t/syn/file.t tests that tried to load temp.pbc were all failing. The reason turned out to be that the temp.imc files hadn't been flushed to disk yet. Explicitly closing the files ensures that they are written before we try to compile them. Strange but anyway applied. Thanks. leo
Re: [PATCH] Add explicit close to t/syn/file.t tests
On Wed, 3 Sep 2003, Leopold Toetsch wrote: Andy Dougherty [EMAIL PROTECTED] wrote: I don't know why this didn't show up anywhere else, but on Solaris 8 with perl5.00503, the imcc/t/syn/file.t tests that tried to load temp.pbc were all failing. The reason turned out to be that the temp.imc files hadn't been flushed to disk yet. Explicitly closing the files ensures that they are written before we try to compile them. Strange but anyway applied. Thanks. Actually not so strange in retrospect, but it did take me a few minutes to figure it out. It's a manifestation of the flush-before-exec issue. Starting with 5.6.0, perl attempts to automatically flush output buffers under such circumstances, though after romping through util.c:Perl_my_fflush_all() (and the supporting Configure code) you'll likely conclude it's always safer to explicitly flush buffers yourself! In my case, I was using 5.00503, which does whatever the underlying OS/stdio does. Anyway, thanks. -- Andy Dougherty [EMAIL PROTECTED]
[PATCH] Add explicit close to t/syn/file.t tests
I don't know why this didn't show up anywhere else, but on Solaris 8 with perl5.00503, the imcc/t/syn/file.t tests that tried to load temp.pbc were all failing. The reason turned out to be that the temp.imc files hadn't been flushed to disk yet. Explicitly closing the files ensures that they are written before we try to compile them. diff -r -u parrot-cvs/languages/imcc/t/syn/file.t parrot-andy/languages/imcc/t/syn/file.t --- parrot-cvs/languages/imcc/t/syn/file.t Thu Aug 21 13:47:27 2003 +++ parrot-andy/languages/imcc/t/syn/file.t Tue Sep 2 15:47:21 2003 @@ -139,6 +139,7 @@ end .end ENDF +close FOO; # compile it system(.$PConfig{slash}imcc$PConfig{exe} -o temp.pbc temp.imc); @@ -171,6 +172,7 @@ end .end ENDF +close FOO; # compile it system(.$PConfig{slash}imcc$PConfig{exe} -o temp.pbc temp.imc); @@ -208,6 +210,7 @@ end .end ENDF +close FOO; # compile it system(.$PConfig{slash}imcc$PConfig{exe} -o temp.pbc temp.imc); @@ -240,6 +243,7 @@ end .end ENDF +close FOO; # compile it output_is('CODE', 'OUT', call sub in external imc, return); @@ -272,6 +276,7 @@ end .end ENDF +close FOO; # compile it SKIP: @@ -356,6 +361,7 @@ end .end ENDF +close FOO; # compile it system(.$PConfig{slash}imcc$PConfig{exe} -o temp.pbc temp.imc); -- Andy Dougherty [EMAIL PROTECTED]