[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-devel
Subject:    Re: Do we have a signal handling class ? (was Re: How to handle CTRL+C)
From:       Guillaume Laurent <glaurent () telegraph-road ! org>
Date:       2001-07-27 23:51:11
[Download RAW message or body]

On Saturday 28 July 2001 01:28, Waldo Bastian wrote:
>
> static void kde_signal_handler(int sig)
> {
>   if (kapp)
>     kapp->signal_handler(sig);
> }
>
> void KApplication::signal_handler(sig)
> {
>    emit UNIXsignal(sig); // Send away as Qt signal
> }

That will take too long. What if you get another signal right when you're in 
the handler ?

IMHO the only thing you can reliably do is set a flag (typically in a bool 
array[NSIG]), and then in the event loop check the flag and emit the 
corresponding Qt signal if it's set).

-- 
					Guillaume.
					http://www.telegraph-road.org
 
>> Visit http://master.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic