From d272fb15855a3630d99bbd7a8a13adaba1a951fe Mon Sep 17 00:00:00 2001 From: hunt Date: Wed, 15 Aug 2007 14:44:21 +0000 Subject: 2007-08-15 Martin Hunt PR4736 * staprun.c (cleanup): Set priority back to normal before removing module. --- runtime/staprun/ChangeLog | 5 +++++ runtime/staprun/stap_merge.c | 3 +-- runtime/staprun/staprun.c | 3 +++ 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/runtime/staprun/ChangeLog b/runtime/staprun/ChangeLog index 002284bf..0ca8812d 100644 --- a/runtime/staprun/ChangeLog +++ b/runtime/staprun/ChangeLog @@ -1,5 +1,10 @@ 2007-08-15 Martin Hunt + PR4736 + * staprun.c (cleanup): Set priority back to normal + before removing module. +2007-08-15 Martin Hunt + * stap_merge.tcl: New. 2007-08-14 David Smith diff --git a/runtime/staprun/stap_merge.c b/runtime/staprun/stap_merge.c index 051a344b..fb8a17c1 100644 --- a/runtime/staprun/stap_merge.c +++ b/runtime/staprun/stap_merge.c @@ -101,10 +101,9 @@ int main (int argc, char *argv[]) } } - if (fread(&len, sizeof(int), 1, fp[j])) { if (verbose) - fprintf(stderr, "[CPU %d, seq=%ld, length=%d]\n", j, min, len); + fprintf(stdout, "[CPU:%d, seq=%ld, length=%d]\n", j, min, len); if (len > bufsize) { bufsize = len * 2; if (verbose) fprintf(stderr, "reallocating %d bytes\n", bufsize); diff --git a/runtime/staprun/staprun.c b/runtime/staprun/staprun.c index d9738cd7..fe55e36f 100644 --- a/runtime/staprun/staprun.c +++ b/runtime/staprun/staprun.c @@ -121,6 +121,9 @@ static void cleanup(int rc) dbug(2, "rc=%d, inserted_module=%d\n", rc, inserted_module); + if (setpriority (PRIO_PROCESS, 0, 0) < 0) + _perr("setpriority"); + /* rc == 2 means disconnected */ if (rc == 2) return; -- cgit