Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:22674 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 8469 invoked by uid 1010); 6 Apr 2006 00:05:36 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 8454 invoked from network); 6 Apr 2006 00:05:36 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 6 Apr 2006 00:05:36 -0000 X-Host-Fingerprint: 67.130.135.29 67-130-135-29.dia.static.qwest.net Received: from ([67.130.135.29:7590] helo=localhost.localdomain) by pb1.pair.com (ecelerity 2.0 beta r(6323M)) with SMTP id 5B/DB-09482-05B54344 for ; Wed, 05 Apr 2006 20:05:36 -0400 Message-ID: <5B.DB.09482.05B54344@pb1.pair.com> To: internals@lists.php.net Date: Wed, 05 Apr 2006 17:05:34 -0700 User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.12) Gecko/20050921 Red Hat/1.7.12-1.1.3.2 X-Accept-Language: en-us, en MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Posted-By: 67.130.135.29 Subject: calling php script from C - pclose problem From: ysidros@adventresources.com (Ysidro) Hello, Posted this message on php-general@lists.php.net and only received a very helpful suggestion to post here, thanks in advance for any additional help... Calling a php script from legacy c code using popen(), works great. Problem: when php script is done, pclose() in c code fails with ECHILD, No child process, wait4() failed. This is because the php script does not hang around to be wait'ed for; any idea how to make a command line php script behave like a normal child process that waits for its parent to get a status via a wait system call?