home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!usc!sol.ctr.columbia.edu!emory!emory!not-for-mail
- From: johnl@obelix.informix.com (Jonathan Leffler)
- Newsgroups: comp.databases.informix
- Subject: Re: defer interrupt.
- Date: 11 Nov 1992 03:33:08 -0500
- Organization: Mailing List Gateway
- Lines: 46
- Sender: walt@mathcs.emory.edu
- Distribution: world
- Message-ID: <1dqgg4INNm65@emory.mathcs.emory.edu>
- Reply-To: johnl@obelix.informix.com (Jonathan Leffler)
- NNTP-Posting-Host: emory.mathcs.emory.edu
- X-Informix-List-ID: <list.1585>
-
- >From: uunet!rhi.hi.is!gaukur (Kristjan Gaukur Kristjansson)
- >Subject: Re: defer interrupt.
- >Date: 9 Nov 92 13:22:18 GMT
- >X-Informix-List-Id: <news.2090>
-
- >>Did you read pages S-29 - S-32 (in the English version, anyway) of the
- >>4GL 4.1 Supplement document? If so, what was unclear?
-
- >Yes I've read them, but maybe theres something wrong with my configuration.
- >In my test exemplar I'm interrupting a foreach loop thats fetching rows
- >and getting some of them into a report.
-
- All is revealed... The problem is that reports are pigs to break into, not
- that the defer interrupt stuff doesn't work particularly. Reports always have
- been neear enough impossible to interrupt, and they haven't changed recently.
- If you subject the program to blizzard of interrupts, then eventually, you
- usually manage to get a report to acknowledge that an interrupt has occurred.
-
- I haven't done exhaustive checking of SQL INTERRUPT ON but I think you
- will find it will work, except when there is a report in use.
-
- One day when I get some time, I'll try an track down what it is about reports
- that makes them immune from interrupt, but they always have been like that.
-
- >So is it maybe something wrong with my termcap?
-
- No, but an interrupt at an inconvenient moment may throw the key handling
- code out of kilter. That is the problem with interrupts... They're never
- expected.
-
- >Also one comment on the int_flag testing; if youre interrupting open, fetch,
- >close statements (with something in between) do you have to test the int_flag
- >after every statement (because you never know in loops where the ctrl-c will
- >hit)?
-
- You should check after the open (because if the staetment was interrupted,
- you don't have a properly open cursor with which to fetch data), after each
- fetch (because if the row wasn't fetched, you don't have any new data in your
- variables), and probably after the close (simply because you're about to go
- and do something with the fetched data, and ought to check that all was OK).
- You don't really need to check after each intermediate calculation; once per
- fetch loop is enough, nomally. (That assumes no nested SQL statements -- you
- should check after each database operation -- hence after open, fetch, close).
-
- Yours,
- Jonathan Leffler (johnl@obelix.informix.com) #include <disclaimer.h>
-