Re: Signal handlers - please help to understand



> Murray Cumming wrote:
>
>> [...]
>>
>>He seems to be asking about what happens when he emits his own custom
>>sigc::signal. sigc::signals don't use g_signal_emit(), or any part of
>>glib/gobject.
>>
>>However, I have no idea what question is actually being asked here. Maybe
>>he is confused because "SIGIO" looks a bit like "signal", but he seems to
>>have written the code himself.
>>
>>
>>
> In manuals about system signals (SIGALRM, SIGIO...,SIGRTMIN...) is said
> that signal
> handlers for them should not execute any usefull code, they are intended
> to set some flag
> only. It's a recommended way to use them.
> So I'm trying to solve this problem (because I need a lot to do when
> those system signals
> arrive)

I don't know anything at all whatsoever about that level of system
signals, but I can imagine that these system signal handlers are blocking,
and therefore should not do anything intensive. I can imagine that they
should just set some flag in shared memory that another process could poll
when that other process has a chance. Just guessing though. A mutex might
be a useful concept here.

> by using sigc::signals to deliver received data for example. It
> seems to work but
> I'm not shure that I'm going in a proper way so this is why I ask about
> it all here because
> I don't quite understand how those (late) slots are working.
>     Thanks for answering,
>        Igor Gorbounov


Murray Cumming
murrayc murrayc com
www.murrayc.com
www.openismus.com



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]