Catching <Ctrl-S> & <DELETE> from stdin

  • frankly
  • Beginner
  • Beginner
  • frankly
  • Posts: 52

Post 3+ Months Ago

Hi ppl,

I wanna know how to catch the signal <DELETE> in the command prompt? Also, <Ctrl-S> is a special character to suspend the terminal, so how can I catch this character? Should I simply monitor the stdin(fd=0)? And stdin by default is line-buffered, so how do I handle the command promt like an editor (display any character typed and read the line after <EOL>) and also handle other signals (e.g. send SIGINT to the own process when <ctrl-c> is pressed) ?

Thanz!! :D
  • Anonymous
  • Bot
  • No Avatar
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post 3+ Months Ago

  • rjmthezonenet
  • Expert
  • Expert
  • User avatar
  • Posts: 526
  • Loc: St. John's, Newfoundland, Canada

Post 3+ Months Ago

I read something about this when reading a book on Bourne shell programming. You can catch those signals there (^Z for example, to prevent accidential logoffs).

What scripting language are you using? I'm guessing Perl... but, I have no way to know for sure.

Post Information

  • Total Posts in this topic: 2 posts
  • Users browsing this forum: No registered users and 127 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.