[erlang-questions] Linked-in driver problem

Bob Cowdery bob@REDACTED
Fri Jul 29 14:41:17 CEST 2011


I have a linked-in driver which pretty much follows the example in the
Programming Erlang book. This works very well and I've been using it for
a while. I now need two separate instances of this so I went the easy
route and created another gen-server for the second instance. Both these
gen-servers spawn a reader process and make the reader the port owner.

When I start up the program which is a full OTP implementation the
supervisor kicks in and closes it all down. No error messages. I have
discovered that when the second process spawns its reader the close down
occurs with the reader of the first process exiting. If I don't spawn
the second reader then it stays up and I can send commands from both
processes but obviously can't read responses for the second process. I'm
obviously doing something that is incorrect here but I can't figure what.


More information about the erlang-questions mailing list