otp genserver and port program
Fri Oct 23 11:45:41 CEST 2009
I wrote a port program based on the design principles of
The only difference is my program is a linked in driver and the linked
in driver connects to a C program. The C program returns a tuple
response. It works fine if only one client connects to the server (I
get a proper response). But in case multiple client connects to the
server I get a bad match error and the gen_server terminates :(. The
debug message is not that useful and googling didn't give me anything
useful. I am using port_command to send the message to the linked in
driver (which is part of the handle_call). Is there any way to debug a
gen_server crashing (I don't get anything other than the badmatch
which I don't understand) and would gen_server handle_call not handle
multiple calls that are received simultaneously? It works fine if I
remove the port_command and just return random tuples.
The error I get looks something like this:
I would really appreciate any kind of help or pointers - have been
trying to debug this for a while and can't get much information :(.
In a world without fences who needs Gates?
More information about the erlang-questions