🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.windows.x
Article #37254

X & signals

#37254
From: Rob Gabbard
Date: Thu, 22 Feb 1990 21:29
32 lines
1622 bytes
Has anyone had any problems with using alarm signals with X ? My problem is
this - I have an X application that may be away from the event loop for 
quite some time.  So, to avoid overflowing the event queue, I have a routine
that looks somthing like this:

	clean_queue()
	{
		while ( XPending( display ) )
			{
			XtNextEvent( &event );
			XtDispatchEvent( &event );
			}

		signal(SIGALRM,clean_queue);
	}

	Upon exiting my event loop to go and do something else I call 
signal(SIGALRM,clean_queue) and then use setitimer to send an alarm every
few seconds. Then, when reentering my event loop I turn the timer back off.

	This works fine for a while but it eventually crashes. The error
messages range from invalid protocol requests to bad op codes in 
XDeleteProperty.  This is running under Ultrix on a DECStation 3100.


-- 
                                   ________   _________    _______    ________
                                  / _______|  |  ____  \  |  ___  \  / _______|
Rob Gabbard (uunet!sdrc!evgabb)   | |______   | |    \  \ | |   \ | | /
Technical Development Engineer    \_______ \  | |     | | | |___/ / | |
Structural Dynamics Research Corp. ______| |  | |____/  / |  ____ \ | \_______
#include <std/disclaimer.h>       |________/  |________/  |_|    |_| \________|
Technical Details
Message-ID: <1154@sdrc.UUCP>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!uunet!sdrc!evgabb

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!uunet!sdrc!evgabb
From: evgabb@sdrc.UUCP (Rob Gabbard)
Newsgroups: comp.windows.x
Subject: X & signals
Keywords: xwindows signals
Message-ID: <1154@sdrc.UUCP>
Date: 22 Feb 90 21:29:22 GMT
Organization: SDRC, Cincinnati
Lines: 32