[erlang-questions] Passing parameters to a port driver

Per Hedeland per@REDACTED
Tue Mar 11 20:05:38 CET 2008


>Sebastian Bello <sebastian.bello@REDACTED> wrote:
>
>Ideally I would like to perform something like
>
>Port = open_port({spawn, "./mylib parm1 parm2"}, [])
>
>at the Erlang side, and be able to parse /parmN /from the C side:
>
>static ErlDrvData driver_start(ErlDrvPort port, char *buff) {
>   
>    // parse parameters from *buff
>}
>
>That's all; is that possible with a linked-in driver?

Yes.

--Per



More information about the erlang-questions mailing list