Date: Thu, 26 Jan 2012 14:44:26 -0500 From: Michael Scheidell <scheidell@freebsd.org> To: <freebsd-ports@freebsd.org>, <perl@freebsd.org> Subject: Re: what is maxcmdlen? $0 len? Message-ID: <4F21AD1A.40903@freebsd.org> In-Reply-To: <4F219044.9030705@freebsd.org> References: <4F2173A8.5010803@freebsd.org> <4352.46.129.107.107.1327599369.squirrel@mymail.acsalaska.net> <4F219044.9030705@freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On 1/26/12 12:41 PM, Michael Scheidell wrote:
>
>
> On 1/26/12 12:36 PM, rflynn@acsalaska.net wrote:
>> Also, it looks like swatch is creating a temporary script that is
>> actually run, so the status command is not supposed to find it.
>>
>> It's a design issue upstream that you want them to find a better
>> solution for.
>>
> I am thinking:
> either do what SHOULD be done, and in swatch(). check for cmdlen >
> (x?) and what is x?) and let swatch die.
>
this actually makes more sense, as to the cmdbuflen size.
len=`echo "0${command} ${swatch_flags} (perl)0" | wc -c`
if [ $len -ge 255 ];then
takes the command, swatch flags, the (perl) added to end, and two byte
buffer (the 0). and if GE 255, then:
either FAIL with err 1 swatch_${i}_flags too long
or set procname = %%LOCALBASE/bin/perl.
this seems to work in all cases.. start/stop/status, one file in
tail-file, several files in tail-file, etc.
--
Michael Scheidell, CTO
o: 561-999-5000
d: 561-948-2259
>*| *SECNAP Network Security Corporation
* Best Mobile Solutions Product of 2011
* Best Intrusion Prevention Product
* Hot Company Finalist 2011
* Best Email Security Product
* Certified SNORT Integrator
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4F21AD1A.40903>
