Drivers that drive me mad...
Bruce Fitzsimons
Bruce@REDACTED
Tue Aug 22 20:37:10 CEST 2000
Hi peoples,
I just thought I'd throw this to the list and see if someone can tell me
WHY?
My dialogic driver has been sending me nutty for several days because
whenever I sent it a command, it would die. No visible exit signals or
anything. No reason that I could fathom, it worked fine from the shell.
The situation I had was :
1. voice_call process that calls...
2. erlogic.erl that is a server for the dialogic commands. Dialogic events
are received by a loop spawned from this driver and distributed(which seems
nasty but I don't see a way around it). the loop process opens the port
to...
3. erlogic_driver.so - the driver code
Everything worked fine until I sent a command to erlogic.erl and it
translated it and sent a command to the driver port (like a pid...but
different) port ! {self(), {command, {"xxx"}}}. At this point the driver
crashed and took the loop with it. I couldn't trap any message from it.
After a few days of mucking around with this, I decided that maybe the
process that opens a port should send the commands to it. And it
works....yay!
So my questions are - why are drivers ports different to pids? Is this
documented anywhere? and why does it die without a sound (not typical erlang
at all!). It seems to be the erlang interface code that kills it.
Cheers,
Bruce
More information about the erlang-questions
mailing list