Ticket #8889: byteswap.patch

File byteswap.patch, 898 bytes (added by beirdo, 15 years ago)
  • mythtv/libs/libmythdb/mythsystem.cpp

    commit d1739a0e951c28a4a73b165c6b0d5faf883b2686
    Author: Gavin Hurlbut <gjhurlbu@gmail.com>
    Date:   Sun Aug 29 16:41:13 2010 -0700
    
        Add back custom exitcode swapping
    
    diff --git a/mythtv/libs/libmythdb/mythsystem.cpp b/mythtv/libs/libmythdb/mythsystem.cpp
    index 0226808..02b8f36 100644
    a b void MythSystemReaper::run(void)  
    136136        m_pidMap.remove(pid);
    137137        m_mapLock.unlock();
    138138
     139        if( WIFEXITED(status) && WEXITSTATUS(status) >= 15 )
     140        {
     141            VERBOSE(VB_IMPORTANT, QString("PID %1: bogus status? swapping status %2")
     142                .arg(pid) .arg(status));
     143            status = ((status & 0xFF) << 8) |
     144                     ((status & 0xFF00) >> 8);
     145        }
     146
    139147        if( WIFEXITED(status) )
    140148        {
    141149            pidData->result = WEXITSTATUS(status);