[Mono-dev] Control-C handler

Jonathan Pryor jonpryor at vt.edu
Thu Dec 20 13:16:10 EST 2007


On Thu, 2007-12-20 at 18:56 +0100, pablosantosluac wrote:
> I've found the following code to set a Control-C handler on a .NET 1.1 
> application.
> 
> http://geekswithblogs.net/mrnat/archive/2004/09/23/11594.aspx
> 
> Is there a way to do the same on Linux/Mono?

You can use signal(2), which is helpfully exposed by Mono.Posix.dll.

See the attached program.

 - Jon

-------------- next part --------------
A non-text attachment was scrubbed...
Name: ctrlc.cs
Type: text/x-csharp
Size: 460 bytes
Desc: not available
Url : http://lists.ximian.com/pipermail/mono-devel-list/attachments/20071220/254574da/attachment.bin 


More information about the Mono-devel-list mailing list