Find the answer to your Linux question:
Results 1 to 5 of 5
Hello, I've done some hunting on this and other forums as well as my own system and have come up dry. I have a SLES10 box where root is using ...
  1. #1
    Just Joined!
    Join Date
    Sep 2008
    Posts
    7

    Redefine Ctrl+C as the SIGINT

    Hello,
    I've done some hunting on this and other forums as well as my own system and have come up dry. I have a SLES10 box where root is using the Korn shell as the default. There was a lot of system configuration done by the vendor of the app that sits on this box and one of the "features" is that Ctrl+C no longer sends a SIGINT. I just get "^C" when I try. Needless to say, I'd like to redefine this so that I can kill commands/scripts without the need to manually whack the PID.

    Where is the Ctrl+C defined and what steps do I take to redefine it to its default behavior?

    Thanks,
    Jeff
    Last edited by pgymjp; 01-05-2010 at 01:27 PM. Reason: Grammar

  2. #2
    Linux Guru gogalthorp's Avatar
    Join Date
    Oct 2006
    Location
    West (by God) Virginia
    Posts
    3,105
    You could start a bash shell just by typing bash at the command line.

  3. #3
    Linux Guru reed9's Avatar
    Join Date
    Feb 2009
    Location
    Boston, MA
    Posts
    4,651
    According to my google-fu, stty is the command you want.

    I would try adding a line to your ~/.kshrc file as such
    Code:
    stty intr '^C'
    Make sure to source the file after.

  4. #4
    Linux Guru gogalthorp's Avatar
    Join Date
    Oct 2006
    Location
    West (by God) Virginia
    Posts
    3,105
    Since this is a root problem the file will be in /root

  5. #5
    Linux Guru reed9's Avatar
    Join Date
    Feb 2009
    Location
    Boston, MA
    Posts
    4,651
    Quote Originally Posted by gogalthorp View Post
    Since this is a root problem the file will be in /root
    True. But if he's logged in as root, ~ points to /root.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...