open_port function problem.
Ingela Anderton
ingela@REDACTED
Fri Dec 19 09:18:19 CET 2003
Maybe you should read the documentation a bit closer ;)
http://www.erlang.org/doc/r9c/doc/index.html
>From man page of the module erlang:
port_command(Port, Data)
[...]
Failure: badarg if Port is not an open port or the registered name of
an open port, or if Data is not an I/O list. An I/O list is a binary
or a (possibly) deep list of binaries or integers in the range 0
through 255.
[...]
Chenniappan,Dhanasekaran [DBA] wrote:
> hai,
>
> we are working on erlang port communication program which communicate with
> c .exe . for that we use open_port like
> "open_port({spawn, ExtPrg}, [{packet, 2}]),"
>
> our problem is when we are sending number 26 through that port the port get
> closed.what may be possibly wrong with this. and when we give 10 through
> buffer it always prints we assume that it may be due to ascii property of 10
> & 13 which is new line and cairrage return respectively, but how can these
> things be handled effectively,there is no clue regarding the port close when
> sending 26. Evenn the example foo also reflect the same resullt. Please give
> us an solution in this problem.
>
> regards
> dhanas
--
/m.v.h Ingela
//The highway of life is always under construction. //
|\ _,,,--,,_ ,)
/,`.-'`' -, ;-;;'
|,4- ) )-,_ ) /\
'---''(_/--' (_/-'
Ericsson AB - OTP team
Cellular/Mobile: +46 70 636 78 68
More information about the erlang-questions
mailing list