driver_send_term question.

Rodolphe Duge de Bernonville rod@REDACTED
Tue Oct 30 13:12:00 CET 2001

thanks for answering so quickly !

Sean Hinde a écrit :
> > My question is about the argument of driver_send_term
> > (to send result of a driver to another process) and
> > his second argument (receiver) :
> If you want to return the message to the same process that called the driver
> (not necessarily the port owner) you can retrieve this using:
> ErlDriverTerm driver_caller(ErlDrvPort port)

yes I have seen it ...

> It's documented in the erts Ref manual in the erl_drver section.
> > My driver works but I had to make a not really nice "cut/paste"
> > of the macro "make_pid" from erl_term.h (and the order of
> > the arguments of this macro is different from the order
> > displayed by the pid of a process.)
> >
> > So is there a better way to do that ?
> If you want to send it to some other arbritrary process I'm not sure there's
> a standard way.

it was my problem ... the way I did it was to send the pid of the
receiver process to the driver and to transform it into something
readable by the driver_send_term function.

Other thing, sending a pid to a driver gives a BadMatch error ?
(I am working with the example driver of the documentation but now
I send it in a list format).

More information about the erlang-questions mailing list