Subject: | output from ps is different on Cygwin |
Thte output from ps is different on Cygwin, so the test fails due to that. However, the /proc/<pid>/statm interface works and is generally preferrable when it exists.
Subject: | perl-IO-Socket-SSL.src1.patch |
--- origsrc/IO-Socket-SSL-2.015/t/memleak_bad_handshake.t 2015-04-17 14:06:34.000000000 +0200
+++ src/IO-Socket-SSL-2.015/t/memleak_bad_handshake.t 2015-05-23 22:02:45.936309200 +0200
@@ -84,7 +84,7 @@ exit;
sub getsize {
my $pid = shift;
- open( my $ps,'-|',"ps -o vsize -p $pid 2>/dev/null" ) or return;
- $ps && <$ps> or return; # header
- return int(<$ps>); # size
+ open my $STATM, "</proc/$pid/statm" || die "Cannot open /proc/$pid/statm!\n";
+ my @data = <$STATM>; @_ = split '', "@data";
+ return int($_[0]);
}