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

  • frankly
  • Beginner
  • Beginner
  • No Avatar
  • Joined: Feb 28, 2003
  • Posts: 52
  • Status: Offline

Post March 21st, 2003, 9:37 am

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
  • Joined: 25 Feb 2008
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post March 21st, 2003, 9:37 am

  • rjmthezonenet
  • Expert
  • Expert
  • User avatar
  • Joined: Jan 14, 2004
  • Posts: 526
  • Loc: St. John's, Newfoundland, Canada
  • Status: Offline

Post February 4th, 2004, 10:13 am

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 282 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
 
cron
 

© 2011 Unmelted, LLC. Ozzu® is a registered trademark of Unmelted, LLC.