ID: 41857
Updated by: [EMAIL PROTECTED]
Reported By: charpour at gnet dot gr
-Status: Open
+Status: Assigned
Bug Type: Program Execution
Operating System: Debian 4.0 etch/Slackware 10.2.0
PHP Version: 5.2.3
-Assigned To:
+Assigned To: tony2001
New Comment:
According to Thies' commit comment about the --enable-sigchild option
it is needed when using oracle libs >= 8.1
(see: cvs log -r1.132 configure.in)
Does it still count? And if it does, is this option just for the oracle
stuff? If it is, why not move it into ext/oci8/config.m4 ? (and perhaps
ext/pdo_oci/config.m4 needs it too..)
Previous Comments:
------------------------------------------------------------------------
[2007-06-30 11:49:00] judas dot iscariote at gmail dot com
If you remove --enable-sigchild it will work. do not use that, is not
needed anymore for nothing. ( IIRC was needed for old oracle extension
that is no longer in use)
I only wonder why it has not been removed yet..
------------------------------------------------------------------------
[2007-06-30 00:21:09] thespacefrog at hotmail dot com
I have the same problem with proc_close and I need the sigchild option
to have the script run as a daemon. Is there any chance to fix this?:/
Thanks
------------------------------------------------------------------------
[2007-06-29 21:37:18] charpour at gnet dot gr
Without these options in the configure command works fine (returns
always 0) :
--enable-sigchild --enable-pcntl --enable-shmop --enable-sysvsem
------------------------------------------------------------------------
[2007-06-29 20:52:33] charpour at gnet dot gr
Description:
------------
Sometimes proc_close() returns the expected value "0" but most times
returns -1.
Configure command:
'./configure' '--prefix=/usr/local/php5.2' '--with-mysql'
'--with-mysql-sock' '--with-sqlite' '--enable-sqlite-utf8' '--with-zlib'
'--with-zlib-dir' '--with-bz2'
'--with-config-file-path=/usr/local/php5.2' '--enable-mbstring'
'--enable-sigchild' '--enable-pcntl' '--enable-shmop' '--enable-sysvsem'
'--enable-cli' '--disable-cgi'
Reproduce code:
---------------
<?php
$descriptorspec = array(
0 => array("pipe", "r"),
1 => array("pipe", "w"),
2 => array("file", "/tmp/error-output.txt", "a")
);
$cwd = '/tmp';
$process = proc_open('ls -lap', $descriptorspec, $pipes, $cwd);
if (is_resource($process)) {
fclose($pipes[0]);
echo stream_get_contents($pipes[1]);
fclose($pipes[1]);
$return_value = proc_close($process);
echo "command returned $return_value\n";
}
?>
Expected result:
----------------
command returned 0.
Actual result:
--------------
command returned 0. or command returned -1.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=41857&edit=1