44c4ce8 rpmbuild: fix background process (group) cancellation

1 file Authored by praiskup 3 years ago, Committed by praiskup 3 years ago,
    rpmbuild: fix background process (group) cancellation
    
    The 'copr-rpmbuild' process doesn't explicitly handle 'SIGINT', and so
    it doesn't resend the signal down to its children.  Interrupting just
    the main process often ended up with uncontrolled background mock
    process that could collide by subsequent build task performed on the
    same builder (#1501).
    
    The easiest thing for us now is to mimic what happens on terminal when
    pressing CTRL+C (sending INT to all processes in corresponding process
    group).  This way we deliver INT also to mock process (through the
    wrapping /bin/unbuffer process).  And mock takes care of all it's
    children properly by "orphanskill" feature.
    
    Fixes: #1501