proc_open() with pty descriptor type fails with errno 14 on amd64
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
php5 (Ubuntu) |
Fix Released
|
Medium
|
Unassigned |
Bug Description
Binary package hint: php5
On Ubuntu 9.10 (Karmic) i386, the following test script prints "resource(7) of type (process)" as expected, but on amd64 it prints
Warning: proc_open(): failed to open slave pty, errno 14 in /home/jon/test.php on line 11
bool(false)
--
<?php
$shell = '/bin/bash';
$descriptorspec = array(
0 => array('pty'),
1 => array('pty'),
2 => array('pty'),
);
$pipes = array();
$proc = proc_open($shell, $descriptorspec, $pipes); // line 11
var_dump($proc);
if ($proc) {
fclose($pipes[0]);
fclose($pipes[1]);
fclose($pipes[2]);
proc_close($proc);
}
?>
--
The script was run on the command line. php --version prints
PHP 5.2.10-2ubuntu6.4 with Suhosin-Patch 0.9.7 (cli) (built: Jan 6 2010 22:56:44)
Copyright (c) 1997-2009 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2009 Zend Technologies
And apt-cache policy php5-cli prints
php5-cli:
Installed: 5.2.10.
Candidate: 5.2.10.
Version table:
*** 5.2.10.
500 http://
500 http://
100 /var/lib/
5.
500 http://
Able to reproduce it on lucid as well.
Regards
chuck