|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2016-03-11 19:00 UTC] mark at mpen dot ca
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
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Thu Oct 30 15:00:01 2025 UTC |
Having trouble reproducing. Can you attach strace output for 5.6 and 7? Invoke like: $ strace -ttt -T -f -s1024 -o strace.log php test.php Thanks.