summaryrefslogtreecommitdiff
path: root/ACE/bin
diff options
context:
space:
mode:
authorSon Dinh <dinhs@objectcomputing.com>2022-04-29 16:45:38 -0500
committerSon Dinh <dinhs@objectcomputing.com>2022-05-06 10:58:33 -0500
commita334d5c29adbeb3997c8474284cc51b3805fedea (patch)
treef25521b3e1b88de5621110fba4c2cc444a8095d4 /ACE/bin
parent5c38ce72996e395e7154432193e3c01bac353b83 (diff)
downloadATCD-a334d5c29adbeb3997c8474284cc51b3805fedea.tar.gz
From review
Diffstat (limited to 'ACE/bin')
-rw-r--r--ACE/bin/PerlACE/Process_Unix.pm9
1 files changed, 4 insertions, 5 deletions
diff --git a/ACE/bin/PerlACE/Process_Unix.pm b/ACE/bin/PerlACE/Process_Unix.pm
index 905be7a47db..3781a11d123 100644
--- a/ACE/bin/PerlACE/Process_Unix.pm
+++ b/ACE/bin/PerlACE/Process_Unix.pm
@@ -587,14 +587,13 @@ sub print_stacktrace_linux
close ($pattern_fh);
# Find the core file from the pattern
- my $last_slash_idx = rindex ($line, "/");
my $path = ".";
my $pattern;
- if ($last_slash_idx == -1) {
- $pattern = $line;
+ if ($line =~ /^(.*)\/([^\/]*)$/) {
+ $path = $1;
+ $pattern = $2;
} else {
- $pattern = substr ($line, $last_slash_idx + 1);
- $path = substr ($line, 0, $last_slash_idx);
+ $pattern = $line;
}
# If /proc/sys/kernel/core_uses_pid is non-zero and the pattern