[buildd-tools-devel] Bug#477770: Bug#477770: [PATCH] improve SIGINT handling

Roger Leigh rleigh at codelibre.net
Sun Jun 6 21:07:05 UTC 2010


tags 477770 + fixed-upstream pending
thanks

On Mon, May 10, 2010 at 03:07:21PM -0400, Nathaniel W. Turner wrote:
> From: Nathaniel W. Turner <nate at houseofnate.net>
> 
> This addresses the case where a Ctrl-C is intended for a process running
> in the chroot; before, schroot would always exit without cleaning up
> (the most visible symptom being left-over bind-mounts in
> /var/lib/schroot/mount).  Now, cleanup occurs, and an appropriate error
> message is displayed ("E: Child terminated by signal ‘Interrupt’").
> 
> This patch does not cover all the cases described by bug 477770, but I
> think it is a step in the right direction.

Thanks for the patch.  This looks like it fixes the issue originally
reported very nicely.  It's been committed into git, and will be in the
next release, which should be very soon.

Looking at the run-parts code, this should handle the case of SIGINT
being received when running the setup scripts (the script will return
with SIGINT in its exit code which will lead to an abort), and the
signal handlers are present for the entire duration of the session
so it should always get handled for that period.  If we receive a
signal outside the session code and get aborted by default, that's
OK since there's no cleanup needed.

AFAICT the case mentioned in the report was if the child receives
SIGTERM, then no cleanup occurs.  That's a separate issue, so I'll
file a new bug for that if it's still present.  Was there anything
else I've forgotten about we need to handle?


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: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://lists.alioth.debian.org/pipermail/buildd-tools-devel/attachments/20100606/8b7354d0/attachment.pgp>


More information about the Buildd-tools-devel mailing list