On Wed, Mar 13, 2002 at 10:59:17PM +0200, Jarkko Hietaniemi wrote: > On Wed, Mar 13, 2002 at 08:46:46PM +0000, Nicholas Clark wrote: > > Surely the real workaround is to have perl check if the file is seekable, and > > if so seek to 1 byte before the desired size, write a zero byte, then seek > > back whence it came? > > I forgot to mention that I tried exactly that, and it didn't seem to > work. Once you ftruncate, there's no getting back, it seemed. > (There's more to the mystery, I admit: trying to replicate the failure > in trivial C does *not* work: the ftruncate is hapy to extend a file. > But the Perl C code fails. Then I ran out of spare cycles.) Ah. One of those. We had a similar one where perl doing DNS lookup for a particular host with dozens of A records (or something like that) SEGVed the FreeBSD libc resolver code, but trying to write the same thing in C (to bug report it) just didn't work. Maybe the simple C programs don't have enough undefined behaviour else where, but perl has so much that some leaks through to make the repeatable things go wrong. And I don't even have a cray to test on. :-( Nicholas Clark -- Even better than the real thing: http://nms-cgi.sourceforge.net/Thread Previous | Thread Next