[OT] Re: return level?

Matej Cepl matej at ceplovi.cz
Tue Feb 18 18:01:51 CET 2003


David Relson wrote:
> Then run the scripts from your python program and see what it prints.
> 
> Also, run bogofilter from the command line and use "echo $?" to see what 
> it's really returning.

This is really weird:

   ~% echo exit 0 > zero
   ~% echo exit 1 > one
   ~% echo exit 2 > two
   ~% chmod +x zero one two
   ~% ./zero ; echo $?
   0
   ~% ./one  ; echo $?
   1
   ~% ./two  ; echo $?
   2
   ~% python
   Python 2.1.3 (#1, Sep  7 2002, 15:29:56)
   [GCC 2.95.4 20011002 (Debian prerelease)] on linux2
   Type "copyright", "credits" or "license" for more information.
   >>> import os
   >>> os.system("/home/matej/one")
   256
   >>> os.system("/home/matej/two")
   512
   >>> os.system("/home/matej/zero")
   0
   >>>
   ~% bogofilter < relson
   ~% echo $?
   1
   ~% 

(relson is obviously your previous mail). Does it mean, that
I should divide returned value by 256 or that I should make some
bitwise masking (xoring?)?

   Thanks for help,

      Matej

-- 
Matej Cepl,
Finger: 89EF 4BC6 288A BF43 1BAB  25C3 E09F EF25 D964 84AC
138 Highland Ave. #10, Somerville, Ma 02143, (617) 623-1488
 
The main idea of the pope's asking for forgivness was not to be
afraid of the truth. DO NOT BE AFRAID OF TRUTH! We have to have
faith in the God's governing power to be able not to be afraid.
    -- On NPR The Connection from March 13, 2000





More information about the Bogofilter mailing list