<div dir="ltr"><div>Hi Vincent, Alex,<br>I'm not a C programmer, so, could you please explain why fork() is the problem? I see this feature work this way:<br></div><div>1. Place "run external command" statement into "if" statement inside the filter or function, so it will be ran only on the specific updates/withdraws.<br>
</div><div>2. When update/withdraw message is arrived, BIRD runs external command, passes message details to it as environment variables and forks it. After fork BIRD is not blocked by child execution, so it will not be a performance impact.<br>
<br></div><div>Please clarify if I missed something.<br></div><div class="gmail_extra"><br><br><div class="gmail_quote">2014-07-18 20:40 GMT+03:00 Vincent Bernat <span dir="ltr"><<a href="mailto:bernat@luffy.cx" target="_blank">bernat@luffy.cx</a>></span>:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"> ❦ 18 juillet 2014 18:01 +0100, Alex Bligh <<a href="mailto:alex@alex.org.uk" target="_blank">alex@alex.org.uk</a>> :<br>
<div><br>
>> On 18.7.2014 10:50, Stanislav Datskevich wrote:<br>
>>> So, this feature will not be implemented? I think BIRD will turn into<br>
>>> BGP swiss-knife if it will be.<br>
>><br>
>> I think, this sounds interesting to me. And it shouldn't be very<br>
>> complicated to code it. I will look at it.<br>
><br>
> Can I suggest you make the syntax such that a script is but one option?<br>
> I can see a good case for (e.g.) triggering a little lua to run, which<br>
> would not involve a fork() and be much faster. Clearly someone else would<br>
> have to code that bit, but generalising this might be useful. This way<br>
> you could get your lua to filter out 99% of things before running<br>
> (e.g.) a script. We have some experience integrating lua things and<br>
> whilst I can't guarantee it, we may be prepared to take a look.<br>
<br>
</div>Another way to avoid forking is to allow a long-running process to<br>
receive data, either through a socket or by spawning it and<br>
communicating with it on stdin/stdout.<br>
<span><font color="#888888">--<br>
panic("aha1740.c"); /* Goodbye */<br>
2.2.16 /usr/src/linux/drivers/scsi/aha1740.c<br>
</font></span></blockquote></div><br></div></div>