Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:22676 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 734 invoked by uid 1010); 6 Apr 2006 03:53:26 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 718 invoked from network); 6 Apr 2006 03:53:26 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 6 Apr 2006 03:53:26 -0000 X-Host-Fingerprint: 64.233.166.182 pproxy.gmail.com Linux 2.4/2.6 Received: from ([64.233.166.182:50832] helo=pproxy.gmail.com) by pb1.pair.com (ecelerity 2.0 beta r(6323M)) with SMTP id C2/B0-28072-6B094344 for ; Wed, 05 Apr 2006 23:53:26 -0400 Received: by pproxy.gmail.com with SMTP id z59so43323pyg for ; Wed, 05 Apr 2006 20:53:22 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=ASJXuiBciNk8LKzbR/Qe0BhKhvshqnZFSn0btXr3HSDoIcAINv7dHl/etNNMCFg8DWIDW/UFKQqxFYwvaGBUYi6g3Ipc6bBRGy3F51DAaaWQg5Jncjl7vJYC04HNlporzEiiQGmWhk4YOzIKYDbv2YRJHw56+RqKmQd2qAvTbjA= Received: by 10.35.60.15 with SMTP id n15mr485747pyk; Wed, 05 Apr 2006 20:53:22 -0700 (PDT) Received: by 10.35.41.17 with HTTP; Wed, 5 Apr 2006 20:53:22 -0700 (PDT) Message-ID: <4e89b4260604052053v2898e799kbc1a9fe4e954dce5@mail.gmail.com> Date: Wed, 5 Apr 2006 23:53:22 -0400 To: Ysidro Cc: internals@lists.php.net In-Reply-To: <5B.DB.09482.05B54344@pb1.pair.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: <5B.DB.09482.05B54344@pb1.pair.com> Subject: Re: [PHP-DEV] calling php script from C - pclose problem From: kingwez@gmail.com ("Wez Furlong") That doesn't sound right... it's more likely that you're doing something funky in your process (not php) with SIGCHLD so that wait4() misses the event when you pclose. My suggestion: strace your stuff and look for rogue signal() and wait style calls that might be screwing things up. Third party libraries (in particular, OCI) can have this kind of effect. --Wez. On 4/5/06, Ysidro wrote: > 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? > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > >