K
K
Kirill Batalin2016-12-09 17:22:30
linux
Kirill Batalin, 2016-12-09 17:22:30

Why is SIGPIPE not blocking?

Hello.
The program works with a socket. To prevent the SIGPIPE signal from flying out, I block it:
sigset(SIGPIPE, SIG_IGN);
But the execution is still completed by the SIGPIPE signal during the send execution:
ssize_t size = send(socket, data, currentSize, 0);

If the MSG_NOSIGNAL flag is set, then the signal will stop flying. But this method works under Linux, but does not work under Solaris.

Why is the signal not blocked?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
K
Kirill Batalin, 2016-12-09
@kir55rus

Issue resolved. GDB was resetting the signal handler

E
Egor Shustrov, 2017-04-15
@HeavenlyWaltz

Have you looked here?
or here?

D
Denis Artamonov, 2017-04-15
@ArtamonovDenis

Similar question

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question