Am 28.12.2012 10:43, schrieb ArtemGr:
> Tommi Mäkitalo <tommi@...> writes:
>>      As I can see in your stack trace, this happens in tntnet. And tntnet
>>      sets the signal handler for SIGPIPE. So it shouldn't happen anyway.
>>      Setting the signal handler is global to the process. You do not need
>>      to set it again in your components.
>>      I wonder how the crash can happen. The kernel tells, that it stops
>>      the process since it received a signal SIGPIPE although tntnet told
>>      to ignore that signal by setting the handler to SIG_IGN. I have
>>      currently no idea. Maybe someone else here has a idea?
>>      Tommi
> There is a SO_NOSIGPIPE option:
> http://stackoverflow.com/a/450130/257568
> Perhaps it is available on PS3.
> There's MSG_NOSIGNAL: http://stackoverflow.com/a/1705705/257568
> And here's something complex: http://stackoverflow.com/a/2347848/257568
>
> First I would've checked if the handler is changed somewhere with
>    struct sigaction have;
>    if (sigaction (SIGPIPE, nullptr, &have) == 0)
>      log_info ('SIGPIPE handler: ' << have.sa_handler);
>
Good point. I checked in a change in cxxtools. I added a configure 
check, if SO_NOSIGPIPE or MSG_NOSIGNAL is available and use them if so. 
Otherwise cxxtools uses pthread_sigaction to block SIGPIPE. I tested 
MSG_NOSIGNAL and pthread_sigaction on linux. I have not yet checked, if 
SIGPIPE is really prevented now. I will do that next.

Could you (all) please check the latest trunk of cxxtools on your 
platform. Linux do not know SO_NOSIGPIPE and hence BSD or something is 
needed to test it.

Tommi

------------------------------------------------------------------------------
Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
MVPs and experts. SALE $99.99 this month only -- learn more at:
http://p.sf.net/sfu/learnmore_122912
_______________________________________________
Tntnet-general mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tntnet-general

Reply via email to