
Am Donnerstag 07 Mai 2009 18:36:08 schrieb Thomas Friedrich:
Hi everyone,
Each of the above function take a list of filenames, run certain command-line programs on them, which I invoke by runCommand, and each of them produce multiple output-files. Each function in main needs a couple of those output-files that are produced by the function directly above it. How do I get Haskell to wait, till all the data is written to the disk, before invoking the next command.
System.Process.waitForProcess should do it, conveniently runCommand returns a ProcessHandle.
The way the program is currently written, Haskell doesn't see that the input of one function depends on the output of another, and tries to run them all at the same time.
Any ideas?
Thanks everyone for your help.
Cheers, Thomas