From: Shachar S. <sh...@sh...> - 2007-06-06 05:42:46
|
Amos Shapira wrote: > On 06/06/07, Shachar Shemesh <sh...@sh...> wrote: > >> Amos Shapira wrote: >> >>> How? The current situation (before my changes from today) fails on >>> helper process exit just the same, and if we'll solve the >>> multi-thread/multi-process scenario then this SIGPIPE fix will also >>> work (maybe with an addition check inside the critical section that >>> the pipe is still there). >>> >>> >> No, it will not. Only one process will receive the "remaining count" of >> 0, and it will be the only process that will be the only process that >> will correctly know to stop sending requests. Hence - problem not solved! >> > > 1. It won't make it worse, would it? Instead of all the processes > failing with SIGPIPE every time a too low -n parameter is given only > one process will fail if it binds too many times. > First, notice that this is not about failing, it's about sending an unexpected signal to the process. No, instead of all processes failing, all but one will fail. It won't make it worse, but it won't make it better either. > 2. Since you already pass MSG_NOSIGNAL to send(2) this might be a mute > point anyway. > moot. Yes. > (BTW - according to http://www.wlug.org.nz/MSG_NOSIGNAL, MSG_NOSIGNAL > is also not completely portable). > Yes. We will probably need to test for it in configure and #ifdef it. Is NOSIGPIPE, mentioned in the article, portable? > BTW2 - should we mention portability issues in the manual? I'd move > them to the README. > > I'm not sure. >> >> Probably not. I'll write signal detection into the test app and see. >> > > I'll add this to test.c, that's what it's there for. > What other test app do we have? > >> This is another case where I see a problem coming, but don't remember >> that I already saw that problem coming before, and already handled it. >> > > Did you remember to take your pills? :) > > Surprising, I know, but I don't have ANY pills prescribed to me :-) > > Maybe a reference to linus's full rant against SVN/CVS will give more > context for the above paragraph. > http://codicesoftware.blogspot.com/2007/05/linus-torvalds-on-git-and-scm.html Shachar |