
25 Jul
2003
25 Jul
'03
9:22 a.m.
AJ wrote:
Ok so I added the "hSetBuffering stdout NoBuffering" line to my main function and still got the same 'nonlazy' behaviour, or so I thought. It took me some time to figure out what was going on. I am using emacs to write my code and I was calling a.out from inside it. Obviously it was emacs that was holding back the output until the program terminated! Now I feel kinda stupid :-(
Anyway since I am also lazy enough to dislike switching back to the shell whenever I want to test my programs, here is another question - how do I make emacs give me the output AS AND WHEN it recieves it?
If you put an ampersand ("&") after the command, Emacs will run it in
the background.
--
Glynn Clements