Issues

ZF-8736: exec command into a process return exit code = -1

Issue Type: Bug Created: 2010-01-07T03:56:29.000+0000 Last Updated: 2012-11-20T21:37:58.000+0000 Status: Open Fix version(s): Reporter: Sébastien Cramatte (scramatte) Assignee: None Tags: - ZendX_Console_Process_Unix

Related issues: Attachments:

Description

If you're trying to use exec in a script that uses signal SIGCHLD, it will return -1 as the exit code of the command (although output is correct!).

<pre class="highlight">
public function start()
    {
        if (!$this->_ipcIsOkay) {
            require_once 'ZendX/Console/Process/Exception.php';
            throw new ZendX_Console_Process_Exception('Unable to create SHM segments for process communications');
        }

        // @see <a href="http://www.php.net/manual/en/function.pcntl-fork.php#41150">http://php.net/manual/en/…</a>
        @ob_end_flush();
        
        pcntl_signal(SIGCHLD, SIG_IGN);
        ...

"pcntl_signal(SIGCHLD, SIG_IGN);" line might be removed or replaced by "pcntl_signal(SIGCHLD, SIG_DFL);" ?

Comments

No comments to display

Have you found an issue?

See the Overview section for more details.

Copyright

© 2006-2016 by Zend, a Rogue Wave Company. Made with by awesome contributors.

This website is built using zend-expressive and it runs on PHP 7.

Contacts