All of lore.kernel.org
 help / color / mirror / Atom feed
From: Patrick Ohly <patrick.ohly@intel.com>
To: "Aníbal Limón" <anibal.limon@linux.intel.com>
Cc: openembedded-core@lists.openembedded.org
Subject: Re: [PATCHv2 1/2] oeqa/selftest/{context, case}: Handle KeyboardInterrupt/SIGINT and SIGTERM
Date: Tue, 27 Jun 2017 20:43:35 +0200	[thread overview]
Message-ID: <1498589015.7464.60.camel@intel.com> (raw)
In-Reply-To: <20170627163020.22521-1-anibal.limon@linux.intel.com>

On Tue, 2017-06-27 at 11:30 -0500, Aníbal Limón wrote:
> In order to avoid corrupt local.conf and bblayers.conf adds
> signal handler for SIGTERM and use try/finally (KeyboardIntrrupt) block
> to restore previously backuped configuration.

Thanks for pointing out that SIGTERM isn't going through the "finally"
block - I thought it would, hence my previous question.

However, in this incarnation of your patch there's now cleanup code in
various places. Would it be perhaps cleaner to just raise a suitable
exception in the signal handler and leave all the cleanup code in the
"finally" block?

-- 
Best Regards, Patrick Ohly

The content of this message is my personal opinion only and although
I am an employee of Intel, the statements I make here in no way
represent Intel's position on the issue, nor am I authorized to speak
on behalf of Intel on this matter.





      parent reply	other threads:[~2017-06-27 18:43 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-27 16:30 [PATCHv2 1/2] oeqa/selftest/{context, case}: Handle KeyboardInterrupt/SIGINT and SIGTERM Aníbal Limón
2017-06-27 16:30 ` [PATCHv2 2/2] selftest/cases/package: Call parent setUpClass method Aníbal Limón
2017-06-27 18:43 ` Patrick Ohly [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1498589015.7464.60.camel@intel.com \
    --to=patrick.ohly@intel.com \
    --cc=anibal.limon@linux.intel.com \
    --cc=openembedded-core@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.