control-c

Why does active_record break the behavior of Ruby's trap and how do I work around it?

In the last couple of days, I've been trying to get a solution to an active_record issue that has been plaguing me. Posts on railsforum and stackoverflow have turned up completely dry. The length and level of detail in those posts may have dissuaded commentors, so I'm trying again - in brief. Under windows, the trap behavior is normal...

How to disable Control-C in a WindowsXP Python console program?

I'd like to put my cmd.com window into a mode where Control-C does not generate a SIGINT signal to Python (ActiveState if it matters). I know I can use the signal module to handle SIGINT. The problem is that handling SIGINT is too late; by the time it is handled, it has already interrupted a system call. I'd like something equivalent t...

Catching Ctrl+C in Java

Is it possible to catch the Ctrl+C signal in a java command-line application? I'd like to clean up some resources before terminating the program. ...

sending control+c (SIGINT) to NSPIPE in objective-c

Hello, I am trying to terminate an openvpn task, spawned via NSTask. My question: Should I send ctrl+c (SIGINT) to the input NSPipe for my NSTask? inputPipe = [NSPipe pipe]; taskInput = [inputPipe fileHandleForWriting]; NSString dataString = @"\cC"; [taskInput writeData:[dataString dataUsingEncoding: [NSString defaultCStringEncoding]...