~ubuntu-branches/ubuntu/precise/ghc/precise

« back to all changes in this revision

Viewing changes to libraries/process/tests/3231.hs

  • Committer: Bazaar Package Importer
  • Author(s): Joachim Breitner
  • Date: 2011-01-17 12:49:24 UTC
  • Revision ID: james.westby@ubuntu.com-20110117124924-do1pym1jlf5o636m
Tags: upstream-7.0.1
ImportĀ upstreamĀ versionĀ 7.0.1

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
module Main (main) where
 
2
 
 
3
import Control.Concurrent
 
4
import System.IO
 
5
import System.Cmd
 
6
import System.Directory
 
7
 
 
8
main = do
 
9
    hSetBuffering stdout NoBuffering
 
10
    forkIO $ f "foo1.txt"
 
11
    forkIO $ f "foo2.txt"
 
12
    threadDelay $ 2*1000000
 
13
    putStrLn "Finished successfully"
 
14
 
 
15
f file = do
 
16
    h <- openFile file WriteMode
 
17
    hPutStrLn h "fjkladsf"
 
18
    system "sleep 1"
 
19
    -- putChar '.'
 
20
    hClose h
 
21
    removeFile file
 
22
    f file