newbie question: suppressing dos window

Dear all, Is it somehow possible to suppress the dos window (in windows), for example to run tasks in the background? Couldn't find it anywhere in the documentation. Any suggestions appreciated. Thanks. Regards, Maarten

Hi Maarten,
Just to clarify your question, which of these do you mean:
1) How can I run a Haskell program compiled with GHC in a way that
does not start a DOS window.
2) How can I run an external program with the system command in
WinHugs without it spawning a separate DOS window.
Thanks
Neil
On 6/13/06, Maarten
Dear all,
Is it somehow possible to suppress the dos window (in windows), for example to run tasks in the background? Couldn't find it anywhere in the documentation. Any suggestions appreciated. Thanks.
Regards,
Maarten
_______________________________________________ Libraries mailing list Libraries@haskell.org http://www.haskell.org/mailman/listinfo/libraries

On Tue, 2006-06-13 at 16:23 +0200, Maarten wrote:
Dear all,
Is it somehow possible to suppress the dos window (in windows), for example to run tasks in the background? Couldn't find it anywhere in the documentation. Any suggestions appreciated. Thanks.
There's an FAQ on this on the Gtk2Hs site: http://haskell.org/gtk2hs/archives/2005/06/23/hiding-the-console-on-windows/ The thing you have to watch out for is using standard IO functions when the process's stdin/stdou/stderr are not connected to anything. So if your program does not use the stdio at all then you're ok, or if you launch the program with redirected standard io handles (eg to pipes) then you're probably also ok. Duncan

Thanks all. This was indeed my question... Too bad creation of a dos window isn't done lazily... :) It would indeed be interesting to have still more control over the dos window, so you could close the dos window after user input. (And closing a dos window shouldn't necessarily always close your program. ) Shouldn't be too difficult, I guess... Maarten Duncan Coutts wrote:
On Tue, 2006-06-13 at 16:23 +0200, Maarten wrote:
Dear all,
Is it somehow possible to suppress the dos window (in windows), for example to run tasks in the background? Couldn't find it anywhere in the documentation. Any suggestions appreciated. Thanks.
There's an FAQ on this on the Gtk2Hs site:
http://haskell.org/gtk2hs/archives/2005/06/23/hiding-the-console-on-windows/
The thing you have to watch out for is using standard IO functions when the process's stdin/stdou/stderr are not connected to anything. So if your program does not use the stdio at all then you're ok, or if you launch the program with redirected standard io handles (eg to pipes) then you're probably also ok.
Duncan
participants (3)
-
Duncan Coutts
-
Maarten
-
Neil Mitchell