|
|
5b07b8a |
From 03428d8d7441ed0d6150ea6194bf4cb0ec3c6f12 Mon Sep 17 00:00:00 2001
|
|
|
5b07b8a |
From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar@redhat.com>
|
|
|
5b07b8a |
Date: Fri, 21 Jul 2017 13:47:58 +0200
|
|
|
5b07b8a |
Subject: [PATCH] Replace /bin/ps
|
|
|
5b07b8a |
MIME-Version: 1.0
|
|
|
5b07b8a |
Content-Type: text/plain; charset=UTF-8
|
|
|
5b07b8a |
Content-Transfer-Encoding: 8bit
|
|
|
5b07b8a |
|
|
|
5b07b8a |
Signed-off-by: Petr Písař <ppisar@redhat.com>
|
|
|
5b07b8a |
---
|
|
|
5b07b8a |
Makefile.PL | 4 ++--
|
|
|
5b07b8a |
Process.pm | 8 ++++----
|
|
|
5b07b8a |
2 files changed, 6 insertions(+), 6 deletions(-)
|
|
|
5b07b8a |
|
|
|
5b07b8a |
diff --git a/Makefile.PL b/Makefile.PL
|
|
|
5b07b8a |
index dc1c433..c4081f5 100644
|
|
|
5b07b8a |
--- a/Makefile.PL
|
|
|
5b07b8a |
+++ b/Makefile.PL
|
|
|
5b07b8a |
@@ -2,7 +2,7 @@
|
|
|
5b07b8a |
|
|
|
5b07b8a |
use ExtUtils::MakeMaker;
|
|
|
5b07b8a |
|
|
|
5b07b8a |
-my $ps = $ENV{PS_PATH} || "/bin/ps";
|
|
|
5b07b8a |
+my $ps = $ENV{PS_PATH} || "XXX";
|
|
|
5b07b8a |
|
|
|
5b07b8a |
my $worked = 0;
|
|
|
5b07b8a |
if( -x $ps ) {
|
|
|
5b07b8a |
@@ -15,7 +15,7 @@ if( -x $ps ) {
|
|
|
5b07b8a |
}
|
|
|
5b07b8a |
|
|
|
5b07b8a |
unless( $worked ) {
|
|
|
5b07b8a |
- warn "this module assumes you have a ps program in /bin/ps\n";
|
|
|
5b07b8a |
+ warn "this module assumes you have a ps program in XXX\n";
|
|
|
5b07b8a |
warn "you can override it by setting an environment variable,\n";
|
|
|
5b07b8a |
warn " e.g. PS_PATH=/usr/local/bin/ps; export PS_PATH\n";
|
|
|
5b07b8a |
exit 0;
|
|
|
5b07b8a |
diff --git a/Process.pm b/Process.pm
|
|
|
5b07b8a |
index 5b36fdc..109d6eb 100644
|
|
|
5b07b8a |
--- a/Process.pm
|
|
|
5b07b8a |
+++ b/Process.pm
|
|
|
5b07b8a |
@@ -6,7 +6,7 @@ use Carp;
|
|
|
5b07b8a |
use IPC::System::Simple qw(capturex);
|
|
|
5b07b8a |
|
|
|
5b07b8a |
our $VERSION = '1.3101';
|
|
|
5b07b8a |
-our $PS_PROGRAM = $ENV{PS_PATH} || '/bin/ps';
|
|
|
5b07b8a |
+our $PS_PROGRAM = $ENV{PS_PATH} || 'XXX';
|
|
|
5b07b8a |
our $AUTOLOAD;
|
|
|
5b07b8a |
|
|
|
5b07b8a |
1;
|
|
|
5b07b8a |
@@ -38,7 +38,7 @@ __END__
|
|
|
5b07b8a |
|
|
|
5b07b8a |
=head1 NAME
|
|
|
5b07b8a |
|
|
|
5b07b8a |
-Unix::Process - Perl extension to get pid info from (/bin/ps).
|
|
|
5b07b8a |
+Unix::Process - Perl extension to get pid info from (XXX).
|
|
|
5b07b8a |
|
|
|
5b07b8a |
=head1 SYNOPSIS
|
|
|
5b07b8a |
|
|
|
5b07b8a |
@@ -53,14 +53,14 @@ All fields from the ps command can be fetched by calling a function of their
|
|
|
5b07b8a |
name (see SYNOPSIS). If the pid is not given as an argument to the function,
|
|
|
5b07b8a |
$$ (cur pid) is assumed.
|
|
|
5b07b8a |
|
|
|
5b07b8a |
-This module is really just a giant AUTOLOAD to interact with the /bin/ps
|
|
|
5b07b8a |
+This module is really just a giant AUTOLOAD to interact with the XXX
|
|
|
5b07b8a |
command. I suppose I could be talked into doing something real with it some
|
|
|
5b07b8a |
day.
|
|
|
5b07b8a |
|
|
|
5b07b8a |
You can manually set the C<$Unix::Process::PS_PROGRAM = "/opt/bin/ps"> by hand,
|
|
|
5b07b8a |
or you can set C<$ENV{PS_PATH} = "/usr/local/bin/ps">, but you must somehow
|
|
|
5b07b8a |
instruct Unix::Process on the location of ps. Otherwise, it will guess
|
|
|
5b07b8a |
-C<"/bin/ps">.
|
|
|
5b07b8a |
+C<"XXX">.
|
|
|
5b07b8a |
|
|
|
5b07b8a |
=head1 AUTHOR
|
|
|
5b07b8a |
|
|
|
5b07b8a |
--
|
|
|
5b07b8a |
2.9.4
|
|
|
5b07b8a |
|