ioslave terminating mechanism
aleXXX
alexander.neundorf at gmx.net
Thu Apr 18 00:53:02 BST 2002
On Thursday 18 April 2002 01:08, Waldo Bastian wrote:
>
> That's nice and all but it fails to take into account that signal delivery
> is asynchronous and the current code can deadlock when the siganl happens
> to arrive at an inconvenient time. E.g. within a malloc or free call. When
> you then call the destructor your process will deadlock.
>
> You simply can't call arbitrary code (the destructor of a slave) at any
> arbitrary moment (when the signal arrives) and expect it to work.
Ok, so how about setting a flag in the signal handler which is checked in
dispatchLoop() and if it is set call the dtor from there ?
Bye
Alex
More information about the kde-core-devel
mailing list