summaryrefslogtreecommitdiff
path: root/debian
diff options
context:
space:
mode:
authorJustus Winter <4winter@informatik.uni-hamburg.de>2014-04-27 08:51:46 +0200
committerJustus Winter <4winter@informatik.uni-hamburg.de>2014-04-27 08:51:46 +0200
commit52e994d27d25461f0b92127d9512db8765191b95 (patch)
treebbc2ddb86f749fd0924506daf57b7f1e02a3cbe7 /debian
parent2f3571114d348d790b13b41f66a8421b640de72f (diff)
add exec-abbreviate-task-names.patch
Diffstat (limited to 'debian')
-rw-r--r--debian/patches/exec-abbreviate-task-names.patch36
-rw-r--r--debian/patches/series1
2 files changed, 37 insertions, 0 deletions
diff --git a/debian/patches/exec-abbreviate-task-names.patch b/debian/patches/exec-abbreviate-task-names.patch
new file mode 100644
index 00000000..24cedfe9
--- /dev/null
+++ b/debian/patches/exec-abbreviate-task-names.patch
@@ -0,0 +1,36 @@
+commit 9948e87495f1c52d52aabd6d3465fc9431ff6b43
+Author: Justus Winter <4winter@informatik.uni-hamburg.de>
+Date: Sun Apr 27 08:43:17 2014 +0200
+
+ exec: abbreviate the task name if necessary
+
+ * exec/exec.c (do_exec): If the formatted task name exceeds
+ TASK_NAME_SIZE, abbreviate it.
+
+diff --git a/exec/exec.c b/exec/exec.c
+index 935762e..b068f5e 100644
+--- a/exec/exec.c
++++ b/exec/exec.c
+@@ -1168,9 +1168,20 @@ do_exec (file_t file,
+ goto out;
+
+ char *name;
+- if (asprintf (&name, "%s(%d)", argv, pid) > 0)
++ int size = asprintf (&name, "%s(%d)", argv, pid);
++ if (size > 0)
+ {
+- task_set_name (newtask, name);
++/* This is an internal implementational detail of the gnumach kernel. */
++#define TASK_NAME_SIZE 32
++ if (size < TASK_NAME_SIZE)
++ task_set_name (newtask, name);
++ else
++ {
++ char *abbr = name + size - TASK_NAME_SIZE + 1;
++ abbr[0] = abbr[1] = abbr[2] = '.';
++ task_set_name (newtask, abbr);
++ }
++#undef TASK_NAME_SIZE
+ free (name);
+ }
+ }
diff --git a/debian/patches/series b/debian/patches/series
index c80d17c1..26eb6bd1 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -50,3 +50,4 @@ ext2fs-two-pagers.patch
#ext2fs-fix-inum-type.patch
#ext2fs-cache-superblock.patch
#libpager-threading-rework.patch
+exec-abbreviate-task-names.patch