All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH][RFC] bitbake-worker: set the process name when starting a task
@ 2016-01-06 16:25 Ross Burton
  2016-01-06 21:42 ` Christopher Larson
  0 siblings, 1 reply; 3+ messages in thread
From: Ross Burton @ 2016-01-06 16:25 UTC (permalink / raw)
  To: bitbake-devel

If the setproctitle module is present then use it to change the process name
when the worker starts a task.  This results in each worker showing what task it
is executing in a process listing.

Signed-off-by: Ross Burton <ross.burton@intel.com>
---
 bitbake/bin/bitbake-worker | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/bitbake/bin/bitbake-worker b/bitbake/bin/bitbake-worker
index 3390f63..15b0f10 100755
--- a/bitbake/bin/bitbake-worker
+++ b/bitbake/bin/bitbake-worker
@@ -371,6 +371,12 @@ class BitbakeWorker(object):
         fn, task, taskname, quieterrors, appends, taskdepdata = pickle.loads(data)
         workerlog_write("Handling runtask %s %s %s\n" % (task, fn, taskname))
 
+        try:
+            import setproctitle
+            setproctitle.setproctitle("bitbake-worker: %s:%s" % (os.path.basename(fn), taskname))
+        except ImportError:
+            pass
+
         pid, pipein, pipeout = fork_off_task(self.cookercfg, self.data, self.workerdata, fn, task, taskname, appends, taskdepdata, quieterrors)
 
         self.build_pids[pid] = task
-- 
2.6.4



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

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

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-01-06 16:25 [PATCH][RFC] bitbake-worker: set the process name when starting a task Ross Burton
2016-01-06 21:42 ` Christopher Larson
2016-01-07 14:00   ` Richard Purdie

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.