eric@eddie.MIT.EDU (Eric Van Tassell) (07/04/89)
I am intefacing X to our own object-oriented LISP and have to
deal with the problem of getting asynchronous notification of
pending events. Previously we did this by useing
XCheckMaskEvent when the alarm_timer (which is also used for
other purposes) went off. As gross as this was, it worked.
As a result of the recent discussions here I did
fcntl(dpy->fd,F_SETOWN,getpid())
and
fcntl(dpy->fd,F_SETFL,fcntl(dpy->fd,F_GETFL) |FASYNC)
to cause my process(the lisp) to get SIGIOs when events were ready.
This almost works(i.e. works in all but the following case)
- Start lisp (open display ,do fcntls, and such)
- create and map a window
- dive into an hours long fractal computation (for those
questioning the utility of this the point is that the
fractal computation should get interrupted to deal w/events)
* Nothing happens, I dont even see the window but gdb shows that
XMapWindow was called with the right args.
* If I do a "kill -23 pid-of-the-lisp" it wakes up and sees
the expected events (expose , ...)
Any clues? What is the difference in getting SIGIO's when th
LISP is idle .vs. doing a big compute? TIA! --
Eric Van Tassell(dlcdev!eric@eddie.mit.edu)
Progress Software Corp.
22B Cotton Rd.
Nashua, NH 03063 {603-882-2488}