All of lore.kernel.org
 help / color / mirror / Atom feed
* Triggering graceful bitbake shutdown
@ 2016-03-01 12:50 Tanu Kaskinen
  2016-03-04 17:58 ` Richard Purdie
  0 siblings, 1 reply; 5+ messages in thread
From: Tanu Kaskinen @ 2016-03-01 12:50 UTC (permalink / raw)
  To: bitbake-devel

Hi,

I wrote a small script that runs bitbake sequentially with multiple
MACHINE values. Sometimes I want to stop it with ctrl-c before it has
finished, but it didn't work properly out-of-the box when running
bitbake under the script (my script would not wait for bitbake to exit,
and bitbake threw some backtrace too). I then modified SIGINT handling
in my script so that it forwards the signal to bitbake and then waits
for bitbake to exit. The problem is that bitbake ignores SIGINT. The UI
handles python's KeyboardInterrupt exception, but that exception
doesn't get raised when bitbake runs under my script. I don't know what
triggers KeyboardInterrupt in normal conditions, since SIGINT doesn't
seem to be sufficient, does python perhaps monitor stdin to catch the
actual ctrl-c keypress?

Anyway, sending SIGTERM instead of SIGINT "works". However, the SIGTERM
handler shuts down bitbake immediately rather than waiting for the
current tasks to finish. Is that less safe than the normal ctrl-c
handling? If the immediate shutdown is equally safe, then I have no
problem, but if SIGTERM can cause state corruption so that resuming
later doesn't work reliably, then I'd like to have some way for
triggering graceful bitbake shutdown from my script. Any suggestions?

Or maybe there is already some way to run bitbake for multiple
MACHINEs, and I don't need to write any script myself?

-- 
Tanu


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2016-03-05 14:01 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-03-01 12:50 Triggering graceful bitbake shutdown Tanu Kaskinen
2016-03-04 17:58 ` Richard Purdie
2016-03-05 10:41   ` Tanu Kaskinen
2016-03-05 11:21     ` Tanu Kaskinen
2016-03-05 14:01       ` Tanu Kaskinen

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.