|
From: <sv...@va...> - 2007-09-18 19:12:56
|
Author: weidendo
Date: 2007-09-18 20:12:57 +0100 (Tue, 18 Sep 2007)
New Revision: 6861
Log:
callgrind_control: Fix behavior with callgrind runs of another user
callgrind_control uses files /tmp/callgrind.info.* to be able to
locate running callgrind processes. These files can be read only by
the user which started callgrind. The callgrind_control script
did not check for "permission denied" on opening these files, which
resulted in some unexpected errors. Now, it is checked whether
the "open" was successful, and if not, we skip the according callgrind
process.
Fixes bug 149963.
Modified:
trunk/callgrind/callgrind_control.in
Modified: trunk/callgrind/callgrind_control.in
===================================================================
--- trunk/callgrind/callgrind_control.in 2007-09-18 07:35:51 UTC (rev 6860)
+++ trunk/callgrind/callgrind_control.in 2007-09-18 19:12:57 UTC (rev 6861)
@@ -43,7 +43,8 @@
close MAP;
if ($found == 0) { next; }
- open INFO, "<$f";
+ $res = open INFO, "<$f";
+ if (!$res) { next; }
while(<INFO>) {
if (/version: (\d+)/) { $mversion{$pid} = $1; }
if (/cmd: (.+)$/) { $cmd{$pid} = $1; }
|