PHP  
 PHP_5_4
downloads | QA | documentation | faq | getting help | mailing lists | reporting bugs | php.net sites | links | my php.net 
 

Test Failure Report for ext/standard/tests/general_functions/proc_open02.phpt ('proc_open')

Script

1: <?php
2: $ds 
= array(array('pipe''r'));
3:
4:
$cat proc_open(
5:     
'/bin/sleep 2',
6:     
$ds,
7:     
$pipes
8:
);
9:
10:
usleep(20000); // let the OS run the sleep process before sending the signal
11:
12:
var_dump(proc_terminate($cat0)); // status check
13:
usleep(20000);
14:
var_dump(proc_get_status($cat));
15:
16:
var_dump(proc_terminate($cat)); // now really quit it
17:
usleep(20000);
18:
var_dump(proc_get_status($cat));
19:
20:
proc_close($cat);
21:
22: echo 
"Done!\n";
23:
24:
?>
25:

Expected

bool(true)
array(8) {
  ["command"]=>
  string(12) "/bin/sleep 2"
  ["pid"]=>
  int(%d)
  ["running"]=>
  bool(true)
  ["signaled"]=>
  bool(false)
  ["stopped"]=>
  bool(false)
  ["exitcode"]=>
  int(-1)
  ["termsig"]=>
  int(0)
  ["stopsig"]=>
  int(0)
}
bool(true)
array(8) {
  ["command"]=>
  string(12) "/bin/sleep 2"
  ["pid"]=>
  int(%d)
  ["running"]=>
  bool(false)
  ["signaled"]=>
  bool(true)
  ["stopped"]=>
  bool(false)
  ["exitcode"]=>
  int(-1)
  ["termsig"]=>
  int(15)
  ["stopsig"]=>
  int(0)
}
Done!

Output

bool(true)
array(8) {
  ["command"]=>
  string(12) "/bin/sleep 2"
  ["pid"]=>
  int(5661)
  ["running"]=>
  bool(true)
  ["signaled"]=>
  bool(false)
  ["stopped"]=>
  bool(false)
  ["exitcode"]=>
  int(-1)
  ["termsig"]=>
  int(0)
  ["stopsig"]=>
  int(0)
}
bool(true)
array(8) {
  ["command"]=>
  string(12) "/bin/sleep 2"
  ["pid"]=>
  int(5661)
  ["running"]=>
  bool(true)
  ["signaled"]=>
  bool(false)
  ["stopped"]=>
  bool(false)
  ["exitcode"]=>
  int(-1)
  ["termsig"]=>
  int(0)
  ["stopsig"]=>
  int(0)
}
Done!

Diff

027+   bool(true)
028+   ["signaled"]=>
028-   ["signaled"]=>
029-   bool(true)
035+   int(0)
035-   int(15)

 

Generated at Tue, 15 Jul 2014 20:53:37 +0000 (8 days ago)

Copyright © 2005-2014 The PHP Group
All rights reserved.