in reply to Re: When to use sigtrap, when to assign to %SIG?
in thread When to use sigtrap, when to assign to %SIG?

To be pedantic, setting $SIG{INT} does not define what ctrl-C does. It defines what action to take on receiving an interrupt signal. It's typically the shell that maps ctrl-C to an interrupt signal, but that can be set using stty.
Well text editors do re-define CTRL-C to mean copy-to-pasteboard. But they do it for the entire program. This is "well-known" behavior and is assumed to be global for the program.
Are you sure? Or is the text editor that you are using a graphical program (that is, doesn't run inside a terminal), and hence, ctrl-C isn't mapped to the "send SIGINT to foreground process" action in the first place? What happens if you actually send a SIGINT signal to the editor from a different process?

Replies are listed 'Best First'.
Re^3: When to use sigtrap, when to assign to %SIG?
by Marshall (Canon) on Jan 02, 2012 at 11:55 UTC
    I think we are getting far afield from what the OP asked.