Path: utzoo!censor!comspec!humvax!robohack!eci386!clewis From: clewis@eci386.uucp (Chris Lewis) Newsgroups: comp.lang.perl Subject: print return code bug... Message-ID: <1990May4.202029.9341@eci386.uucp> Date: 4 May 90 20:20:29 GMT Reply-To: clewis@eci386 (Chris Lewis) Organization: Elegant Communications Inc., Toronto, Canada Lines: 28 Unless I've missed something, this is supposed to fill up your file system and then stop, but it ain't stopping: $Header: perly.c,v 3.0.1.5 90/03/27 16:20:57 lwall Locked $ Patch level: 18 386/ix 1.0.6 > open(handle, ">/usr5/test"); > printf $!; > $v = "1111111111111111111111111111111111111111111111111111111111111111111"; > $v = "$v$v$v$v$v$v$v$v$v$v$v"; > # Speedups > $v = substr($v, 0, 511); > $! = ""; > while(1) { > (printf handle ($v)) || die "BOOM! $! $@"; > } Be careful about running this ;-) if you want to test it, you might want to try something different - the point is, printf doesn't appear to be returning 0 on a write error (as the manual appears to imply it should - it does say print is supposed to and then defines printf in terms of print).. -- Chris Lewis, Elegant Communications Inc, {uunet!attcan,utzoo}!lsuc!eci386!clewis Ferret mailing list: eci386!ferret-list, psroff mailing list: eci386!psroff-list