
Krasimir Angelov wrote:
On 2/13/07, Simon Marlow
wrote: Sounds like a good idea. You need to look at rts/RtsMessages.c, in particular rtsErrorMsgFn(), which currently has cases for GUI and non-GUI. I guess it really should have 3 cases: GUI, console, and non-GUI.
The trick here is how to find whether the current application is GUI, console or non-GUI. The distinction between GUI and Console applications is easy because you can check subsystem OS type. This doesn't work with Windows services because they can be either GUI or Console. The OS is preventing them from showing any windows.
So then a program which is running as a service should explicitly set a different message handler. Maybe we could provide a handler that sends messages to the system log. Cheers, Simon