With my external program I create a PDF file, and try to pass to an erlang program. But the PDF contains EOT symbols. When the first EOT is reached, the transfer stops.
How I can pass the whole file?
added after sarnold,
os:cmd(io_lib:format("LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib;
export LD_LIBRARY_PATH; /home/yola/progra/cpp/pdf/a.out ~s", ["Hello"]))
this doesnt return whole generated file. First EOT symbol encountered at 2305 pos and erlang got 2304 symbols, but file length 64xxx bytes.
The
os:cmdfunction uses EOT to know when to stop reading from the external program; see os.erl. So you’ll have to do it in some other way, such as redirecting output to a file: