Hello, >I need to invoke a perl script (SPAMASSASSIN FWIW) from a C program with command >line parameters and input and output re-direction. Currently from my 'C' program >I call LIB$SPAWN with a PERL command such as: > > perl spamassassin. -e2160 < SAMPLE-SPAM.TXT > KZSAMPLE-SPAM-OUT.TXT > >This works but incurs LIB$SPAWN's process creation overhead in addition to >re-compilation of the perl scripts each time around (and this set of scripts >takes five to ten seconds to compile). This is more overhead than I'd like and >I'm looking to cut out as much of it as possible. Ideally it would be done >without creating a sub process and with only one loading of the perl interpreter >and one compilation of the scripts for the life of a server process. (The server >process will invoke SPAMASSASSIN many times in its life, once for each mail >message processed.)
If the point of the exercise is to run SPAMASSASIN then frankly you'd be much better off looking at Process Software's PreciseMail product. It's an implementation of SpamAssassin in C, with various enhancements and improvements, and optional Bayesian filtering too. Very efficient and very effective. http://www.process.com/ Regards, Jeremy Begg +---------------------------------------------------------+ | VSM Software Services Pty. Ltd. | | http://www.vsm.com.au/ | | "OpenVMS Systems Management & Programming" | |---------------------------------------------------------| | P.O.Box 402, Walkerville, | E-Mail: [EMAIL PROTECTED] | | South Australia 5081 | Phone: +61 8 8221 5188 | |---------------------------| Mobile: 0414 422 947 | | A.C.N. 068 409 156 | FAX: +61 8 8221 7199 | +---------------------------------------------------------+
