home *** CD-ROM | disk | FTP | other *** search
- Xref: sparky comp.databases.ingres:2328 alt.toolkits.xview:1219 comp.windows.x:21390
- Path: sparky!uunet!cis.ohio-state.edu!news.sei.cmu.edu!cert!netnews.upenn.edu!kin.lap.upenn.edu!jarnot
- From: jarnot@kin.lap.upenn.edu (Kevin J. Jarnot)
- Newsgroups: comp.databases.ingres,alt.toolkits.xview,comp.windows.x
- Subject: Re: XVIEW and INGRES compatability problem! HELP!
- Summary: I wonder if this happens with Oracle and Motif???
- Message-ID: <105904@netnews.upenn.edu>
- Date: 21 Jan 93 04:07:48 GMT
- References: <1993Jan20.040019.11802@BofA.com>
- Sender: news@netnews.upenn.edu
- Followup-To: comp.databases.ingres
- Organization: University of Pennsylvania, Language Analysis Center
- Lines: 68
- Nntp-Posting-Host: kin.lap.upenn.edu
-
- In article <1993Jan20.040019.11802@BofA.com> karl@BofA.COM (Karl Nicholas) writes:
- > I am having a problem with ingres and xview
- > in the same program.
- >
- > When I make an xview scrollable panel,
- > and then put in some ingres code (connect to database),
- > I get an alarm clock fault when I hit the xview scroll
- > bar.
- >
- > This would indicate to me that both ingres and
- > the xview pacakage are using the Alarm Clock signal
- > and not doing it properly?
- >
- > Can anyone confirm or deny this? Has anyone
- > else run into this? Has anyone else fixed it?
-
-
- [code deleted]
-
- Actually, I just posted the same problem to both alt.toolkits.xview
- and comp.windows.x a few days ago.
-
- Yes, it seems that version 6.4 of Ingres is trapping SIGALRMs for some
- reason, which of course plays havoc with the notifier in XView. In the
- scrollbar package, the up and down arrows seem to emit SIGALRMs, which
- of course are then trapped by Ingres, causing your app to bletch and
- print the cryptic message "Alarm clock" to stderr (Ingres seems to have
- error messages rivaling even DOS in clarity...) and exit.
-
- I came up with a quick fix in a sleepless haze over the weekend (don't
- you love when problems like this pop up two weeks before a deadline? ;-)
- Use the following function call:
-
- notify_set_signal_func(frame, sigint_handler, SIGALRM, NOTIFY_ASYNC);
-
- to trap the SIGALRM before Ingres gets ahold of it. sigint_handler()
- is a function that looks something like this:
-
-
- Notify_value
- sigint_handler(client, sig, when)
- Notify_client client;
- int sig;
- {
- printf("Received signal %d...ignoring it...\n", sig);
- return NOTIFY_DONE;
- }
-
-
- Seems to work OK as a kludge...
-
- And to think I ignored everyone when they insisted I should NOT use
- Ingres embedded SQL in my XView gui...something about strange crashes... ;-)
-
- Mail me back if you need more info...
-
-
-
-
- Take care,
-
- Kevin
-
- --
- Kevin J. Jarnot (jarnot@kin.lap.upenn.edu) | "The monkey-boys are evil -
- Lead Programmer/Analyst/Keyboardist | Lord Whorfin is supreme..."
- Univ. of Pennsylvania Language Analysis Center |
- 3700 Market St, Suite 202 Phila, PA 19104 | "Vita Non Jerk"
-