Permalink
Browse files

Fixed OS check regexp

  • Loading branch information...
1 parent 7eed0bf commit d8a88aae905d4cf5565fcd0d1d2941748cb93560 @DavidKlassen DavidKlassen committed Oct 12, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 Realplexor/Tools.pm
View
2 Realplexor/Tools.pm
@@ -41,7 +41,7 @@ sub rerun_unlimited {
# Returns amount of used memory by pid (in megabytes).
sub get_memory_usage {
my ($pid) = @_;
- my $h = "$^O" =~ /^freebsd|darwin$/ ? " | awk 'NR>1'" : "--no-headers";
+ my $h = "$^O" =~ /^(freebsd|darwin)$/ ? " | awk 'NR>1'" : "--no-headers";
my $mem = `ps -p $pid -o rss $h`;
return 0 if !$mem;
$mem =~ s/\s+//sg;

0 comments on commit d8a88aa

Please sign in to comment.