php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #2077 pclose calling waitid() for forked processes
Submitted: 1999-08-16 17:21 UTC Modified: 2000-05-21 18:31 UTC
From: markm at dct dot com Assigned:
Status: Closed Package: Performance problem
PHP Version: 3.0.11 OS: Solaris 2.6
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: markm at dct dot com
New email:
PHP Version: OS:

 

 [1999-08-16 17:21 UTC] markm at dct dot com
I have noticed by browsing through truss files that when pclose is called after a popen, waitid is called.  I can understand why, since pclose returns the status of the process exec'ed off by popen.  This does become a burden, however when the exec'ed process takes some time to run.  For example, in many thinks I have been doing, I have been using popen to open a pipe to sendmail, and send out mail.  When pclose is then called, it takes anywhere from 5 to 6 seconds to fufill that function call.  This takes place for EACH pclose call, which can significantly slow down the loading of a web page.

I'd like to maybe suggest a second argument to pclose, which would be a boolean, as to whether or not the programmer wants the exit status of the exec'ed process, or pclose itself.  The default value could have pclose work the way it currently does.  This would allow those of us who run into this problem an easy speed workaround.


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2000-05-21 18:31 UTC] jimw at cvs dot php dot net
if you want the program to run in the background, background
it with '&'.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Mon Apr 29 06:01:29 2024 UTC