Re: Gracefully stopping an infinite loop after a particular keyboard input
- From: "peace07" <f.florey@xxxxxxxxxxxxxx>
- Date: 15 Dec 2006 01:57:06 -0800
Ranjan schrieb:
I am having a script that is doing some tests continuously. I am
running it from cygwin under Windows OS and is currently using CTRL+C
to stop the script. But by "ctrl+c" the script stops at that very
moment. In between there are some read write operations going on files
and when the script stops atonce.
I want that when I press any key say "Q" from keyboard , the script
should complete that particular loop and then stop. (Hope I am able to
clarify my problem).
A simple solution might be, that you just test within the loop if the
button has beed pressed? Or maybe i didn't get the problem correctly.
Without testing around, i would assume, that if should work with the
fconfigure / fileevent
commands (in combination with stdin).
Hope this helps,
Friedemann
.
- Follow-Ups:
- References:
- Prev by Date: Re: Unable to get multiple Set-Cookie definitions in headers
- Next by Date: Re: External IP address
- Previous by thread: Gracefully stopping an infinite loop after a particular keyboard input
- Next by thread: Re: Gracefully stopping an infinite loop after a particular keyboard input
- Index(es):