[Mimedefang] Interesting return code from TrendMicro

David F. Skoll dfs at roaringpenguin.com
Wed Apr 7 21:17:02 EDT 2004


On Wed, 7 Apr 2004, Stephen Smoogen wrote:

> Ok the two issues is that for some reason the $retcode needs to be
> divided by 512 on Red Hat Enterprise 3 (perl 5.8 etc)

That is extremely unlikely, unless Red Hat has made major,
incompatible changes to the kernel and glibc.  The return code from
Perl's execution of a command with (open "$cmd |") is simply the
status code from the wait(2) sytem call.  Practically since the dawn
of UNIX, the exit code is obtained from the status code by shifting
right 8 bits, and a glance at RHEL3 shows this in
/usr/include/bits/waitstatus.h:

	#define __WEXITSTATUS(status)   (((status) & 0xff00) >> 8)

So I'm convinced something else is happening.  See the
"perlvar" man page on RHEL3, and search for "$?".

> The second issue is that the logic in interpret_trend_code might need
> some fixing..

That's possible; I'll look at it.

Regards,

David.



More information about the MIMEDefang mailing list