proc_open() with pty descriptor type fails with errno 14 on amd64

Bug #525205 reported by Jon Tai
6
This bug affects 1 person
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.dfsg.1-2ubuntu6.4
  Candidate: 5.2.10.dfsg.1-2ubuntu6.4
  Version table:
 *** 5.2.10.dfsg.1-2ubuntu6.4 0
        500 http://us.archive.ubuntu.com karmic-updates/main Packages
        500 http://security.ubuntu.com karmic-security/main Packages
        100 /var/lib/dpkg/status
     5.2.10.dfsg.1-2ubuntu6 0
        500 http://us.archive.ubuntu.com karmic/main Packages

Revision history for this message
Chuck Short (zulcss) wrote :

Able to reproduce it on lucid as well.

Regards
chuck

Changed in php5 (Ubuntu):
importance: Undecided → Medium
status: New → Triaged
Revision history for this message
Chuck Short (zulcss) wrote :

This has been fixed in lucid.

Regards
chuck

Changed in php5 (Ubuntu):
status: Triaged → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.