Re: [Shorewall-users] Macro files bug

Tom Eastep
Fri, 26 Oct 2007 23:01:55 -0000

Andrew Suffield wrote:
> On Fri, Oct 26, 2007 at 03:19:40PM -0700, Tom Eastep wrote:
>> Andrew Suffield wrote:
>>
>>> Hmm, assuming that it''s just evaled then you could
probably stash a
>>> sub in one of the extension scripts that runs early in the compile
>>> process, and then:
>>>
>>> PERL SMTP qw{fw net}
>>>
>>> gives you the "smarter macro" feature.
>>>
>>> (It does depend what package you''re evaling stuff in -
ideally they
>>> should all be tossed into a private namespace, so you
don''t
>>> accidentally redefine parts of shorewall-perl)
>>>
>>> It is not immediately apparent how to get the same effect from the
>>> shell version. Maybe something with scripts and the search path?
>> It''s not just evaled -- it''s using a child process
with piped output.
>
> If it''s spawning a new interpreter, that''s inconvinient.
Can that be
> avoided? A fork of the parent interpreter would suffice, since
that''ll
> still have any state that was set up by the earlier extension
> scripts. It''d also be faster (the perl interpreter takes a *long*
time
> to start up, compared to the already kinda slow fork() syscall).

PERL is now forking.