[erlang-questions] escript question

Chris Hicks <>
Sun Sep 18 19:57:24 CEST 2011


Thanks for the response, Tim. The first two were along the lines of what I was thinking I'd need to do, though I didn't know about file:consult/1 which could come in very handy for a couple other things I'm working on. I'm leaning a bit more towards #1 though simply because in the system I'm building there could be anywhere from dozens to hundreds of these scripts being fired off each second and, without having spent much time thinking about it, I imagine trying to filter the appropriate structure back to the appropriate process which fired off the escript via method #2 would just add some unnecessary complexity.
Date: Sun, 18 Sep 2011 18:44:24 +0100
Subject: Re: [erlang-questions] escript question
From: 
To: 
CC: 

1. write it to a file and use file:consult/1 to grab the result.2. write it back to stdout and use erl_parse/erl_eval3. use emu_args to get the escript hooked into the distribution protocol and use rcp:call to send the result back

Not actually sure about (3) as I've never done that, but the other two work fine and are simple to implement.
Cheers,
Tim


On 18 September 2011 17:49, Chris Hicks <> wrote:






Quick question, what would be considered the easiest way to "return" data to a running Erlang application from an escript? For example I might want to run an escript with a data structure I want it to modify and, once it is all done, get the modified structure back. 		 	   		  


_______________________________________________

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/20110918/a6435d57/attachment.html>


More information about the erlang-questions mailing list