in reply to Unix-Domain TCP Server Crashing

~/tmp$ ./sockclient & ./sockclient & ./sockclient

First, I'm going to make the assumption that ~/tmp$ is the prompt.
Of the rest, what worries me is the use of ampersand, Donald Duck, &. Bash (I assume you are using Bash) will take that to run the preceeding command in background, however the right-most command is not run in background in that way. When you run jobs in background it is difficult to predict the order of execution, and different results can ensue.

I wonder, did you mean this:
./sockclient && ./sockclient && ./sockclient
?

Replies are listed 'Best First'.
Re^2: Unix-Domain TCP Server Crashing
by wokka (Acolyte) on Aug 17, 2010 at 12:36 UTC
    Your prompt and bash assumptions are correct, though I don't understand how Donald Duck fits in. I was remiss in not being more specific, I will add that info to the node so that it's clear. Thanks for pointing that out.

    Given that, no, I did not mean '&&'. I was specifically trying to execute multiple requests at the same time. The server is written around a fork, and I was testing how this behaved.

    These results are obviously different, as you say, but they are consistent and reproducible across several platforms (granted, all running bash), and my question is why and how this comes to pass.