[erlang-questions] How to specify receiver for erl_drv_send_term

Lukas Larsson <>
Mon Jun 23 17:21:58 CEST 2014


Hello,

The only way that I know if from either driver_caller or driver_connected.
What I have done to solve this problem is to make the process that should
get the message "register" with the port. When it does the register call I
get the pid using driver_caller and save the pid in the port state.

You should probably also monitor the process from the driver to in case it
terminates.

Lukas


On Mon, Jun 23, 2014 at 2:02 PM,  <
> wrote:

> Hi all,
>
>
>
> I've been practicing writing a port driver for a legacy SIGTRN product. In
> attempting to send back data from the port driver to a erlang process, I
> don't know how to convert existing  erlang_pid data to a ErlDrvTerm data
> which is required by erl_drv_send_term(), as the receiver parameter. It'll
> be graceful if somebody here could give me a hand.
>
>
>
> Regards,
>
> Ben
>
>
>
> _______________________________________________
> erlang-questions mailing list
> 
> http://erlang.org/mailman/listinfo/erlang-questions
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20140623/bb6f635d/attachment.html>


More information about the erlang-questions mailing list