Michael G Schwern wrote:
On Sun, Sep 25, 2005 at 12:28:38AM -0400, John E. Malmberg wrote:

So it appears the problem is that nothing is calling fsync(), but I am not sure what needs to be changed to fix this. I also do not know if this affects anything other than VMS.


Since your the only one to notice create.t failing, I'm going to guess its
a VMS specific problem.

Let's see if its basic unbuffered file writing that's busted or if its
something more involved that Test::More is tickling..  Try this:

use Test::More tests => 3;

ok open WRITE, ">foo" or diag $!;
select WRITE;
$| = 1;
print WRITE "Test";

ok open READ, "foo" or diag $!;
is <READ>, 'Test';

close READ;
close WRITE;

1 while unlink "foo";

1..3
ok 1
ok 2
not ok 3
#     Failed test ([-]unbuf.t at line 9)
#          got: undef
#     expected: 'Test'
# Looks like you failed 1 test of 3.
%SYSTEM-F-ABORT, abort

Running it under the debugger shows that it is never calling fsync() to actually flush the data to the disk.

No attempt to call fflush() seems to have been made either.

It looks like that PERLIO_FUNCS_DECL in perlio.c is configured to do a NOOP of PerlIOBase_noop_ok for the default flush() action.

I suspect that if I change the entry in PERLIO_FUNCS_DECL for flush to call something that does an fsync() that it would make the test work.

-John
[EMAIL PROTECTED]
Personal Opinion Only


Reply via email to