2b154f0 [rpmbuild] avoid subprocess.communicate(timeout=..)

Authored and Committed by praiskup 5 years ago
    [rpmbuild] avoid subprocess.communicate(timeout=..)
    
    That's not working on Python 2.7; so implement the killer by
    threading.Timer callback.
    
    Also - while we are on it - be more careful;  there are spec files
    which start temporary daemons (e.g. pg_ctl start ..) and if we
    terminate the builder (e.g. by timeout=), the signal handlers
    might not have chance to be executed.
    
    So newly we first send SIGINT, then SIGTERM and as the last resort
    SIGKILL.
    
    Also, apply the default (3600) timeout on SRPM builds.