Eclipse CDT: Thread is getting SIGPIPE in debugging mode

445 Views Asked by At

There is a tool written in C language, based on socket programming and multi-threading. If I simply run the tool, there is no error and the tool does its work flawlessly.

But if I run the tool in debugging mode, switching between thread is raising SIGPIPE signal and thus data could not be transferred from the tool to its server.

Would handling the SIGPIPE using SIGNAL(SIGPIPE, SIG_IGN) make the thread work?

As far as I understand, this is being raised due to failing of Inter-Process communication between threads. If it is, then how can one debug such multi-threaded application?

Please suggest me the way to handle this issue.

1

There are 1 best solutions below

0
On BEST ANSWER

This got resolved by carefully stepping into threads. The tool not only creates processes but threads also thus improper gdbinit setting and stepping raises SIGPIPE signal.

This is illustrated in the other related post here.