[mythtv-commits] mythtv/master commit: 7df45359e by Gavin Hurlbut (Beirdo)

MythTV noreply at mythtv.org
Thu Feb 17 08:45:57 UTC 2011


      Author:  Gavin Hurlbut <ghurlbut at mythtv.org>
 Change Date:  2011-02-17T00:40:59-08:00
   Push Date:  2011/02/17 00:45:54 -0800
  Repository:  mythtv
      Branch:  master
New Revision:  7df45359e597d5018a59f877ab45377474c40c58
   Changeset:  https://github.com/MythTV/mythtv/commit/7df45359e

Log:

Rework exitcodes

MythTV has far too many exit codes, several of which have practically no
purpose whatsoever.  Any distinction between the various exit codes is far
easier dealt with by using log messages before exiting.  Do we really care that
the error was in the logfile or the pidfile, for instance?  Most, if not all,
scripts that use these return values check for 0 (success) or !0 (fail).

Additionally, the exit codes *must* fit into 8 bits.  I forgot this minor
detail earlier in the myth_system rewrite.  exit() only uses 8 bits, and will
chop off all the higher order bits anyways.

So...  I have combined the exit codes into far fewer exit codes, removed ones
that are completely unused, and then renumbered them to have general errors
start at 128.  This allows for 127 commercials to be flagged before we see a
false error, which should be plenty.

One place that could be somewhat changed in function is transcoding.  When
the cutlist has been changed during a transcode run, I have folded that exit
code from mythtranscode into the "restart transcoding" one.  Thus, it may
have essentially aborted earlier, but would now restart the transcode run
instead.

Please let me know if any oddities occur.

Modified:

   mythplugins/mytharchive/mytharchivehelper/main.cpp
   mythplugins/mythnetvision/mythfillnetvision/main.cpp
   mythplugins/mythzoneminder/mythzmserver/main.cpp
   mythtv/libs/libmyth/mythcommandlineparser.cpp
   mythtv/libs/libmythbase/exitcodes.h
   mythtv/libs/libmythbase/system-unix.cpp
   mythtv/libs/libmythtv/jobqueue.cpp
   mythtv/programs/mythavtest/main.cpp
   mythtv/programs/mythbackend/main.cpp
   mythtv/programs/mythbackend/main_helpers.cpp
   mythtv/programs/mythbackend/mainserver.cpp
   mythtv/programs/mythbackend/mediaserver.cpp
   mythtv/programs/mythbackend/scheduler.cpp
   mythtv/programs/mythcommflag/main.cpp
   mythtv/programs/mythfilldatabase/filldata.cpp
   mythtv/programs/mythfilldatabase/main.cpp
   mythtv/programs/mythfilldatabase/xmltvparser.cpp
   mythtv/programs/mythfrontend/backendconnectionmanager.cpp
   mythtv/programs/mythfrontend/main.cpp
   mythtv/programs/mythfrontend/mediarenderer.cpp
   mythtv/programs/mythjobqueue/main.cpp
   mythtv/programs/mythlcdserver/main.cpp
   mythtv/programs/mythmessage/main.cpp
   mythtv/programs/mythpreviewgen/main.cpp
   mythtv/programs/mythshutdown/main.cpp
   mythtv/programs/mythtranscode/main.cpp
   mythtv/programs/mythtranscode/mpeg2fix.cpp
   mythtv/programs/mythtranscode/mpeg2fix.h
   mythtv/programs/mythtv-setup/main.cpp
   mythtv/programs/mythwelcome/main.cpp



More information about the mythtv-commits mailing list