diff options
author | Son Dinh <dinhs@objectcomputing.com> | 2022-04-29 16:45:38 -0500 |
---|---|---|
committer | Son Dinh <dinhs@objectcomputing.com> | 2022-04-29 16:45:38 -0500 |
commit | fad3aa9f735ede7455e2fe7e7ff5a5c991b9f8f7 (patch) | |
tree | 74f7efd0154dbd870afa26b12c2cb99711f9207b | |
parent | f04748dc14e7218547cd8621b89d880390ea8b38 (diff) | |
download | ATCD-fad3aa9f735ede7455e2fe7e7ff5a5c991b9f8f7.tar.gz |
From review
-rw-r--r-- | ACE/bin/PerlACE/Process_Unix.pm | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/ACE/bin/PerlACE/Process_Unix.pm b/ACE/bin/PerlACE/Process_Unix.pm index a81db1d1f84..f67bd770b50 100644 --- a/ACE/bin/PerlACE/Process_Unix.pm +++ b/ACE/bin/PerlACE/Process_Unix.pm @@ -595,14 +595,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 |