[Ace-users] [ace-users] ACE_SOCK_Stream::recv_n() returns -1 if interrupted by signal
Jules d'Entremont
Jules.dEntremont at SolaceSystems.com
Fri Oct 26 14:19:02 CDT 2007
> >I don't have control over which signals are being used by the
> >application (I'm developing an SDK which is used by others). In
fact,
> >in this case, the signal (SIGALRM) is used by the application, so it
> >can't be ignored.
>
> Assuming that you are running in an OS that supports the POSIX thread
> API, you should be able to block signals in the thread that does the
> read. That should solve your problem.
No, that won't work. The signal needs to be delivered, to the thread
that does the read, in a timely manner. It can't be blocked.
> The problem with your suggested fix is that it breaks current
semantics.
> The easiest way to solve this is via the APIs that ACE supports that
> can block signals in a particular thread. It would also be possible
> to parameterize ACE_SOCK_Stream so that it could conditionally ignore
> signals, but that will have broader side-effects.
How about providing a new function, or a flag to modify the behaviour of
one of the existing functions?
Jules.
> Take care,
>
> Doug
More information about the Ace-users
mailing list