Skip to Main Content
Volume 6A: Motif Programming Manual
book

Volume 6A: Motif Programming Manual

by David Brennan, Dan Heller, Paula Ferguson
September 1993
Intermediate to advanced content levelIntermediate to advanced
1014 pages
28h 26m
English
O'Reilly Media, Inc.
Content preview from Volume 6A: Motif Programming Manual
copies of unfinished files, flushing buffers, or whatever.
Now, what does all this have to do with X applications? Let's say that you want to display an ErrorDialog upon receipt
of a signal. Here is where the problem with X and UNIX signals arises. To elaborate, we return to the call−waiting
analogy. The original telephone conversation that you were having before call waiting interrupted represents the X
protocol communication between an X client and the X server. Now, let's assume that instead of hearing a tone that
indicates there is an incoming call, you are immediately transferred to the new call without any notification. In
mid−conversation, the original caller can no longer hear you. Furthermore, when you are transferred back to the
original caller, the discussion may have progressed without your knowledge. Whatever you were saying would now
be completely confusing to anyone listening.
This situation is analogous to what happens when a UNIX signal interrupts a program that might be communicating
with the X server via the X protocol. When a UNIX signal is delivered, the operating system immediately branches to
your signal handler without notice. If you are in the middle of an X protocol message (an Xlib call) at the time of the
signal delivery, and your signal handler also calls an Xlib routine that generates another protocol message, the X
server is sent a garbled message. Basically, you started to say something and got interrupted, so now you are saying
something completely different. ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Volume 7A: XView Programming Manual

Volume 7A: XView Programming Manual

Dan Heller

Publisher Resources

ISBN: 9780596000431