Hey Rob,

I just tried your idea and it works correctly if flush is added.  I
figured this is probably a libc bug but thought I'd post it here in
case others have trouble with it.  Might be a good idea to add a flush
inside ns_ftruncate as a workaround.

Jim

>
> +---------- On Feb 22, Jim Wilcoxson said:
> > set fd [open xyz w]
> > puts $fd "abcdefg"
> > close $fd
> >
> > set fd [open xyz r+]
> > seek $fd 4
> > puts -nonewline $fd "x"
>
> What happens if you put "flush $fd" right here, after the puts and
> before the ns_ftruncate?
>
> > ns_ftruncate $fd 3
> > close $fd
> > return
>

Reply via email to