
#11997: hSetFileSize zeroes file -------------------------------------+------------------------------------- Reporter: jacereda | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: | Version: 7.10.3 libraries/base | Keywords: | Operating System: MacOS X Architecture: x86_64 | Type of failure: Incorrect result (amd64) | at runtime Test Case: | Blocked By: Blocking: | Related Tickets: Differential Rev(s): | Wiki Page: -------------------------------------+------------------------------------- The following sequence: {{{ cp /bin/echo /tmp/echo && ghc -e 'import System.IO' -e 'withFile "/tmp/echo" WriteMode (`hSetFileSize` 1000)' }}} results in /tmp/echo containing 1000 zeros. I would expect the truncated content as if truncate() was called. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/11997 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler