Mailinglist Archive: opensuse (2348 mails)

< Previous Next >
Re: [opensuse] Quick bash question - testing for the presence of keyboard input without pausing a loop?
  • From: Sam Clemens <clemens.sam1@xxxxxxxxx>
  • Date: Sat, 05 Apr 2008 04:24:11 -0400
  • Message-id: <47F7372B.7000504@xxxxxxxxx>
G T Smith wrote:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Sam Clemens wrote:
Control-C usually will stop a running script. And you can use trap to
deal with any tidying up afterwards... Not really what trap is intended
for but it should work...syntax below...
Actually, that's EXACTLY what trap was designed for.


What I meant was trap is not really intended for interactive user I/O
but reviewing the sentence again, I admit it is more than a little
ambiguous.. oh well :-)

A tool is what you make of it.

I'm quite sure that the ability to trapping SIGINT was
intended all along. Why?
Because otherwise, Ctrl-C would produce SIGKILL (which
can't be trapped/caught), not SIGINT.


--
To unsubscribe, e-mail: opensuse+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse+help@xxxxxxxxxxxx

< Previous Next >
This Thread