Bug #71804 [NEW]: proc_close does not return exit code
From: mark at mpen dot ca
Operating system: Ubuntu 14.10
PHP version: 7.0.4
Package: Program Execution
Bug Type: Bug
Bug description:proc_close does not return exit code
Description:
------------
proc_close always return exit code -1 on PHP 7 when it should be 0 (as
it does on PHP 5.6).
$ php7 --version
PHP 7.0.4 (cli) (built: Mar 11 2016 10:54:16) ( NTS )
Copyright (c) 1997-2016 The PHP Group
Zend Engine v3.0.0, Copyright (c) 1998-2016 Zend Technologies
Compiled with:
./configure --with-openssl --with-layout=GNU --with-pear --enable-ftp
--with-mysqli=mysqlnd --with-pdo-mysql=mysqlnd --enable-session
--enable-libxml --enable-xml --with-zlib=yes --enable-mbstring=all
--with-gettext --with-pspell --with-gd --enable-gd-native-ttf
--with-freetype-dir=/usr/local/lib/ --with-jpeg-dir=/usr/local/lib/
--enable-sockets --enable-pcntl --enable-sigchild
--with-mcrypt=/usr/local/lib --enable-posix --enable-dom
--enable-simplexml --with-readline --enable-bcmath
Test script:
---------------
<?php
$proc = proc_open("pwd",[1=>['pipe','w']], $pipes);
var_dump(stream_get_contents($pipes[1]));
fclose($pipes[1]);
var_dump(proc_close($proc));
Expected result:
----------------
Exit code 0
Actual result:
--------------
Exit code -1
--
Edit bug report at https://bugs.php.net/bug.php?id=71804&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=71804&r=trysnapshot54
Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=71804&r=trysnapshot55
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=71804&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=71804&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=71804&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=71804&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=71804&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=71804&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=71804&r=support
Expected behavior: https://bugs.php.net/fix.php?id=71804&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=71804&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=71804&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=71804&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=71804&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=71804&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=71804&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=71804&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=71804&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=71804&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=71804&r=mysqlcfg
Thread (7 messages)
- mark at mpen dot ca