[Bro] External commands - Error

Riccardo Bortolameotti r.bortolameotti at gmail.com
Wed Apr 16 08:03:41 PDT 2014

Hello everybody,

I am having a problem regarding external command execution. 

This is the piece of code:
function f (s : string) :  Exec::Result 
	local anagram : Exec::Command;
	local res : Exec::Result;
	res = [$exit_code = 0];
	local prog = "/home/riccardo/ngram-ids/ngram-ids/ngram-ids"; 
	local param = "-l /home/riccardo/ngram-ids/ngram-ids/save -m test -t 0 -U " + s;
	anagram = [$cmd = prog, $stdin = param];
	res = Exec::run(anagram);
	return res;
Basically the problem is that the variable res do not receive any value
from the execution of the program. Since this execution should be run
several times because is within a loop, I do not know if there are
problems of threading (like wait for the result). I also receive an
error like this:

1394205441.982764 warning: non-void function returns without a value:
1394205441.982764 error: return trigger in context which does not allow
delaying result

thank you in advance,


More information about the Bro mailing list