Use UNIX-style 'ps' options everywhere for compatibility

This commit is contained in:
Jason Lawrence 2015-12-31 11:54:05 -06:00
parent c039f2fff7
commit 48d1de5b0c
2 changed files with 6 additions and 6 deletions

8
sanoid
View File

@ -928,7 +928,7 @@ sub checklock {
return 2; return 2;
} }
open PL, "$pscmd p $lockpid -o args= |"; open PL, "$pscmd -p $lockpid -o args= |";
my @processlist = <PL>; my @processlist = <PL>;
close PL; close PL;
@ -980,7 +980,7 @@ sub writelock {
my $pid = $$; my $pid = $$;
open PL, "$pscmd p $$ -o args= |"; open PL, "$pscmd -p $$ -o args= |";
my @processlist = <PL>; my @processlist = <PL>;
close PL; close PL;
@ -998,9 +998,9 @@ sub iszfsbusy {
# return true if busy (currently being sent or received), return false if not. # return true if busy (currently being sent or received), return false if not.
my $fs = shift; my $fs = shift;
# if (args{'debug'}) { print "DEBUG: checking to see if $fs on is already in zfs receive using $pscmd axo args= ...\n"; } # if (args{'debug'}) { print "DEBUG: checking to see if $fs on is already in zfs receive using $pscmd -Ao args= ...\n"; }
open PL, "$pscmd axo args= |"; open PL, "$pscmd -Ao args= |";
my @processes = <PL>; my @processes = <PL>;
close PL; close PL;

View File

@ -458,9 +458,9 @@ sub checkcommands {
sub iszfsbusy { sub iszfsbusy {
my ($rhost,$fs,$isroot) = @_; my ($rhost,$fs,$isroot) = @_;
if ($rhost ne '') { $rhost = "$sshcmd $rhost"; } if ($rhost ne '') { $rhost = "$sshcmd $rhost"; }
if ($debug) { print "DEBUG: checking to see if $fs on $rhost is already in zfs receive using $rhost $pscmd axo args= ...\n"; } if ($debug) { print "DEBUG: checking to see if $fs on $rhost is already in zfs receive using $rhost $pscmd -Ao args= ...\n"; }
open PL, "$rhost $pscmd axo args= |"; open PL, "$rhost $pscmd -Ao args= |";
my @processes = <PL>; my @processes = <PL>;
close PL; close PL;