[erlang-questions] Linked-in driver problem
Fri Jul 29 23:14:18 CEST 2011
Take a look at http://www.erlang.org/doc/man/erl_driver.htmland
ERL_DRV_FLAG_USE_PORT_LOCKING. My guess is that you've got driver
locking right now and it's failing when you try to acquire the lock again
for the second port.
On Fri, Jul 29, 2011 at 5:41 AM, Bob Cowdery <bob@REDACTED>wrote:
> 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.
> erlang-questions mailing list
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the erlang-questions