Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re: Unix-Domain TCP Server Crashing

by cdarke (Prior)
on Aug 17, 2010 at 07:44 UTC ( [id://855422]=note: print w/replies, xml ) Need Help??


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.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://855422]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (7)
As of 2024-04-25 14:30 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found