[buildd-tools-devel] buildd handling of sbuild termination by signal

Roger Leigh rleigh at codelibre.net
Sun Feb 7 13:49:38 UTC 2010


Hi,

I've attached a patch to get buildd to handle the case where sbuild
is terminated by a signal.  The current code on the buildd branch
handles only the exit status, and doesn't handle signal termination.

I've tested the logic in a test program, and then implemented this
in Buildd::Daemon, but the code in the patch hasn't been tested
live.  It will need checking and testing.  The main change is the
use of the POSIX macros WIFEXITED/WEXITSTATUS/WIFSIGNALED/WTERMSIG
to correctly extract the necessary information out of the exit
status.

Additional changes in the patch are:
- processing all lines of the sbuild output to avoid sbuild
  blocking on a log write
- addition of $failed variable to handle all failure cases
- addition to $giveback to specially handle givebacks to avoid code
  duplication (givebacks can occur in three separate cases)


Regards,
Roger

-- 
  .''`.  Roger Leigh
 : :' :  Debian GNU/Linux             http://people.debian.org/~rleigh/
 `. `'   Printing on GNU/Linux?       http://gutenprint.sourceforge.net/
   `-    GPG Public Key: 0x25BFB848   Please GPG sign your mail.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: buildd-handle-sbuild-signal-term.patch
Type: text/x-diff
Size: 3194 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/buildd-tools-devel/attachments/20100207/62fea494/attachment.patch>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://lists.alioth.debian.org/pipermail/buildd-tools-devel/attachments/20100207/62fea494/attachment.pgp>


More information about the Buildd-tools-devel mailing list