Re: Query regarding MSG_NOSIGNAL with SSL_Write

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

 



> On May 2, 2017, at 5:06 AM, Matt Caswell <matt@xxxxxxxxxxx> wrote:
> 
>> Yes, ours is a library and we do not wish to ignore the signal process
>> wide because the consumer of our library (application) might want to
>> handle the SIGPIPE for there own socket handling.
> 
> Could you use pthread_sigmask() to only block SIGPIPE for the current
> thread (perhaps unblocking it again before returning control back to the
> caller of your library)?

Presumably, the signal will be delivered as soon as it unblocked, and likely
before "returning control to the caller".  So I think this just delays the
problem, but does not fix it.  Blocking a signal is not the same as ignoring
it.  Multi-threaded programs should avoid having signals delivered to some
random thread that happens to be "on CPU", by blocking signals permanently
in all but a single signal-handling thread, but such design decisions are
made in main() and not in libraries.

-- 
	Viktor.
-- 
openssl-users mailing list
To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-users



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

[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux