[Date Prev] [Date Next] [Thread Prev] [Thread Next] Date Index Thread Index Search archive:
Date:Mon Nov 27 23:18:07 2003 
Subject:Re: using record and file in windows poplog - can you force a write? 
From:A . Sloman 
Volume-ID:1031127.01 

> I'm running Poplog under Windows98 just now (after umpteen years
> running it under Unix), and am hitting an exasperation or two in
> relation to how it writes things - or rather, the way it delays in
> writing things!

The documentation on windows poplog says, if I recall correctly that
it was ported to windows NT and should therefore work in its successors,
but some system calls may not work properly in windows98
which is a more primitive operating system....

> specifically the problem arises with two commands, record and file:
>
> if I say "record in myfile", say, that's fine ... except that it
> doesn't seem to ACTUALLY record anything in the file until I say
> "endrecord" - as if it's saving it all up in some ever-increasing
> buffer, then spewing it out ... this is particularly irritating,
> as I'm trying to run a program that looks likely to take days/weeks/
> maybe even months to complete ... and if my machine crashes (for any
> reason),

You'll get the same behaviour under unix/linux I think. The only
answer is to look at the code for endrecord. If endrecord works,
then maybe you can make your program every now again again
run the procedures record_stop and start_record as defined in
the record library
	$usepop/pop/lib/auto/record.p

I have no idea if that will work, as I have not even tried it in
unix or linux. Whether it works will depend on whether discappend
works on windows.

If that does not work, then every now and again change the file you
are writing to.

But it may be better to use sysopen, syswrite and sysclose directly,
if they work in windows 98. See REF sysio

Another possibility is to try printing the null character every
now and again. I seem to recall that that used cause the output
buffer to be flushed, but I don't know.

Still even that may not help if windows does not let you access a file
that was never closed properly.

>
> so I'm really just hoping there's some tweak one can do to get Poplog
> to actually write something when I tell it to, and not when it takes
> its fancy! <grin> ... I tried guddling around with flush_buffer etc.,
> but that's all Unix-oriented, and seems not to take effect under Windows.

It might in a newer version of windows.


> ... help!
>
> p.s. ... ah, Unix, where art thou?

Is there some reason why you cannot use linux?

Even on my laptop I use only linux.

	http://www.cs.bham.ac.uk/research/poplog/bham-linux-poplog.tar.gz

Aaron