>From: Joel Reymont <joelr1 at gmail.com>
>To: Branimir Maksimovic <bmaxa at hotmail.com>
>CC: haskell-cafe at haskell.org>Subject: Re: [Haskell-cafe] Re: syscall, sigpause and EINTR on Mac OSX
>Date: Sun, 11 Dec 2005 23:31:44 +0000
>>Allright, I _am_ convinced. How do I ready ^C from the keyboard???
If this is some daemon program you can't. Perhaps that
should be a daemon.
Just make console client that will read commands from keyboard
and send to your program.
In single threaded client you can handle ^C if you like in signal handler
without problem.
That can be gui program if you like , but console
one should be enough.
You can implement eg: status, start, pause, quit and so.
For now quit will be just fine, later you can add more commands.
Make one listener thread in your program for such connections
and that's it.
Or just use telnet (this isn't safe though), but you can
restrict connections.
And don't forget to mask SIGINT :)
Greetings, Bane.
>>On Dec 11, 2005, at 10:02 PM, Branimir Maksimovic wrote:
>>>This should be enough reason to scan for keyboard events instead.
>>There is no guarantee that SIGINT would be sent only by keyboard.
>>--
>http://wagerlabs.com/>>>>>
_________________________________________________________________
Express yourself instantly with MSN Messenger! Download today it's FREE!
http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/